Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1039)

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2857133004: Change Accessor(s) to use AstFactory to create MethodInvocation, PropertyGet/Set. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 57a8e10651aec033e48c49c31a05814a222a3927..5259c1dc3312fcbbd78676cd7f63477e798b4291 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -621,7 +621,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
return receiver.doInvocation(charOffset, arguments);
} else {
return buildMethodInvocation(
- toValue(receiver), callName, arguments, charOffset);
+ astFactory, toValue(receiver), callName, arguments, charOffset);
}
}
@@ -684,8 +684,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
return buildCompileTimeError(
"Not an operator: '$operator'.", token.charOffset);
} else {
- Expression result =
- makeBinary(a, new Name(operator), null, b, offset: token.charOffset);
+ Expression result = makeBinary(astFactory, a, new Name(operator), null, b,
+ offset: token.charOffset);
if (isSuper) {
result = toSuperMethodInvocation(result);
}
@@ -706,8 +706,11 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
VariableDeclaration variable = new VariableDeclaration.forValue(a);
push(makeLet(
variable,
- new ConditionalExpression(buildIsNull(new VariableGet(variable)), b,
- new VariableGet(variable), const DynamicType())));
+ new ConditionalExpression(
+ buildIsNull(astFactory, new VariableGet(variable)),
+ b,
+ new VariableGet(variable),
+ const DynamicType())));
}
/// Handle `a?.b(...)`.
@@ -751,7 +754,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
astFactory.directPropertyGet(new ThisExpression(), target);
receiver = astFactory.superPropertyGet(node.name, target);
return buildMethodInvocation(
- receiver, callName, node.arguments, node.fileOffset);
+ astFactory, receiver, callName, node.arguments, node.fileOffset);
}
bool areArgumentsCompatible(FunctionNode function, Arguments arguments) {
@@ -1743,13 +1746,14 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
if (receiver is ThisAccessor && receiver.isSuper) {
push(toSuperMethodInvocation(buildMethodInvocation(
+ astFactory,
astFactory.thisExpression(receiver.token),
new Name(operator),
new Arguments.empty(),
token.charOffset)));
} else {
- push(buildMethodInvocation(toValue(receiver), new Name(operator),
- new Arguments.empty(), token.charOffset));
+ push(buildMethodInvocation(astFactory, toValue(receiver),
+ new Name(operator), new Arguments.empty(), token.charOffset));
}
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/builder/ast_factory.dart ('k') | pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698