mirror of
https://github.com/dart-lang/sdk
synced 2024-10-02 23:49:17 +00:00
Spelling sdk
Closes https://github.com/dart-lang/sdk/pull/50918 Co-authored-by: Josh Soref <jsoref@gmail.com> GitOrigin-RevId: 1fd275051c561b63d374fb47e76a22424c4a12a9 Change-Id: I97790d9c79ff659f2c1fa2d2d46d041fe67957cb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278530 Reviewed-by: William Hesse <whesse@google.com> Commit-Queue: Alexander Thomas <athom@google.com> Reviewed-by: Tess Strickland <sstrickl@google.com>
This commit is contained in:
parent
a675b7e005
commit
b9b6511ca6
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -12,7 +12,7 @@ abstract class EfficientLengthIterable<T> extends Iterable<T> {
|
|||
|
||||
/// 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.
|
||||
|
|
|
@ -15,7 +15,7 @@ abstract class EfficientLengthIterable<T> extends Iterable<T> {
|
|||
|
||||
/// 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.
|
||||
|
|
|
@ -1379,7 +1379,7 @@ class Parser {
|
|||
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));
|
||||
|
|
|
@ -1967,7 +1967,7 @@ a:focus, a:hover {
|
|||
<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 @@ a:focus, a:hover {
|
|||
<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>
|
||||
|
||||
|
|
|
@ -5295,8 +5295,8 @@ class CompletionResultsParams implements HasToJson {
|
|||
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 @@ class TypeHierarchyItem implements HasToJson {
|
|||
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;
|
||||
|
||||
|
|
|
@ -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<IncludedSuggestionRelevanceTag>
|
||||
/// (optional)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -5295,8 +5295,8 @@ class CompletionResultsParams implements HasToJson {
|
|||
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 @@ class TypeHierarchyItem implements HasToJson {
|
|||
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;
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -150,7 +150,7 @@ class D<T extends B> {}
|
|||
]);
|
||||
}
|
||||
|
||||
test_indirect_notInstantiatedt() async {
|
||||
test_indirect_notInstantiated() async {
|
||||
await assertErrorsInCode(r'''
|
||||
class A<K, V extends K> {}
|
||||
class C<T extends List<A>> {}
|
||||
|
|
|
@ -288,7 +288,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder {
|
|||
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 = {};
|
||||
|
||||
|
|
|
@ -411,7 +411,7 @@ Future<Output?> 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).
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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}`:"
|
||||
|
|
|
@ -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}`:"
|
||||
|
|
|
@ -375,13 +375,13 @@ class CodeGenerator {
|
|||
: <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;
|
||||
}
|
||||
|
|
|
@ -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].
|
||||
|
|
|
@ -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].
|
||||
|
|
|
@ -256,7 +256,7 @@ abstract class CombinedMemberSignatureBase<T> {
|
|||
/// // 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}) {}
|
||||
|
|
|
@ -168,7 +168,7 @@ Iterable<LintingError> lintSectionEntryDuplicates(StatusSection section) {
|
|||
/// [ strong ]
|
||||
/// [ $compiler == dart2js ]
|
||||
///
|
||||
/// which should should become:
|
||||
/// which should become:
|
||||
///
|
||||
/// [ $compiler == dart2js ]
|
||||
/// [ $mode == debug ]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<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 @@ 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);
|
||||
|
|
|
@ -118,7 +118,7 @@ class ReadStream : public ValueObject {
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() &&
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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]) {
|
||||
|
|
|
@ -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]) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
///
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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.
|
||||
}
|
||||
|
||||
|
|
|
@ -881,7 +881,7 @@ class WhereTypeIterator<T> implements Iterator<T> {
|
|||
* 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");
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -199,7 +199,7 @@ class WasmTable<T> 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<F extends Function>(WasmI32 index);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -98,7 +98,7 @@ external int passAsPointerAndValue(NativeFieldWrapperClass1 obj, int value);
|
|||
@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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue