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

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: 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..be30ccd48c60c908958fa79b095c6f42877bcc77 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
+ // Find the first function, script, or eval scope. This is the scope
adamk 2015/07/22 20:55:50 Can you fully fix this comment while you're here t
rossberg 2015/07/23 09:33:58 Done.
// 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