From b9b6511ca67cf3708f8cf4ef435aed94d66dd613 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Fri, 20 Jan 2023 12:37:49 +0000 Subject: [PATCH] Spelling sdk Closes https://github.com/dart-lang/sdk/pull/50918 Co-authored-by: Josh Soref GitOrigin-RevId: 1fd275051c561b63d374fb47e76a22424c4a12a9 Change-Id: I97790d9c79ff659f2c1fa2d2d46d041fe67957cb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278530 Reviewed-by: William Hesse Commit-Queue: Alexander Thomas Reviewed-by: Tess Strickland --- CHANGELOG.md | 2 +- .../dart2/BigIntParsePrint.dart | 2 +- .../SoundSplayTreeSieve/dart/iterable.dart | 2 +- .../SoundSplayTreeSieve/dart2/iterable.dart | 2 +- .../lib/src/parser/parser_impl.dart | 2 +- pkg/analysis_server/doc/api.html | 4 ++-- .../lib/protocol/protocol_generated.dart | 6 +++--- .../support/integration_test_methods.dart | 2 +- .../java/types/TypeHierarchyItem.java | 4 ++-- pkg/analysis_server/tool/spec/spec_input.html | 4 ++-- .../lib/src/protocol/protocol_generated.dart | 6 +++--- .../test/generated/parser_test_base.dart | 2 +- .../not_instantiated_bound_test.dart | 2 +- .../lib/src/js_backend/interceptor_data.dart | 2 +- pkg/compiler/lib/src/phase/load_kernel.dart | 2 +- .../swarm/swarm_ui_lib/touch/Momentum.dart | 2 +- .../jsinterop/internal_annotations_test.dart | 4 ++-- pkg/compiler/test/jsinterop/world_test.dart | 4 ++-- pkg/dds/tool/dap/codegen.dart | 4 ++-- .../src/api_prototype/compiler_options.dart | 4 ++-- .../lib/src/base/processed_options.dart | 2 +- .../kernel/combined_member_signature.dart | 2 +- pkg/status_file/lib/status_file_linter.dart | 2 +- runtime/include/dart_api.h | 2 +- runtime/vm/code_patcher.cc | 2 +- runtime/vm/compiler/assembler/assembler_ia32.h | 4 ++-- runtime/vm/compiler/ffi/marshaller.cc | 2 +- runtime/vm/compiler/ffi/marshaller.h | 2 +- runtime/vm/dart_api_impl.cc | 18 +++++++++--------- runtime/vm/datastream.h | 2 +- runtime/vm/image_snapshot.h | 2 +- runtime/vm/type_testing_stubs.cc | 8 ++++---- runtime/vm/unibrow.cc | 2 +- .../js_dev_runtime/patch/core_patch.dart | 4 ++-- .../private/ddc_runtime/errors.dart | 2 +- .../js_dev_runtime/private/debugger.dart | 2 +- .../_internal/js_runtime/lib/core_patch.dart | 4 ++-- .../js_runtime/lib/foreign_helper.dart | 2 +- sdk/lib/_internal/vm/lib/string_patch.dart | 2 +- sdk/lib/convert/utf.dart | 2 +- sdk/lib/internal/iterable.dart | 2 +- sdk/lib/io/security_context.dart | 2 +- sdk/lib/isolate/isolate.dart | 2 +- sdk/lib/wasm/wasm_types.dart | 2 +- tests/corelib/bigint_bitlength_test.dart | 4 ++-- tests/corelib_2/bigint_bitlength_test.dart | 4 ++-- tests/ffi/vmspecific_ffi_native_test.dart | 2 +- .../opt_in_test.dart | 2 +- 48 files changed, 75 insertions(+), 75 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f3fb0c4e9a..aaf2085370f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 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 deprecated. Use `publish_to` in your `pubspec.yaml` or set the diff --git a/benchmarks/BigIntParsePrint/dart2/BigIntParsePrint.dart b/benchmarks/BigIntParsePrint/dart2/BigIntParsePrint.dart index 62c84a60622..a29ce021b71 100644 --- a/benchmarks/BigIntParsePrint/dart2/BigIntParsePrint.dart +++ b/benchmarks/BigIntParsePrint/dart2/BigIntParsePrint.dart @@ -51,7 +51,7 @@ class Benchmark extends BenchmarkBase { if (b.bitLength < bits) { restartDelta += seed >> 20; 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; } var string = b.toString(); diff --git a/benchmarks/SoundSplayTreeSieve/dart/iterable.dart b/benchmarks/SoundSplayTreeSieve/dart/iterable.dart index 6870a3bceb2..218759ddb40 100644 --- a/benchmarks/SoundSplayTreeSieve/dart/iterable.dart +++ b/benchmarks/SoundSplayTreeSieve/dart/iterable.dart @@ -12,7 +12,7 @@ abstract class EfficientLengthIterable extends Iterable { /// Creates errors throw by [Iterable] when the element count is wrong. 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"); /// Error thrown by, e.g., [Iterable.single] if there are too many results. diff --git a/benchmarks/SoundSplayTreeSieve/dart2/iterable.dart b/benchmarks/SoundSplayTreeSieve/dart2/iterable.dart index 3bbdcfa6df9..9900f029988 100644 --- a/benchmarks/SoundSplayTreeSieve/dart2/iterable.dart +++ b/benchmarks/SoundSplayTreeSieve/dart2/iterable.dart @@ -15,7 +15,7 @@ abstract class EfficientLengthIterable extends Iterable { /// Creates errors throw by [Iterable] when the element count is wrong. 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"); /// Error thrown by, e.g., [Iterable.single] if there are too many results. diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart index 9467f350b87..60ef398f69b 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart @@ -1379,7 +1379,7 @@ class Parser { bool recover = false; if (optional(';', endGroup.next!)) { // Missing parenthesis. Insert them. - // Turn ";" in to "();" + // Turn ";" into "();" // Insert missing 'Function' below. reportRecoverableError(endGroup, missingParameterMessage(MemberKind.FunctionTypeAlias)); diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html index c6bad954b4a..4790f67ab95 100644 --- a/pkg/analysis_server/doc/api.html +++ b/pkg/analysis_server/doc/api.html @@ -1967,7 +1967,7 @@ a:focus, a:hover {

