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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1637843002: typeInformation in CreateInstance is a kind of TypeExpression (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months 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/cps_ir/cps_ir_builder_task.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
index f256d75a49203c1e140d91b24ed81c03f50dc3dd..3b7fbe068f4fa6ed32abe9253fc9bfff93ad0cdb 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
@@ -382,7 +382,7 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
IrBuilder builder = getBuilderFor(constructor);
final bool requiresTypeInformation =
- builder.program.requiresRuntimeTypesFor(classElement);
+ builder.program.requiresRuntimeTypesFor(classElement);
return withBuilder(builder, () {
// Setup parameters and create a box if anything is captured.
@@ -410,11 +410,15 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
closureScope: getClosureScopeForFunction(constructor));
// Create a list of the values of all type argument parameters, if any.
- List<ir.Primitive> typeInformation;
+ ir.Primitive typeInformation;
if (requiresTypeInformation) {
- typeInformation = irParameters.sublist(firstTypeArgumentParameterIndex);
+ typeInformation = new ir.TypeExpression(
+ ir.TypeExpressionKind.INSTANCE,
+ classElement.thisType,
+ irParameters.sublist(firstTypeArgumentParameterIndex));
+ irBuilder.add(new ir.LetPrim(typeInformation));
} else {
- typeInformation = const <ir.Primitive>[];
+ typeInformation = null;
}
// -- Load values for type variables declared on super classes --

Powered by Google App Engine
This is Rietveld 408576698