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-dispatcher/compiler-dispatcher-tracer.h" | 9 #include "src/compiler-dispatcher/compiler-dispatcher-tracer.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 if (trace_compiler_dispatcher_jobs_) { | 199 if (trace_compiler_dispatcher_jobs_) { |
200 PrintF("CompilerDispatcherJob[%p]: Preparing to compile\n", | 200 PrintF("CompilerDispatcherJob[%p]: Preparing to compile\n", |
201 static_cast<void*>(this)); | 201 static_cast<void*>(this)); |
202 } | 202 } |
203 | 203 |
204 compile_info_.reset( | 204 compile_info_.reset( |
205 new CompilationInfo(parse_info_.get(), Handle<JSFunction>::null())); | 205 new CompilationInfo(parse_info_.get(), Handle<JSFunction>::null())); |
206 | 206 |
207 DeferredHandleScope scope(isolate_); | 207 DeferredHandleScope scope(isolate_); |
208 if (Compiler::Analyze(parse_info_.get())) { | 208 if (Compiler::Analyze(parse_info_.get())) { |
209 compile_job_.reset(Compiler::PrepareUnoptimizedCompilationJob( | 209 compile_job_.reset( |
210 compile_info_.get(), LazyCompilationMode::kAlways)); | 210 Compiler::PrepareUnoptimizedCompilationJob(compile_info_.get())); |
211 } | 211 } |
212 compile_info_->set_deferred_handles(scope.Detach()); | 212 compile_info_->set_deferred_handles(scope.Detach()); |
213 | 213 |
214 if (!compile_job_.get()) { | 214 if (!compile_job_.get()) { |
215 if (!isolate_->has_pending_exception()) isolate_->StackOverflow(); | 215 if (!isolate_->has_pending_exception()) isolate_->StackOverflow(); |
216 status_ = CompileJobStatus::kFailed; | 216 status_ = CompileJobStatus::kFailed; |
217 return false; | 217 return false; |
218 } | 218 } |
219 | 219 |
220 can_compile_on_background_thread_ = | 220 can_compile_on_background_thread_ = |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 return 0.0; | 328 return 0.0; |
329 } | 329 } |
330 | 330 |
331 void CompilerDispatcherJob::ShortPrint() { | 331 void CompilerDispatcherJob::ShortPrint() { |
332 DCHECK(ThreadId::Current().Equals(isolate_->thread_id())); | 332 DCHECK(ThreadId::Current().Equals(isolate_->thread_id())); |
333 shared_->ShortPrint(); | 333 shared_->ShortPrint(); |
334 } | 334 } |
335 | 335 |
336 } // namespace internal | 336 } // namespace internal |
337 } // namespace v8 | 337 } // namespace v8 |
OLD | NEW |