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

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: i have no idea 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
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index f3c64f9eadf73c7c4f9c1671779c4f55926697f9..73d99fce3af695d980ab2912bfe9f723410beaa5 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -409,6 +409,17 @@ 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 {
+ // TODO(arv): Cleanup
+ // DCHECK(IsConciseMethod(function_kind()) ||
+ // IsAccessorFunction(function_kind()) ||
+ // IsConstructor(function_kind()));
+ DCHECK(!is_arrow_scope() || home_object_ == nullptr);
+ return home_object_;
+ }
+
// Declarations list.
ZoneList<Declaration*>* declarations() { return &decls_; }
@@ -566,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_;
« src/ast-numbering.cc ('K') | « src/runtime/runtime-classes.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698