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

Unified Diff: src/scopes.h

Issue 1244423003: [es6] Fix function context check for super and new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment; added test for super calls Created 5 years, 5 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.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 f9354188bf31e99858e2da0c0696eb5cd049c9da..e565ff69fe25f7c1197a341a5e96940ced953773 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -483,15 +483,14 @@ class Scope: public ZoneObject {
// The number of contexts between this and scope; zero if this == scope.
int ContextChainLength(Scope* scope);
- // Find the script scope.
- // Used in modules implemenetation to find hosting scope.
- // TODO(rossberg): is this needed?
- Scope* ScriptScope();
-
- // Find the first function, global, or eval scope. This is the scope
- // where var declarations will be hoisted to in the implementation.
+ // Find the first function, script, eval or (declaration) block scope. This is
+ // the scope where var declarations will be hoisted to in the implementation.
Scope* DeclarationScope();
+ // Find the first (non-arrow) function or script scope. This is where
+ // 'this' is bound, and what determines the function kind.
+ Scope* ReceiverScope();
+
Handle<ScopeInfo> GetScopeInfo(Isolate* isolate);
// Get the chain of nested scopes within this scope for the source statement
« no previous file with comments | « src/preparser.h ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698