1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-05 09:20:04 +00:00

Spelling sdk

Closes https://github.com/dart-lang/sdk/pull/50918

Co-authored-by: Josh Soref <jsoref@gmail.com>
GitOrigin-RevId: 1fd275051c561b63d374fb47e76a22424c4a12a9
Change-Id: I97790d9c79ff659f2c1fa2d2d46d041fe67957cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278530
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
This commit is contained in:
Alexander Thomas 2023-01-20 12:37:49 +00:00 committed by Commit Queue
parent a675b7e005
commit b9b6511ca6
48 changed files with 75 additions and 75 deletions

View File

@ -2607,7 +2607,7 @@ Updated the Linter to `0.1.129`, which includes:
`pubspec.lock` for `package_foo`, allowing users to only upgrade a subset of `pubspec.lock` for `package_foo`, allowing users to only upgrade a subset of
dependencies. dependencies.
- New command `dart pub login` that logs in to pub.dev. - New command `dart pub login` that logs into pub.dev.
- The `--server` option to `dart pub publish` and `dart pub uploader` are - The `--server` option to `dart pub publish` and `dart pub uploader` are
deprecated. Use `publish_to` in your `pubspec.yaml` or set the deprecated. Use `publish_to` in your `pubspec.yaml` or set the

View File

@ -51,7 +51,7 @@ class Benchmark extends BenchmarkBase {
if (b.bitLength < bits) { if (b.bitLength < bits) {
restartDelta += seed >> 20; restartDelta += seed >> 20;
restartDelta += BigInt.one; restartDelta += BigInt.one;
// Restart from a slighly reduced seed to generate different numbers. // Restart from a slightly reduced seed to generate different numbers.
b = seed - restartDelta; b = seed - restartDelta;
} }
var string = b.toString(); var string = b.toString();

View File

@ -12,7 +12,7 @@ abstract class EfficientLengthIterable<T> extends Iterable<T> {
/// Creates errors throw by [Iterable] when the element count is wrong. /// Creates errors throw by [Iterable] when the element count is wrong.
abstract class IterableElementError { abstract class IterableElementError {
/// Error thrown thrown by, e.g., [Iterable.first] when there is no result. /// Error thrown by, e.g., [Iterable.first] when there is no result.
static StateError noElement() => StateError("No element"); static StateError noElement() => StateError("No element");
/// Error thrown by, e.g., [Iterable.single] if there are too many results. /// Error thrown by, e.g., [Iterable.single] if there are too many results.

View File

@ -15,7 +15,7 @@ abstract class EfficientLengthIterable<T> extends Iterable<T> {
/// Creates errors throw by [Iterable] when the element count is wrong. /// Creates errors throw by [Iterable] when the element count is wrong.
abstract class IterableElementError { abstract class IterableElementError {
/// Error thrown thrown by, e.g., [Iterable.first] when there is no result. /// Error thrown by, e.g., [Iterable.first] when there is no result.
static StateError noElement() => StateError("No element"); static StateError noElement() => StateError("No element");
/// Error thrown by, e.g., [Iterable.single] if there are too many results. /// Error thrown by, e.g., [Iterable.single] if there are too many results.

View File

@ -1379,7 +1379,7 @@ class Parser {
bool recover = false; bool recover = false;
if (optional(';', endGroup.next!)) { if (optional(';', endGroup.next!)) {
// Missing parenthesis. Insert them. // Missing parenthesis. Insert them.
// Turn "<whatever>;" in to "<whatever>();" // Turn "<whatever>;" into "<whatever>();"
// Insert missing 'Function' below. // Insert missing 'Function' below.
reportRecoverableError(endGroup, reportRecoverableError(endGroup,
missingParameterMessage(MemberKind.FunctionTypeAlias)); missingParameterMessage(MemberKind.FunctionTypeAlias));

View File

@ -1967,7 +1967,7 @@ a:focus, a:hover {
<p> <p>
The client is expected to check this list against the The client is expected to check this list against the
<tt>ElementKind</tt> sent in <tt>IncludedSuggestionSet</tt> to decide <tt>ElementKind</tt> sent in <tt>IncludedSuggestionSet</tt> to decide
whether or not these symbols should should be presented to the user. whether or not these symbols should be presented to the user.
</p> </p>
</dd><dt class="field"><b>includedSuggestionRelevanceTags: List&lt;<a href="#type_IncludedSuggestionRelevanceTag">IncludedSuggestionRelevanceTag</a>&gt;<span style="color:#999999"> (optional)</span></b></dt><dd> </dd><dt class="field"><b>includedSuggestionRelevanceTags: List&lt;<a href="#type_IncludedSuggestionRelevanceTag">IncludedSuggestionRelevanceTag</a>&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
@ -5912,7 +5912,7 @@ a:focus, a:hover {
<p> <p>
The indexes of the items representing the mixins The indexes of the items representing the mixins
referenced by this class. The list will be empty if referenced by this class. The list will be empty if
there are no classes mixed in to this class. there are no classes mixed into this class.
</p> </p>
</dd><dt class="field"><b>subclasses: List&lt;int&gt;</b></dt><dd> </dd><dt class="field"><b>subclasses: List&lt;int&gt;</b></dt><dd>

View File

@ -5295,8 +5295,8 @@ class CompletionResultsParams implements HasToJson {
List<IncludedSuggestionSet>? includedSuggestionSets; List<IncludedSuggestionSet>? includedSuggestionSets;
/// The client is expected to check this list against the ElementKind sent in /// The client is expected to check this list against the ElementKind sent in
/// IncludedSuggestionSet to decide whether or not these symbols should /// IncludedSuggestionSet to decide whether or not these symbols should be
/// should be presented to the user. /// presented to the user.
List<ElementKind>? includedElementKinds; List<ElementKind>? includedElementKinds;
/// The client is expected to check this list against the values of the field /// The client is expected to check this list against the values of the field
@ -16478,7 +16478,7 @@ class TypeHierarchyItem implements HasToJson {
List<int> interfaces; List<int> interfaces;
/// The indexes of the items representing the mixins referenced by this /// The indexes of the items representing the mixins referenced by this
/// class. The list will be empty if there are no classes mixed in to this /// class. The list will be empty if there are no classes mixed into this
/// class. /// class.
List<int> mixins; List<int> mixins;

View File

@ -1254,7 +1254,7 @@ abstract class IntegrationTestMixin {
/// ///
/// The client is expected to check this list against the ElementKind sent /// The client is expected to check this list against the ElementKind sent
/// in IncludedSuggestionSet to decide whether or not these symbols should /// in IncludedSuggestionSet to decide whether or not these symbols should
/// should be presented to the user. /// be presented to the user.
/// ///
/// includedSuggestionRelevanceTags: List<IncludedSuggestionRelevanceTag> /// includedSuggestionRelevanceTags: List<IncludedSuggestionRelevanceTag>
/// (optional) /// (optional)

View File

@ -68,7 +68,7 @@ public class TypeHierarchyItem {
/** /**
* The indexes of the items representing the mixins referenced by this class. The list will be * The indexes of the items representing the mixins referenced by this class. The list will be
* empty if there are no classes mixed in to this class. * empty if there are no classes mixed into this class.
*/ */
private final int[] mixins; private final int[] mixins;
@ -173,7 +173,7 @@ public class TypeHierarchyItem {
/** /**
* The indexes of the items representing the mixins referenced by this class. The list will be * The indexes of the items representing the mixins referenced by this class. The list will be
* empty if there are no classes mixed in to this class. * empty if there are no classes mixed into this class.
*/ */
public int[] getMixins() { public int[] getMixins() {
return mixins; return mixins;

View File

@ -1842,7 +1842,7 @@
<p> <p>
The client is expected to check this list against the The client is expected to check this list against the
<tt>ElementKind</tt> sent in <tt>IncludedSuggestionSet</tt> to decide <tt>ElementKind</tt> sent in <tt>IncludedSuggestionSet</tt> to decide
whether or not these symbols should should be presented to the user. whether or not these symbols should be presented to the user.
</p> </p>
</field> </field>
<field name="includedSuggestionRelevanceTags" optional="true"> <field name="includedSuggestionRelevanceTags" optional="true">
@ -5471,7 +5471,7 @@
<p> <p>
The indexes of the items representing the mixins The indexes of the items representing the mixins
referenced by this class. The list will be empty if referenced by this class. The list will be empty if
there are no classes mixed in to this class. there are no classes mixed into this class.
</p> </p>
</field> </field>
<field name="subclasses"> <field name="subclasses">

View File

@ -5295,8 +5295,8 @@ class CompletionResultsParams implements HasToJson {
List<IncludedSuggestionSet>? includedSuggestionSets; List<IncludedSuggestionSet>? includedSuggestionSets;
/// The client is expected to check this list against the ElementKind sent in /// The client is expected to check this list against the ElementKind sent in
/// IncludedSuggestionSet to decide whether or not these symbols should /// IncludedSuggestionSet to decide whether or not these symbols should be
/// should be presented to the user. /// presented to the user.
List<ElementKind>? includedElementKinds; List<ElementKind>? includedElementKinds;
/// The client is expected to check this list against the values of the field /// The client is expected to check this list against the values of the field
@ -16478,7 +16478,7 @@ class TypeHierarchyItem implements HasToJson {
List<int> interfaces; List<int> interfaces;
/// The indexes of the items representing the mixins referenced by this /// The indexes of the items representing the mixins referenced by this
/// class. The list will be empty if there are no classes mixed in to this /// class. The list will be empty if there are no classes mixed into this
/// class. /// class.
List<int> mixins; List<int> mixins;

View File

@ -1506,7 +1506,7 @@ class ParserTestCase with ParserTestHelpers implements AbstractParserTestCase {
/// Helper methods that aid in parser tests. /// Helper methods that aid in parser tests.
/// ///
/// Intended to be mixed in to parser test case classes. /// Intended to be mixed into parser test case classes.
mixin ParserTestHelpers { mixin ParserTestHelpers {
ExpectedError error(ErrorCode code, int offset, int length, ExpectedError error(ErrorCode code, int offset, int length,
{Pattern? correctionContains, {Pattern? correctionContains,

View File

@ -150,7 +150,7 @@ class D<T extends B> {}
]); ]);
} }
test_indirect_notInstantiatedt() async { test_indirect_notInstantiated() async {
await assertErrorsInCode(r''' await assertErrorsInCode(r'''
class A<K, V extends K> {} class A<K, V extends K> {}
class C<T extends List<A>> {} class C<T extends List<A>> {}

View File

@ -288,7 +288,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder {
final Set<ClassEntity> _interceptedClasses = {}; final Set<ClassEntity> _interceptedClasses = {};
/// Set of classes used as mixins on intercepted (native and primitive) /// Set of classes used as mixins on intercepted (native and primitive)
/// classes. Methods on these classes might also be mixed in to regular Dart /// classes. Methods on these classes might also be mixed into regular Dart
/// (unintercepted) classes. /// (unintercepted) classes.
final Set<ClassEntity> _classesMixedIntoInterceptedClasses = {}; final Set<ClassEntity> _classesMixedIntoInterceptedClasses = {};

View File

@ -411,7 +411,7 @@ Future<Output?> run(Input input) async {
moduleLibraries, initializedCompilerState); moduleLibraries, initializedCompilerState);
} }
/// Registers with the dart2js compiler all sources embeded in a kernel /// Registers with the dart2js compiler all sources embedded in a kernel
/// component. This may include sources that were read from disk directly as /// component. This may include sources that were read from disk directly as
/// files, but also sources that were embedded in binary `.dill` files (like the /// files, but also sources that were embedded in binary `.dill` files (like the
/// platform kernel file and kernel files from modular compilation pipelines). /// platform kernel file and kernel files from modular compilation pipelines).

View File

@ -475,7 +475,7 @@ class TimeoutMomentum implements Momentum {
if (_moves.isNotEmpty) { if (_moves.isNotEmpty) {
final move = _moves.first; final move = _moves.first;
// This is a workaround for the ugly hacks that get applied when a user // This is a workaround for the ugly hacks that get applied when a user
// passed a velocity in to this Momentum implementation. // passed a velocity into this Momentum implementation.
num velocityScale = SingleDimensionPhysics._MS_PER_FRAME * num velocityScale = SingleDimensionPhysics._MS_PER_FRAME *
SingleDimensionPhysics._INITIAL_VELOCITY_BOOST_FACTOR; SingleDimensionPhysics._INITIAL_VELOCITY_BOOST_FACTOR;
velocity = Coordinate(move.vx / velocityScale, move.vy / velocityScale); velocity = Coordinate(move.vx / velocityScale, move.vy / velocityScale);

View File

@ -187,12 +187,12 @@ $mainSource
// Classes that are expected to be instantiated by default. `Object` and // Classes that are expected to be instantiated by default. `Object` and
// `Interceptor` are base types for non-native and native types, and // `Interceptor` are base types for non-native and native types, and
// `JavaScriptObject` is the base type for `dart:html` types. // `JavaScriptObject` is the base type for `dart:html` types.
var insantiatedBaseClasses = [ var instantiatedBaseClasses = [
'Object', 'Object',
'Interceptor', 'Interceptor',
'JavaScriptObject' 'JavaScriptObject'
]; ];
if (!isInstantiated && !insantiatedBaseClasses.contains(name)) { if (!isInstantiated && !instantiatedBaseClasses.contains(name)) {
Expect.isFalse( Expect.isFalse(
world.classHierarchy.isInstantiated(cls), world.classHierarchy.isInstantiated(cls),
"Expected $name to be uninstantiated in `${mainSource}`:" "Expected $name to be uninstantiated in `${mainSource}`:"

View File

@ -181,12 +181,12 @@ $mainSource
// Classes that are expected to be instantiated by default. `Object` and // Classes that are expected to be instantiated by default. `Object` and
// `Interceptor` are base types for non-native and native types, and // `Interceptor` are base types for non-native and native types, and
// `JavaScriptObject` is the base type for `dart:html` types. // `JavaScriptObject` is the base type for `dart:html` types.
var insantiatedBaseClasses = [ var instantiatedBaseClasses = [
'Object', 'Object',
'Interceptor', 'Interceptor',
'JavaScriptObject' 'JavaScriptObject'
]; ];
if (!isInstantiated && !insantiatedBaseClasses.contains(name)) { if (!isInstantiated && !instantiatedBaseClasses.contains(name)) {
Expect.isFalse( Expect.isFalse(
world.classHierarchy.isInstantiated(cls), world.classHierarchy.isInstantiated(cls),
"Expected $name to be uninstantiated in `${mainSource}`:" "Expected $name to be uninstantiated in `${mainSource}`:"

View File

@ -375,13 +375,13 @@ class CodeGenerator {
: <String, JsonType>{}; : <String, JsonType>{};
// Skip creation of Request sub-classes, as we don't use these we just // Skip creation of Request sub-classes, as we don't use these we just
// pass the arguments in to the method directly. // pass the arguments into the method directly.
if (name != 'Request' && name.endsWith('Request')) { if (name != 'Request' && name.endsWith('Request')) {
continue; continue;
} }
// Skip creation of Event sub-classes, as we don't use these we just // Skip creation of Event sub-classes, as we don't use these we just
// pass the body in to sendEvent directly. // pass the body into sendEvent directly.
if (name != 'Event' && name.endsWith('Event')) { if (name != 'Event' && name.endsWith('Event')) {
continue; continue;
} }

View File

@ -87,7 +87,7 @@ class CompilerOptions {
/// URI of the SDK summary file (typically a "file:" URI). /// URI of the SDK summary file (typically a "file:" URI).
/// ///
/// This should should be a summary previously generated by this package (and /// This should be a summary previously generated by this package (and
/// not the similarly named summary files from `package:analyzer`.) /// not the similarly named summary files from `package:analyzer`.)
/// ///
/// If `null` and [compileSdk] is false, the SDK summary will be searched for /// If `null` and [compileSdk] is false, the SDK summary will be searched for
@ -277,7 +277,7 @@ class CompilerOptions {
allowedExperimentalFlags: allowedExperimentalFlagsForTesting); allowedExperimentalFlags: allowedExperimentalFlagsForTesting);
/// Returns the minimum language version needed for a library with the given /// Returns the minimum language version needed for a library with the given
/// [importUri] to opt in to the experiment with the given [flag]. /// [importUri] to opt into the experiment with the given [flag].
/// ///
/// Note that the experiment might not be enabled at all for the library, as /// Note that the experiment might not be enabled at all for the library, as
/// computed by [isExperimentEnabledInLibrary]. /// computed by [isExperimentEnabledInLibrary].

View File

@ -378,7 +378,7 @@ class ProcessedOptions {
flags.GlobalFeatures get globalFeatures => _raw.globalFeatures; flags.GlobalFeatures get globalFeatures => _raw.globalFeatures;
/// Returns the minimum language version needed for a library with the given /// Returns the minimum language version needed for a library with the given
/// [importUri] to opt in to the experiment with the given [flag]. /// [importUri] to opt into the experiment with the given [flag].
/// ///
/// Note that the experiment might not be enabled at all for the library, as /// Note that the experiment might not be enabled at all for the library, as
/// computed by [isExperimentEnabledInLibrary]. /// computed by [isExperimentEnabledInLibrary].

View File

@ -256,7 +256,7 @@ abstract class CombinedMemberSignatureBase<T> {
/// // void method({covariant int named}) -> Mixin.method /// // void method({covariant int named}) -> Mixin.method
/// } /// }
/// class SubClass extends Class { /// class SubClass extends Class {
/// // This is a valid override since `Class.method` should should /// // This is a valid override since `Class.method` should
/// // not be considered as _not_ having a required named parameter - /// // not be considered as _not_ having a required named parameter -
/// // it is legacy and doesn't know about required named parameters. /// // it is legacy and doesn't know about required named parameters.
/// void method({required int named}) {} /// void method({required int named}) {}

View File

@ -168,7 +168,7 @@ Iterable<LintingError> lintSectionEntryDuplicates(StatusSection section) {
/// [ strong ] /// [ strong ]
/// [ $compiler == dart2js ] /// [ $compiler == dart2js ]
/// ///
/// which should should become: /// which should become:
/// ///
/// [ $compiler == dart2js ] /// [ $compiler == dart2js ]
/// [ $mode == debug ] /// [ $mode == debug ]

View File

@ -1972,7 +1972,7 @@ DART_EXPORT Dart_Handle Dart_FunctionName(Dart_Handle function);
DART_EXPORT Dart_Handle Dart_FunctionOwner(Dart_Handle function); DART_EXPORT Dart_Handle Dart_FunctionOwner(Dart_Handle function);
/** /**
* Determines whether a function handle referes to a static function * Determines whether a function handle refers to a static function
* of method. * of method.
* *
* For the purposes of the embedding API, a top-level function is * For the purposes of the embedding API, a top-level function is

View File

@ -41,7 +41,7 @@ bool MatchesPattern(uword end, const int16_t* pattern, intptr_t size) {
// instructions with trap instructions, which can cause this test to fail. // instructions with trap instructions, which can cause this test to fail.
// //
// Ignoring trap instructions would work well enough within GDB alone, but it // Ignoring trap instructions would work well enough within GDB alone, but it
// doesn't work in RR, because the check for the trap instrution itself will // doesn't work in RR, because the check for the trap instruction itself will
// cause replay to diverge from the original record. // cause replay to diverge from the original record.
if (FLAG_support_rr) return true; if (FLAG_support_rr) return true;

View File

@ -1212,9 +1212,9 @@ class Assembler : public AssemblerBase {
void Breakpoint() override { int3(); } void Breakpoint() override { int3(); }
// Check if the given value is an integer value that can be directly // Check if the given value is an integer value that can be directly
// emdedded into the code without additional XORing with jit_cookie. // embedded into the code without additional XORing with jit_cookie.
// We consider 16-bit integers, powers of two and corresponding masks // We consider 16-bit integers, powers of two and corresponding masks
// as safe values that can be emdedded into the code object. // as safe values that can be embedded into the code object.
static bool IsSafeSmi(const Object& object) { static bool IsSafeSmi(const Object& object) {
if (!target::IsSmi(object)) { if (!target::IsSmi(object)) {
return false; return false;

View File

@ -207,7 +207,7 @@ intptr_t BaseMarshaller::NumDefinitions(intptr_t arg_index) const {
} }
ASSERT(loc.IsStack()); ASSERT(loc.IsStack());
// For stack, word size definitions in IL. In FFI calls passed in to the // For stack, word size definitions in IL. In FFI calls passed into the
// native call, in FFI callbacks read in separate NativeParams. // native call, in FFI callbacks read in separate NativeParams.
const intptr_t size_in_bytes = type.SizeInBytes(); const intptr_t size_in_bytes = type.SizeInBytes();
const intptr_t num_defs = const intptr_t num_defs =

View File

@ -180,7 +180,7 @@ class CallMarshaller : public BaseMarshaller {
// The location of the inputs to the IL FfiCall instruction. // The location of the inputs to the IL FfiCall instruction.
dart::Location LocInFfiCall(intptr_t def_index_global) const; dart::Location LocInFfiCall(intptr_t def_index_global) const;
// Allocate a TypedData before the FfiCall and pass it in to the FfiCall so // Allocate a TypedData before the FfiCall and pass it into the FfiCall so
// that it can be populated in assembly. // that it can be populated in assembly.
bool PassTypedData() const; bool PassTypedData() const;
intptr_t TypedDataSizeInBytes() const; intptr_t TypedDataSizeInBytes() const;

View File

@ -3294,7 +3294,7 @@ DART_EXPORT Dart_Handle Dart_ListLength(Dart_Handle list, intptr_t* len) {
if ((index >= 0) && (index < array_obj.Length())) { \ if ((index >= 0) && (index < array_obj.Length())) { \
return Api::NewHandle(thread, array_obj.At(index)); \ return Api::NewHandle(thread, array_obj.At(index)); \
} \ } \
return Api::NewError("Invalid index passed in to access list element"); return Api::NewError("Invalid index passed into access list element");
DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list, intptr_t index) { DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list, intptr_t index) {
DARTSCOPE(Thread::Current()); DARTSCOPE(Thread::Current());
@ -3327,7 +3327,7 @@ DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list, intptr_t index) {
} \ } \
return Api::Success(); \ return Api::Success(); \
} \ } \
return Api::NewError("Invalid offset/length passed in to access list"); return Api::NewError("Invalid offset/length passed into access list");
DART_EXPORT Dart_Handle Dart_ListGetRange(Dart_Handle list, DART_EXPORT Dart_Handle Dart_ListGetRange(Dart_Handle list,
intptr_t offset, intptr_t offset,
@ -3380,7 +3380,7 @@ DART_EXPORT Dart_Handle Dart_ListGetRange(Dart_Handle list,
array.SetAt(index, value_obj); \ array.SetAt(index, value_obj); \
return Api::Success(); \ return Api::Success(); \
} \ } \
return Api::NewError("Invalid index passed in to set list element"); return Api::NewError("Invalid index passed into set list element");
DART_EXPORT Dart_Handle Dart_ListSetAt(Dart_Handle list, DART_EXPORT Dart_Handle Dart_ListSetAt(Dart_Handle list,
intptr_t index, intptr_t index,
@ -3499,7 +3499,7 @@ static ObjectPtr ThrowArgumentError(const char* exception_message) {
} \ } \
return Api::Success(); \ return Api::Success(); \
} \ } \
return Api::NewError("Invalid length passed in to access array elements"); return Api::NewError("Invalid length passed into access array elements");
DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list, DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list,
intptr_t offset, intptr_t offset,
@ -3516,7 +3516,7 @@ DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list,
reinterpret_cast<uint8_t*>(array.DataAddr(offset)), length); reinterpret_cast<uint8_t*>(array.DataAddr(offset)), length);
return Api::Success(); return Api::Success();
} }
return Api::NewError("Invalid length passed in to access list elements"); return Api::NewError("Invalid length passed into access list elements");
} }
} }
if (obj.IsArray()) { if (obj.IsArray()) {
@ -3578,7 +3578,7 @@ DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list,
} \ } \
return Api::Success(); \ return Api::Success(); \
} \ } \
return Api::NewError("Invalid length passed in to set array elements"); return Api::NewError("Invalid length passed into set array elements");
DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list, DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list,
intptr_t offset, intptr_t offset,
@ -3595,7 +3595,7 @@ DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list,
native_array, length); native_array, length);
return Api::Success(); return Api::Success();
} }
return Api::NewError("Invalid length passed in to access list elements"); return Api::NewError("Invalid length passed into access list elements");
} }
} }
if (obj.IsArray() && !Array::Cast(obj).IsImmutable()) { if (obj.IsArray() && !Array::Cast(obj).IsImmutable()) {
@ -5026,7 +5026,7 @@ DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj,
RETURN_TYPE_ERROR(thread->zone(), obj, Instance); RETURN_TYPE_ERROR(thread->zone(), obj, Instance);
} }
return Api::NewError( return Api::NewError(
"%s: invalid index %d passed in to access native instance field", "%s: invalid index %d passed into access native instance field",
CURRENT_FUNC, index); CURRENT_FUNC, index);
} }
@ -5040,7 +5040,7 @@ DART_EXPORT Dart_Handle Dart_SetNativeInstanceField(Dart_Handle obj,
} }
if (!instance.IsValidNativeIndex(index)) { if (!instance.IsValidNativeIndex(index)) {
return Api::NewError( return Api::NewError(
"%s: invalid index %d passed in to set native instance field", "%s: invalid index %d passed into set native instance field",
CURRENT_FUNC, index); CURRENT_FUNC, index);
} }
instance.SetNativeField(index, value); instance.SetNativeField(index, value);

View File

@ -118,7 +118,7 @@ class ReadStream : public ValueObject {
current_ = reinterpret_cast<const uint8_t*>(cursor); current_ = reinterpret_cast<const uint8_t*>(cursor);
// With big-endian order and the has-more marker being 0, the correction // With big-endian order and the has-more marker being 0, the correction
// factor to remove the last-byte marker is a constant, which can be folded // factor to remove the last-byte marker is a constant, which can be folded
// in to subsequent load offsets. // into subsequent load offsets.
return result + 128; return result + 128;
} }

View File

@ -564,7 +564,7 @@ class ImageWriter : public ValueObject {
SnapshotTextObjectNamer namer_; SnapshotTextObjectNamer namer_;
// Reserve two postive labels for each of the ProgramSection values (one for // Reserve two positive labels for each of the ProgramSection values (one for
// vm, one for isolate). // vm, one for isolate).
intptr_t next_label_ = 1 + 2 * kNumProgramSections; intptr_t next_label_ = 1 + 2 * kNumProgramSections;
#endif #endif

View File

@ -1325,9 +1325,9 @@ void RegisterTypeArgumentsUse(const Function& function,
// This is an approximation: If we only know the type, but not the cid, we // This is an approximation: If we only know the type, but not the cid, we
// might have a this-dispatch where we know it's either this class or any // might have a this-dispatch where we know it's either this class or any
// subclass. // subclass.
// We try to strengthen this assumption further down by checking the offset // We try to strengthen this assumption further down by checking the
// of the type argument vector, but generally speaking this could be a // offset of the type argument vector, but generally speaking this could
// false-postive, which is still ok! // be a false-positive, which is still ok!
const AbstractType& type = *instance->Type()->ToAbstractType(); const AbstractType& type = *instance->Type()->ToAbstractType();
if (type.IsType()) { if (type.IsType()) {
const Class& type_class = Class::Handle(type.type_class()); const Class& type_class = Class::Handle(type.type_class());
@ -1509,7 +1509,7 @@ void TypeUsageInfo::UseTypeArgumentsInInstanceCreation(
// of type arguments the class expects. // of type arguments the class expects.
ASSERT(ta.IsNull() || klass.NumTypeArguments() <= ta.Length()); ASSERT(ta.IsNull() || klass.NumTypeArguments() <= ta.Length());
// If this is a non-instantiated [TypeArguments] object, then it referes to // If this is a non-instantiated [TypeArguments] object, then it refers to
// type parameters. We need to ensure the type parameters in [ta] only // type parameters. We need to ensure the type parameters in [ta] only
// refer to type parameters in the class. // refer to type parameters in the class.
if (!ta.IsNull() && !ta.IsInstantiated() && if (!ta.IsNull() && !ta.IsInstantiated() &&

View File

@ -84,7 +84,7 @@ struct MultiCharacterSpecialCase {
// Look up the mapping for the given character in the specified table, // Look up the mapping for the given character in the specified table,
// which is of the specified length and uses the specified special case // which is of the specified length and uses the specified special case
// mapping for multi-char mappings. The next parameter is the character // mapping for multi-char mappings. The next parameter is the character
// following the one to map. The result will be written in to the result // following the one to map. The result will be written into the result
// buffer and the number of characters written will be returned. Finally, // buffer and the number of characters written will be returned. Finally,
// if the allow_caching_ptr is non-null then false will be stored in // if the allow_caching_ptr is non-null then false will be stored in
// it if the result contains multiple characters or depends on the // it if the result contains multiple characters or depends on the

View File

@ -1496,7 +1496,7 @@ class _BigIntImpl implements BigInt {
*/ */
_BigIntImpl operator <<(int shiftAmount) { _BigIntImpl operator <<(int shiftAmount) {
if (shiftAmount < 0) { if (shiftAmount < 0) {
throw ArgumentError("shift-amount must be posititve $shiftAmount"); throw ArgumentError("shift-amount must be positive $shiftAmount");
} }
if (_isZero) return this; if (_isZero) return this;
final digitShift = shiftAmount ~/ _digitBits; final digitShift = shiftAmount ~/ _digitBits;
@ -1560,7 +1560,7 @@ class _BigIntImpl implements BigInt {
*/ */
_BigIntImpl operator >>(int shiftAmount) { _BigIntImpl operator >>(int shiftAmount) {
if (shiftAmount < 0) { if (shiftAmount < 0) {
throw ArgumentError("shift-amount must be posititve $shiftAmount"); throw ArgumentError("shift-amount must be positive $shiftAmount");
} }
if (_isZero) return this; if (_isZero) return this;
final digitShift = shiftAmount ~/ _digitBits; final digitShift = shiftAmount ~/ _digitBits;

View File

@ -22,7 +22,7 @@ throwDeferredIsLoadedError(
throw DeferredNotLoadedError(enclosingLibrary, importPrefix); throw DeferredNotLoadedError(enclosingLibrary, importPrefix);
} }
// TODO(nshahan) Cleanup embeded strings and extract file location at runtime // TODO(nshahan) Cleanup embedded strings and extract file location at runtime
// from the stacktrace. // from the stacktrace.
assertFailed(String? message, assertFailed(String? message,
[String? fileUri, int? line, int? column, String? conditionSource]) { [String? fileUri, int? line, int? column, String? conditionSource]) {

View File

@ -595,7 +595,7 @@ class LibraryModuleFormatter implements Formatter {
var libraryNames = dart.getModuleName(object)!.split('/'); var libraryNames = dart.getModuleName(object)!.split('/');
// Library names are received with a repeat directory name, so strip the // Library names are received with a repeat directory name, so strip the
// last directory entry here to make the path cleaner. For example, the // last directory entry here to make the path cleaner. For example, the
// library "third_party/dart/utf/utf" shoud display as // library "third_party/dart/utf/utf" should display as
// "third_party/dart/utf/". // "third_party/dart/utf/".
if (libraryNames.length > 1 && if (libraryNames.length > 1 &&
libraryNames.last == libraryNames[libraryNames.length - 2]) { libraryNames.last == libraryNames[libraryNames.length - 2]) {

View File

@ -1361,7 +1361,7 @@ class _BigIntImpl implements BigInt {
/// It is an error if [shiftAmount] is negative. /// It is an error if [shiftAmount] is negative.
_BigIntImpl operator <<(int shiftAmount) { _BigIntImpl operator <<(int shiftAmount) {
if (shiftAmount < 0) { if (shiftAmount < 0) {
throw new ArgumentError("shift-amount must be posititve $shiftAmount"); throw new ArgumentError("shift-amount must be positive $shiftAmount");
} }
if (_isZero) return this; if (_isZero) return this;
final digitShift = shiftAmount ~/ _digitBits; final digitShift = shiftAmount ~/ _digitBits;
@ -1423,7 +1423,7 @@ class _BigIntImpl implements BigInt {
/// It is an error if [shiftAmount] is negative. /// It is an error if [shiftAmount] is negative.
_BigIntImpl operator >>(int shiftAmount) { _BigIntImpl operator >>(int shiftAmount) {
if (shiftAmount < 0) { if (shiftAmount < 0) {
throw new ArgumentError("shift-amount must be posititve $shiftAmount"); throw new ArgumentError("shift-amount must be positive $shiftAmount");
} }
if (_isZero) return this; if (_isZero) return this;
final digitShift = shiftAmount ~/ _digitBits; final digitShift = shiftAmount ~/ _digitBits;

View File

@ -134,7 +134,7 @@ import 'dart:_rti' show Rti;
/// Type argument. /// Type argument.
/// ///
/// In Dart 2.0, the type argument additionally constrains the returned type. /// In Dart 2.0, the type argument additionally constrains the returned type.
/// So, with type inference filling in the type argumemnt, /// So, with type inference filling in the type argument,
/// ///
/// String s = JS('', 'JSON.stringify(#)', x); /// String s = JS('', 'JSON.stringify(#)', x);
/// ///

View File

@ -93,7 +93,7 @@ abstract class _StringBase implements String {
static const int _maxJoinReplaceOneByteStringLength = 500; static const int _maxJoinReplaceOneByteStringLength = 500;
factory _StringBase._uninstantiable() { factory _StringBase._uninstantiable() {
throw new UnsupportedError("_StringBase can't be instaniated"); throw new UnsupportedError("_StringBase can't be instantiated");
} }
@pragma("vm:recognized", "asm-intrinsic") @pragma("vm:recognized", "asm-intrinsic")

View File

@ -287,7 +287,7 @@ class _Utf8EncoderSink extends _Utf8Encoder with StringConversionSinkMixin {
if (isLast) close(); if (isLast) close();
} }
// TODO(floitsch): implement asUtf8Sink. Sligthly complicated because it // TODO(floitsch): implement asUtf8Sink. Slightly complicated because it
// needs to deal with malformed input. // needs to deal with malformed input.
} }

View File

@ -881,7 +881,7 @@ class WhereTypeIterator<T> implements Iterator<T> {
* Creates errors throw by [Iterable] when the element count is wrong. * Creates errors throw by [Iterable] when the element count is wrong.
*/ */
abstract class IterableElementError { abstract class IterableElementError {
/** Error thrown thrown by, e.g., [Iterable.first] when there is no result. */ /** Error thrown by, e.g., [Iterable.first] when there is no result. */
static StateError noElement() => StateError("No element"); static StateError noElement() => StateError("No element");
/** Error thrown by, e.g., [Iterable.single] if there are too many results. */ /** Error thrown by, e.g., [Iterable.single] if there are too many results. */
static StateError tooMany() => StateError("Too many elements"); static StateError tooMany() => StateError("Too many elements");

View File

@ -42,7 +42,7 @@ abstract class SecurityContext {
/// certificate authorities as its trusted roots. On Linux and Windows, this /// certificate authorities as its trusted roots. On Linux and Windows, this
/// list is taken from Mozilla, who maintains it as part of Firefox. On, /// list is taken from Mozilla, who maintains it as part of Firefox. On,
/// MacOS, iOS, and Android, this list comes from the trusted certificates /// MacOS, iOS, and Android, this list comes from the trusted certificates
/// stores built in to the platforms. /// stores built into the platforms.
external static SecurityContext get defaultContext; external static SecurityContext get defaultContext;
/// Sets the private key for a server certificate or client certificate. /// Sets the private key for a server certificate or client certificate.

View File

@ -733,7 +733,7 @@ abstract class SendPort implements Capability {
/// contain any object, with the following exceptions: /// contain any object, with the following exceptions:
/// ///
/// - Objects with native resources (subclasses of e.g. /// - Objects with native resources (subclasses of e.g.
/// `NativeFieldWrapperClass1`). A [Socket] object for example referrs /// `NativeFieldWrapperClass1`). A [Socket] object for example refers
/// internally to objects that have native resources attached and can /// internally to objects that have native resources attached and can
/// therefore not be sent. /// therefore not be sent.
/// - [ReceivePort] /// - [ReceivePort]

View File

@ -199,7 +199,7 @@ class WasmTable<T> extends _WasmBase {
external WasmI32 get size; external WasmI32 get size;
/// Call a function stored in the table using the `call_indirect` Wasm /// Call a function stored in the table using the `call_indirect` Wasm
/// instructionm. The function value returned from this method must be /// instruction. The function value returned from this method must be
/// called directly. /// called directly.
@pragma("wasm:entry-point") @pragma("wasm:entry-point")
external F callIndirect<F extends Function>(WasmI32 index); external F callIndirect<F extends Function>(WasmI32 index);

View File

@ -17,8 +17,8 @@ void check(int length, BigInt base) {
assert(base > BigInt.zero); assert(base > BigInt.zero);
// Check with slight adjustments. We choose -3..+3 so that the lowest bit in // Check with slight adjustments. We choose -3..+3 so that the lowest bit in
// the 2's-complement representation is both zero and one for both the postive // the 2's-complement representation is both zero and one for both the
// [n] and its negative complement [m] below. // positive [n] and its negative complement [m] below.
for (int delta = -3; delta <= 3; delta++) { for (int delta = -3; delta <= 3; delta++) {
BigInt n = base + BigInt.from(delta); BigInt n = base + BigInt.from(delta);
assert(n >= BigInt.zero); assert(n >= BigInt.zero);

View File

@ -17,8 +17,8 @@ void check(int length, BigInt base) {
assert(base > BigInt.zero); assert(base > BigInt.zero);
// Check with slight adjustments. We choose -3..+3 so that the lowest bit in // Check with slight adjustments. We choose -3..+3 so that the lowest bit in
// the 2's-complement representation is both zero and one for both the postive // the 2's-complement representation is both zero and one for both the
// [n] and its negative complement [m] below. // positive [n] and its negative complement [m] below.
for (int delta = -3; delta <= 3; delta++) { for (int delta = -3; delta <= 3; delta++) {
BigInt n = base + BigInt.from(delta); BigInt n = base + BigInt.from(delta);
assert(n >= BigInt.zero); assert(n >= BigInt.zero);

View File

@ -98,7 +98,7 @@ external int passAsPointerAndValue(NativeFieldWrapperClass1 obj, int value);
@FfiNative<IntPtr Function(IntPtr, Pointer<Void>)>('PassAsValueAndPointer') @FfiNative<IntPtr Function(IntPtr, Pointer<Void>)>('PassAsValueAndPointer')
external int passAsValueAndPointer(int value, NativeFieldWrapperClass1 obj); external int passAsValueAndPointer(int value, NativeFieldWrapperClass1 obj);
// Helpers for testing argumnent evaluation order is preserved. // Helpers for testing argument evaluation order is preserved.
int state = 0; int state = 0;
int setState(int value) { int setState(int value) {
state = value; state = value;

View File

@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a // for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file. // BSD-style license that can be found in the LICENSE file.
// This version should continue to opt in to null safety in perpetuity (or at // This version should continue to opt into null safety in perpetuity (or at
// least until Dart 3), when the experiment is enabled. // least until Dart 3), when the experiment is enabled.
// @dart = 2.12 // @dart = 2.12