Commit 2e10e3e3 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Clean up queued compilation tasks when quitting.

R=jkummerow@chromium.org
BUG=

Review URL: https://codereview.chromium.org/17543002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6f09cb47
......@@ -106,12 +106,15 @@ void OptimizingCompilerThread::Stop() {
stop_semaphore_->Wait();
if (FLAG_parallel_recompilation_delay != 0) {
InstallOptimizedFunctions();
// Barrier when loading queue length is not necessary since the write
// happens in CompileNext on the same thread.
while (NoBarrier_Load(&queue_length_) > 0) {
CompileNext();
InstallOptimizedFunctions();
while (NoBarrier_Load(&queue_length_) > 0) CompileNext();
InstallOptimizedFunctions();
} else {
OptimizingCompiler* optimizing_compiler;
while (input_queue_.Dequeue(&optimizing_compiler)) {
// The optimizing compiler is allocated in the CompilationInfo's zone.
delete optimizing_compiler->info();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment