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

Unified Diff: src/scopes.h

Issue 1129723003: Revert of Resolve references to "this" the same way as normal variables (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 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/scopeinfo.cc ('k') | src/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index 92f5c4cf72e73aff6bbdf5e09914de835d535f45..5e3dc1f0654bf65c3ee738665fcb7bf2107be63b 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -144,15 +144,14 @@
// Create a new unresolved variable.
VariableProxy* NewUnresolved(AstNodeFactory* factory,
const AstRawString* name,
- Variable::Kind kind = Variable::NORMAL,
int start_position = RelocInfo::kNoPosition,
int end_position = RelocInfo::kNoPosition) {
// Note that we must not share the unresolved variables with
// the same name because they may be removed selectively via
// RemoveUnresolved().
DCHECK(!already_resolved());
- VariableProxy* proxy =
- factory->NewVariableProxy(name, kind, start_position, end_position);
+ VariableProxy* proxy = factory->NewVariableProxy(
+ name, Variable::NORMAL, start_position, end_position);
unresolved_.Add(proxy, zone_);
return proxy;
}
@@ -347,21 +346,7 @@
LanguageMode language_mode() const { return language_mode_; }
// The variable corresponding to the 'this' value.
- Variable* receiver() {
- DCHECK(has_this_declaration());
- DCHECK_NOT_NULL(receiver_);
- return receiver_;
- }
-
- Variable* LookupThis() { return Lookup(ast_value_factory_->this_string()); }
-
- // TODO(wingo): Add a GLOBAL_SCOPE scope type which will lexically allocate
- // "this" (and no other variable) on the native context. Script scopes then
- // will not have a "this" declaration.
- bool has_this_declaration() const {
- return (is_function_scope() && !is_arrow_scope()) || is_module_scope() ||
- is_script_scope();
- }
+ Variable* receiver() { return receiver_; }
// The variable corresponding to the 'new.target' value.
Variable* new_target_var() { return new_target_; }
@@ -721,8 +706,6 @@
void AllocateNonParameterLocal(Isolate* isolate, Variable* var);
void AllocateNonParameterLocals(Isolate* isolate);
void AllocateVariablesRecursively(Isolate* isolate);
- void AllocateParameter(Variable* var, int index);
- void AllocateReceiver();
void AllocateModules();
// Resolve and fill in the allocation information for all variables
« no previous file with comments | « src/scopeinfo.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698