| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 69     CompileNext(); | 69     CompileNext(); | 
| 70 | 70 | 
| 71     if (FLAG_trace_parallel_recompilation) { | 71     if (FLAG_trace_parallel_recompilation) { | 
| 72       time_spent_compiling_ += OS::Ticks() - compiling_start; | 72       time_spent_compiling_ += OS::Ticks() - compiling_start; | 
| 73     } | 73     } | 
| 74   } | 74   } | 
| 75 } | 75 } | 
| 76 | 76 | 
| 77 | 77 | 
| 78 void OptimizingCompilerThread::CompileNext() { | 78 void OptimizingCompilerThread::CompileNext() { | 
| 79   Heap::RelocationLock relocation_lock(isolate_->heap()); |  | 
| 80   OptimizingCompiler* optimizing_compiler = NULL; | 79   OptimizingCompiler* optimizing_compiler = NULL; | 
| 81   input_queue_.Dequeue(&optimizing_compiler); | 80   input_queue_.Dequeue(&optimizing_compiler); | 
| 82   Barrier_AtomicIncrement(&queue_length_, static_cast<Atomic32>(-1)); | 81   Barrier_AtomicIncrement(&queue_length_, static_cast<Atomic32>(-1)); | 
| 83 | 82 | 
| 84   ASSERT(optimizing_compiler->info()->closure()->IsInRecompileQueue()); | 83   ASSERT(optimizing_compiler->info()->closure()->IsInRecompileQueue()); | 
| 85 | 84 | 
| 86   OptimizingCompiler::Status status = optimizing_compiler->OptimizeGraph(); | 85   OptimizingCompiler::Status status = optimizing_compiler->OptimizeGraph(); | 
| 87   ASSERT(status != OptimizingCompiler::FAILED); | 86   ASSERT(status != OptimizingCompiler::FAILED); | 
| 88   // Prevent an unused-variable error in release mode. | 87   // Prevent an unused-variable error in release mode. | 
| 89   USE(status); | 88   USE(status); | 
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 170 | 169 | 
| 171 #ifdef DEBUG | 170 #ifdef DEBUG | 
| 172 bool OptimizingCompilerThread::IsOptimizerThread() { | 171 bool OptimizingCompilerThread::IsOptimizerThread() { | 
| 173   if (!FLAG_parallel_recompilation) return false; | 172   if (!FLAG_parallel_recompilation) return false; | 
| 174   return ThreadId::Current().ToInteger() == thread_id_; | 173   return ThreadId::Current().ToInteger() == thread_id_; | 
| 175 } | 174 } | 
| 176 #endif | 175 #endif | 
| 177 | 176 | 
| 178 | 177 | 
| 179 } }  // namespace v8::internal | 178 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|