From f7a2ea5e0674cfb7af10e44dad331e8ba5a42523 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 24 Jan 2023 18:00:25 +0000 Subject: [PATCH] Spelling Closes https://github.com/dart-lang/sdk/pull/50922 GitOrigin-RevId: 58fd7cfd5ef470a65a52ea28e0407244d853c917 Change-Id: I2e5a5ed991cb05270170a18b8f0169daa9eabdb7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278537 Reviewed-by: Alexander Thomas Commit-Queue: Alexander Thomas --- BUILD.gn | 8 ++++---- CHANGELOG.md | 8 ++++---- runtime/BUILD.gn | 2 +- .../docs/compiler/pragmas_recognized_by_compiler.md | 2 +- runtime/docs/compiler/type_testing_stubs.md | 4 ++-- runtime/docs/gc.md | 4 ++-- runtime/docs/glossary.md | 2 +- runtime/docs/index.md | 2 +- runtime/include/dart_api.h | 10 +++++----- runtime/include/dart_tools_api.h | 4 ++-- runtime/lib/ffi_dynamic_library.cc | 8 ++++---- runtime/lib/isolate.cc | 2 +- runtime/observatory/lib/src/elements/script_inset.dart | 2 +- .../observatory_2/lib/src/elements/script_inset.dart | 2 +- runtime/platform/floating_point_win.cc | 2 +- runtime/platform/globals.h | 2 +- runtime/platform/utils.cc | 2 +- runtime/tests/vm/dart/causal_stacks/utils.dart | 2 +- runtime/tests/vm/dart/enable_mirrors_test.dart | 2 +- runtime/tests/vm/dart/flutter_regress_82278_test.dart | 2 +- .../vm/dart/heap_snapshot_regress_49710_test.dart | 2 +- .../dart_api_create_lightweight_isolate_test.dart | 2 +- runtime/tests/vm/dart/regress_35481_test.dart | 2 +- runtime/tests/vm/dart/splay_ephemeron_test.dart | 8 ++++---- runtime/tests/vm/dart/splay_weak_test.dart | 4 ++-- runtime/tests/vm/dart/transferable_throws_test.dart | 4 ++-- runtime/tests/vm/dart_2/causal_stacks/utils.dart | 2 +- runtime/tests/vm/dart_2/enable_mirrors_test.dart | 2 +- .../tests/vm/dart_2/flutter_regress_82278_test.dart | 2 +- .../vm/dart_2/heap_snapshot_regress_49710_test.dart | 2 +- .../dart_api_create_lightweight_isolate_test.dart | 2 +- runtime/tests/vm/dart_2/regress_35481_test.dart | 2 +- runtime/tests/vm/dart_2/splay_ephemeron_test.dart | 8 ++++---- runtime/tests/vm/dart_2/splay_weak_test.dart | 4 ++-- runtime/tests/vm/dart_2/transferable_throws_test.dart | 4 ++-- runtime/tests/vm/vm.status | 6 +++--- runtime/third_party/double-conversion/src/bignum.cc | 6 +++--- .../double-conversion/src/double-conversion.h | 2 +- runtime/third_party/double-conversion/src/fast-dtoa.cc | 2 +- .../third_party/double-conversion/src/fixed-dtoa.cc | 2 +- runtime/third_party/double-conversion/src/strtod.cc | 2 +- runtime/tools/create_snapshot_file.py | 2 +- runtime/tools/dartfuzz/dartfuzz.dart | 2 +- runtime/tools/dartfuzz/dartfuzz_test.dart | 2 +- runtime/tools/dartfuzz/gen_api_table.dart | 2 +- runtime/tools/dartfuzz/gen_type_table.dart | 2 +- runtime/tools/graphexplorer/graphexplorer.js | 2 +- runtime/tools/heapsnapshot/lib/src/analysis.dart | 2 +- runtime/tools/heapsnapshot/lib/src/cli.dart | 2 +- runtime/tools/heapsnapshot/test/utils.dart | 2 +- runtime/vm/compiler/aot/precompiler.cc | 2 +- runtime/vm/compiler/aot/precompiler.h | 2 +- runtime/vm/compiler/backend/flow_graph_compiler.h | 2 +- runtime/vm/compiler/backend/il_arm.cc | 2 +- runtime/vm/compiler/backend/il_x64.cc | 2 +- runtime/vm/compiler/backend/inliner.cc | 2 +- runtime/vm/compiler/graph_intrinsifier.cc | 8 ++++---- runtime/vm/compiler/intrinsifier.cc | 4 ++-- runtime/vm/compiler/stub_code_compiler_arm.cc | 2 +- runtime/vm/compiler/stub_code_compiler_arm64.cc | 2 +- runtime/vm/compiler/stub_code_compiler_ia32.cc | 2 +- runtime/vm/compiler/stub_code_compiler_riscv.cc | 2 +- runtime/vm/compiler/stub_code_compiler_x64.cc | 2 +- runtime/vm/constants_riscv.h | 2 +- runtime/vm/dart_api_impl_test.cc | 2 +- runtime/vm/elf.cc | 2 +- runtime/vm/exceptions.h | 2 +- runtime/vm/kernel_loader.cc | 2 +- runtime/vm/message_snapshot.cc | 4 ++-- runtime/vm/object.cc | 2 +- runtime/vm/object.h | 2 +- runtime/vm/os_thread.h | 2 +- runtime/vm/service_test.cc | 2 +- third_party/binaryen/BUILD.gn | 2 +- utils/peg/pegparser.dart | 2 +- 75 files changed, 110 insertions(+), 110 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 380fc57909e..43b5605bf39 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -5,11 +5,11 @@ import("build/config/gclient_args.gni") import("sdk_args.gni") -targetting_fuchsia = target_os == "fuchsia" +targeting_fuchsia = target_os == "fuchsia" # This target will be built if no target is specified when invoking ninja. group("default") { - if (targetting_fuchsia) { + if (targeting_fuchsia) { # Fuchsia has run_vm_tests marked testonly. testonly = true } @@ -18,7 +18,7 @@ group("default") { group("most") { import("runtime/runtime_args.gni") - if (targetting_fuchsia) { + if (targeting_fuchsia) { # Fuchsia has run_vm_tests marked testonly. testonly = true } @@ -35,7 +35,7 @@ group("most") { group("runtime") { import("runtime/runtime_args.gni") - if (targetting_fuchsia) { + if (targeting_fuchsia) { # Fuchsia has run_vm_tests marked testonly. testonly = true } diff --git a/CHANGELOG.md b/CHANGELOG.md index aaf2085370f..b6fdcb85635 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -648,7 +648,7 @@ them, you must set the lower bound on the SDK constraint for your package to ``` This change is needed to fix [#36453][] where the dart programs not caring - about the terminal settings can inadverently corrupt the terminal settings + about the terminal settings can inadvertently corrupt the terminal settings when e.g. piping into less. Furthermore the `echoMode` setting now only controls the `echo` local mode @@ -1078,7 +1078,7 @@ them, you must set the lower bound on the SDK constraint for your package to - **Breaking change** [#46100](https://github.com/dart-lang/sdk/issues/46100): The standalone `dartdevc` tool has been marked deprecated as previously - announced and will be deleted in a future Dart stable relase. This tool + announced and will be deleted in a future Dart stable release. This tool was intended for use only by build systems like bazel, `build_web_compilers` and `flutter_tools`. The functionality remains available for those systems, but it is no longer exposed as a command-line tool in the SDK. @@ -1867,7 +1867,7 @@ This is a patch release that fixes: `a.toUnsigned(32) >>> b` on the VM. - Prior to Dart 2.14, metadata (annotations) were not permitted to be specified - with generic type arguments. This restriction is lifted in Dart Dart 2.14. + with generic type arguments. This restriction is lifted in Dart 2.14. ```dart class C { @@ -2648,7 +2648,7 @@ This is a patch release that fixes the following issues: - compiler error causing incorrect use of positional parameters when named parameters should be used instead (issues [flutter/flutter#65324][] and [flutter/flutter#68092][]). -- crashes and/or undefined behavor in AOT compiled code (issues [#43770][] and +- crashes and/or undefined behavior in AOT compiled code (issues [#43770][] and [#43786][]). - AOT compilation of classes with more than 64 unboxed fields (issue [flutter/flutter#67803][]). diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index 2b8f56010ed..e4a40fe4130 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -172,7 +172,7 @@ config("dart_config") { lib_dirs = [ root_out_dir + "/lib" ] } if (using_fuchsia_gn_sdk || using_fuchsia_sdk) { - # TODO(chinmaygarde): Currenty these targets need to be build in the + # TODO(chinmaygarde): Currently these targets need to be build in the # Fuchsia tree as well as outside it using the SDK. However, not all # Fuchsia features are available in the SDK. As these features are added, # the guards can be removed. Eventually, only SDK builds will be present. diff --git a/runtime/docs/compiler/pragmas_recognized_by_compiler.md b/runtime/docs/compiler/pragmas_recognized_by_compiler.md index 640fd3c693b..f7d06bb515b 100644 --- a/runtime/docs/compiler/pragmas_recognized_by_compiler.md +++ b/runtime/docs/compiler/pragmas_recognized_by_compiler.md @@ -36,7 +36,7 @@ VM will keep trying to inline the function in new contexts, not giving up after ## Annotations for return types and field types The VM is not able to see across method calls (apart from inlining) and -therefore does not know anything about the return'ed values of calls, except for +therefore does not know anything about the returned values of calls, except for the interface type of the signature. To improve this we have two types of additional information sources the VM diff --git a/runtime/docs/compiler/type_testing_stubs.md b/runtime/docs/compiler/type_testing_stubs.md index b8a0a0d5022..26749c4c306 100644 --- a/runtime/docs/compiler/type_testing_stubs.md +++ b/runtime/docs/compiler/type_testing_stubs.md @@ -4,7 +4,7 @@ This page describes how type testing stubs (TTS) are implemented. ### Type Tests -Explicit ` as ` checks in Dart code (also generated implicitly in CFE) compile +Explicit ` as ` checks in Dart code (also generated implicitly in CFE) compile in the Dart VM's IL to the `AssertAssignable` instruction. ### Type Testing Stubs @@ -25,7 +25,7 @@ The TTS has a special calling convention which accepts: This calling convention is the same as for the SubtypeTestCache-based implementation. -We distuinguish between different type tests (based on the ``): +We distinguish between different type tests (based on the ``): #### Simple Subtype ClassId-based range checks diff --git a/runtime/docs/gc.md b/runtime/docs/gc.md index 8545a375414..ffd1ca96ad8 100644 --- a/runtime/docs/gc.md +++ b/runtime/docs/gc.md @@ -189,7 +189,7 @@ We can eliminate these checks when the compiler can prove these cases cannot hap * `container` is the same object as `value`. The GC never needs to retain an additional object if it sees a self-reference, so ignoring a self-reference cannot cause us to free a reachable object. * `container` is known to be a new object or known to be an old object that is in the remembered set and is marked if marking is in progress. -We can know that `container` meets the last property if `container` is the result of an allocation (instead of a heap load), and there is no instruction that can trigger a GC between the allocation and the store. This is because the allocation stubs ensure the result of AllocateObject is either a new-space object (common case, bump pointer allocation succeeds), or has been pre-emptively added to the remembered set and marking worklist (uncommon case, entered runtime to allocate object, possibly triggering GC). +We can know that `container` meets the last property if `container` is the result of an allocation (instead of a heap load), and there is no instruction that can trigger a GC between the allocation and the store. This is because the allocation stubs ensure the result of AllocateObject is either a new-space object (common case, bump pointer allocation succeeds), or has been preemptively added to the remembered set and marking worklist (uncommon case, entered runtime to allocate object, possibly triggering GC). ``` container <- AllocateObject @@ -197,7 +197,7 @@ container <- AllocateObject StoreInstanceField(container, value, NoBarrier) ``` -We can further eliminate barriers when `container` is the result of an allocation, and there is no instruction that can create an additional Dart frame between the allocation and the store. This is because after a GC, any old-space objects in the frames below an exit frame will be pre-emptively added to the remembered set and marking worklist (Thread::RestoreWriteBarrierInvariant). +We can further eliminate barriers when `container` is the result of an allocation, and there is no instruction that can create an additional Dart frame between the allocation and the store. This is because after a GC, any old-space objects in the frames below an exit frame will be preemptively added to the remembered set and marking worklist (Thread::RestoreWriteBarrierInvariant). ``` container <- AllocateObject diff --git a/runtime/docs/glossary.md b/runtime/docs/glossary.md index 1264136fed1..c25e7b31ecf 100644 --- a/runtime/docs/glossary.md +++ b/runtime/docs/glossary.md @@ -116,7 +116,7 @@ A set of isolates that are sharing the same program and the same heap. Isolates ## Out-of-band message, OOB message -A message that is deliveried at any interrupt check, such as at function entry or the back-edge of a loop, rather than only when returning to the message loop. +A message that is delivered at any interrupt check, such as at function entry or the back-edge of a loop, rather than only when returning to the message loop. ## [Hot reload](https://github.com/dart-lang/sdk/wiki/Hot-reload) diff --git a/runtime/docs/index.md b/runtime/docs/index.md index 23a1a147305..21a9843a7fc 100644 --- a/runtime/docs/index.md +++ b/runtime/docs/index.md @@ -214,7 +214,7 @@ void printAnimal(obj) { print('}'); } -// Call printAnimal(...) a lot of times with an intance of Cat. +// Call printAnimal(...) a lot of times with an instance of Cat. // As a result printAnimal(...) will be optimized under the // assumption that obj is always a Cat. for (var i = 0; i < 50000; i++) diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h index 65d98c59ad2..4f4baeabb9a 100644 --- a/runtime/include/dart_api.h +++ b/runtime/include/dart_api.h @@ -1711,8 +1711,8 @@ DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_RunLoop(void); * \param error A non-NULL pointer which will hold an error message if the call * fails. The error has to be free()ed by the caller. * - * \return If successful the VM takes owernship of the isolate and takes care - * of its message loop. If not successful the caller retains owernship of the + * \return If successful the VM takes ownership of the isolate and takes care + * of its message loop. If not successful the caller retains ownership of the * isolate. */ DART_EXPORT DART_WARN_UNUSED_RESULT bool Dart_RunLoopAsync( @@ -3504,7 +3504,7 @@ DART_EXPORT Dart_Handle Dart_SetRootLibrary(Dart_Handle library); * \param number_of_type_arguments Number of type arguments. * For non parametric types the number of type arguments would be 0. * \param type_arguments Pointer to an array of type arguments. - * For non parameteric types a NULL would be passed in for this argument. + * For non parametric types a NULL would be passed in for this argument. * * \return If no error occurs, the type is returned. * Otherwise an error handle is returned. @@ -3523,7 +3523,7 @@ DART_EXPORT Dart_Handle Dart_GetType(Dart_Handle library, * \param number_of_type_arguments Number of type arguments. * For non parametric types the number of type arguments would be 0. * \param type_arguments Pointer to an array of type arguments. - * For non parameteric types a NULL would be passed in for this argument. + * For non parametric types a NULL would be passed in for this argument. * * \return If no error occurs, the type is returned. * Otherwise an error handle is returned. @@ -3542,7 +3542,7 @@ DART_EXPORT Dart_Handle Dart_GetNullableType(Dart_Handle library, * \param number_of_type_arguments Number of type arguments. * For non parametric types the number of type arguments would be 0. * \param type_arguments Pointer to an array of type arguments. - * For non parameteric types a NULL would be passed in for this argument. + * For non parametric types a NULL would be passed in for this argument. * * \return If no error occurs, the type is returned. * Otherwise an error handle is returned. diff --git a/runtime/include/dart_tools_api.h b/runtime/include/dart_tools_api.h index 42c2ba8db2e..35cc00a1d4b 100644 --- a/runtime/include/dart_tools_api.h +++ b/runtime/include/dart_tools_api.h @@ -364,7 +364,7 @@ DART_EXPORT bool Dart_IsReloading(); * "Embedder" - Execution of Dart embedder code * "GC" - Execution of Dart Garbage Collector * "Isolate" - Dart Isolate lifecycle execution - * "VM" - Excution in Dart VM runtime code + * "VM" - Execution in Dart VM runtime code * "" - None * * When "all" is specified all the categories are enabled. @@ -518,7 +518,7 @@ typedef void (*Dart_TimelineRecorderCallback)( * will be remembered. Providing a NULL callback will clear the registration * (i.e., a NULL callback produced a no-op instead of a crash). * - * Setting a callback is insuffient to receive events through the callback. The + * Setting a callback is insufficient to receive events through the callback. The * VM flag `timeline_recorder` must also be set to `callback`. */ DART_EXPORT void Dart_SetTimelineRecorderCallback( diff --git a/runtime/lib/ffi_dynamic_library.cc b/runtime/lib/ffi_dynamic_library.cc index a6b0f2893fb..f0d3acd8ffb 100644 --- a/runtime/lib/ffi_dynamic_library.cc +++ b/runtime/lib/ffi_dynamic_library.cc @@ -87,15 +87,15 @@ static void* LoadDynamicLibrary(const char* library_file, // On windows, nullptr signals trying a lookup in all loaded modules. const nullptr_t kWindowsDynamicLibraryProcessPtr = nullptr; -void* co_task_mem_alloced = nullptr; +void* co_task_mem_allocated = nullptr; // If an error occurs populates |error| with an error message // (caller must free this message when it is no longer needed). void* LookupSymbolInProcess(const char* symbol, char** error) { // Force loading ole32.dll. - if (co_task_mem_alloced == nullptr) { - co_task_mem_alloced = CoTaskMemAlloc(sizeof(intptr_t)); - CoTaskMemFree(co_task_mem_alloced); + if (co_task_mem_allocated == nullptr) { + co_task_mem_allocated = CoTaskMemAlloc(sizeof(intptr_t)); + CoTaskMemFree(co_task_mem_allocated); } HANDLE current_process = diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc index 7e2c78a732d..09764dde8fe 100644 --- a/runtime/lib/isolate.cc +++ b/runtime/lib/isolate.cc @@ -1267,7 +1267,7 @@ DEFINE_NATIVE_ENTRY(TransferableTypedData_materialize, 0, 1) { { NoSafepointScope no_safepoint; peer = thread->heap()->GetPeer(t.ptr()); - // Assume that object's Peer is only used to track transferrability state. + // Assume that object's Peer is only used to track transferability state. ASSERT(peer != nullptr); } diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart index 51c101d62f2..3fffc51e143 100644 --- a/runtime/observatory/lib/src/elements/script_inset.dart +++ b/runtime/observatory/lib/src/elements/script_inset.dart @@ -903,7 +903,7 @@ class ScriptInsetElement extends CustomElement implements Renderable { var position = 0; consumeUntil(var stop) { if (stop <= position) { - return null; // Empty gap between annotations/boundries. + return null; // Empty gap between annotations/boundaries. } if (stop > line.text.length) { // Approximated token length can run past the end of the line. diff --git a/runtime/observatory_2/lib/src/elements/script_inset.dart b/runtime/observatory_2/lib/src/elements/script_inset.dart index 721663a9d3d..82ea4c6fb9b 100644 --- a/runtime/observatory_2/lib/src/elements/script_inset.dart +++ b/runtime/observatory_2/lib/src/elements/script_inset.dart @@ -901,7 +901,7 @@ class ScriptInsetElement extends CustomElement implements Renderable { var position = 0; consumeUntil(var stop) { if (stop <= position) { - return null; // Empty gap between annotations/boundries. + return null; // Empty gap between annotations/boundaries. } if (stop > line.text.length) { // Approximated token length can run past the end of the line. diff --git a/runtime/platform/floating_point_win.cc b/runtime/platform/floating_point_win.cc index 6e853d6dfcd..cf674346324 100644 --- a/runtime/platform/floating_point_win.cc +++ b/runtime/platform/floating_point_win.cc @@ -34,7 +34,7 @@ double atan2_ieee(double x, double y) { if (((cls_x & (_FPCLASS_PINF | _FPCLASS_NINF)) != 0) && ((cls_y & (_FPCLASS_PINF | _FPCLASS_NINF)) != 0)) { // atan2 values at infinities listed above are the same as values - // at (+/-1, +/-1). index_x is 0, when x is +infinty, 1 when x is -infinty. + // at (+/-1, +/-1). index_x is 0, when x is +infinity, 1 when x is -infinity. // Same is with index_y. int index_x = (cls_x & _FPCLASS_PINF) != 0 ? 0 : 1; int index_y = (cls_y & _FPCLASS_PINF) != 0 ? 0 : 1; diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h index 2c9b7404a8a..40d8ac3d1cf 100644 --- a/runtime/platform/globals.h +++ b/runtime/platform/globals.h @@ -250,7 +250,7 @@ struct simd128_value_t { #error Automatic compiler detection failed. #endif -// LIKELY/UNLIKELY give the compiler branch preditions that may affect block +// LIKELY/UNLIKELY give the compiler branch predictions that may affect block // scheduling. #ifdef __GNUC__ #define LIKELY(cond) __builtin_expect((cond), 1) diff --git a/runtime/platform/utils.cc b/runtime/platform/utils.cc index f8bd278785f..c35f98c5c0d 100644 --- a/runtime/platform/utils.cc +++ b/runtime/platform/utils.cc @@ -86,7 +86,7 @@ uint32_t Utils::ReverseBits32(uint32_t x) { } // Implementation according to H.S.Warren's "Hacker's Delight" -// (Addison Wesley, 2002) Chapter 10 and T.Grablund, P.L.Montogomery's +// (Addison Wesley, 2002) Chapter 10 and T.Grablund, P.L.Montgomery's // "Division by Invariant Integers Using Multiplication" (PLDI 1994). void Utils::CalculateMagicAndShiftForDivRem(int64_t divisor, int64_t* magic, diff --git a/runtime/tests/vm/dart/causal_stacks/utils.dart b/runtime/tests/vm/dart/causal_stacks/utils.dart index 4356953531c..27545919308 100644 --- a/runtime/tests/vm/dart/causal_stacks/utils.dart +++ b/runtime/tests/vm/dart/causal_stacks/utils.dart @@ -284,7 +284,7 @@ Future doTestAwaitThen(Future f(), List expectedStack, // Caller catches but a then is set. try { // Passing (e) {} to then() can cause the closure instructions to be - // dedupped, changing the stack trace to the dedupped owner, so we + // deduped, changing the stack trace to the deduped owner, so we // duplicate the Expect.fail() call in the closure. await f().then((e) => Expect.fail('No exception thrown!')); Expect.fail('No exception thrown!'); diff --git a/runtime/tests/vm/dart/enable_mirrors_test.dart b/runtime/tests/vm/dart/enable_mirrors_test.dart index e9f8e195821..050fed4e74d 100644 --- a/runtime/tests/vm/dart/enable_mirrors_test.dart +++ b/runtime/tests/vm/dart/enable_mirrors_test.dart @@ -4,7 +4,7 @@ // VMOptions=--enable-mirrors=false -// Verfies that '--enable-mirrors=false' affects conditional imports and +// Verifies that '--enable-mirrors=false' affects conditional imports and // constant bool.fromEnvironment. import "package:expect/expect.dart"; diff --git a/runtime/tests/vm/dart/flutter_regress_82278_test.dart b/runtime/tests/vm/dart/flutter_regress_82278_test.dart index 3170ab4d82a..0a6f4b69e26 100644 --- a/runtime/tests/vm/dart/flutter_regress_82278_test.dart +++ b/runtime/tests/vm/dart/flutter_regress_82278_test.dart @@ -50,7 +50,7 @@ class Foo { } // The TypeArgumentVector will be at an offset that cannot be loaded from via -// normal addresing mode on ARM64. +// normal addressing mode on ARM64. class GenericFoo extends Foo {} final l = [GenericFoo(), null, 1, 1.0]; diff --git a/runtime/tests/vm/dart/heap_snapshot_regress_49710_test.dart b/runtime/tests/vm/dart/heap_snapshot_regress_49710_test.dart index b1ec9928574..8dd16f85360 100644 --- a/runtime/tests/vm/dart/heap_snapshot_regress_49710_test.dart +++ b/runtime/tests/vm/dart/heap_snapshot_regress_49710_test.dart @@ -18,7 +18,7 @@ main() async { VMInternalsForTesting.writeHeapSnapshotToFile(file); final snapshot = loadHeapSnapshotFromFile(file); for (final klass in snapshot.classes) { - // Ensure field indices are unique, densly numbered from 0. + // Ensure field indices are unique, densely numbered from 0. final fields = klass.fields.toList()..sort((a, b) => a.index - b.index); for (int i = 0; i < fields.length; ++i) { Expect.equals(i, fields[i].index); diff --git a/runtime/tests/vm/dart/isolates/dart_api_create_lightweight_isolate_test.dart b/runtime/tests/vm/dart/isolates/dart_api_create_lightweight_isolate_test.dart index d4734b8a903..14b92ff05ee 100644 --- a/runtime/tests/vm/dart/isolates/dart_api_create_lightweight_isolate_test.dart +++ b/runtime/tests/vm/dart/isolates/dart_api_create_lightweight_isolate_test.dart @@ -116,7 +116,7 @@ Future withPeerPointer(fun(Pointer peer)) async { // we can validate that a->x has been changed. Expect.isTrue(peer.cast().toDartString().startsWith('xb')); - // The cleanup callback is called after after notifying exit listeners. So we + // The cleanup callback is called after notifying exit listeners. So we // wait a little here to ensure the write of the callback has arrived. await Future.delayed(const Duration(milliseconds: 100)); Expect.equals('xbz', peer.cast().toDartString()); diff --git a/runtime/tests/vm/dart/regress_35481_test.dart b/runtime/tests/vm/dart/regress_35481_test.dart index f7acbddad90..3f4264bc790 100644 --- a/runtime/tests/vm/dart/regress_35481_test.dart +++ b/runtime/tests/vm/dart/regress_35481_test.dart @@ -8,7 +8,7 @@ // // Here, all phi nodes generated within the try block are kept alive, and one of // the phi nodes within toList (which gets inlined) uses the value of an -// instance call to setLength. Inlining setLength wthin toList replaced the +// instance call to setLength. Inlining setLength within toList replaced the // (binding) InstanceCall instruction with a (non-binding) StoreInstanceField // instruction, which caused the phi node to have an invalid SSA index argument. diff --git a/runtime/tests/vm/dart/splay_ephemeron_test.dart b/runtime/tests/vm/dart/splay_ephemeron_test.dart index d7d2f1d5103..bdb3b05add8 100644 --- a/runtime/tests/vm/dart/splay_ephemeron_test.dart +++ b/runtime/tests/vm/dart/splay_ephemeron_test.dart @@ -48,8 +48,8 @@ class Payload { this.right = right; } - // This ordering of fields is delibrate: one key is visited before the expando - // and one after. + // This ordering of fields is deliberate: one key is visited before the + // expando and one after. final leftKey = new Object(); final expando = new Expando(); final rightKey = new Object(); @@ -69,8 +69,8 @@ class Payload { class EphemeronNode extends Node { EphemeronNode(num key, Object? value) : super(key, value); - // This ordering of fields is delibrate: one key is visited before the expando - // and one after. + // This ordering of fields is deliberate: one key is visited before the + // expando and one after. final leftKey = new Object(); final expando = new Expando(); final rightKey = new Object(); diff --git a/runtime/tests/vm/dart/splay_weak_test.dart b/runtime/tests/vm/dart/splay_weak_test.dart index 32f8445d7d0..4d1209b0d45 100644 --- a/runtime/tests/vm/dart/splay_weak_test.dart +++ b/runtime/tests/vm/dart/splay_weak_test.dart @@ -46,7 +46,7 @@ class Payload { this.right = right; } - // This ordering of fields is delibrate: one strong reference visited before + // This ordering of fields is deliberate: one strong reference visited before // the weak reference and one after. var leftWeak; @pragma("vm:entry-point") // TODO(50571): Remove illegal optimization. @@ -78,7 +78,7 @@ class Payload { class WeakNode extends Node { WeakNode(num key, Object? value) : super(key, value); - // This ordering of fields is delibrate: one strong reference visited before + // This ordering of fields is deliberate: one strong reference visited before // the weak reference and one after. var leftWeak; @pragma("vm:entry-point") // TODO(50571): Remove illegal optimization. diff --git a/runtime/tests/vm/dart/transferable_throws_test.dart b/runtime/tests/vm/dart/transferable_throws_test.dart index 1c3aadf55a8..c01459a3078 100644 --- a/runtime/tests/vm/dart/transferable_throws_test.dart +++ b/runtime/tests/vm/dart/transferable_throws_test.dart @@ -66,7 +66,7 @@ void receiver(final transferable) { transferable.materialize(); } -throwsIfCummulativeListIsTooLargeOn32bitPlatform() { +throwsIfCumulativeListIsTooLargeOn32bitPlatform() { try { int maxUint8ListSize = pow(2, 30) as int; // Check whether we are on 32-bit or 64-bit platform. @@ -96,7 +96,7 @@ main() async { await throwsIfSendMoreThanOnce(); throwsIfMaterializeMoreThanOnce(); await throwsIfReceiverMaterializesMoreThanOnce(); - throwsIfCummulativeListIsTooLargeOn32bitPlatform(); + throwsIfCumulativeListIsTooLargeOn32bitPlatform(); dynamic myNull; if (hasUnsoundNullSafety) { diff --git a/runtime/tests/vm/dart_2/causal_stacks/utils.dart b/runtime/tests/vm/dart_2/causal_stacks/utils.dart index ec673b517ef..48ab8a7ffed 100644 --- a/runtime/tests/vm/dart_2/causal_stacks/utils.dart +++ b/runtime/tests/vm/dart_2/causal_stacks/utils.dart @@ -286,7 +286,7 @@ Future doTestAwaitThen(Future f(), List expectedStack, // Caller catches but a then is set. try { // Passing (e) {} to then() can cause the closure instructions to be - // dedupped, changing the stack trace to the dedupped owner, so we + // deduped, changing the stack trace to the deduped owner, so we // duplicate the Expect.fail() call in the closure. await f().then((e) => Expect.fail('No exception thrown!')); Expect.fail('No exception thrown!'); diff --git a/runtime/tests/vm/dart_2/enable_mirrors_test.dart b/runtime/tests/vm/dart_2/enable_mirrors_test.dart index 072c740ab76..7716e67cf44 100644 --- a/runtime/tests/vm/dart_2/enable_mirrors_test.dart +++ b/runtime/tests/vm/dart_2/enable_mirrors_test.dart @@ -4,7 +4,7 @@ // VMOptions=--enable-mirrors=false -// Verfies that '--enable-mirrors=false' affects conditional imports and +// Verifies that '--enable-mirrors=false' affects conditional imports and // constant bool.fromEnvironment. // @dart = 2.9 diff --git a/runtime/tests/vm/dart_2/flutter_regress_82278_test.dart b/runtime/tests/vm/dart_2/flutter_regress_82278_test.dart index 13f18e61860..1e813eaf9a2 100644 --- a/runtime/tests/vm/dart_2/flutter_regress_82278_test.dart +++ b/runtime/tests/vm/dart_2/flutter_regress_82278_test.dart @@ -52,7 +52,7 @@ class Foo { } // The TypeArgumentVector will be at an offset that cannot be loaded from via -// normal addresing mode on ARM64. +// normal addressing mode on ARM64. class GenericFoo extends Foo {} final l = [GenericFoo(), null, 1, 1.0]; diff --git a/runtime/tests/vm/dart_2/heap_snapshot_regress_49710_test.dart b/runtime/tests/vm/dart_2/heap_snapshot_regress_49710_test.dart index 3853304d88f..06d3fa69dce 100644 --- a/runtime/tests/vm/dart_2/heap_snapshot_regress_49710_test.dart +++ b/runtime/tests/vm/dart_2/heap_snapshot_regress_49710_test.dart @@ -20,7 +20,7 @@ main() async { VMInternalsForTesting.writeHeapSnapshotToFile(file); final snapshot = loadHeapSnapshotFromFile(file); for (final klass in snapshot.classes) { - // Ensure field indices are unique, densly numbered from 0. + // Ensure field indices are unique, densely numbered from 0. final fields = klass.fields.toList()..sort((a, b) => a.index - b.index); for (int i = 0; i < fields.length; ++i) { Expect.equals(i, fields[i].index); diff --git a/runtime/tests/vm/dart_2/isolates/dart_api_create_lightweight_isolate_test.dart b/runtime/tests/vm/dart_2/isolates/dart_api_create_lightweight_isolate_test.dart index 23ffcd0315c..eb25cfb27a3 100644 --- a/runtime/tests/vm/dart_2/isolates/dart_api_create_lightweight_isolate_test.dart +++ b/runtime/tests/vm/dart_2/isolates/dart_api_create_lightweight_isolate_test.dart @@ -118,7 +118,7 @@ Future withPeerPointer(fun(Pointer peer)) async { // we can validate that a->x has been changed. Expect.isTrue(peer.cast().toDartString().startsWith('xb')); - // The cleanup callback is called after after notifying exit listeners. So we + // The cleanup callback is called after notifying exit listeners. So we // wait a little here to ensure the write of the callback has arrived. await Future.delayed(const Duration(milliseconds: 100)); Expect.equals('xbz', peer.cast().toDartString()); diff --git a/runtime/tests/vm/dart_2/regress_35481_test.dart b/runtime/tests/vm/dart_2/regress_35481_test.dart index a6cbf25ed49..4041c1ad9d3 100644 --- a/runtime/tests/vm/dart_2/regress_35481_test.dart +++ b/runtime/tests/vm/dart_2/regress_35481_test.dart @@ -10,7 +10,7 @@ // // Here, all phi nodes generated within the try block are kept alive, and one of // the phi nodes within toList (which gets inlined) uses the value of an -// instance call to setLength. Inlining setLength wthin toList replaced the +// instance call to setLength. Inlining setLength within toList replaced the // (binding) InstanceCall instruction with a (non-binding) StoreInstanceField // instruction, which caused the phi node to have an invalid SSA index argument. diff --git a/runtime/tests/vm/dart_2/splay_ephemeron_test.dart b/runtime/tests/vm/dart_2/splay_ephemeron_test.dart index 0f435fef89a..9e89fbe7b31 100644 --- a/runtime/tests/vm/dart_2/splay_ephemeron_test.dart +++ b/runtime/tests/vm/dart_2/splay_ephemeron_test.dart @@ -52,8 +52,8 @@ class Payload { this.right = right; } - // This ordering of fields is delibrate: one key is visited before the expando - // and one after. + // This ordering of fields is deliberate: one key is visited before the + // expando and one after. final leftKey = new Object(); final expando = new Expando(); final rightKey = new Object(); @@ -73,8 +73,8 @@ class Payload { class EphemeronNode extends Node { EphemeronNode(num key, Object value) : super(key, value); - // This ordering of fields is delibrate: one key is visited before the expando - // and one after. + // This ordering of fields is deliberate: one key is visited before the + // expando and one after. final leftKey = new Object(); final expando = new Expando(); final rightKey = new Object(); diff --git a/runtime/tests/vm/dart_2/splay_weak_test.dart b/runtime/tests/vm/dart_2/splay_weak_test.dart index ccf551fd286..154c1979b9f 100644 --- a/runtime/tests/vm/dart_2/splay_weak_test.dart +++ b/runtime/tests/vm/dart_2/splay_weak_test.dart @@ -50,7 +50,7 @@ class Payload { this.right = right; } - // This ordering of fields is delibrate: one strong reference visited before + // This ordering of fields is deliberate: one strong reference visited before // the weak reference and one after. var leftWeak; @pragma("vm:entry-point") // TODO(50571): Remove illegal optimization. @@ -82,7 +82,7 @@ class Payload { class WeakNode extends Node { WeakNode(num key, Object value) : super(key, value); - // This ordering of fields is delibrate: one strong reference visited before + // This ordering of fields is deliberate: one strong reference visited before // the weak reference and one after. var leftWeak; @pragma("vm:entry-point") // TODO(50571): Remove illegal optimization. diff --git a/runtime/tests/vm/dart_2/transferable_throws_test.dart b/runtime/tests/vm/dart_2/transferable_throws_test.dart index d985cbc0e76..93351b65bda 100644 --- a/runtime/tests/vm/dart_2/transferable_throws_test.dart +++ b/runtime/tests/vm/dart_2/transferable_throws_test.dart @@ -68,7 +68,7 @@ void receiver(final transferable) { transferable.materialize(); } -throwsIfCummulativeListIsTooLargeOn32bitPlatform() { +throwsIfCumulativeListIsTooLargeOn32bitPlatform() { try { int maxUint8ListSize = pow(2, 30); // Check whether we are on 32-bit or 64-bit platform. @@ -98,7 +98,7 @@ main() async { await throwsIfSendMoreThanOnce(); throwsIfMaterializeMoreThanOnce(); await throwsIfReceiverMaterializesMoreThanOnce(); - throwsIfCummulativeListIsTooLargeOn32bitPlatform(); + throwsIfCumulativeListIsTooLargeOn32bitPlatform(); Expect.throwsArgumentError(() => TransferableTypedData.fromList(null)); Expect.throwsArgumentError(() => TransferableTypedData.fromList([null])); diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status index 8d1a2decff3..caf539703d8 100644 --- a/runtime/tests/vm/vm.status +++ b/runtime/tests/vm/vm.status @@ -244,7 +244,7 @@ dart_2/optimized_stacktrace_line_and_column_test: SkipByDesign # Looks for filen dart_2/optimized_stacktrace_line_test: SkipByDesign # Looks for filenames in stacktrace output dart_2/regress_37382_test: SkipByDesign # Matches the type arguments names -# Enabling of dartk for sim{arm,arm64} revelaed these test failures, which +# Enabling of dartk for sim{arm,arm64} revealed these test failures, which # are to be triaged. Isolate tests are skipped on purpose due to the usage of # batch mode. [ $compiler == dartk && $mode == debug && ($arch == simarm || $arch == simarm64 || $arch == simarm64c || $arch == simriscv32 || $arch == simriscv64) ] @@ -391,7 +391,7 @@ dart/isolates/dart_api_create_lightweight_isolate_test: SkipByDesign # https://d dart/isolates/thread_pool_test: SkipByDesign # https://dartbug.com/37299 Test uses dart:ffi which is not supported on simulators. dart/regress_41971_test: SkipByDesign # https://dartbug.com/37299 dart:ffi is not supported on simulator dart/sdk_hash_test: SkipSlow # gen_kernel is slow to run on simarm -dart/splay_c_finalizer_test: SkipByDesign # No FFI on simualtors +dart/splay_c_finalizer_test: SkipByDesign # No FFI on simulators dart/unboxed_param_args_descriptor_test: SkipByDesign # https://dartbug.com/37299 FFI helper not supported on simulator dart/unboxed_param_tear_off_test: SkipByDesign # https://dartbug.com/37299 FFI helper not supported on simulator dart/unboxed_param_test: SkipByDesign # https://dartbug.com/37299 FFI helper not supported on simulator @@ -399,7 +399,7 @@ dart_2/isolates/dart_api_create_lightweight_isolate_test: SkipByDesign # https:/ dart_2/isolates/thread_pool_test: SkipByDesign # https://dartbug.com/37299 Test uses dart:ffi which is not supported on simulators. dart_2/regress_41971_test: SkipByDesign # https://dartbug.com/37299 dart:ffi is not supported on simulator dart_2/sdk_hash_test: SkipSlow # gen_kernel is slow to run on simarm -dart_2/splay_c_finalizer_test: SkipByDesign # No FFI on simualtors +dart_2/splay_c_finalizer_test: SkipByDesign # No FFI on simulators dart_2/unboxed_param_args_descriptor_test: SkipByDesign # https://dartbug.com/37299 FFI helper not supported on simulator dart_2/unboxed_param_tear_off_test: SkipByDesign # https://dartbug.com/37299 FFI helper not supported on simulator dart_2/unboxed_param_test: SkipByDesign # https://dartbug.com/37299 FFI helper not supported on simulator diff --git a/runtime/third_party/double-conversion/src/bignum.cc b/runtime/third_party/double-conversion/src/bignum.cc index 8892de8f2a3..98f2a2a0593 100644 --- a/runtime/third_party/double-conversion/src/bignum.cc +++ b/runtime/third_party/double-conversion/src/bignum.cc @@ -445,7 +445,7 @@ void Bignum::AssignPowerUInt16(uint16_t base, int power_exponent) { mask >>= 2; uint64_t this_value = base; - bool delayed_multipliciation = false; + bool delayed_multiplication = false; const uint64_t max_32bits = 0xFFFFFFFF; while (mask != 0 && this_value <= max_32bits) { this_value = this_value * this_value; @@ -458,13 +458,13 @@ void Bignum::AssignPowerUInt16(uint16_t base, int power_exponent) { if (high_bits_zero) { this_value *= base; } else { - delayed_multipliciation = true; + delayed_multiplication = true; } } mask >>= 1; } AssignUInt64(this_value); - if (delayed_multipliciation) { + if (delayed_multiplication) { MultiplyByUInt32(base); } diff --git a/runtime/third_party/double-conversion/src/double-conversion.h b/runtime/third_party/double-conversion/src/double-conversion.h index 6bdfa8d25d7..712c0003b84 100644 --- a/runtime/third_party/double-conversion/src/double-conversion.h +++ b/runtime/third_party/double-conversion/src/double-conversion.h @@ -138,7 +138,7 @@ class DoubleToStringConverter { // Example with decimal_in_shortest_low = -6, // decimal_in_shortest_high = 21, // EMIT_POSITIVE_EXPONENT_SIGN activated, and - // EMIT_TRAILING_DECIMAL_POINT deactived: + // EMIT_TRAILING_DECIMAL_POINT deactivated: // ToShortest(0.000001) -> "0.000001" // ToShortest(0.0000001) -> "1e-7" // ToShortest(111111111111111111111.0) -> "111111111111111110000" diff --git a/runtime/third_party/double-conversion/src/fast-dtoa.cc b/runtime/third_party/double-conversion/src/fast-dtoa.cc index 61350383a95..aaf6ae75a2b 100644 --- a/runtime/third_party/double-conversion/src/fast-dtoa.cc +++ b/runtime/third_party/double-conversion/src/fast-dtoa.cc @@ -565,7 +565,7 @@ static bool Grisu3(double v, // the difference between w and boundary_minus/plus (a power of 2) and to // compute scaled_boundary_minus/plus by subtracting/adding from // scaled_w. However the code becomes much less readable and the speed - // enhancements are not terriffic. + // enhancements are not terrific. DiyFp scaled_boundary_minus = DiyFp::Times(boundary_minus, ten_mk); DiyFp scaled_boundary_plus = DiyFp::Times(boundary_plus, ten_mk); diff --git a/runtime/third_party/double-conversion/src/fixed-dtoa.cc b/runtime/third_party/double-conversion/src/fixed-dtoa.cc index aef65fdc211..390e823d95e 100644 --- a/runtime/third_party/double-conversion/src/fixed-dtoa.cc +++ b/runtime/third_party/double-conversion/src/fixed-dtoa.cc @@ -394,7 +394,7 @@ bool FastFixedDtoa(double v, TrimZeros(buffer, length, decimal_point); buffer[*length] = '\0'; if ((*length) == 0) { - // The string is empty and the decimal_point thus has no importance. Mimick + // The string is empty and the decimal_point thus has no importance. Mimic // Gay's dtoa and and set it to -fractional_count. *decimal_point = -fractional_count; } diff --git a/runtime/third_party/double-conversion/src/strtod.cc b/runtime/third_party/double-conversion/src/strtod.cc index 56d848c1ed7..7aad406483e 100644 --- a/runtime/third_party/double-conversion/src/strtod.cc +++ b/runtime/third_party/double-conversion/src/strtod.cc @@ -497,7 +497,7 @@ float Strtof(Vector buffer, int exponent) { // low-precision (3 digits): // when read from input: 123 // when rounded from high precision: 124. - // To do this we simply look at the neigbors of the correct result and see + // To do this we simply look at the neighbors of the correct result and see // if they would round to the same float. If the guess is not correct we have // to look at four values (since two different doubles could be the correct // double). diff --git a/runtime/tools/create_snapshot_file.py b/runtime/tools/create_snapshot_file.py index 2354acb26ab..5f8c13843f5 100755 --- a/runtime/tools/create_snapshot_file.py +++ b/runtime/tools/create_snapshot_file.py @@ -90,7 +90,7 @@ def GenerateFileFromTemplate(output_file, input_cc_file, vm_isolate_input_file, isolate_input_file): """Generates C++ file based on a input_cc_file template and two binary files - Template is expected to have two %s placehoders which would be filled + Template is expected to have two %s placeholders which would be filled with binary contents of the given files each formatted as a comma separated list of integers. """ diff --git a/runtime/tools/dartfuzz/dartfuzz.dart b/runtime/tools/dartfuzz/dartfuzz.dart index e58a25855e0..060c8c0767b 100644 --- a/runtime/tools/dartfuzz/dartfuzz.dart +++ b/runtime/tools/dartfuzz/dartfuzz.dart @@ -1763,7 +1763,7 @@ class DartFuzz { } else if (dartType.constructors(tp).isNotEmpty) { // Constructors serve as literals for non trivially constructable types. // Important note: We have to test for existence of a non trivial - // constructor before testing for list type assiciation, since some types + // constructor before testing for list type association, since some types // like ListInt32 are of list type but can not be constructed // from a literal. emitConstructorOrLiteral(depth + 1, tp, rhsFilter: rhsFilter); diff --git a/runtime/tools/dartfuzz/dartfuzz_test.dart b/runtime/tools/dartfuzz/dartfuzz_test.dart index 7f77a53df68..4c43023820f 100644 --- a/runtime/tools/dartfuzz/dartfuzz_test.dart +++ b/runtime/tools/dartfuzz/dartfuzz_test.dart @@ -476,7 +476,7 @@ class DartFuzzTest { if (numOutputLines > 0) { // Only report the actual output divergence details up to // numOutputLines, since this output may be lengthy and should be - // reproducable anyway. + // reproducible anyway. print('\nout1:\n'); printDivergenceOutput(result1.output, numOutputLines); print('\nout2:\n'); diff --git a/runtime/tools/dartfuzz/gen_api_table.dart b/runtime/tools/dartfuzz/gen_api_table.dart index f02cd84b355..b9abe8f761b 100644 --- a/runtime/tools/dartfuzz/gen_api_table.dart +++ b/runtime/tools/dartfuzz/gen_api_table.dart @@ -688,7 +688,7 @@ enum Restriction { /// Class that represents Dart library methods. /// -/// The invididual lists are organized by return type. +/// The individual lists are organized by return type. /// Proto is a list of DartTypes whose first element is the type of the /// DartType of the receiver (DartType.VOID if none). The remaining elements are /// DartTypes of the parameters. The second element is DartType.VOID if there diff --git a/runtime/tools/dartfuzz/gen_type_table.dart b/runtime/tools/dartfuzz/gen_type_table.dart index 400fefdb9bf..dc2bbde474a 100644 --- a/runtime/tools/dartfuzz/gen_type_table.dart +++ b/runtime/tools/dartfuzz/gen_type_table.dart @@ -895,7 +895,7 @@ Set> filterOperator(Set> op) { return newOp; } -// See comment on filterOpterator. +// See comment on filterOperator. void filterOperators(Set allTypes) { for (var tp in allTypes) { var typName = typeConstName(tp); diff --git a/runtime/tools/graphexplorer/graphexplorer.js b/runtime/tools/graphexplorer/graphexplorer.js index 0025c4f9f1f..96cd19b8447 100644 --- a/runtime/tools/graphexplorer/graphexplorer.js +++ b/runtime/tools/graphexplorer/graphexplorer.js @@ -310,7 +310,7 @@ Graph.prototype.loadDartHeapSnapshot = function(data) { // // If `rewriteForOwners` is true, for each vertex that has an "owner" edge, // replace all edges to the vertex with an edge from the owner to the vertex. -// This can be the graph more hierachical and reveal more structure in the +// This can be the graph more hierarchical and reveal more structure in the // dominator tree. Graph.prototype.compute = function(rewriteForOwners) { this.computePredecessors(); diff --git a/runtime/tools/heapsnapshot/lib/src/analysis.dart b/runtime/tools/heapsnapshot/lib/src/analysis.dart index 62c23040bd2..0bf4bebcd3a 100644 --- a/runtime/tools/heapsnapshot/lib/src/analysis.dart +++ b/runtime/tools/heapsnapshot/lib/src/analysis.dart @@ -546,7 +546,7 @@ class Analysis { // lost after reading. Can we preserve it somewhere on // `HeapSnapshotGraph`? // - // The approximation is based on knowning the header size of a string: + // The approximation is based on knowing the header size of a string: // - String has: header, length (hash - on 32-bit platforms) + payload final fixedSize = _headerSize + _wordSize * (_arch == _Arch.arch32 ? 2 : 1); diff --git a/runtime/tools/heapsnapshot/lib/src/cli.dart b/runtime/tools/heapsnapshot/lib/src/cli.dart index 902c6fe396e..2ede3cf8a3b 100644 --- a/runtime/tools/heapsnapshot/lib/src/cli.dart +++ b/runtime/tools/heapsnapshot/lib/src/cli.dart @@ -37,7 +37,7 @@ abstract class Command { final args = allArgs.skip(startOfRest).toList(); await executeInternal(state, options, args); } catch (e, s) { - state.output.print('An error occured: $e\n$s'); + state.output.print('An error occurred: $e\n$s'); printUsage(state); } } diff --git a/runtime/tools/heapsnapshot/test/utils.dart b/runtime/tools/heapsnapshot/test/utils.dart index 34618289430..67476d34b59 100644 --- a/runtime/tools/heapsnapshot/test/utils.dart +++ b/runtime/tools/heapsnapshot/test/utils.dart @@ -93,7 +93,7 @@ class Testee { final exitCode = await _process.exitCode; print('child-exitcode: $exitCode'); if (exitCode != 0) { - throw 'Child process terminated unsucessfully'; + throw 'Child process terminated unsuccessfully'; } } } diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc index 61ed40304b1..84f323a4925 100644 --- a/runtime/vm/compiler/aot/precompiler.cc +++ b/runtime/vm/compiler/aot/precompiler.cc @@ -3366,7 +3366,7 @@ void Precompiler::Obfuscate() { Library::RegisterLibraries(T, libraries_); } - // Obfuscation is done. Move obfuscation map into malloced memory. + // Obfuscation is done. Move obfuscation map into mallocated memory. IG->set_obfuscation_map(Obfuscator::SerializeMap(T)); // Discard obfuscation mappings to avoid including them into snapshot. diff --git a/runtime/vm/compiler/aot/precompiler.h b/runtime/vm/compiler/aot/precompiler.h index 541fd9922dc..ce64a2cfd15 100644 --- a/runtime/vm/compiler/aot/precompiler.h +++ b/runtime/vm/compiler/aot/precompiler.h @@ -498,7 +498,7 @@ class Obfuscator : public ValueObject { // Note: this operation is not optimized because is very infrequent. static void Deobfuscate(Thread* thread, const GrowableObjectArray& pieces); - // Serialize renaming map as a malloced array of strings. + // Serialize renaming map as a mallocated array of strings. static const char** SerializeMap(Thread* thread); void PreventRenaming(const char* name); diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.h b/runtime/vm/compiler/backend/flow_graph_compiler.h index 2ce69b65709..85d0becc455 100644 --- a/runtime/vm/compiler/backend/flow_graph_compiler.h +++ b/runtime/vm/compiler/backend/flow_graph_compiler.h @@ -1015,7 +1015,7 @@ class FlowGraphCompiler : public ValueObject { friend class StoreIndexedInstr; // For AddPcRelativeCallStubTarget(). friend class StoreFieldInstr; // For AddPcRelativeCallStubTarget(). friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. - friend class GraphInstrinsicCodeGenScope; // For optimizing_. + friend class GraphIntrinsicCodeGenScope; // For optimizing_. // Architecture specific implementation of simple native moves. void EmitNativeMoveArchitecture(const compiler::ffi::NativeLocation& dst, diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc index 80b2951daf7..377d69ee692 100644 --- a/runtime/vm/compiler/backend/il_arm.cc +++ b/runtime/vm/compiler/backend/il_arm.cc @@ -787,7 +787,7 @@ LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, // We invoke a stub that can potentially clobber any CPU register // but can only clobber FPU registers on the slow path when // entering runtime. Preserve all FPU registers that are - // not guarateed to be preserved by the ABI. + // not guaranteed to be preserved by the ABI. const intptr_t kCpuRegistersToPreserve = kDartAvailableCpuRegs & ~kNonChangeableInputRegs; const intptr_t kFpuRegistersToPreserve = diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc index d8f84dd4d02..93223757a9b 100644 --- a/runtime/vm/compiler/backend/il_x64.cc +++ b/runtime/vm/compiler/backend/il_x64.cc @@ -661,7 +661,7 @@ LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, // We invoke a stub that can potentially clobber any CPU register // but can only clobber FPU registers on the slow path when // entering runtime. Preserve all FPU registers that are - // not guarateed to be preserved by the ABI. + // not guaranteed to be preserved by the ABI. const intptr_t kCpuRegistersToPreserve = kDartAvailableCpuRegs & ~kNonChangeableInputRegs; const intptr_t kFpuRegistersToPreserve = diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc index d704df174cd..7bd7d7bd3a4 100644 --- a/runtime/vm/compiler/backend/inliner.cc +++ b/runtime/vm/compiler/backend/inliner.cc @@ -1058,7 +1058,7 @@ class CallSiteInliner : public ValueObject { // to reduce code size and make sure we use the intrinsic code. if (CompilerState::Current().is_aot() && function.is_intrinsic() && !inliner_->AlwaysInline(function)) { - TRACE_INLINING(THR_Print(" Bailout: intrinisic\n")); + TRACE_INLINING(THR_Print(" Bailout: intrinsic\n")); PRINT_INLINING_TREE("intrinsic", &call_data->caller, &function, call_data->call); return false; diff --git a/runtime/vm/compiler/graph_intrinsifier.cc b/runtime/vm/compiler/graph_intrinsifier.cc index b1206faf807..1a9d6ec1467 100644 --- a/runtime/vm/compiler/graph_intrinsifier.cc +++ b/runtime/vm/compiler/graph_intrinsifier.cc @@ -23,13 +23,13 @@ namespace dart { DECLARE_FLAG(bool, print_flow_graph); DECLARE_FLAG(bool, print_flow_graph_optimized); -class GraphInstrinsicCodeGenScope { +class GraphIntrinsicCodeGenScope { public: - explicit GraphInstrinsicCodeGenScope(FlowGraphCompiler* compiler) + explicit GraphIntrinsicCodeGenScope(FlowGraphCompiler* compiler) : compiler_(compiler), old_is_optimizing_(compiler->is_optimizing()) { compiler_->is_optimizing_ = true; } - ~GraphInstrinsicCodeGenScope() { + ~GraphIntrinsicCodeGenScope() { compiler_->is_optimizing_ = old_is_optimizing_; } @@ -44,7 +44,7 @@ static void EmitCodeFor(FlowGraphCompiler* compiler, FlowGraph* graph) { // For graph intrinsics we run the linearscan register allocator, which will // pass opt=true for MakeLocationSummary. We therefore also have to ensure // `compiler->is_optimizing()` is set to true during EmitNativeCode. - GraphInstrinsicCodeGenScope optimizing_scope(compiler); + GraphIntrinsicCodeGenScope optimizing_scope(compiler); compiler->assembler()->Comment("Graph intrinsic begin"); for (intptr_t i = 0; i < graph->reverse_postorder().length(); i++) { diff --git a/runtime/vm/compiler/intrinsifier.cc b/runtime/vm/compiler/intrinsifier.cc index 52b819e4c56..af9006c98c1 100644 --- a/runtime/vm/compiler/intrinsifier.cc +++ b/runtime/vm/compiler/intrinsifier.cc @@ -162,7 +162,7 @@ struct IntrinsicDesc { const char* function_name; }; -struct LibraryInstrinsicsDesc { +struct LibraryIntrinsicsDesc { Library& library; const IntrinsicDesc* intrinsics; }; @@ -205,7 +205,7 @@ void Intrinsifier::InitializeState() { Error& error = Error::Handle(zone); static const intptr_t kNumLibs = 4; - const LibraryInstrinsicsDesc intrinsics[kNumLibs] = { + const LibraryIntrinsicsDesc intrinsics[kNumLibs] = { {Library::Handle(zone, Library::CoreLibrary()), core_intrinsics}, {Library::Handle(zone, Library::TypedDataLibrary()), typed_data_intrinsics}, diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc index fab0d393369..eb1d0278105 100644 --- a/runtime/vm/compiler/stub_code_compiler_arm.cc +++ b/runtime/vm/compiler/stub_code_compiler_arm.cc @@ -2946,7 +2946,7 @@ void StubCodeCompiler::GenerateJumpToFrameStub(Assembler* assembler) { Register tmp1 = R0, tmp2 = R1; // Check if we exited generated from FFI. If so do transition - this is needed // because normally runtime calls transition back to generated via destructor - // of TransititionGeneratedToVM/Native that is part of runtime boilerplate + // of TransitionGeneratedToVM/Native that is part of runtime boilerplate // code (see DEFINE_RUNTIME_ENTRY_IMPL in runtime_entry.h). Ffi calls don't // have this boilerplate, don't have this stack resource, have to transition // explicitly. diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc index cce1a1a3a3e..c2d980ff7f0 100644 --- a/runtime/vm/compiler/stub_code_compiler_arm64.cc +++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc @@ -3257,7 +3257,7 @@ void StubCodeCompiler::GenerateJumpToFrameStub(Assembler* assembler) { Register tmp1 = R0, tmp2 = R1; // Check if we exited generated from FFI. If so do transition - this is needed // because normally runtime calls transition back to generated via destructor - // of TransititionGeneratedToVM/Native that is part of runtime boilerplate + // of TransitionGeneratedToVM/Native that is part of runtime boilerplate // code (see DEFINE_RUNTIME_ENTRY_IMPL in runtime_entry.h). Ffi calls don't // have this boilerplate, don't have this stack resource, have to transition // explicitly. diff --git a/runtime/vm/compiler/stub_code_compiler_ia32.cc b/runtime/vm/compiler/stub_code_compiler_ia32.cc index 3298fc042f5..58d571e6257 100644 --- a/runtime/vm/compiler/stub_code_compiler_ia32.cc +++ b/runtime/vm/compiler/stub_code_compiler_ia32.cc @@ -2617,7 +2617,7 @@ void StubCodeCompiler::GenerateJumpToFrameStub(Assembler* assembler) { Label exit_through_non_ffi; // Check if we exited generated from FFI. If so do transition - this is needed // because normally runtime calls transition back to generated via destructor - // of TransititionGeneratedToVM/Native that is part of runtime boilerplate + // of TransitionGeneratedToVM/Native that is part of runtime boilerplate // code (see DEFINE_RUNTIME_ENTRY_IMPL in runtime_entry.h). Ffi calls don't // have this boilerplate, don't have this stack resource, have to transition // explicitly. diff --git a/runtime/vm/compiler/stub_code_compiler_riscv.cc b/runtime/vm/compiler/stub_code_compiler_riscv.cc index 1c2ae7ffc1e..30586aae497 100644 --- a/runtime/vm/compiler/stub_code_compiler_riscv.cc +++ b/runtime/vm/compiler/stub_code_compiler_riscv.cc @@ -3046,7 +3046,7 @@ void StubCodeCompiler::GenerateJumpToFrameStub(Assembler* assembler) { Label exit_through_non_ffi; // Check if we exited generated from FFI. If so do transition - this is needed // because normally runtime calls transition back to generated via destructor - // of TransititionGeneratedToVM/Native that is part of runtime boilerplate + // of TransitionGeneratedToVM/Native that is part of runtime boilerplate // code (see DEFINE_RUNTIME_ENTRY_IMPL in runtime_entry.h). Ffi calls don't // have this boilerplate, don't have this stack resource, have to transition // explicitly. diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc index 74ca2b245c0..d9578dd277b 100644 --- a/runtime/vm/compiler/stub_code_compiler_x64.cc +++ b/runtime/vm/compiler/stub_code_compiler_x64.cc @@ -3180,7 +3180,7 @@ void StubCodeCompiler::GenerateJumpToFrameStub(Assembler* assembler) { Label exit_through_non_ffi; // Check if we exited generated from FFI. If so do transition - this is needed // because normally runtime calls transition back to generated via destructor - // of TransititionGeneratedToVM/Native that is part of runtime boilerplate + // of TransitionGeneratedToVM/Native that is part of runtime boilerplate // code (see DEFINE_RUNTIME_ENTRY_IMPL in runtime_entry.h). Ffi calls don't // have this boilerplate, don't have this stack resource, have to transition // explicitly. diff --git a/runtime/vm/constants_riscv.h b/runtime/vm/constants_riscv.h index 99aba573486..6a15aaf246b 100644 --- a/runtime/vm/constants_riscv.h +++ b/runtime/vm/constants_riscv.h @@ -1569,7 +1569,7 @@ static constexpr ExtensionSet RV_G = RV_I | RV_M | RV_A | RV_F | RV_D; static constexpr ExtensionSet RV_GC = RV_G | RV_C; static constexpr Extension RV_Zba(6); // Address generation static constexpr Extension RV_Zbb(7); // Basic bit-manipulation -static constexpr Extension RV_Zbc(8); // Carry-less multiplicatio +static constexpr Extension RV_Zbc(8); // Carry-less multiplication static constexpr Extension RV_Zbs(9); // Single-bit instructions static constexpr ExtensionSet RV_B = RV_Zba | RV_Zbb | RV_Zbc | RV_Zbs; static constexpr ExtensionSet RV_GCB = RV_GC | RV_B; diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc index 5c6071c8eaa..07672a20ab7 100644 --- a/runtime/vm/dart_api_impl_test.cc +++ b/runtime/vm/dart_api_impl_test.cc @@ -5098,7 +5098,7 @@ TEST_CASE(DartAPI_SetStickyError) { EXPECT(Dart_GetStickyError() == Dart_Null()); } -TEST_CASE(DartAPI_TypeGetNonParamtericTypes) { +TEST_CASE(DartAPI_TypeGetNonParametricTypes) { const char* kScriptChars = "class MyClass0 {\n" "}\n" diff --git a/runtime/vm/elf.cc b/runtime/vm/elf.cc index 5538d473f1b..be284e2fdd3 100644 --- a/runtime/vm/elf.cc +++ b/runtime/vm/elf.cc @@ -94,7 +94,7 @@ FOR_EACH_SECTION_TYPE(DECLARE_SECTION_TYPE_CLASS) class BitsContainer; class Segment; -// Align note sections and segments to 4 byte boundries. +// Align note sections and segments to 4 byte boundaries. static constexpr intptr_t kNoteAlignment = 4; class Section : public ZoneAllocated { diff --git a/runtime/vm/exceptions.h b/runtime/vm/exceptions.h index 1af67ac9dd8..15734404445 100644 --- a/runtime/vm/exceptions.h +++ b/runtime/vm/exceptions.h @@ -244,7 +244,7 @@ class CatchEntryMove { // at the catch entry. // Note: this is a deserialized representation that is used by the runtime // system as a temporary representation and for caching. That is why this -// object is allocated in the malloced heap and not in the Dart heap. +// object is allocated in the mallocated heap and not in the Dart heap. class CatchEntryMoves { public: static CatchEntryMoves* Allocate(intptr_t num_moves) { diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc index a486e716e63..65f70a80b93 100644 --- a/runtime/vm/kernel_loader.cc +++ b/runtime/vm/kernel_loader.cc @@ -2395,7 +2395,7 @@ FunctionPtr CreateFieldInitializerFunction(Thread* thread, init_name = Symbols::FromConcat(thread, Symbols::InitPrefix(), init_name); // Static field initializers are not added as members of their owning class, - // so they must be pre-emptively given a patch class to avoid the meaning of + // so they must be preemptively given a patch class to avoid the meaning of // their kernel/token position changing during a reload. Compare // Class::PatchFieldsAndFunctions(). // This might also be necessary for lazy computation of local var descriptors. diff --git a/runtime/vm/message_snapshot.cc b/runtime/vm/message_snapshot.cc index 29bc5eac36c..62d787b4b4e 100644 --- a/runtime/vm/message_snapshot.cc +++ b/runtime/vm/message_snapshot.cc @@ -1900,7 +1900,7 @@ class TransferableTypedDataMessageSerializationCluster objects_.Add(transferable); void* peer = s->thread()->heap()->GetPeer(transferable->ptr()); - // Assume that object's Peer is only used to track transferrability state. + // Assume that object's Peer is only used to track transferability state. ASSERT(peer != nullptr); TransferableTypedDataPeer* tpeer = reinterpret_cast(peer); @@ -1918,7 +1918,7 @@ class TransferableTypedDataMessageSerializationCluster s->AssignRef(transferable); void* peer = s->thread()->heap()->GetPeer(transferable->ptr()); - // Assume that object's Peer is only used to track transferrability state. + // Assume that object's Peer is only used to track transferability state. ASSERT(peer != nullptr); TransferableTypedDataPeer* tpeer = reinterpret_cast(peer); diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc index 14cde0a0056..08c5e1f734e 100644 --- a/runtime/vm/object.cc +++ b/runtime/vm/object.cc @@ -15560,7 +15560,7 @@ void PcDescriptors::SetLength(intptr_t value) const { void PcDescriptors::CopyData(const void* bytes, intptr_t size) { NoSafepointScope no_safepoint; uint8_t* data = UnsafeMutableNonPointer(&untag()->data()[0]); - // We're guaranted these memory spaces do not overlap. + // We're guaranteed these memory spaces do not overlap. memcpy(data, bytes, size); // NOLINT } diff --git a/runtime/vm/object.h b/runtime/vm/object.h index d01417c0e6e..09dec43ed95 100644 --- a/runtime/vm/object.h +++ b/runtime/vm/object.h @@ -3873,7 +3873,7 @@ class Function : public Object { // dispatchers is not visible. Synthetic code that can trigger // exceptions such as the outer async functions that create Futures // is visible. - // instrinsic: Has a hand-written assembly prologue. + // intrinsic: Has a hand-written assembly prologue. // inlinable: Candidate for inlining. False for functions with features we // don't support during inlining (e.g., optional parameters), // functions which are too big, etc. diff --git a/runtime/vm/os_thread.h b/runtime/vm/os_thread.h index dc6976d8079..bd0a3f1bf39 100644 --- a/runtime/vm/os_thread.h +++ b/runtime/vm/os_thread.h @@ -219,7 +219,7 @@ class OSThread : public BaseThread { static bool Compare(ThreadId a, ThreadId b); // This function can be called only once per OSThread, and should only be - // called when the retunred id will eventually be passed to OSThread::Join(). + // called when the returned id will eventually be passed to OSThread::Join(). static ThreadJoinId GetCurrentThreadJoinId(OSThread* thread); // Called at VM startup and shutdown. diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc index cade468b4f1..b1db023333d 100644 --- a/runtime/vm/service_test.cc +++ b/runtime/vm/service_test.cc @@ -82,7 +82,7 @@ static ArrayPtr Eval(Dart_Handle lib, const char* expr) { const String& dummy_isolate_id = String::Handle(String::New("isolateId")); Dart_Handle expr_val; { - TransitionVMToNative transiton(Thread::Current()); + TransitionVMToNative transition(Thread::Current()); expr_val = Dart_EvaluateStaticExpr(lib, NewString(expr)); EXPECT_VALID(expr_val); } diff --git a/third_party/binaryen/BUILD.gn b/third_party/binaryen/BUILD.gn index 5ae07fd6144..139d9f8e1b8 100644 --- a/third_party/binaryen/BUILD.gn +++ b/third_party/binaryen/BUILD.gn @@ -44,7 +44,7 @@ source_set("binaryen_sources") { # We avoid listing all sources manually, this means when updating # binaryen in DEPS (or manually editing) one has to ensure to # re-run GN in DEPS to ensure new dependencies are picked up. - # (this lowers the maintainaince burden of GN build support for binaryen) + # (this lowers the maintenance burden of GN build support for binaryen) sources = exec_script("list_sources.py", src_dirs, "list lines", diff --git a/utils/peg/pegparser.dart b/utils/peg/pegparser.dart index a5fb3bbe6bb..bef5a902f82 100644 --- a/utils/peg/pegparser.dart +++ b/utils/peg/pegparser.dart @@ -27,7 +27,7 @@ library PegParser; * sequence is value-generating if any of the subrules are value-generating or * if there is a reducing function. If no reducing function is given, the value * returned depends on the number of value-generating subrules. If there is - * only one value generating subrule, that provideds the value for the sequence. + * only one value generating subrule, that provides the value for the sequence. * If there are more, then the value is a list of the values of the * value-generating subrules. */