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

Unified Diff: src/ast/scopes.h

Issue 1784893003: ParameterInitializerRewriter must maintain temporary variable order (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Nikolaos comments 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 | « src/ast/ast-expression-visitor.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index d35a20231519c77fb9a921bc33ac72e62feed411..d767a33de05a285ab9b97112ca1f7ff4acabb7d8 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -209,7 +209,9 @@ class Scope: public ZoneObject {
// Remove a temporary variable. This is for adjusting the scope of
// temporaries used when desugaring parameter initializers.
- bool RemoveTemporary(Variable* var);
+ // Returns the index at which it was found in this scope, or -1 if
+ // it was not found.
+ int RemoveTemporary(Variable* var);
// Adds a temporary variable in this scope's TemporaryScope. This is for
// adjusting the scope of temporaries used when desugaring parameter
@@ -605,7 +607,9 @@ class Scope: public ZoneObject {
// variables may be implicitly 'declared' by being used (possibly in
// an inner scope) with no intervening with statements or eval calls.
VariableMap variables_;
- // Compiler-allocated (user-invisible) temporaries.
+ // Compiler-allocated (user-invisible) temporaries. Due to the implementation
+ // of RemoveTemporary(), may contain nulls, which must be skipped-over during
+ // allocation and printing.
ZoneList<Variable*> temps_;
// Parameter list in source order.
ZoneList<Variable*> params_;
« no previous file with comments | « src/ast/ast-expression-visitor.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698