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

Unified Diff: src/parsing/parse-info.h

Issue 2342443004: Only pass the outer scope info with ParseInfo (Closed)
Patch Set: rebase Created 4 years, 3 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/handles.h ('k') | src/parsing/parse-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parse-info.h
diff --git a/src/parsing/parse-info.h b/src/parsing/parse-info.h
index 6176135c5979c6565b474af065c6c93ed8f48fe0..e3fb5bd0c1274b391a5f349edeef977cf29e26db 100644
--- a/src/parsing/parse-info.h
+++ b/src/parsing/parse-info.h
@@ -159,11 +159,15 @@ class ParseInfo {
Isolate* isolate() const { return isolate_; }
Handle<SharedFunctionInfo> shared_info() const { return shared_; }
Handle<Script> script() const { return script_; }
- Handle<Context> context() const { return context_; }
+ MaybeHandle<ScopeInfo> maybe_outer_scope_info() const {
+ return maybe_outer_scope_info_;
+ }
void clear_script() { script_ = Handle<Script>::null(); }
void set_isolate(Isolate* isolate) { isolate_ = isolate; }
void set_shared_info(Handle<SharedFunctionInfo> shared) { shared_ = shared; }
- void set_context(Handle<Context> context) { context_ = context; }
+ void set_outer_scope_info(Handle<ScopeInfo> outer_scope_info) {
+ maybe_outer_scope_info_ = outer_scope_info;
+ }
void set_script(Handle<Script> script) { script_ = script; }
//--------------------------------------------------------------------------
@@ -178,7 +182,10 @@ class ParseInfo {
void ReopenHandlesInNewHandleScope() {
shared_ = Handle<SharedFunctionInfo>(*shared_);
script_ = Handle<Script>(*script_);
- context_ = Handle<Context>(*context_);
+ Handle<ScopeInfo> outer_scope_info;
+ if (maybe_outer_scope_info_.ToHandle(&outer_scope_info)) {
+ maybe_outer_scope_info_ = Handle<ScopeInfo>(*outer_scope_info);
+ }
}
#ifdef DEBUG
@@ -224,7 +231,7 @@ class ParseInfo {
Isolate* isolate_;
Handle<SharedFunctionInfo> shared_;
Handle<Script> script_;
- Handle<Context> context_;
+ MaybeHandle<ScopeInfo> maybe_outer_scope_info_;
//----------- Inputs+Outputs of parsing and scope analysis -----------------
ScriptData** cached_data_; // used if available, populated if requested.
« no previous file with comments | « src/handles.h ('k') | src/parsing/parse-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698