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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 12334070: Support runtime check of function types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: New check encoding Created 7 years, 9 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: sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index e6fd47862ac1280627bedfdbbf339ae86f10a11c..92cce46bcd3525a4d57b2d8928cc74f2109d402a 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -1866,6 +1866,12 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
}
parameterNodes = parameterNodes.tail;
});
+ if (inCheckContext) {
+ functionParameters.forEachParameter((Element element) {
+ compiler.enqueuer.resolution.registerIsCheck(
+ element.computeType(compiler), mapping);
+ });
+ }
}
visitCascade(Cascade node) {
@@ -1963,6 +1969,9 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
scope = oldScope;
enclosingElement = previousEnclosingElement;
+ if (function.computeType(compiler).containsTypeVariables) {
+ world.registerGenericClosure(function, mapping);
+ }
world.registerInstantiatedClass(compiler.functionClass, mapping);
}

Powered by Google App Engine
This is Rietveld 408576698