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

Unified Diff: src/parsing/parser.cc

Issue 1863083002: [parser] Remove ParseInfo::closure field. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-internal-9
Patch Set: Rebased. Created 4 years, 8 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/parsing/parser.h ('k') | test/cctest/compiler/function-tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 548c1093d739ac097e16719d9e8e1af2d8de7c36..8310ad948c543de2cfa10689062e10e1a1106496 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -39,7 +39,6 @@ ScriptData::ScriptData(const byte* data, int length)
}
}
-
ParseInfo::ParseInfo(Zone* zone)
: zone_(zone),
flags_(0),
@@ -51,15 +50,14 @@ ParseInfo::ParseInfo(Zone* zone)
unicode_cache_(nullptr),
stack_limit_(0),
hash_seed_(0),
+ isolate_(nullptr),
cached_data_(nullptr),
ast_value_factory_(nullptr),
literal_(nullptr),
scope_(nullptr) {}
-
ParseInfo::ParseInfo(Zone* zone, Handle<JSFunction> function)
: ParseInfo(zone, Handle<SharedFunctionInfo>(function->shared())) {
- set_closure(function);
set_context(Handle<Context>(function->context()));
}
@@ -1048,12 +1046,12 @@ FunctionLiteral* Parser::ParseLazy(Isolate* isolate, ParseInfo* info,
// Parse the function literal.
Scope* scope = NewScope(scope_, SCRIPT_SCOPE);
info->set_script_scope(scope);
- if (!info->closure().is_null()) {
+ if (!info->context().is_null()) {
// Ok to use Isolate here, since lazy function parsing is only done in the
// main thread.
DCHECK(parsing_on_main_thread_);
- scope = Scope::DeserializeScopeChain(isolate, zone(),
- info->closure()->context(), scope);
+ scope = Scope::DeserializeScopeChain(isolate, zone(), *info->context(),
+ scope);
}
original_scope_ = scope;
AstNodeFactory function_factory(ast_value_factory());
« no previous file with comments | « src/parsing/parser.h ('k') | test/cctest/compiler/function-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698