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

Unified Diff: src/scopes.h

Issue 1135243004: [es6] Support super.property in eval and arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code review cleanup 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/preparser.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 01df8f9d77e2d355a3ab8b17a8f7b85d5cd31990..d56018532152909538635d95cdb50286ddfc0d34 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -409,6 +409,16 @@ 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_;
+ }
+
// Declarations list.
ZoneList<Declaration*>* declarations() { return &decls_; }
@@ -567,6 +577,8 @@ class Scope: public ZoneObject {
Variable* new_target_;
// Convenience variable; function scopes only.
Variable* arguments_;
+ // Convenience variable; method scopes only.
+ Variable* home_object_;
// Module descriptor; module scopes only.
ModuleDescriptor* module_descriptor_;
« no previous file with comments | « src/preparser.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698