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

Unified Diff: dart/frog/leg/ssa/closure.dart

Issue 9417031: Mock up all remaining core library implementation classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 10 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 | « dart/frog/leg/ssa/builder.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/ssa/closure.dart
diff --git a/dart/frog/leg/ssa/closure.dart b/dart/frog/leg/ssa/closure.dart
index 6dc77ce4404b3bf7c6f47366b06bd0eb2871ebca..707634a2f782d69fc3430cd71f8313d25ba8ed63 100644
--- a/dart/frog/leg/ssa/closure.dart
+++ b/dart/frog/leg/ssa/closure.dart
@@ -309,7 +309,12 @@ class ClosureTranslator extends AbstractVisitor {
}
visitFunctionExpression(FunctionExpression node) {
- FunctionElement element = elements[node];
+ Element element = elements[node];
+ if (element.kind === ElementKind.PARAMETER) {
+ // TODO(ahe): This is a hack. This method should *not* call
+ // visitChildren.
+ return node.name.accept(this);
+ }
bool isClosure = (closureData !== null);
if (isClosure) closures.add(node);
@@ -360,6 +365,9 @@ class ClosureTranslator extends AbstractVisitor {
declareLocal(element);
}
+ // 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.
node.visitChildren(this);
attachCapturedScopeVariables(node);
« no previous file with comments | « dart/frog/leg/ssa/builder.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698