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>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2f3fb0c..aaf2085 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2607,7 +2607,7 @@
`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 62c84a6..a29ce02 100644
--- a/benchmarks/BigIntParsePrint/dart2/BigIntParsePrint.dart
+++ b/benchmarks/BigIntParsePrint/dart2/BigIntParsePrint.dart
@@ -51,7 +51,7 @@
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 6870a3b..218759d 100644
--- a/benchmarks/SoundSplayTreeSieve/dart/iterable.dart
+++ b/benchmarks/SoundSplayTreeSieve/dart/iterable.dart
@@ -12,7 +12,7 @@
/// 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 3bbdcfa6..9900f02 100644
--- a/benchmarks/SoundSplayTreeSieve/dart2/iterable.dart
+++ b/benchmarks/SoundSplayTreeSieve/dart2/iterable.dart
@@ -15,7 +15,7 @@
/// 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 9467f35..60ef398 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 @@
bool recover = false;
if (optional(';', endGroup.next!)) {
// Missing parenthesis. Insert them.
- // Turn "<whatever>;" in to "<whatever>();"
+ // Turn "<whatever>;" into "<whatever>();"
// 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 c6bad95..4790f67 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -1967,7 +1967,7 @@
<p>
The client is expected to check this list against the
<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>
</dd><dt class="field"><b>includedSuggestionRelevanceTags: List<<a href="#type_IncludedSuggestionRelevanceTag">IncludedSuggestionRelevanceTag</a>><span style="color:#999999"> (optional)</span></b></dt><dd>
@@ -5912,7 +5912,7 @@
<p>
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.
</p>
</dd><dt class="field"><b>subclasses: List<int></b></dt><dd>
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
index 03eb241..de57570 100644
--- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -5295,8 +5295,8 @@
List<IncludedSuggestionSet>? 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<ElementKind>? includedElementKinds;
/// The client is expected to check this list against the values of the field
@@ -16478,7 +16478,7 @@
List<int> 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<int> 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 ff18a9d..9b0e23e 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 @@
///
/// 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<IncludedSuggestionRelevanceTag>
/// (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 156ec7d..4fc2820 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 @@
/**
* 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 @@
/**
* 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 e96ae5d..7bd407c 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -1842,7 +1842,7 @@
<p>
The client is expected to check this list against the
<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>
</field>
<field name="includedSuggestionRelevanceTags" optional="true">
@@ -5471,7 +5471,7 @@
<p>
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.
</p>
</field>
<field name="subclasses">
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 a8e086e..2076786 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 @@
List<IncludedSuggestionSet>? 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<ElementKind>? includedElementKinds;
/// The client is expected to check this list against the values of the field
@@ -16478,7 +16478,7 @@
List<int> 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<int> mixins;
diff --git a/pkg/analyzer/test/generated/parser_test_base.dart b/pkg/analyzer/test/generated/parser_test_base.dart
index 938e879..d2909a3 100644
--- a/pkg/analyzer/test/generated/parser_test_base.dart
+++ b/pkg/analyzer/test/generated/parser_test_base.dart
@@ -1506,7 +1506,7 @@
/// 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 930f6f4..a2d6e42 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 @@
]);
}
- test_indirect_notInstantiatedt() async {
+ test_indirect_notInstantiated() async {
await assertErrorsInCode(r'''
class A<K, V extends K> {}
class C<T extends List<A>> {}
diff --git a/pkg/compiler/lib/src/js_backend/interceptor_data.dart b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
index de5e42e..17da19f 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 @@
final Set<ClassEntity> _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<ClassEntity> _classesMixedIntoInterceptedClasses = {};
diff --git a/pkg/compiler/lib/src/phase/load_kernel.dart b/pkg/compiler/lib/src/phase/load_kernel.dart
index 99574c8..6f5f060 100644
--- a/pkg/compiler/lib/src/phase/load_kernel.dart
+++ b/pkg/compiler/lib/src/phase/load_kernel.dart
@@ -411,7 +411,7 @@
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 5a07efd..eab6ecb0 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 @@
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 b316cb4..c8c5e77 100644
--- a/pkg/compiler/test/jsinterop/internal_annotations_test.dart
+++ b/pkg/compiler/test/jsinterop/internal_annotations_test.dart
@@ -187,12 +187,12 @@
// 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 bc27e68..9ccd1ec 100644
--- a/pkg/compiler/test/jsinterop/world_test.dart
+++ b/pkg/compiler/test/jsinterop/world_test.dart
@@ -181,12 +181,12 @@
// 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 1fd68cb7..22a527c 100644
--- a/pkg/dds/tool/dap/codegen.dart
+++ b/pkg/dds/tool/dap/codegen.dart
@@ -375,13 +375,13 @@
: <String, JsonType>{};
// 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 f011b3b..b0f8237 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 @@
/// 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 @@
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 b3773dc..61eca8e 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 @@
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 d3ce0ba..a2ca1ab 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 @@
/// // 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 b5cc2b4..ffc7c71 100644
--- a/pkg/status_file/lib/status_file_linter.dart
+++ b/pkg/status_file/lib/status_file_linter.dart
@@ -168,7 +168,7 @@
/// [ 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 d4560eb..3cdff65 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -1972,7 +1972,7 @@
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 d711035..680aa3f 100644
--- a/runtime/vm/code_patcher.cc
+++ b/runtime/vm/code_patcher.cc
@@ -41,7 +41,7 @@
// 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 2cd509c..31efef3 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.h
+++ b/runtime/vm/compiler/assembler/assembler_ia32.h
@@ -1212,9 +1212,9 @@
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 9497fa7..6ea3f5f 100644
--- a/runtime/vm/compiler/ffi/marshaller.cc
+++ b/runtime/vm/compiler/ffi/marshaller.cc
@@ -207,7 +207,7 @@
}
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 cb74a08..caeacf1 100644
--- a/runtime/vm/compiler/ffi/marshaller.h
+++ b/runtime/vm/compiler/ffi/marshaller.h
@@ -180,7 +180,7 @@
// 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 af7cd80..7bd52c3 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -3294,7 +3294,7 @@
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 @@
} \
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 @@
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 @@
} \
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 @@
reinterpret_cast<uint8_t*>(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 @@
} \
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 @@
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 @@
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 @@
}
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 3edda33..1288065 100644
--- a/runtime/vm/datastream.h
+++ b/runtime/vm/datastream.h
@@ -118,7 +118,7 @@
current_ = reinterpret_cast<const uint8_t*>(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 91c17cd..a959f59 100644
--- a/runtime/vm/image_snapshot.h
+++ b/runtime/vm/image_snapshot.h
@@ -564,7 +564,7 @@
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 83489c3..0f69744 100644
--- a/runtime/vm/type_testing_stubs.cc
+++ b/runtime/vm/type_testing_stubs.cc
@@ -1325,9 +1325,9 @@
// 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 @@
// 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 4dbb507..c3152ab 100644
--- a/runtime/vm/unibrow.cc
+++ b/runtime/vm/unibrow.cc
@@ -84,7 +84,7 @@
// 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 dc2013d..e440baa 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 @@
*/
_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 @@
*/
_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 504ae5e..23611af 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 @@
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 467e012..6965d0b 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 @@
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 13e8f4a..c427dfc 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 @@
/// 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 @@
/// 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 428e0b8..24e99fb 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 @@
/// 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 f66ac00..a1b4464 100644
--- a/sdk/lib/_internal/vm/lib/string_patch.dart
+++ b/sdk/lib/_internal/vm/lib/string_patch.dart
@@ -93,7 +93,7 @@
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 47f2647..85bc297 100644
--- a/sdk/lib/convert/utf.dart
+++ b/sdk/lib/convert/utf.dart
@@ -287,7 +287,7 @@
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 96bf7ba..4dbd20a 100644
--- a/sdk/lib/internal/iterable.dart
+++ b/sdk/lib/internal/iterable.dart
@@ -881,7 +881,7 @@
* 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 8e9839e..5571aba 100644
--- a/sdk/lib/io/security_context.dart
+++ b/sdk/lib/io/security_context.dart
@@ -42,7 +42,7 @@
/// 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 0791f85..4b83ad7 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -733,7 +733,7 @@
/// 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 cb2745a..c5c3ff1 100644
--- a/sdk/lib/wasm/wasm_types.dart
+++ b/sdk/lib/wasm/wasm_types.dart
@@ -199,7 +199,7 @@
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<F extends Function>(WasmI32 index);
diff --git a/tests/corelib/bigint_bitlength_test.dart b/tests/corelib/bigint_bitlength_test.dart
index ff7c87a..c4e72a8 100644
--- a/tests/corelib/bigint_bitlength_test.dart
+++ b/tests/corelib/bigint_bitlength_test.dart
@@ -17,8 +17,8 @@
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 ff7c87a..c4e72a8 100644
--- a/tests/corelib_2/bigint_bitlength_test.dart
+++ b/tests/corelib_2/bigint_bitlength_test.dart
@@ -17,8 +17,8 @@
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 8d0e0d2..d8115ee 100644
--- a/tests/ffi/vmspecific_ffi_native_test.dart
+++ b/tests/ffi/vmspecific_ffi_native_test.dart
@@ -98,7 +98,7 @@
@FfiNative<IntPtr Function(IntPtr, Pointer<Void>)>('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 66b880c..706bb14 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