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

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

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Remove obsolete named argument. Created 3 years, 12 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/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 d659977b96d3559b9deb836a2ab7180719af0e72..49be09d13cff2af7bbe67a258987687fa72a330a 100644
--- a/pkg/compiler/lib/src/ssa/graph_builder.dart
+++ b/pkg/compiler/lib/src/ssa/graph_builder.dart
@@ -261,6 +261,14 @@ class ReifiedTypeRepresentationBuilder
void visitTypeVariableType(TypeVariableType type, GraphBuilder builder) {
ClassElement cls = builder.backend.helpers.RuntimeType;
TypeMask instructionType = new TypeMask.subclass(cls, closedWorld);
+
+ // TODO(floitsch): this hack maps type variables of generic function
+ // typedefs to dynamic. For example: `typedef F = Function<T>(T)`.
+ if (type is MethodTypeVariableType) {
+ visitDynamicType(const DynamicType(), builder);
+ return;
+ }
+
if (!builder.sourceElement.enclosingElement.isClosure &&
builder.sourceElement.isInstanceMember) {
HInstruction receiver = builder.localsHandler.readThis();

Powered by Google App Engine
This is Rietveld 408576698