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

Unified Diff: src/ast/scopes.h

Issue 2242193002: [Interpreter] Avoid accessing Isolate from during bytecode generation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_sourceposition
Patch Set: Rebase Created 4 years, 4 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 | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 05df42c198a84b5ddb255285cef8f13953bf09ef..ef6508de2a0397fa85ccc512a6182114e3531818 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -411,8 +411,15 @@ class Scope: public ZoneObject {
// 'this' is bound, and what determines the function kind.
DeclarationScope* GetReceiverScope();
+ // Creates a scope info if it doesn't already exist.
Handle<ScopeInfo> GetScopeInfo(Isolate* isolate);
+ // GetScopeInfo() must have been called once to create the ScopeInfo.
+ Handle<ScopeInfo> scope_info() {
+ DCHECK(!scope_info_.is_null());
+ return scope_info_;
+ }
+
// ---------------------------------------------------------------------------
// Strict mode support.
bool IsDeclared(const AstRawString* name) {
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698