Index: src/optimizing-compiler-thread.h |
diff --git a/src/optimizing-compiler-thread.h b/src/optimizing-compiler-thread.h |
index 275ceb40b711ccecf4ee4937355fed1eb8f23c61..cbd4d0e48724a3577a51fda93d0675567b77df38 100644 |
--- a/src/optimizing-compiler-thread.h |
+++ b/src/optimizing-compiler-thread.h |
@@ -54,13 +54,13 @@ class OptimizingCompilerThread : public Thread { |
install_mutex_(OS::CreateMutex()), |
time_spent_compiling_(0), |
time_spent_total_(0) { |
- NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(false)); |
+ NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(CONTINUE)); |
NoBarrier_Store(&queue_length_, static_cast<AtomicWord>(0)); |
} |
void Run(); |
void Stop(); |
- void CompileNext(); |
+ void Flush(); |
void QueueForOptimization(OptimizingCompiler* optimizing_compiler); |
void InstallOptimizedFunctions(); |
@@ -92,6 +92,13 @@ class OptimizingCompilerThread : public Thread { |
} |
private: |
+ enum StopFlag { CONTINUE, STOP, FLUSH }; |
+ |
+ void FlushInputQueue(bool restore_function_code); |
+ void FlushOutputQueue(bool restore_function_code); |
+ |
+ void CompileNext(); |
+ |
#ifdef DEBUG |
int thread_id_; |
Mutex* thread_id_mutex_; |