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..2da4ad0712d9f573a8176cb1ad98084cd5f1b688 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,23 @@ 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_hash_seed(isolate_->heap()->HashSeed()); |
marja
2016/08/05 09:43:05
Why don't you need the hash seed any more?
jochen (gone - plz use gerrit)
2016/08/05 11:20:16
Oops, didn't want to delete that
|
+ parse_info_->set_lazy(); |
marja
2016/08/05 09:43:05
Why? Don't we need to at least check some FLAG_s t
jochen (gone - plz use gerrit)
2016/08/05 11:20:15
In the spirit of ParseLazy this flag means that th
|
+ 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; |
} |
@@ -118,6 +131,12 @@ void CompilerDispatcherJob::FinalizeParsingOnMainThread() { |
return; |
} |
+ { |
+ HandleScope scope(isolate_); |
+ Handle<String> inferred_name(function_->shared()->inferred_name()); |
+ parse_info_->literal()->set_inferred_name(inferred_name); |
+ } |
marja
2016/08/05 09:43:05
Why is this good - the HandleScope goes out of Sco
jochen (gone - plz use gerrit)
2016/08/05 11:20:15
True. I'll just do that when preparing the compila
|
+ |
InternalizeParsingResult(); |
status_ = CompileJobStatus::kReadyToCompile; |