Chromium Code Reviews| 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..24e756dcea6963c6171f9e1bb64466d9abb2d482 100644 |
| --- a/pkg/compiler/lib/src/ssa/builder_kernel.dart |
| +++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
| @@ -279,6 +279,26 @@ 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); |
|
Siggi Cherem (dart-lang)
2016/09/14 18:23:26
dartfmt
Harry Terkelsen
2016/09/14 18:25:55
Done.
|
| + } 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; |