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

Unified Diff: pkg/compiler/lib/src/ssa/builder_kernel.dart

Issue 2896983002: Lookup const constructor invocation like other constants (Closed)
Patch Set: Created 3 years, 7 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 | tests/compiler/dart2js_native/dart2js_native.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 38902b25916dca1981ad4ca16f8abd3ba0f9c413..f56900f697728d162d943842f0240fffef0c4235 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -3001,6 +3001,12 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
@override
void visitConstructorInvocation(ir.ConstructorInvocation invocation) {
ir.Constructor target = invocation.target;
+ if (invocation.isConst) {
+ ConstantValue constant = astAdapter.getConstantFor(invocation);
+ stack.add(graph.addConstant(constant, closedWorld));
+ return;
+ }
+
// TODO(sra): For JS-interop targets, process arguments differently.
List<HInstruction> arguments =
_visitArgumentsForStaticTarget(target.function, invocation.arguments);
« no previous file with comments | « no previous file | tests/compiler/dart2js_native/dart2js_native.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698