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

Unified Diff: src/scopes.h

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/ppc/full-codegen-ppc.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 63cd13d47c175ce5b934825df1d2ccb4163ea0ea..016fc7f7c3d852ccfd58ad68e6cd0d2f903eafb1 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -409,20 +409,12 @@ class Scope: public ZoneObject {
return arguments_;
}
- // A local variable to the [[HomeObject]] used by methods if we need to
- // allocate it; NULL otherwise.
- Variable* home_object_var() const {
- DCHECK(home_object_ == nullptr ||
- (is_function_scope() && (IsConciseMethod(function_kind()) ||
- IsAccessorFunction(function_kind()) ||
- IsConstructor(function_kind()))));
- return home_object_;
- }
-
Variable* this_function_var() const {
// This is only used in derived constructors atm.
DCHECK(this_function_ == nullptr ||
- (is_function_scope() && IsSubclassConstructor(function_kind())));
+ (is_function_scope() && (IsConstructor(function_kind()) ||
+ IsConciseMethod(function_kind()) ||
+ IsAccessorFunction(function_kind()))));
return this_function_;
}
@@ -584,8 +576,6 @@ class Scope: public ZoneObject {
Variable* new_target_;
// Convenience variable; function scopes only.
Variable* arguments_;
- // Convenience variable; method scopes only.
- Variable* home_object_;
// Convenience variable; Subclass constructor only
Variable* this_function_;
// Module descriptor; module scopes only.
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698