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

@ -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

@ -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>

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

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

@ -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">

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

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

@ -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

@ -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

@ -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

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

@ -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

@ -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

@ -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;