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

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

Issue 2566563002: dart2js-kernel: Handle ir.TypeLiteral for type variables (Closed)
Patch Set: Created 4 years 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 | « no previous file | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index fd1fef4487ba3ad08899e920a1f19222206846ea..a36a7bb0086a20de3720a4ba3fdabace56d79745 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -997,8 +997,16 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
return;
}
if (type is ir.TypeParameterType) {
- // TODO(27394): Load type parameter from current 'this' object.
- defaultExpression(typeLiteral);
+ // TODO(sra): Convert the type logic here to use ir.DartType.
+ DartType dartType = astAdapter.getDartType(type);
+ dartType = localsHandler.substInContext(dartType);
+ HInstruction value = typeBuilder.analyzeTypeArgument(
+ dartType, sourceElement,
+ sourceInformation: null);
+ _pushStaticInvocation(astAdapter.runtimeTypeToString,
+ <HInstruction>[value], backend.stringType);
+ _pushStaticInvocation(astAdapter.createRuntimeType, <HInstruction>[pop()],
+ astAdapter.createRuntimeTypeReturnType);
return;
}
// TODO(27394): 'dynamic' and function types observed. Where are they from?
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698