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

Unified Diff: src/scopes.h

Issue 908883002: new classes: implement new.target passing to superclass constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix x64 arithmetic Created 5 years, 10 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-scopes.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 cd4658d37bca7ae3fbf7ac007323c90217074ed8..2cc8b3e9569bf80bc11d49dfdda733d134ef7f73 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -88,7 +88,7 @@ class Scope: public ZoneObject {
scope_name_ = scope_name;
}
- void Initialize(bool uninitialized_this = false);
+ void Initialize(bool subclass_constructor = false);
// Checks if the block scope is redundant, i.e. it does not contain any
// block scoped declarations. In that case it is removed from the scope
@@ -343,9 +343,12 @@ class Scope: public ZoneObject {
// The language mode of this scope.
LanguageMode language_mode() const { return language_mode_; }
- // The variable corresponding the 'this' value.
+ // The variable corresponding to the 'this' value.
Variable* receiver() { return receiver_; }
+ // The variable corresponding to the 'new.target' value.
+ Variable* new_target_var() { return new_target_; }
+
// The variable holding the function literal for named function
// literals, or NULL. Only valid for function scopes.
VariableDeclaration* function() const {
@@ -517,6 +520,8 @@ class Scope: public ZoneObject {
Variable* receiver_;
// Function variable, if any; function scopes only.
VariableDeclaration* function_;
+ // new.target variable, function scopes only.
+ Variable* new_target_;
// Convenience variable; function scopes only.
Variable* arguments_;
// Interface; module scopes only.
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698