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

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

Issue 1969753002: Adjusts dart2js SSA builder to tolerate method type arguments. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/resolution/type_resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50db1bf00553b3735936d472965f8e9013c595b7..222d7e37d9088db81950a9b7a7420a4bb4d8c7e5 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -4766,6 +4766,17 @@ class SsaBuilder extends ast.Visitor
// The type variable is stored on the object.
return readTypeVariable(member.enclosingClass, type.element,
sourceInformation: sourceInformation);
+ } else if (type is MethodTypeVariableType) {
Johnni Winther 2016/05/11 12:58:30 I think this should be the first test, so that we
+ // TODO(eernst): The enclosing `else if` was added to provide minimal
+ // support for generic methods: The method type arguments are always
+ // pretending to have the value `dynamic`. Revise for full support.
+ DynamicType type = const DynamicType();
+ JavaScriptBackend backend = compiler.backend;
+ ClassElement cls = backend.helpers.DynamicRuntimeType;
+ HInstruction instruction =
+ new HDynamicType(type, new TypeMask.exact(cls, compiler.world));
+ add(instruction);
+ return instruction;
} else {
reporter.internalError(
type.element, 'Unexpected type variable in static context.');
« no previous file with comments | « pkg/compiler/lib/src/resolution/type_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698