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

Unified Diff: src/compiler-dispatcher/compiler-dispatcher-job.cc

Issue 2220463002: Hook up compiler dispatcher jobs to lazy parser. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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/parsing/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler-dispatcher/compiler-dispatcher-job.cc
diff --git a/src/compiler-dispatcher/compiler-dispatcher-job.cc b/src/compiler-dispatcher/compiler-dispatcher-job.cc
index 6f44063888ddda6976b36a8fcd7e934392b65051..a7f83c279dfdb9a3f466b997afcd536de9dec95a 100644
--- a/src/compiler-dispatcher/compiler-dispatcher-job.cc
+++ b/src/compiler-dispatcher/compiler-dispatcher-job.cc
@@ -46,6 +46,8 @@ void CompilerDispatcherJob::PrepareToParseOnMainThread() {
zone_.reset(new Zone(isolate_->allocator()));
Handle<SharedFunctionInfo> shared(function_->shared(), isolate_);
Handle<Script> script(Script::cast(shared->script()), isolate_);
+ DCHECK(script->type() != Script::TYPE_NATIVE);
+
Handle<String> source(String::cast(script->source()), isolate_);
if (source->IsExternalTwoByteString()) {
character_stream_.reset(new ExternalTwoByteStringUtf16CharacterStream(
@@ -66,12 +68,24 @@ void CompilerDispatcherJob::PrepareToParseOnMainThread() {
parse_info_.reset(new ParseInfo(zone_.get()));
parse_info_->set_isolate(isolate_);
parse_info_->set_character_stream(character_stream_.get());
+ parse_info_->set_lazy();
parse_info_->set_hash_seed(isolate_->heap()->HashSeed());
+ parse_info_->set_is_named_expression(shared->is_named_expression());
+ parse_info_->set_calls_eval(shared->scope_info()->CallsEval());
+ parse_info_->set_compiler_hints(shared->compiler_hints());
+ parse_info_->set_start_position(shared->start_position());
+ parse_info_->set_end_position(shared->end_position());
parse_info_->set_unicode_cache(unicode_cache_.get());
+ parse_info_->set_language_mode(shared->language_mode());
+
parser_.reset(new Parser(parse_info_.get()));
parser_->DeserializeScopeChain(
parse_info_.get(), handle(function_->context(), isolate_),
Scope::DeserializationMode::kDeserializeOffHeap);
+
+ Handle<String> name(String::cast(shared->name()));
+ parse_info_->set_function_name(
+ parse_info_->ast_value_factory()->GetString(name));
status_ = CompileJobStatus::kReadyToParse;
}
« no previous file with comments | « no previous file | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698