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

Unified Diff: pkg/compiler/lib/src/ssa/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/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index f3e3ade6e2f78004a9e0e12e2877dec8aea392af..53de1aa4088947b90766154a44edfe1429db39fe 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -3298,23 +3298,7 @@ class SsaBuilder extends ast.Visitor
});
// TODO(15489): Register at codegen.
registry?.registerInstantiation(type);
- return callSetRuntimeTypeInfoWithTypeArguments(
- type.element, inputs, newObject);
- }
-
- HInstruction callSetRuntimeTypeInfoWithTypeArguments(ClassElement element,
- List<HInstruction> rtiInputs, HInstruction newObject) {
- if (!backend.classNeedsRti(element)) {
- return newObject;
- }
-
- HInstruction typeInfo = new HTypeInfoExpression(
- TypeInfoExpressionKind.INSTANCE,
- element.thisType,
- rtiInputs,
- backend.dynamicType);
- add(typeInfo);
- return callSetRuntimeTypeInfo(typeInfo, newObject);
+ return callSetRuntimeTypeInfoWithTypeArguments(type, inputs, newObject);
}
HInstruction callSetRuntimeTypeInfo(
@@ -5272,8 +5256,7 @@ class SsaBuilder extends ast.Visitor
}
// TODO(15489): Register at codegen.
registry?.registerInstantiation(type);
- return callSetRuntimeTypeInfoWithTypeArguments(
- type.element, arguments, object);
+ return callSetRuntimeTypeInfoWithTypeArguments(type, arguments, object);
}
visitLiteralList(ast.LiteralList node) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698