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 3eb696af225dc25b6d65c3249b15e748d6f9dd35..b670e6451868f0e1434d7aae31b8f74f9f30e8cb 100644 |
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart |
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
@@ -279,6 +279,27 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder { |
} |
@override |
+ void visitListLiteral(ir.ListLiteral listLiteral) { |
+ HInstruction listInstruction; |
+ if (listLiteral.isConst) { |
+ listInstruction = |
+ graph.addConstant(astAdapter.getConstantFor(listLiteral), compiler); |
+ } else { |
+ List<HInstruction> elements = <HInstruction>[]; |
+ for (ir.Expression element in listLiteral.expressions) { |
+ element.accept(this); |
+ elements.add(pop()); |
+ } |
+ listInstruction = new HLiteralList(elements, backend.extendableArrayType); |
+ add(listInstruction); |
+ // TODO(het): set runtime type info |
+ } |
+ |
+ // TODO(het): Set the instruction type to the list type given by inference |
+ stack.add(listInstruction); |
+ } |
+ |
+ @override |
void visitStaticGet(ir.StaticGet staticGet) { |
var staticTarget = staticGet.target; |
Element element = astAdapter.getElement(staticTarget).declaration; |