The client is expected to check this list against the ElementKind sent in IncludedSuggestionSet 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.

includedSuggestionRelevanceTags: List<IncludedSuggestionRelevanceTag> (optional)
@@ -5912,7 +5912,7 @@ a:focus, a:hover {

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. + there are no classes mixed into this class.

subclasses: List<int>
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart index 03eb241a87a..de575704669 100644 --- a/pkg/analysis_server/lib/protocol/protocol_generated.dart +++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart @@ -5295,8 +5295,8 @@ class CompletionResultsParams implements HasToJson { List? includedSuggestionSets; /// The client is expected to check this list against the ElementKind sent in - /// IncludedSuggestionSet to decide whether or not these symbols should - /// should be presented to the user. + /// IncludedSuggestionSet to decide whether or not these symbols should be + /// presented to the user. List? includedElementKinds; /// The client is expected to check this list against the values of the field @@ -16478,7 +16478,7 @@ class TypeHierarchyItem implements HasToJson { List interfaces; /// 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. List mixins; diff --git a/pkg/analysis_server/test/integration/support/integration_test_methods.dart b/pkg/analysis_server/test/integration/support/integration_test_methods.dart index ff18a9dafc2..9b0e23e35b4 100644 --- a/pkg/analysis_server/test/integration/support/integration_test_methods.dart +++ b/pkg/analysis_server/test/integration/support/integration_test_methods.dart @@ -1254,7 +1254,7 @@ abstract class IntegrationTestMixin { /// /// The client is expected to check this list against the ElementKind sent /// in IncludedSuggestionSet to decide whether or not these symbols should - /// should be presented to the user. + /// be presented to the user. /// /// includedSuggestionRelevanceTags: List /// (optional) diff --git a/pkg/analysis_server/tool/spec/generated/java/types/TypeHierarchyItem.java b/pkg/analysis_server/tool/spec/generated/java/types/TypeHierarchyItem.java index 156ec7dcc66..4fc28204df2 100644 --- a/pkg/analysis_server/tool/spec/generated/java/types/TypeHierarchyItem.java +++ b/pkg/analysis_server/tool/spec/generated/java/types/TypeHierarchyItem.java @@ -68,7 +68,7 @@ public class TypeHierarchyItem { /** * 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; @@ -173,7 +173,7 @@ public class TypeHierarchyItem { /** * 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() { return mixins; diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html index e96ae5d5476..7bd407c9c4a 100644 --- a/pkg/analysis_server/tool/spec/spec_input.html +++ b/pkg/analysis_server/tool/spec/spec_input.html @@ -1842,7 +1842,7 @@

The client is expected to check this list against the ElementKind sent in IncludedSuggestionSet 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.

@@ -5471,7 +5471,7 @@

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. + there are no classes mixed into this class.

diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart index a8e086e26cf..2076786bcfd 100644 --- a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart +++ b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart @@ -5295,8 +5295,8 @@ class CompletionResultsParams implements HasToJson { List? includedSuggestionSets; /// The client is expected to check this list against the ElementKind sent in - /// IncludedSuggestionSet to decide whether or not these symbols should - /// should be presented to the user. + /// IncludedSuggestionSet to decide whether or not these symbols should be + /// presented to the user. List? includedElementKinds; /// The client is expected to check this list against the values of the field @@ -16478,7 +16478,7 @@ class TypeHierarchyItem implements HasToJson { List interfaces; /// 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. List mixins; diff --git a/pkg/analyzer/test/generated/parser_test_base.dart b/pkg/analyzer/test/generated/parser_test_base.dart index 938e8793916..d2909a37e5b 100644 --- a/pkg/analyzer/test/generated/parser_test_base.dart +++ b/pkg/analyzer/test/generated/parser_test_base.dart @@ -1506,7 +1506,7 @@ class ParserTestCase with ParserTestHelpers implements AbstractParserTestCase { /// 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 { ExpectedError error(ErrorCode code, int offset, int length, {Pattern? correctionContains, diff --git a/pkg/analyzer/test/src/diagnostics/not_instantiated_bound_test.dart b/pkg/analyzer/test/src/diagnostics/not_instantiated_bound_test.dart index 930f6f41ee7..a2d6e4236c2 100644 --- a/pkg/analyzer/test/src/diagnostics/not_instantiated_bound_test.dart +++ b/pkg/analyzer/test/src/diagnostics/not_instantiated_bound_test.dart @@ -150,7 +150,7 @@ class D {} ]); } - test_indirect_notInstantiatedt() async { + test_indirect_notInstantiated() async { await assertErrorsInCode(r''' class A {} class C> {} diff --git a/pkg/compiler/lib/src/js_backend/interceptor_data.dart b/pkg/compiler/lib/src/js_backend/interceptor_data.dart index de5e42e57a1..17da19f3791 100644 --- a/pkg/compiler/lib/src/js_backend/interceptor_data.dart +++ b/pkg/compiler/lib/src/js_backend/interceptor_data.dart @@ -288,7 +288,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder { final Set _interceptedClasses = {}; /// 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. final Set _classesMixedIntoInterceptedClasses = {}; diff --git a/pkg/compiler/lib/src/phase/load_kernel.dart b/pkg/compiler/lib/src/phase/load_kernel.dart index 99574c8713d..6f5f0604504 100644 --- a/pkg/compiler/lib/src/phase/load_kernel.dart +++ b/pkg/compiler/lib/src/phase/load_kernel.dart @@ -411,7 +411,7 @@ Future run(Input input) async { 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 /// files, but also sources that were embedded in binary `.dill` files (like the /// platform kernel file and kernel files from modular compilation pipelines). diff --git a/pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/Momentum.dart b/pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/Momentum.dart index 5a07efd0c8e..eab6ecb00c9 100644 --- a/pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/Momentum.dart +++ b/pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/Momentum.dart @@ -475,7 +475,7 @@ class TimeoutMomentum implements Momentum { if (_moves.isNotEmpty) { final move = _moves.first; // 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 * SingleDimensionPhysics._INITIAL_VELOCITY_BOOST_FACTOR; velocity = Coordinate(move.vx / velocityScale, move.vy / velocityScale); diff --git a/pkg/compiler/test/jsinterop/internal_annotations_test.dart b/pkg/compiler/test/jsinterop/internal_annotations_test.dart index b316cb4382c..c8c5e77370c 100644 --- a/pkg/compiler/test/jsinterop/internal_annotations_test.dart +++ b/pkg/compiler/test/jsinterop/internal_annotations_test.dart @@ -187,12 +187,12 @@ $mainSource // Classes that are expected to be instantiated by default. `Object` and // `Interceptor` are base types for non-native and native types, and // `JavaScriptObject` is the base type for `dart:html` types. - var insantiatedBaseClasses = [ + var instantiatedBaseClasses = [ 'Object', 'Interceptor', 'JavaScriptObject' ]; - if (!isInstantiated && !insantiatedBaseClasses.contains(name)) { + if (!isInstantiated && !instantiatedBaseClasses.contains(name)) { Expect.isFalse( world.classHierarchy.isInstantiated(cls), "Expected $name to be uninstantiated in `${mainSource}`:" diff --git a/pkg/compiler/test/jsinterop/world_test.dart b/pkg/compiler/test/jsinterop/world_test.dart index bc27e6829a2..9ccd1ec5cd9 100644 --- a/pkg/compiler/test/jsinterop/world_test.dart +++ b/pkg/compiler/test/jsinterop/world_test.dart @@ -181,12 +181,12 @@ $mainSource // Classes that are expected to be instantiated by default. `Object` and // `Interceptor` are base types for non-native and native types, and // `JavaScriptObject` is the base type for `dart:html` types. - var insantiatedBaseClasses = [ + var instantiatedBaseClasses = [ 'Object', 'Interceptor', 'JavaScriptObject' ]; - if (!isInstantiated && !insantiatedBaseClasses.contains(name)) { + if (!isInstantiated && !instantiatedBaseClasses.contains(name)) { Expect.isFalse( world.classHierarchy.isInstantiated(cls), "Expected $name to be uninstantiated in `${mainSource}`:" diff --git a/pkg/dds/tool/dap/codegen.dart b/pkg/dds/tool/dap/codegen.dart index 1fd68cb7bed..22a527cca27 100644 --- a/pkg/dds/tool/dap/codegen.dart +++ b/pkg/dds/tool/dap/codegen.dart @@ -375,13 +375,13 @@ class CodeGenerator { : {}; // 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')) { continue; } // 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')) { continue; } diff --git a/pkg/front_end/lib/src/api_prototype/compiler_options.dart b/pkg/front_end/lib/src/api_prototype/compiler_options.dart index f011b3bf54c..b0f82376ea7 100644 --- a/pkg/front_end/lib/src/api_prototype/compiler_options.dart +++ b/pkg/front_end/lib/src/api_prototype/compiler_options.dart @@ -87,7 +87,7 @@ class CompilerOptions { /// 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`.) /// /// If `null` and [compileSdk] is false, the SDK summary will be searched for @@ -277,7 +277,7 @@ class CompilerOptions { allowedExperimentalFlags: allowedExperimentalFlagsForTesting); /// 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 /// computed by [isExperimentEnabledInLibrary]. diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart index b3773dc26bf..61eca8e59b1 100644 --- a/pkg/front_end/lib/src/base/processed_options.dart +++ b/pkg/front_end/lib/src/base/processed_options.dart @@ -378,7 +378,7 @@ class ProcessedOptions { flags.GlobalFeatures get globalFeatures => _raw.globalFeatures; /// 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 /// computed by [isExperimentEnabledInLibrary]. diff --git a/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart b/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart index d3ce0bac6ce..a2ca1ab2a5b 100644 --- a/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart +++ b/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart @@ -256,7 +256,7 @@ abstract class CombinedMemberSignatureBase { /// // void method({covariant int named}) -> Mixin.method /// } /// 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 - /// // it is legacy and doesn't know about required named parameters. /// void method({required int named}) {} diff --git a/pkg/status_file/lib/status_file_linter.dart b/pkg/status_file/lib/status_file_linter.dart index b5cc2b4f9af..ffc7c71327e 100644 --- a/pkg/status_file/lib/status_file_linter.dart +++ b/pkg/status_file/lib/status_file_linter.dart @@ -168,7 +168,7 @@ Iterable lintSectionEntryDuplicates(StatusSection section) { /// [ strong ] /// [ $compiler == dart2js ] /// -/// which should should become: +/// which should become: /// /// [ $compiler == dart2js ] /// [ $mode == debug ] diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h index d4560eb912e..3cdff659b67 100644 --- a/runtime/include/dart_api.h +++ b/runtime/include/dart_api.h @@ -1972,7 +1972,7 @@ DART_EXPORT Dart_Handle Dart_FunctionName(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. * * For the purposes of the embedding API, a top-level function is diff --git a/runtime/vm/code_patcher.cc b/runtime/vm/code_patcher.cc index d711035fbc6..680aa3ff47b 100644 --- a/runtime/vm/code_patcher.cc +++ b/runtime/vm/code_patcher.cc @@ -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. // // 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. if (FLAG_support_rr) return true; diff --git a/runtime/vm/compiler/assembler/assembler_ia32.h b/runtime/vm/compiler/assembler/assembler_ia32.h index 2cd509c38b5..31efef32b29 100644 --- a/runtime/vm/compiler/assembler/assembler_ia32.h +++ b/runtime/vm/compiler/assembler/assembler_ia32.h @@ -1212,9 +1212,9 @@ class Assembler : public AssemblerBase { void Breakpoint() override { int3(); } // 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 - // 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) { if (!target::IsSmi(object)) { return false; diff --git a/runtime/vm/compiler/ffi/marshaller.cc b/runtime/vm/compiler/ffi/marshaller.cc index 9497fa79201..6ea3f5fd0a4 100644 --- a/runtime/vm/compiler/ffi/marshaller.cc +++ b/runtime/vm/compiler/ffi/marshaller.cc @@ -207,7 +207,7 @@ intptr_t BaseMarshaller::NumDefinitions(intptr_t arg_index) const { } 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. const intptr_t size_in_bytes = type.SizeInBytes(); const intptr_t num_defs = diff --git a/runtime/vm/compiler/ffi/marshaller.h b/runtime/vm/compiler/ffi/marshaller.h index cb74a082957..caeacf1e882 100644 --- a/runtime/vm/compiler/ffi/marshaller.h +++ b/runtime/vm/compiler/ffi/marshaller.h @@ -180,7 +180,7 @@ class CallMarshaller : public BaseMarshaller { // The location of the inputs to the IL FfiCall instruction. 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. bool PassTypedData() const; intptr_t TypedDataSizeInBytes() const; diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc index af7cd804b95..7bd52c35907 100644 --- a/runtime/vm/dart_api_impl.cc +++ b/runtime/vm/dart_api_impl.cc @@ -3294,7 +3294,7 @@ DART_EXPORT Dart_Handle Dart_ListLength(Dart_Handle list, intptr_t* len) { if ((index >= 0) && (index < array_obj.Length())) { \ 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) { DARTSCOPE(Thread::Current()); @@ -3327,7 +3327,7 @@ DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list, intptr_t index) { } \ 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, intptr_t offset, @@ -3380,7 +3380,7 @@ DART_EXPORT Dart_Handle Dart_ListGetRange(Dart_Handle list, array.SetAt(index, value_obj); \ 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, intptr_t index, @@ -3499,7 +3499,7 @@ static ObjectPtr ThrowArgumentError(const char* exception_message) { } \ 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, intptr_t offset, @@ -3516,7 +3516,7 @@ DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list, reinterpret_cast(array.DataAddr(offset)), length); 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()) { @@ -3578,7 +3578,7 @@ DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list, } \ 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, intptr_t offset, @@ -3595,7 +3595,7 @@ DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list, native_array, length); 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()) { @@ -5026,7 +5026,7 @@ DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj, RETURN_TYPE_ERROR(thread->zone(), obj, Instance); } 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); } @@ -5040,7 +5040,7 @@ DART_EXPORT Dart_Handle Dart_SetNativeInstanceField(Dart_Handle obj, } if (!instance.IsValidNativeIndex(index)) { 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); } instance.SetNativeField(index, value); diff --git a/runtime/vm/datastream.h b/runtime/vm/datastream.h index 3edda33a50a..128806512ca 100644 --- a/runtime/vm/datastream.h +++ b/runtime/vm/datastream.h @@ -118,7 +118,7 @@ class ReadStream : public ValueObject { current_ = reinterpret_cast(cursor); // 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 - // in to subsequent load offsets. + // into subsequent load offsets. return result + 128; } diff --git a/runtime/vm/image_snapshot.h b/runtime/vm/image_snapshot.h index 91c17cd18f8..a959f597483 100644 --- a/runtime/vm/image_snapshot.h +++ b/runtime/vm/image_snapshot.h @@ -564,7 +564,7 @@ class ImageWriter : public ValueObject { 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). intptr_t next_label_ = 1 + 2 * kNumProgramSections; #endif diff --git a/runtime/vm/type_testing_stubs.cc b/runtime/vm/type_testing_stubs.cc index 83489c3c280..0f69744c2c0 100644 --- a/runtime/vm/type_testing_stubs.cc +++ b/runtime/vm/type_testing_stubs.cc @@ -1325,9 +1325,9 @@ void RegisterTypeArgumentsUse(const Function& function, // 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 // subclass. - // We try to strengthen this assumption further down by checking the offset - // of the type argument vector, but generally speaking this could be a - // false-postive, which is still ok! + // We try to strengthen this assumption further down by checking the + // offset of the type argument vector, but generally speaking this could + // be a false-positive, which is still ok! const AbstractType& type = *instance->Type()->ToAbstractType(); if (type.IsType()) { const Class& type_class = Class::Handle(type.type_class()); @@ -1509,7 +1509,7 @@ void TypeUsageInfo::UseTypeArgumentsInInstanceCreation( // of type arguments the class expects. 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 // refer to type parameters in the class. if (!ta.IsNull() && !ta.IsInstantiated() && diff --git a/runtime/vm/unibrow.cc b/runtime/vm/unibrow.cc index 4dbb507ad34..c3152ab12ea 100644 --- a/runtime/vm/unibrow.cc +++ b/runtime/vm/unibrow.cc @@ -84,7 +84,7 @@ struct MultiCharacterSpecialCase { // Look up the mapping for the given character in the specified table, // which is of the specified length and uses the specified special case // 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, // 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 diff --git a/sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart index dc2013d599d..e440baa103f 100644 --- a/sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart +++ b/sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart @@ -1496,7 +1496,7 @@ class _BigIntImpl implements BigInt { */ _BigIntImpl operator <<(int shiftAmount) { if (shiftAmount < 0) { - throw ArgumentError("shift-amount must be posititve $shiftAmount"); + throw ArgumentError("shift-amount must be positive $shiftAmount"); } if (_isZero) return this; final digitShift = shiftAmount ~/ _digitBits; @@ -1560,7 +1560,7 @@ class _BigIntImpl implements BigInt { */ _BigIntImpl operator >>(int shiftAmount) { if (shiftAmount < 0) { - throw ArgumentError("shift-amount must be posititve $shiftAmount"); + throw ArgumentError("shift-amount must be positive $shiftAmount"); } if (_isZero) return this; final digitShift = shiftAmount ~/ _digitBits; diff --git a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart index 504ae5eb93f..23611afd8f5 100644 --- a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart +++ b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart @@ -22,7 +22,7 @@ throwDeferredIsLoadedError( 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. assertFailed(String? message, [String? fileUri, int? line, int? column, String? conditionSource]) { diff --git a/sdk/lib/_internal/js_dev_runtime/private/debugger.dart b/sdk/lib/_internal/js_dev_runtime/private/debugger.dart index 467e0122182..6965d0bc5ae 100644 --- a/sdk/lib/_internal/js_dev_runtime/private/debugger.dart +++ b/sdk/lib/_internal/js_dev_runtime/private/debugger.dart @@ -595,7 +595,7 @@ class LibraryModuleFormatter implements Formatter { var libraryNames = dart.getModuleName(object)!.split('/'); // Library names are received with a repeat directory name, so strip 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/". if (libraryNames.length > 1 && libraryNames.last == libraryNames[libraryNames.length - 2]) { diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart index 13e8f4a1714..c427dfc7c85 100644 --- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart +++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart @@ -1361,7 +1361,7 @@ class _BigIntImpl implements BigInt { /// It is an error if [shiftAmount] is negative. _BigIntImpl operator <<(int shiftAmount) { 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; final digitShift = shiftAmount ~/ _digitBits; @@ -1423,7 +1423,7 @@ class _BigIntImpl implements BigInt { /// It is an error if [shiftAmount] is negative. _BigIntImpl operator >>(int shiftAmount) { 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; final digitShift = shiftAmount ~/ _digitBits; diff --git a/sdk/lib/_internal/js_runtime/lib/foreign_helper.dart b/sdk/lib/_internal/js_runtime/lib/foreign_helper.dart index 428e0b8ab52..24e99fbb084 100644 --- a/sdk/lib/_internal/js_runtime/lib/foreign_helper.dart +++ b/sdk/lib/_internal/js_runtime/lib/foreign_helper.dart @@ -134,7 +134,7 @@ import 'dart:_rti' show Rti; /// Type argument. /// /// 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); /// diff --git a/sdk/lib/_internal/vm/lib/string_patch.dart b/sdk/lib/_internal/vm/lib/string_patch.dart index f66ac0025a5..a1b44647dd7 100644 --- a/sdk/lib/_internal/vm/lib/string_patch.dart +++ b/sdk/lib/_internal/vm/lib/string_patch.dart @@ -93,7 +93,7 @@ abstract class _StringBase implements String { static const int _maxJoinReplaceOneByteStringLength = 500; factory _StringBase._uninstantiable() { - throw new UnsupportedError("_StringBase can't be instaniated"); + throw new UnsupportedError("_StringBase can't be instantiated"); } @pragma("vm:recognized", "asm-intrinsic") diff --git a/sdk/lib/convert/utf.dart b/sdk/lib/convert/utf.dart index 47f2647c1dc..85bc2978681 100644 --- a/sdk/lib/convert/utf.dart +++ b/sdk/lib/convert/utf.dart @@ -287,7 +287,7 @@ class _Utf8EncoderSink extends _Utf8Encoder with StringConversionSinkMixin { 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. } diff --git a/sdk/lib/internal/iterable.dart b/sdk/lib/internal/iterable.dart index 96bf7ba189a..4dbd20a9039 100644 --- a/sdk/lib/internal/iterable.dart +++ b/sdk/lib/internal/iterable.dart @@ -881,7 +881,7 @@ class WhereTypeIterator implements Iterator { * Creates errors throw by [Iterable] when the element count is wrong. */ 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"); /** Error thrown by, e.g., [Iterable.single] if there are too many results. */ static StateError tooMany() => StateError("Too many elements"); diff --git a/sdk/lib/io/security_context.dart b/sdk/lib/io/security_context.dart index 8e9839e7716..5571aba1de3 100644 --- a/sdk/lib/io/security_context.dart +++ b/sdk/lib/io/security_context.dart @@ -42,7 +42,7 @@ abstract class SecurityContext { /// certificate authorities as its trusted roots. On Linux and Windows, this /// list is taken from Mozilla, who maintains it as part of Firefox. On, /// 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; /// Sets the private key for a server certificate or client certificate. diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart index 0791f85da10..4b83ad791eb 100644 --- a/sdk/lib/isolate/isolate.dart +++ b/sdk/lib/isolate/isolate.dart @@ -733,7 +733,7 @@ abstract class SendPort implements Capability { /// contain any object, with the following exceptions: /// /// - 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 /// therefore not be sent. /// - [ReceivePort] diff --git a/sdk/lib/wasm/wasm_types.dart b/sdk/lib/wasm/wasm_types.dart index cb2745a3b50..c5c3ff196cc 100644 --- a/sdk/lib/wasm/wasm_types.dart +++ b/sdk/lib/wasm/wasm_types.dart @@ -199,7 +199,7 @@ class WasmTable extends _WasmBase { external WasmI32 get size; /// 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. @pragma("wasm:entry-point") external F callIndirect(WasmI32 index); diff --git a/tests/corelib/bigint_bitlength_test.dart b/tests/corelib/bigint_bitlength_test.dart index ff7c87a3d18..c4e72a84b66 100644 --- a/tests/corelib/bigint_bitlength_test.dart +++ b/tests/corelib/bigint_bitlength_test.dart @@ -17,8 +17,8 @@ void check(int length, BigInt base) { assert(base > BigInt.zero); // 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 - // [n] and its negative complement [m] below. + // the 2's-complement representation is both zero and one for both the + // positive [n] and its negative complement [m] below. for (int delta = -3; delta <= 3; delta++) { BigInt n = base + BigInt.from(delta); assert(n >= BigInt.zero); diff --git a/tests/corelib_2/bigint_bitlength_test.dart b/tests/corelib_2/bigint_bitlength_test.dart index ff7c87a3d18..c4e72a84b66 100644 --- a/tests/corelib_2/bigint_bitlength_test.dart +++ b/tests/corelib_2/bigint_bitlength_test.dart @@ -17,8 +17,8 @@ void check(int length, BigInt base) { assert(base > BigInt.zero); // 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 - // [n] and its negative complement [m] below. + // the 2's-complement representation is both zero and one for both the + // positive [n] and its negative complement [m] below. for (int delta = -3; delta <= 3; delta++) { BigInt n = base + BigInt.from(delta); assert(n >= BigInt.zero); diff --git a/tests/ffi/vmspecific_ffi_native_test.dart b/tests/ffi/vmspecific_ffi_native_test.dart index 8d0e0d2521b..d8115eef4af 100644 --- a/tests/ffi/vmspecific_ffi_native_test.dart +++ b/tests/ffi/vmspecific_ffi_native_test.dart @@ -98,7 +98,7 @@ external int passAsPointerAndValue(NativeFieldWrapperClass1 obj, int value); @FfiNative)>('PassAsValueAndPointer') 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 setState(int value) { state = value; diff --git a/tests/language/nnbd/experiment_release_version/opt_in_test.dart b/tests/language/nnbd/experiment_release_version/opt_in_test.dart index 66b880c86ba..706bb14a4bf 100644 --- a/tests/language/nnbd/experiment_release_version/opt_in_test.dart +++ b/tests/language/nnbd/experiment_release_version/opt_in_test.dart @@ -2,7 +2,7 @@ // 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. -// 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. // @dart = 2.12