Fix typos

Fixes #49364

TEST=ci

Change-Id: Ic643819c9cdd7b56690981b96b854b1e8d622fff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250160
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Ahmed Ashour 2022-07-12 19:35:22 +00:00 committed by Commit Bot
parent fb7b291886
commit 99f0fb5b70
38 changed files with 50 additions and 50 deletions

View file

@ -1984,7 +1984,7 @@ class SyncStarRewriter extends AsyncRewriterBase {
/// Called with the stream to yield from.
final js.Expression yieldStarExpression;
/// Used by sync* functions to throw exeptions.
/// Used by sync* functions to throw exceptions.
final js.Expression uncaughtErrorExpression;
SyncStarRewriter(DiagnosticReporter diagnosticListener, spannable,

View file

@ -1211,7 +1211,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
_closeFunction();
}
/// Builds a SSA graph for FunctionNodes, found in FunctionExpressions and
/// Builds an SSA graph for FunctionNodes, found in FunctionExpressions and
/// Procedures.
void _buildFunctionNode(
FunctionEntity function, ir.FunctionNode functionNode) {
@ -1253,7 +1253,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
isStatement: true));
}
/// Builds a SSA graph for a sync*/async/async* generator. We generate a
/// Builds an SSA graph for a sync*/async/async* generator. We generate a
/// entry function which tail-calls a body function. The entry contains
/// per-invocation checks and the body, which is later transformed, contains
/// the re-entrant 'state machine' code.
@ -1324,7 +1324,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
_closeFunction();
}
/// Builds a SSA graph for a sync*/async/async* generator body.
/// Builds an SSA graph for a sync*/async/async* generator body.
void _buildGeneratorBody(
JGeneratorBody function, ir.FunctionNode functionNode) {
FunctionEntity entry = function.function;
@ -1473,7 +1473,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
return _isNonNullableByDefault(node.parent);
}
/// Builds a SSA graph for FunctionNodes of external methods. This produces a
/// Builds an SSA graph for FunctionNodes of external methods. This produces a
/// graph for a method with Dart calling conventions that forwards to the
/// actual external method.
void _buildExternalFunctionNode(

View file

@ -9,7 +9,7 @@ Existing VM Service clients can issue both HTTP, websocket, and SSE requests to
# SSE Support
For certain web clients it may be preferrable or required to communicate with DDS using server-sent events (SSE). DDS has a SSE handler listening for requests on `/$debugHandler`.
For certain web clients it may be preferable or required to communicate with DDS using server-sent events (SSE). DDS has an SSE handler listening for requests on `/$debugHandler`.
## SSE and package:vm_service example

View file

@ -89,7 +89,7 @@ class CpuSamplesRepository extends RingBuffer<CpuSample> {
if (!idToFunctionIndex.containsKey(key)) {
idToFunctionIndex[key] = functions.length;
// Keep track of the original index and the location of the function
// in the master function list so we can update the function indicies
// in the master function list so we can update the function indices
// for each sample in this batch.
indexMapping[i] = functions.length;
functions.add(_buildProfileFunction(newFunctions[i]));
@ -100,7 +100,7 @@ class CpuSamplesRepository extends RingBuffer<CpuSample> {
}
}
// Update the indicies into the function table for functions that were
// Update the indices into the function table for functions that were
// newly processed in the most recent event.
for (final sample in samples.samples!) {
final stack = sample.stack!;

View file

@ -1711,7 +1711,7 @@ abstract class DartDebugAdapter<TL extends LaunchRequestArguments,
? _converter.convertToRelativePath(path)
: uri.toString())
: null;
// Because we split on newlines, all items exept the last one need to
// Because we split on newlines, all items except the last one need to
// have their trailing newlines added back.
final output = i == lines.length - 1 ? line : '$line\n';
events.add(

View file

@ -823,8 +823,8 @@ class ThreadInfo {
/// sdk-path/lib/core/print.dart -> dart:core/print.dart
///
/// This is required so that when the user sets a breakpoint in an SDK source
/// (which they may have nagivated to via the Analysis Server) we generate a
/// vaid URI that the VM would create a breakpoint for.
/// (which they may have navigated to via the Analysis Server) we generate a
/// valid URI that the VM would create a breakpoint for.
Future<Uri?> resolvePathToUri(String filePath) async {
// We don't currently need to call lookupPackageUris because the VM can
// handle incoming file:/// URIs for packages, and also the org-dartlang-sdk

View file

@ -14,7 +14,7 @@ abstract class EventBody {
///
/// Used to support custom events sent by the debug adapter such as 'dart.log'.
///
/// The supplied [body] must be convertable to JSON.
/// The supplied [body] must be convertible to JSON.
class RawEventBody extends EventBody {
final Object body;

View file

@ -69,7 +69,7 @@ class ProtocolConverter {
thread,
ref,
// Quotes are handled below, so they can be wrapped around the
// elipsis.
// ellipsis.
includeQuotesAroundString: false,
)
: null;
@ -111,7 +111,7 @@ class ProtocolConverter {
}
}
/// Converts a [vm.Instace] to a list of [dap.Variable]s, one for each
/// Converts a [vm.Instance] to a list of [dap.Variable]s, one for each
/// field/member/element/association.
///
/// If [startItem] and/or [numItems] are supplied, only a slice of the

View file

@ -143,7 +143,7 @@ class MemoryProfile {
HeapSpace.parse(json['old'])!
];
_updateGCEvent(event.isolate!.id!, heaps);
// TODO(terry): expose when GC occured as markers in memory timeline.
// TODO(terry): expose when GC occurred as markers in memory timeline.
}
void stopPolling() {
@ -208,7 +208,7 @@ class MemoryProfile {
return null;
}
/// Poll Fultter engine's Raster Cache metrics.
/// Poll Flutter engine's Raster Cache metrics.
/// @returns engine's rasterCache estimates or null.
Future<RasterCache?> _fetchRasterCacheInfo(IsolateRef selectedIsolate) async {
final response = await getRasterCacheMetrics(selectedIsolate);

View file

@ -390,7 +390,7 @@ void main(List<String> args) async {
final breakpointLine = lineWith(testFile, breakpointMarker);
final stepLine = lineWith(testFile, stepMarker);
// Start with debugSdkLibraryes _enabled_ and hit the breakpoint.
// Start with debugSdkLibraries _enabled_ and hit the breakpoint.
final stop = await client.hitBreakpoint(
testFile,
breakpointLine,

View file

@ -358,7 +358,7 @@ main() {
/// the DAP server upon connection.
Uri _extractVmServiceUri(OutputEventBody vmConnectionBanner) {
// TODO(dantup): Change this to use the dart.debuggerUris custom event
// if implemented (whch VS Code also needs).
// if implemented (which VS Code also needs).
final match = dapVmServiceBannerPattern.firstMatch(vmConnectionBanner.output);
return Uri.parse(match!.group(1)!);
}

View file

@ -318,7 +318,7 @@ void main(List<String> args) {
expect(mapVariable.variablesReference, isPositive);
final variables = await client.expectVariables(
mapVariable.variablesReference,
// We don't expect an evaluteName because the key is not a simple type.
// We don't expect an evaluateName because the key is not a simple type.
'''
key: DateTime
value: _Exception
@ -381,7 +381,7 @@ void main() {
test('does not use toString() result if "Instance of Foo"', () async {
// When evaluateToStringInDebugViews=true, we should discard the result of
// caling toString() when it's just 'Instance of Foo' because we're already
// calling toString() when it's just 'Instance of Foo' because we're already
// showing the type, and otherwise we show:
//
// myVariable: Foo (Instance of Foo)

View file

@ -934,7 +934,7 @@ extension DapTestClientExtension on DapTestClient {
return stack.stackFrames.first.id;
}
/// Evalutes [expression] in frame [frameId] and expects a specific
/// Evaluates [expression] in frame [frameId] and expects a specific
/// [expectedResult].
Future<EvaluateResponseBody> expectEvalResult(
int frameId,

View file

@ -1,6 +1,6 @@
# Debug Adapter Protocol
Dart includes support for debugging using [the Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/) as an alternative to using the [VM Service](https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md) directly, simplying the integration for new editors.
Dart includes support for debugging using [the Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/) as an alternative to using the [VM Service](https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md) directly, simplifying the integration for new editors.
The debug adapters are started with the `dart debug_adapter` command and are intended to be consumed by DAP-compliant tools such as Dart-specific extensions for editors, or configured by users whose editors include generic configurable DAP clients.

View file

@ -101,7 +101,7 @@ extension JsonTypeExtensions on JsonType {
}
/// Whether this type is a simple type that needs no special handling for
/// deserialisation (such as `String`, `bool`, `int`, `Map<String, Object?>`).
/// deserialization (such as `String`, `bool`, `int`, `Map<String, Object?>`).
bool get isSimple {
const _dartSimpleTypes = {
'bool',

View file

@ -697,7 +697,7 @@ Tearoffs of JS types should bind `this`, as noted in
decide what runtime type information to attach. Tearoffs could get the
statically visible type at the call site, or they could be treated like other
JS functions, and be assignable to any function type. Untyped is advantageous
for performance/simplicity, so it's probably preferrable, unless we find
for performance/simplicity, so it's probably preferable, unless we find
compelling examples.

View file

@ -3729,7 +3729,7 @@ class CpuSamplesEvent {
int? pid;
/// A list of references to functions seen in the relevant samples. These
/// references can be looked up using the indicies provided in a `CpuSample`
/// references can be looked up using the indices provided in a `CpuSample`
/// `stack` to determine which function was on the stack.
List<dynamic>? functions;

View file

@ -385,7 +385,7 @@ Directory::ExistsResult Directory::Exists(Namespace* namespc,
if ((errno == EACCES) || (errno == EBADF) || (errno == EFAULT) ||
(errno == ENOMEM) || (errno == EOVERFLOW)) {
// Search permissions denied for one of the directories in the
// path or a low level error occured. We do not know if the
// path or a low level error occurred. We do not know if the
// directory exists.
return UNKNOWN;
}

View file

@ -264,7 +264,7 @@ Directory::ExistsResult Directory::Exists(Namespace* namespc,
if ((errno == EACCES) || (errno == EBADF) || (errno == EFAULT) ||
(errno == ENOMEM) || (errno == EOVERFLOW)) {
// Search permissions denied for one of the directories in the
// path or a low level error occured. We do not know if the
// path or a low level error occurred. We do not know if the
// directory exists.
return UNKNOWN;
}

View file

@ -386,7 +386,7 @@ Directory::ExistsResult Directory::Exists(Namespace* namespc,
if ((errno == EACCES) || (errno == EBADF) || (errno == EFAULT) ||
(errno == ENOMEM) || (errno == EOVERFLOW)) {
// Search permissions denied for one of the directories in the
// path or a low level error occured. We do not know if the
// path or a low level error occurred. We do not know if the
// directory exists.
return UNKNOWN;
}

View file

@ -346,7 +346,7 @@ Directory::ExistsResult Directory::Exists(Namespace* namespc,
if ((errno == EACCES) || (errno == EBADF) || (errno == EFAULT) ||
(errno == ENOMEM) || (errno == EOVERFLOW)) {
// Search permissions denied for one of the directories in the
// path or a low level error occured. We do not know if the
// path or a low level error occurred. We do not know if the
// directory exists.
return UNKNOWN;
}

View file

@ -880,7 +880,7 @@ class SpawnIsolateTask : public ThreadPool::Task {
void FailedSpawn(const char* error, bool has_current_isolate = true) {
ReportError(error != nullptr
? error
: "Unknown error occured during Isolate spawning.");
: "Unknown error occurred during Isolate spawning.");
// Destruction of [IsolateSpawnState] may cause destruction of [Message]
// which make need to delete persistent handles (which requires a current
// isolate group).

View file

@ -38,7 +38,7 @@ class CustomElement {
while (!toBeAttached.isEmpty) {
// Either this element will never be attached or it will be attached
// after a turn of the outer event loop. Fire 'attached' in case it is
// the latter, since firing it out of order is preferrable to not firing
// the latter, since firing it out of order is preferable to not firing
// it at all.
CustomElement element = toBeAttached.removeLast();
print("Warning: created but not in document: $element");

View file

@ -37,7 +37,7 @@ class CustomElement {
while (!toBeAttached.isEmpty) {
// Either this element will never be attached or it will be attached
// after a turn of the outer event loop. Fire 'attached' in case it is
// the latter, since firing it out of order is preferrable to not firing
// the latter, since firing it out of order is preferable to not firing
// it at all.
CustomElement element = toBeAttached.removeLast();
print("Warning: created but not in document: $element");

View file

@ -37,7 +37,7 @@ class CustomElement {
while (!toBeAttached.isEmpty) {
// Either this element will never be attached or it will be attached
// after a turn of the outer event loop. Fire 'attached' in case it is
// the latter, since firing it out of order is preferrable to not firing
// the latter, since firing it out of order is preferable to not firing
// it at all.
CustomElement element = toBeAttached.removeLast();
print("Warning: created but not in document: $element");

View file

@ -17,7 +17,7 @@ namespace dart {
// Note: any instruction that does a call has two deoptimization points,
// one before the call and one after the call - so that we could deoptimize
// to either before or after the call depending on whether the same call
// already occured in the optimized code (and potentially produced
// already occurred in the optimized code (and potentially produced
// observable side-effects) or not.
//
// To simplify implementation we always allocate two deopt ids (one for before

View file

@ -1147,7 +1147,7 @@ void Assembler::roundsd(XmmRegister dst, XmmRegister src, RoundingMode mode) {
EmitUint8(0x3A);
EmitUint8(0x0B);
EmitXmmRegisterOperand(dst, src);
// Mask precision exeption.
// Mask precision exception.
EmitUint8(static_cast<uint8_t>(mode) | 0x8);
}

View file

@ -525,7 +525,7 @@ void Assembler::roundsd(XmmRegister dst, XmmRegister src, RoundingMode mode) {
EmitUint8(0x3A);
EmitUint8(0x0B);
EmitRegisterOperand(dst & 7, src);
// Mask precision exeption.
// Mask precision exception.
EmitUint8(static_cast<uint8_t>(mode) | 0x8);
}

View file

@ -85,7 +85,7 @@ struct CompilerPassState {
// Maps inline_id_to_function[inline_id] -> function. Top scope
// function has inline_id 0. The map is populated by the inliner.
GrowableArray<const Function*> inline_id_to_function;
// Token position where inlining occured.
// Token position where inlining occurred.
GrowableArray<TokenPosition> inline_id_to_token_pos;
// For a given inlining-id(index) specifies the caller's inlining-id.
GrowableArray<intptr_t> caller_inline_id;

View file

@ -130,7 +130,7 @@ const Function& CompilerState::StringBaseInterpolate() {
}
void CompilerState::ReportCrash() {
OS::PrintErr("=== Crash occured when compiling %s in %s mode in %s pass\n",
OS::PrintErr("=== Crash occurred when compiling %s in %s mode in %s pass\n",
function() != nullptr ? function()->ToFullyQualifiedCString()
: "unknown function",
is_aot() ? "AOT"

View file

@ -372,7 +372,7 @@ intptr_t DeoptContext::MaterializeDeferredObjects() {
}
// Since this is the only step where GC can occur during deoptimization,
// use it to report the source line where deoptimization occured.
// use it to report the source line where deoptimization occurred.
if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
DartFrameIterator iterator(Thread::Current(),
StackFrameIterator::kNoCrossThreadIteration);

View file

@ -892,7 +892,7 @@ void Dwarf::WriteLineNumberProgram(DwarfWriteStream* stream) {
auto uri_cstr = Deobfuscate(uri.ToCString());
if (FLAG_resolve_dwarf_paths) {
auto const converted_cstr = ConvertResolvedURI(uri_cstr);
// Strictly enforce this to catch inconvertable cases.
// Strictly enforce this to catch inconvertible cases.
if (converted_cstr == nullptr) {
FATAL("cannot convert resolved URI %s", uri_cstr);
}

View file

@ -534,7 +534,7 @@ ISOLATE_UNIT_TEST_CASE(Profiler_TrivialRecordAllocation) {
AllocationFilter filter(isolate->main_port(), class_a.id(),
Dart_TimelineGetMicros(), 16000);
profile.Build(thread, &filter, Profiler::sample_block_buffer());
// We should have no allocation samples because none occured within
// We should have no allocation samples because none occurred within
// the specified time range.
EXPECT_EQ(0, profile.sample_count());
}
@ -631,7 +631,7 @@ ISOLATE_UNIT_TEST_CASE(Profiler_NativeAllocation) {
Profile profile;
NativeAllocationSampleFilter filter(Dart_TimelineGetMicros(), 16000);
profile.Build(thread, &filter, Profiler::sample_block_buffer());
// We should have no allocation samples because none occured within
// We should have no allocation samples because none occurred within
// the specified time range.
EXPECT_EQ(0, profile.sample_count());
}

View file

@ -111,7 +111,7 @@ type SnapshotObject {
data : NonReferenceData,
referenceCount : uleb128,
// A list of 1-origin indicies into SnapshotGraph.objects
// A list of 1-origin indices into SnapshotGraph.objects
references : uleb128[referenceCount],
}
```

View file

@ -1997,7 +1997,7 @@ class CpuSamples extends Response {
int pid;
// A list of functions seen in the relevant samples. These references can be
// looked up using the indicies provided in a `CpuSample` `stack` to determine
// looked up using the indices provided in a `CpuSample` `stack` to determine
// which function was on the stack.
ProfileFunction[] functions;
@ -2039,7 +2039,7 @@ class CpuSamplesEvent {
int pid;
// A list of references to functions seen in the relevant samples. These references can
// be looked up using the indicies provided in a `CpuSample` `stack` to determine
// be looked up using the indices provided in a `CpuSample` `stack` to determine
// which function was on the stack.
(@Object|NativeFunction)[] functions;

View file

@ -18,7 +18,7 @@ class SliderMenu extends View {
// currently selected menu item
Element selectedItem;
// This holds the element where a touchstart occured. (This is set
// This holds the element where a touchstart occurred. (This is set
// in touchstart, and cleared in touchend.) If this is null, then a
// touch operation is not in progress.
// TODO(mattsh) - move this to a touch mixin
@ -79,7 +79,7 @@ class SliderMenu extends View {
selectItem(touchItem, true);
} else {
// the Touch target is somewhere other where than the touchstart
// occured, so revert the selected menu text back to where it was
// occurred, so revert the selected menu text back to where it was
// before the touchstart,
selectItemText(selectedItem);
}

View file

@ -841,7 +841,7 @@ bool _installSpecializedIsTest(Object? object) {
}
// `o is T*` generally behaves like `o is T`.
// The exeptions are `Object*` (handled above) and `Never*`
// The exceptions are `Object*` (handled above) and `Never*`
//
// `null is Never` --> `false`
// `null is Never*` --> `true`

View file

@ -204,9 +204,9 @@ class IDLArgument extends IDLNode {
IDLType type;
bool isOptional;
bool isIn;
bool hasElipsis;
bool hasEllipsis;
IDLArgument(String this.id, IDLType this.type, IDLExtAttrs extAttrs,
bool this.isOptional, bool this.isIn, bool this.hasElipsis) {
bool this.isOptional, bool this.isIn, bool this.hasEllipsis) {
setExtAttrs(extAttrs);
}