| 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..be88d47a15dbe92dd509582eb9d4de27ee15c651 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,16 @@ 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));
|
| + }
|
| + callSetRuntimeTypeInfo(type.element, arguments, object);
|
| + }
|
| +
|
| visitLiteralList(LiteralList node) {
|
| HInstruction instruction;
|
|
|
| @@ -4516,6 +4528,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 +4730,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) {
|
|
|