| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/optimizing-compile-dispatcher.h" | 5 #include "src/optimizing-compile-dispatcher.h" |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/base/atomicops.h" | 9 #include "src/base/atomicops.h" |
| 10 #include "src/full-codegen.h" | 10 #include "src/full-codegen.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 OptimizingCompileDispatcher* dispatcher = | 45 OptimizingCompileDispatcher* dispatcher = |
| 46 isolate_->optimizing_compile_dispatcher(); | 46 isolate_->optimizing_compile_dispatcher(); |
| 47 base::LockGuard<base::Mutex> lock_guard(&dispatcher->ref_count_mutex_); | 47 base::LockGuard<base::Mutex> lock_guard(&dispatcher->ref_count_mutex_); |
| 48 ++dispatcher->ref_count_; | 48 ++dispatcher->ref_count_; |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual ~CompileTask() {} | 51 virtual ~CompileTask() {} |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 // v8::Task overrides. | 54 // v8::Task overrides. |
| 55 void Run() OVERRIDE { | 55 void Run() override { |
| 56 DisallowHeapAllocation no_allocation; | 56 DisallowHeapAllocation no_allocation; |
| 57 DisallowHandleAllocation no_handles; | 57 DisallowHandleAllocation no_handles; |
| 58 DisallowHandleDereference no_deref; | 58 DisallowHandleDereference no_deref; |
| 59 | 59 |
| 60 OptimizingCompileDispatcher* dispatcher = | 60 OptimizingCompileDispatcher* dispatcher = |
| 61 isolate_->optimizing_compile_dispatcher(); | 61 isolate_->optimizing_compile_dispatcher(); |
| 62 { | 62 { |
| 63 TimerEventScope<TimerEventRecompileConcurrent> timer(isolate_); | 63 TimerEventScope<TimerEventRecompileConcurrent> timer(isolate_); |
| 64 | 64 |
| 65 if (dispatcher->recompilation_delay_ != 0) { | 65 if (dispatcher->recompilation_delay_ != 0) { |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 info->closure()->PrintName(); | 350 info->closure()->PrintName(); |
| 351 PrintF(", AST id %d]\n", info->osr_ast_id().ToInt()); | 351 PrintF(", AST id %d]\n", info->osr_ast_id().ToInt()); |
| 352 } | 352 } |
| 353 DisposeOptimizedCompileJob(stale, false); | 353 DisposeOptimizedCompileJob(stale, false); |
| 354 } | 354 } |
| 355 osr_buffer_[osr_buffer_cursor_] = job; | 355 osr_buffer_[osr_buffer_cursor_] = job; |
| 356 osr_buffer_cursor_ = (osr_buffer_cursor_ + 1) % osr_buffer_capacity_; | 356 osr_buffer_cursor_ = (osr_buffer_cursor_ + 1) % osr_buffer_capacity_; |
| 357 } | 357 } |
| 358 } | 358 } |
| 359 } // namespace v8::internal | 359 } // namespace v8::internal |
| OLD | NEW |