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

Unified Diff: src/scopes.h

Issue 1168513004: [es6] Super call in arrows and eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Push this_function earlier 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/runtime/runtime.h ('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 d56018532152909538635d95cdb50286ddfc0d34..63cd13d47c175ce5b934825df1d2ccb4163ea0ea 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -419,6 +419,13 @@ class Scope: public ZoneObject {
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())));
+ return this_function_;
+ }
+
// Declarations list.
ZoneList<Declaration*>* declarations() { return &decls_; }
@@ -579,6 +586,8 @@ class Scope: public ZoneObject {
Variable* arguments_;
// Convenience variable; method scopes only.
Variable* home_object_;
+ // Convenience variable; Subclass constructor only
+ Variable* this_function_;
// Module descriptor; module scopes only.
ModuleDescriptor* module_descriptor_;
« no previous file with comments | « src/runtime/runtime.h ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698