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

Unified Diff: lib/compiler/implementation/closure.dart

Issue 11273121: Support closures inside initializers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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: lib/compiler/implementation/closure.dart
===================================================================
--- lib/compiler/implementation/closure.dart (revision 14321)
+++ lib/compiler/implementation/closure.dart (working copy)
@@ -45,9 +45,7 @@
return measure(() {
ClosureClassMap nestedClosureData = closureMappingCache[node];
if (nestedClosureData == null) {
- // TODO(floitsch): we can only assume that the reason for not having a
- // closure data here is, because the function is inside an initializer.
- compiler.unimplemented("Closures inside initializers", node: node);
+ compiler.internalError("No closure cache", node: node);
}
return nestedClosureData;
});
@@ -610,9 +608,8 @@
// TODO(ahe): This is problematic. The backend should not repeat
// the work of the resolver. It is the resolver's job to create
// parameters, etc. Other phases should only visit statements.
- // TODO(floitsch): we avoid visiting the initializers on purpose so that
- // we get an error-message later in the builder.
if (node.parameters != null) node.parameters.accept(this);
+ if (node.initializers != null) node.initializers.accept(this);
if (node.body != null) node.body.accept(this);
});
}
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/builder.dart » ('j') | lib/compiler/implementation/ssa/codegen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698