[dart2js] Fix random spelling errors.

Change-Id: I975462e071184c53817f133a9973883d7ea7a7b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246044
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This commit is contained in:
Stephen Adams 2022-05-25 20:55:30 +00:00 committed by Commit Bot
parent 4cf8091c8d
commit 57c8184fe5
2 changed files with 14 additions and 18 deletions

View file

@ -599,7 +599,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
field, parameter, type);
// TODO(sra): Pass source information to
// [potentiallyCheckOrTrustTypeOfParameter].
// TODO(sra): The source information should indiciate the field and
// TODO(sra): The source information should indicate the field and
// possibly its type but not the initializer.
value.sourceInformation ??= _sourceInformationBuilder.buildSet(node);
value = _potentiallyAssertNotNull(field, node, value, type);
@ -1812,7 +1812,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
_handleInTryStatement();
if (_inliningStack.isEmpty && targetElement.isSetter) {
if (node.parent is ir.FunctionNode) {
// An arrow function definition of a setter has a ReturnStatemnt as a
// An arrow function definition of a setter has a ReturnStatement as a
// body, e.g. "set foo(x) => this._x = x;". There is no way to access
// the returned value, so don't emit a return.
return;
@ -1964,7 +1964,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
// moved to the loop update.
// Find a type for the element. Use the element type of the indexer of the
// array, as this is stronger than the iterator's `get current` type, for
// array, as this is stronger than the Iterator's `get current` type, for
// example, `get current` includes null.
// TODO(sra): The element type of a container type mask might be better.
AbstractValue type = _typeInferenceMap.inferredIndexType(node);
@ -3021,7 +3021,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
localsHandler = savedLocals.mergeMultiple(caseHandlers, joinBlock);
}
} else {
// The joinblock is not used.
// The joinBlock is not used.
joinBlock = null;
}
@ -4313,7 +4313,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
} else {
reporter.internalError(
computeSourceSpanFromTreeNode(invocation),
"Unexpected named arguments value in createInvocationMirrror: "
"Unexpected named arguments value in createInvocationMirror: "
"${namedArgumentsLiteral}.");
}
CallStructure callStructure = CallStructure(
@ -5669,10 +5669,6 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
void _pushIsTest(ir.DartType type, HInstruction expression,
SourceInformation sourceInformation) {
// Note: The call to "unalias" this type like in the original SSA builder is
// unnecessary in kernel because Kernel has no notion of typedef.
// TODO(efortuna): Add test for this.
if (type is ir.InvalidType) {
// TODO(sra): Make InvalidType carry a message.
_generateTypeError('invalid type', sourceInformation);
@ -7638,7 +7634,7 @@ class InlineWeeder extends ir.Visitor<void> with ir.VisitorVoidMixin {
// In addition to the initializer expressions and body calls, there is an
// allocator call.
if (hasCallToSomeConstructorBody) {
// A temporary is requried so we have
// A temporary is required so we have
//
// t=new ...;
// ...;
@ -7646,7 +7642,7 @@ class InlineWeeder extends ir.Visitor<void> with ir.VisitorVoidMixin {
//
// I'm guessing it takes about 4 nodes to introduce the temporary and
// assign it.
registerRegularNode(4); // A temporary is requried.
registerRegularNode(4); // A temporary is required.
}
// The initial field values are passed to the allocator.
registerRegularNode(

View file

@ -1887,7 +1887,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
List<js.Expression> arguments = visitArguments(node.inputs);
MemberEntity target = node.element;
// TODO(herhut): The namer should return the appropriate backendname here.
// TODO(herhut): The namer should return the appropriate backend name here.
if (target != null && !node.isInterceptedCall) {
if (target == _commonElements.jsArrayAdd) {
methodName = 'push';
@ -2120,7 +2120,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
if (_commonElements.isCheckConcurrentModificationError(element)) {
// Manually inline the [checkConcurrentModificationError] function. This
// function is only called from a for-loop update. Ideally we would just
// generate the conditionalcontrol flow in the builder but it adds basic
// generate the conditional control flow in the builder but it adds basic
// blocks in the loop update that interfere with other optimizations and
// confuses loop recognition.
@ -2384,16 +2384,16 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
if (target.isStatic || target.isTopLevel) {
var arguments = visitArguments(inputs, start: 0);
js.Expression targeExpression =
js.Expression targetExpression =
js.js.uncachedExpressionTemplate(targetName).instantiate([]);
js.Expression expression;
if (target.isGetter) {
expression = targeExpression;
expression = targetExpression;
} else if (target.isSetter) {
expression = js.js('# = #', [targeExpression, inputs.single]);
expression = js.js('# = #', [targetExpression, inputs.single]);
} else {
assert(target.isFunction);
expression = js.js('#(#)', [targeExpression, arguments]);
expression = js.js('#(#)', [targetExpression, arguments]);
}
push(expression.withSourceInformation(node.sourceInformation));
_registry.registerNativeMethod(target);
@ -3186,7 +3186,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
case IsTestSpecialization.instanceof:
DartType dartType = node.dartType;
// We don't generate instancof specializations for Never* and Object*.
// We don't generate instanceof specializations for Never* and Object*.
assert(dartType is InterfaceType ||
(dartType is LegacyType &&
!dartType.baseType.isObject &&