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

Unified Diff: vm/parser.cc

Issue 10409043: Make saving and restoring of the context around closure calls explicit. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « vm/intermediate_language.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/parser.cc
===================================================================
--- vm/parser.cc (revision 7782)
+++ vm/parser.cc (working copy)
@@ -4985,6 +4985,7 @@
const intptr_t condition_end = token_index_;
ExpectToken(Token::kRPAREN);
if (condition->IsClosureNode()) {
+ EnsureExpressionTemp();
// Function literal in assert implies a call.
condition =
new ClosureCallNode(condition_pos,
@@ -6280,12 +6281,14 @@
Resolver::kIsQualified);
if (!func.IsNull()) {
ASSERT(func.kind() != RawFunction::kConstImplicitGetter);
+ EnsureExpressionTemp();
closure = new StaticGetterNode(call_pos,
Class::ZoneHandle(cls.raw()),
func_name);
return new ClosureCallNode(call_pos, closure, arguments);
}
} else {
+ EnsureExpressionTemp();
closure = GenerateStaticFieldLookup(field, call_pos);
return new ClosureCallNode(call_pos, closure, arguments);
}
@@ -6325,6 +6328,7 @@
TRACE_PARSER("ParseClosureCall");
const intptr_t call_pos = token_index_;
ASSERT(CurrentToken() == Token::kLPAREN);
+ EnsureExpressionTemp();
ArgumentListNode* arguments = ParseActualParameters(NULL, kAllowConst);
return new ClosureCallNode(call_pos, closure, arguments);
}
« no previous file with comments | « vm/intermediate_language.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698