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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 59073003: Version 0.8.10.4 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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
Index: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 29808)
+++ dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -2024,6 +2024,8 @@
push(attachPosition(instruction, node));
}
+ HInstruction peek() => stack.last;
+
HInstruction pop() {
return stack.removeLast();
}
@@ -4519,6 +4521,17 @@
}
}
+ void setRtiIfNeeded(HInstruction object, Node node) {
+ InterfaceType type = elements.getType(node);
+ if (!backend.classNeedsRti(type.element) || type.treatAsRaw) return;
+ List<HInstruction> arguments = <HInstruction>[];
+ for (DartType argument in type.typeArguments) {
+ arguments.add(analyzeTypeArgument(argument));
+ }
+ callSetRuntimeTypeInfo(type.element, arguments, object);
+ compiler.enqueuer.codegen.registerInstantiatedType(type, elements);
+ }
+
visitLiteralList(LiteralList node) {
HInstruction instruction;
@@ -4534,6 +4547,7 @@
}
instruction = buildLiteralList(inputs);
add(instruction);
+ setRtiIfNeeded(instruction, node);
}
TypeMask type =
@@ -4736,6 +4750,7 @@
add(keyValuePairs);
TypeMask mapType = new TypeMask.nonNullSubtype(backend.mapLiteralClass);
pushInvokeStatic(node, backend.getMapMaker(), [keyValuePairs], mapType);
+ setRtiIfNeeded(peek(), node);
}
visitLiteralMapEntry(LiteralMapEntry node) {

Powered by Google App Engine
This is Rietveld 408576698