| Index: src/optimizing-compiler-thread.h
|
| diff --git a/src/optimizing-compiler-thread.h b/src/optimizing-compiler-thread.h
|
| index d5627266d09898d5bf514512b36cb42261b5152d..8a39b39a47d9002058ef865531b04c660d014a9d 100644
|
| --- a/src/optimizing-compiler-thread.h
|
| +++ b/src/optimizing-compiler-thread.h
|
| @@ -29,8 +29,8 @@
|
| #define V8_OPTIMIZING_COMPILER_THREAD_H_
|
|
|
| #include "atomicops.h"
|
| -#include "platform.h"
|
| #include "flags.h"
|
| +#include "platform.h"
|
| #include "unbound-queue.h"
|
|
|
| namespace v8 {
|
| @@ -38,6 +38,7 @@ namespace internal {
|
|
|
| class HGraphBuilder;
|
| class OptimizingCompiler;
|
| +class SharedFunctionInfo;
|
|
|
| class OptimizingCompilerThread : public Thread {
|
| public:
|
| @@ -46,6 +47,7 @@ class OptimizingCompilerThread : public Thread {
|
| isolate_(isolate),
|
| stop_semaphore_(OS::CreateSemaphore(0)),
|
| input_queue_semaphore_(OS::CreateSemaphore(0)),
|
| + output_queue_semaphore_(OS::CreateSemaphore(0)),
|
| time_spent_compiling_(0),
|
| time_spent_total_(0) {
|
| NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(false));
|
| @@ -57,6 +59,9 @@ class OptimizingCompilerThread : public Thread {
|
| void QueueForOptimization(OptimizingCompiler* optimizing_compiler);
|
| void InstallOptimizedFunctions();
|
|
|
| + // Wait for the next optimized function and install it.
|
| + Handle<SharedFunctionInfo> InstallNextOptimizedFunction();
|
| +
|
| inline bool IsQueueAvailable() {
|
| // We don't need a barrier since we have a data dependency right
|
| // after.
|
| @@ -77,6 +82,7 @@ class OptimizingCompilerThread : public Thread {
|
|
|
| ~OptimizingCompilerThread() {
|
| delete input_queue_semaphore_;
|
| + delete output_queue_semaphore_; // Only used for manual mode.
|
| delete stop_semaphore_;
|
| }
|
|
|
| @@ -84,6 +90,7 @@ class OptimizingCompilerThread : public Thread {
|
| Isolate* isolate_;
|
| Semaphore* stop_semaphore_;
|
| Semaphore* input_queue_semaphore_;
|
| + Semaphore* output_queue_semaphore_;
|
| UnboundQueue<OptimizingCompiler*> input_queue_;
|
| UnboundQueue<OptimizingCompiler*> output_queue_;
|
| volatile AtomicWord stop_thread_;
|
|
|