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 1024703004: Cleanups needed for this-scoping in arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 44434fa3622091d19d6b9e511e881883fb0b802f..311c8eab8286114c5e322c86691dfd494dbc5eb7 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -22,8 +22,7 @@ class VariableMap: public ZoneHashMap {
virtual ~VariableMap();
Variable* Declare(Scope* scope, const AstRawString* name, VariableMode mode,
- bool is_valid_lhs, Variable::Kind kind,
- InitializationFlag initialization_flag,
+ Variable::Kind kind, InitializationFlag initialization_flag,
MaybeAssignedFlag maybe_assigned_flag = kNotAssigned);
Variable* Lookup(const AstRawString* name);
@@ -149,8 +148,8 @@ class Scope: public ZoneObject {
// the same name because they may be removed selectively via
// RemoveUnresolved().
DCHECK(!already_resolved());
- VariableProxy* proxy =
- factory->NewVariableProxy(name, false, start_position, end_position);
+ VariableProxy* proxy = factory->NewVariableProxy(
+ name, Variable::NORMAL, start_position, end_position);
unresolved_.Add(proxy, zone_);
return proxy;
}
@@ -347,6 +346,10 @@ class Scope: public ZoneObject {
// The variable corresponding to the 'this' value.
Variable* receiver() { return receiver_; }
+ bool has_this_declaration() const {
wingo 2015/03/23 15:11:14 Given that we won't include the codegen changes in
+ return !is_arrow_scope() && is_declaration_scope();
+ }
+
// The variable corresponding to the 'new.target' value.
Variable* new_target_var() { return new_target_; }
« src/arm/full-codegen-arm.cc ('K') | « src/parser.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698