Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
| index a1666a3546e3a339647cfd18b41eace501c3ce74..b247beaedfdc95740886fd811d3a563688c98968 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
| @@ -2024,6 +2024,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
| push(attachPosition(instruction, node)); |
| } |
| + HInstruction peek() => stack.last; |
| + |
| HInstruction pop() { |
| return stack.removeLast(); |
| } |
| @@ -4501,6 +4503,17 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
| } |
| } |
| + void setRtiIfNeeded(HInstruction object, Node node) { |
| + InterfaceType type = elements.getType(node); |
| + if (!backend.classNeedsRti(type.element)) return; |
| + List<HInstruction> arguments = <HInstruction>[]; |
| + for (DartType argument in type.typeArguments) { |
| + arguments.add(analyzeTypeArgument(argument)); |
| + } |
| + print(arguments); |
|
kasperl
2013/11/01 10:30:57
Get rid of the printing.
karlklose
2013/11/01 10:35:01
Done.
|
| + callSetRuntimeTypeInfo(type.element, arguments, object); |
| + } |
| + |
| visitLiteralList(LiteralList node) { |
| HInstruction instruction; |
| @@ -4516,6 +4529,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
| } |
| instruction = buildLiteralList(inputs); |
| add(instruction); |
| + setRtiIfNeeded(instruction, node); |
| } |
| HType type = new HType.inferredForNode(currentElement, node, compiler); |
| @@ -4717,6 +4731,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
| add(keyValuePairs); |
| HType mapType = new HType.nonNullSubtype(backend.mapLiteralClass, compiler); |
| pushInvokeStatic(node, backend.getMapMaker(), [keyValuePairs], mapType); |
| + setRtiIfNeeded(peek(), node); |
| } |
| visitLiteralMapEntry(LiteralMapEntry node) { |