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

Unified Diff: pkg/compiler/lib/src/ssa/graph_builder.dart

Issue 2502033002: Set runtime type information when converting list literals. (Closed)
Patch Set: . Created 4 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: pkg/compiler/lib/src/ssa/graph_builder.dart
diff --git a/pkg/compiler/lib/src/ssa/graph_builder.dart b/pkg/compiler/lib/src/ssa/graph_builder.dart
index 7f112300128be9a7242f31585426ada8f9e9858f..e5dce33ba569fc5127dcd44b913485562f372d9d 100644
--- a/pkg/compiler/lib/src/ssa/graph_builder.dart
+++ b/pkg/compiler/lib/src/ssa/graph_builder.dart
@@ -215,6 +215,24 @@ abstract class GraphBuilder {
localsHandler.directLocals[local] != null;
}
+ HInstruction callSetRuntimeTypeInfoWithTypeArguments(
+ DartType type, List<HInstruction> rtiInputs, HInstruction newObject) {
+ if (!backend.classNeedsRti(type.element)) {
+ return newObject;
+ }
+
+ HInstruction typeInfo = new HTypeInfoExpression(
+ TypeInfoExpressionKind.INSTANCE,
+ (type.element as ClassElement).thisType,
+ rtiInputs,
+ backend.dynamicType);
+ add(typeInfo);
+ return callSetRuntimeTypeInfo(typeInfo, newObject);
+ }
+
+ HInstruction callSetRuntimeTypeInfo(
+ HInstruction typeInfo, HInstruction newObject);
+
/// The element for which this SSA builder is being used.
Element get targetElement;
TypeBuilder get typeBuilder;

Powered by Google App Engine
This is Rietveld 408576698