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

Unified Diff: runtime/vm/ast.h

Issue 2004373004: Revert "Fix capturing variables in optimized compilations" (Closed) Base URL: git@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 | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
diff --git a/runtime/vm/ast.h b/runtime/vm/ast.h
index 48b4a225d14b4f342a2998ab2422a700a5a43cab..790e94ccfb7bacfa7eb809b692d0be3392f8446f 100644
--- a/runtime/vm/ast.h
+++ b/runtime/vm/ast.h
@@ -540,16 +540,15 @@ class ClosureNode : public AstNode {
ClosureNode(TokenPosition token_pos,
const Function& function,
AstNode* receiver, // Non-null for implicit instance closures.
- LocalScope* scope) // Null for implicit closures or functions
- // that already have a ContextScope because
- // they were compiled before.
+ LocalScope* scope) // Null for implicit closures.
: AstNode(token_pos),
function_(function),
receiver_(receiver),
scope_(scope),
is_deferred_reference_(false) {
ASSERT(function_.IsZoneHandle());
- ASSERT((function_.IsNonImplicitClosureFunction() && (receiver_ == NULL)) ||
+ ASSERT((function_.IsNonImplicitClosureFunction() &&
+ (receiver_ == NULL) && (scope_ != NULL)) ||
(function_.IsImplicitInstanceClosureFunction() &&
(receiver_ != NULL) && (scope_ == NULL)) ||
(function_.IsImplicitStaticClosureFunction() &&
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698