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

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: Address comments 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') | src/interpreter/bytecode-generator.h » ('J')
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 dd65d48c4a14c4e234e958c8ddc8c1a78648fdf0..f412ec2dbc751bb5c555154742379846d298403c 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -412,8 +412,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') | src/interpreter/bytecode-generator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698