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

Unified Diff: src/ast/scopes.h

Issue 1564343002: Fix for temporaries in parameter initializers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 0e7d209d466891eae6a6ff55ccff1a5648f0ef80..6c261f63c376fdf9357eb06ad8cf397f1c08a9ec 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -209,6 +209,15 @@ class Scope: public ZoneObject {
// names.
Variable* NewTemporary(const AstRawString* name);
+ // Remove a temporary variable. This is for adjusting the scope of
+ // temporaries used when desugaring parameter initializers.
+ bool RemoveTemporary(Variable* var);
+
+ // Adds a temporary variable in this scope's TemporaryScope. This is for
+ // adjusting the scope of temporaries used when desugaring parameter
+ // initializers.
+ void AddTemporary(Variable* var) { temps_.Add(var, zone()); }
+
// Adds the specific declaration node to the list of declarations in
// this scope. The declarations are processed as part of entering
// the scope; see codegen.cc:ProcessDeclarations.
« 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