| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index 0c97abd89e8e186722834fad855f9adc4141783b..8ab9efe72ef89c4143ebaa9e0d99e9aa7ea9831f 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -41,6 +41,7 @@
|
| #include "lithium-allocator.h"
|
| #include "log.h"
|
| #include "messages.h"
|
| +#include "optimizing-compiler-thread.h"
|
| #include "platform.h"
|
| #include "regexp-stack.h"
|
| #include "runtime-profiler.h"
|
| @@ -1552,6 +1553,13 @@ void Isolate::Deinit() {
|
|
|
| if (FLAG_hydrogen_stats) HStatistics::Instance()->Print();
|
|
|
| + if (FLAG_optimize_in_parallel) {
|
| + ASSERT(optimizing_compiler_thread_);
|
| + optimizing_compiler_thread_->StopThread();
|
| + delete optimizing_compiler_thread_;
|
| + optimizing_compiler_thread_ = NULL;
|
| + }
|
| +
|
| // We must stop the logger before we tear down other components.
|
| logger_->EnsureTickerStopped();
|
|
|
| @@ -1592,6 +1600,12 @@ void Isolate::SetIsolateThreadLocals(Isolate* isolate,
|
| }
|
|
|
|
|
| +void Isolate::queue_for_optimization(Handle<JSFunction> function) {
|
| + ASSERT(FLAG_optimize_in_parallel);
|
| + optimizing_compiler_thread_->QueueForOptimization(function);
|
| +}
|
| +
|
| +
|
| Isolate::~Isolate() {
|
| TRACE_ISOLATE(destructor);
|
|
|
| @@ -1864,6 +1878,11 @@ bool Isolate::Init(Deserializer* des) {
|
| CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)),
|
| Internals::kIsolateRootsOffset);
|
|
|
| + if (FLAG_optimize_in_parallel) {
|
| + optimizing_compiler_thread_ = new OptimizingCompilerThread(this);
|
| + optimizing_compiler_thread_->Start();
|
| + }
|
| +
|
| state_ = INITIALIZED;
|
| time_millis_at_init_ = OS::TimeCurrentMillis();
|
| return true;
|
|
|