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

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

Issue 2972873002: Create more synthetic kernel objects. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 283adcb7163dd835a9dd638aa8b8a32a58c0ea3d..dc87c7a5ff330ca818702f10d06f086b23b6baf9 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -2279,10 +2279,10 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
} else if (b.isConstructor) {
initialTarget = b.target;
if (type.isAbstract) {
- push(evaluateArgumentsBefore(
+ push(new KernelSyntheticExpression(evaluateArgumentsBefore(
arguments,
buildAbstractClassInstantiationError(
- type.name, nameToken.charOffset)));
+ type.name, nameToken.charOffset))));
return;
} else {
target = initialTarget;
@@ -3053,9 +3053,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
warning("The class '$className' is abstract and can't be instantiated.",
charOffset);
Builder constructor = library.loader.getAbstractClassInstantiationError();
- return new KernelSyntheticExpression(new Throw(buildStaticInvocation(
- constructor.target,
- new KernelArguments(<Expression>[new StringLiteral(className)]))));
+ return new Throw(buildStaticInvocation(constructor.target,
+ new KernelArguments(<Expression>[new StringLiteral(className)])));
}
Statement buildCompileTimeErrorStatement(error, [int charOffset = -1]) {
« no previous file with comments | « no previous file | 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