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

Unified Diff: pkg/compiler/lib/src/kernel/kernel_visitor.dart

Issue 2604463002: dart2js kernel: do less enqueuing. (Closed)
Patch Set: do allow/create references to malformed elements Created 4 years 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 | « pkg/compiler/lib/src/kernel/kernel.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/kernel_visitor.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel_visitor.dart b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
index ea28f680ac5d31fabf613170a807f70bc11f2a60..e61ca0bb74c0f24e42e54101fe06cd2111b1f1ff 100644
--- a/pkg/compiler/lib/src/kernel/kernel_visitor.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
@@ -2162,12 +2162,20 @@ class KernelVisitor extends Object
}
@override
- ir.StaticInvocation handleStaticFunctionIncompatibleInvoke(
+ ir.Expression handleStaticFunctionIncompatibleInvoke(
Send node,
MethodElement function,
NodeList arguments,
CallStructure callStructure,
_) {
+ if (!kernel.compiler.resolution.hasBeenResolved(function) &&
+ !function.isMalformed) {
+ // TODO(sigmund): consider calling nSM or handle recovery differently
+ // here. This case occurs only when this call was the only call to
+ // function, and knowing that the call was erroneous, our resolver didn't
+ // enqueue function itself.
+ return new ir.InvalidExpression();
+ }
return buildStaticInvoke(function, arguments, isConst: false);
}
@@ -2241,14 +2249,13 @@ class KernelVisitor extends Object
}
@override
- ir.MethodInvocation handleStaticSetterInvoke(
+ ir.Expression handleStaticSetterInvoke(
Send node,
FunctionElement setter,
NodeList arguments,
CallStructure callStructure,
_) {
- return buildCall(buildStaticAccessor(null, setter).buildSimpleRead(),
- callStructure, arguments);
+ return new ir.InvalidExpression();
}
@override
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698