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

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
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 550cc634c2e4bc5634da80fc64a9c44652c52f2a..0b9690f9e173a277d9e8a2f64be5df92f42fcb25 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 --
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698