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

Unified Diff: src/scopes.cc

Issue 1154103005: Refactor lexical home object binding (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase Created 5 years, 6 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/scopes.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index 9db5745160c1cff2f859936780744b83c8bac44a..63ae7ec1099627c187043ac2cb62e6e4d270f131 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -159,7 +159,6 @@ void Scope::SetDefaults(ScopeType scope_type, Scope* outer_scope,
new_target_ = nullptr;
function_ = nullptr;
arguments_ = nullptr;
- home_object_ = nullptr;
this_function_ = nullptr;
illegal_redecl_ = nullptr;
scope_inside_with_ = false;
@@ -335,15 +334,6 @@ void Scope::Initialize() {
if (IsConciseMethod(function_kind_) || IsConstructor(function_kind_) ||
IsAccessorFunction(function_kind_)) {
DCHECK(!is_arrow_scope());
- // Declare '.home_object' variable which exists in all methods.
- // Note that it might never be accessed, in which case it won't be
- // allocated during variable allocation.
- variables_.Declare(this, ast_value_factory_->home_object_string(), CONST,
- Variable::NORMAL, kCreatedInitialized);
- }
-
- if (IsSubclassConstructor(function_kind_)) {
- DCHECK(!is_arrow_scope());
variables_.Declare(this, ast_value_factory_->this_function_string(),
CONST, Variable::NORMAL, kCreatedInitialized);
}
@@ -1499,12 +1489,6 @@ void Scope::AllocateNonParameterLocals(Isolate* isolate) {
AllocateNonParameterLocal(isolate, rest_parameter_);
}
- Variable* home_object_var =
- LookupLocal(ast_value_factory_->home_object_string());
- if (home_object_var != nullptr && MustAllocate(home_object_var)) {
- home_object_ = home_object_var;
- }
-
Variable* new_target_var =
LookupLocal(ast_value_factory_->new_target_string());
if (new_target_var != nullptr && MustAllocate(new_target_var)) {
« no previous file with comments | « src/scopes.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698