OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler-dispatcher/compiler-dispatcher-job.h" | 5 #include "src/compiler-dispatcher/compiler-dispatcher-job.h" |
6 | 6 |
7 #include "src/assert-scope.h" | 7 #include "src/assert-scope.h" |
8 #include "src/compilation-info.h" | 8 #include "src/compilation-info.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/global-handles.h" | 10 #include "src/global-handles.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 parse_info_->set_hash_seed(isolate_->heap()->HashSeed()); | 76 parse_info_->set_hash_seed(isolate_->heap()->HashSeed()); |
77 parse_info_->set_is_named_expression(shared->is_named_expression()); | 77 parse_info_->set_is_named_expression(shared->is_named_expression()); |
78 parse_info_->set_calls_eval(shared->scope_info()->CallsEval()); | 78 parse_info_->set_calls_eval(shared->scope_info()->CallsEval()); |
79 parse_info_->set_compiler_hints(shared->compiler_hints()); | 79 parse_info_->set_compiler_hints(shared->compiler_hints()); |
80 parse_info_->set_start_position(shared->start_position()); | 80 parse_info_->set_start_position(shared->start_position()); |
81 parse_info_->set_end_position(shared->end_position()); | 81 parse_info_->set_end_position(shared->end_position()); |
82 parse_info_->set_unicode_cache(unicode_cache_.get()); | 82 parse_info_->set_unicode_cache(unicode_cache_.get()); |
83 parse_info_->set_language_mode(shared->language_mode()); | 83 parse_info_->set_language_mode(shared->language_mode()); |
84 | 84 |
85 parser_.reset(new Parser(parse_info_.get())); | 85 parser_.reset(new Parser(parse_info_.get())); |
86 parser_->DeserializeScopeChain( | 86 parser_->DeserializeScopeChain(parse_info_.get(), |
87 parse_info_.get(), handle(function_->context(), isolate_), | 87 handle(function_->context(), isolate_)); |
88 Scope::DeserializationMode::kDeserializeOffHeap); | |
89 | 88 |
90 Handle<String> name(String::cast(shared->name())); | 89 Handle<String> name(String::cast(shared->name())); |
91 parse_info_->set_function_name( | 90 parse_info_->set_function_name( |
92 parse_info_->ast_value_factory()->GetString(name)); | 91 parse_info_->ast_value_factory()->GetString(name)); |
93 status_ = CompileJobStatus::kReadyToParse; | 92 status_ = CompileJobStatus::kReadyToParse; |
94 } | 93 } |
95 | 94 |
96 void CompilerDispatcherJob::Parse() { | 95 void CompilerDispatcherJob::Parse() { |
97 DCHECK(can_parse_on_background_thread_ || | 96 DCHECK(can_parse_on_background_thread_ || |
98 ThreadId::Current().Equals(isolate_->thread_id())); | 97 ThreadId::Current().Equals(isolate_->thread_id())); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 if (!source_.is_null()) { | 252 if (!source_.is_null()) { |
254 i::GlobalHandles::Destroy(Handle<Object>::cast(source_).location()); | 253 i::GlobalHandles::Destroy(Handle<Object>::cast(source_).location()); |
255 source_ = Handle<String>::null(); | 254 source_ = Handle<String>::null(); |
256 } | 255 } |
257 | 256 |
258 status_ = CompileJobStatus::kInitial; | 257 status_ = CompileJobStatus::kInitial; |
259 } | 258 } |
260 | 259 |
261 } // namespace internal | 260 } // namespace internal |
262 } // namespace v8 | 261 } // namespace v8 |
OLD | NEW |