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

Unified Diff: src/scopes.h

Issue 1405313002: [es6] Fix scoping for default parameters in arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index 26c092fe3e4d16f8dfbd86eaf172710c645e2123..6ac80f88201bbd906ae9487be0948f92d966d0b2 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -178,13 +178,19 @@ class Scope: public ZoneObject {
return proxy;
}
+ void AddUnresolved(VariableProxy* proxy) {
+ DCHECK(!already_resolved());
+ DCHECK(!proxy->is_resolved());
+ unresolved_.Add(proxy, zone_);
+ }
+
// Remove a unresolved variable. During parsing, an unresolved variable
// may have been added optimistically, but then only the variable name
// was used (typically for labels). If the variable was not declared, the
// addition introduced a new unresolved variable which may end up being
// allocated globally as a "ghost" variable. RemoveUnresolved removes
// such a variable again if it was added; otherwise this is a no-op.
- void RemoveUnresolved(VariableProxy* var);
+ bool RemoveUnresolved(VariableProxy* var);
// Creates a new temporary variable in this scope's TemporaryScope. The
// name is only used for printing and cannot be used to find the variable.
@@ -459,6 +465,7 @@ class Scope: public ZoneObject {
// The scope immediately surrounding this scope, or NULL.
Scope* outer_scope() const { return outer_scope_; }
+ void set_outer_scope(Scope* outer_scope) { outer_scope_ = outer_scope; }
// The ModuleDescriptor for this scope; only for module scopes.
ModuleDescriptor* module() const { return module_descriptor_; }

Powered by Google App Engine
This is Rietveld 408576698