| Index: runtime/vm/compiler.cc
|
| diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
|
| index ee9e41b631e217cd3a74f4f443e3566abe8227cc..f3c7ab75d27f99f59231d5fc97cbc220955f9149 100644
|
| --- a/runtime/vm/compiler.cc
|
| +++ b/runtime/vm/compiler.cc
|
| @@ -1614,7 +1614,9 @@ void BackgroundCompilationResult::PopFromQueue(CompilationWorkQueue* queue) {
|
| BackgroundCompiler::BackgroundCompiler(Isolate* isolate)
|
| : isolate_(isolate), running_(true), done_(new bool()),
|
| queue_monitor_(new Monitor()), done_monitor_(new Monitor()),
|
| - function_queue_length_(0) {
|
| + function_queue_length_(0),
|
| + compilation_function_queue_(GrowableObjectArray::null()),
|
| + compilation_result_queue_(GrowableObjectArray::null()) {
|
| *done_ = false;
|
| }
|
|
|
| @@ -1702,13 +1704,12 @@ void BackgroundCompiler::InstallGeneratedCode() {
|
|
|
|
|
| GrowableObjectArray* BackgroundCompiler::FunctionsQueue() const {
|
| - return
|
| - &GrowableObjectArray::ZoneHandle(isolate_->compilation_function_queue());
|
| + return &GrowableObjectArray::ZoneHandle(compilation_function_queue_);
|
| }
|
|
|
|
|
| GrowableObjectArray* BackgroundCompiler::ResultQueue() const {
|
| - return &GrowableObjectArray::ZoneHandle(isolate_->compilation_result_queue());
|
| + return &GrowableObjectArray::ZoneHandle(compilation_result_queue_);
|
| }
|
|
|
|
|
| @@ -1745,6 +1746,27 @@ void BackgroundCompiler::AddResult(const BackgroundCompilationResult& value) {
|
| }
|
|
|
|
|
| +void BackgroundCompiler::set_compilation_function_queue(
|
| + const GrowableObjectArray& value) {
|
| + compilation_function_queue_ = value.raw();
|
| +}
|
| +
|
| +
|
| +void BackgroundCompiler::set_compilation_result_queue(
|
| + const GrowableObjectArray& value) {
|
| + compilation_result_queue_ = value.raw();
|
| +}
|
| +
|
| +
|
| +void BackgroundCompiler::VisitPointers(ObjectPointerVisitor* visitor) {
|
| + visitor->VisitPointer(reinterpret_cast<RawObject**>(
|
| + &compilation_function_queue_));
|
| +
|
| + visitor->VisitPointer(reinterpret_cast<RawObject**>(
|
| + &compilation_result_queue_));
|
| +}
|
| +
|
| +
|
| void BackgroundCompiler::Stop(BackgroundCompiler* task) {
|
| ASSERT(Isolate::Current()->background_compiler() == task);
|
| if (task == NULL) {
|
| @@ -1783,9 +1805,9 @@ void BackgroundCompiler::EnsureInit(Thread* thread) {
|
| if (isolate->background_compiler() == NULL) {
|
| BackgroundCompiler* task = new BackgroundCompiler(isolate);
|
| isolate->set_background_compiler(task);
|
| - isolate->set_compilation_function_queue(GrowableObjectArray::Handle(
|
| + task->set_compilation_function_queue(GrowableObjectArray::Handle(
|
| thread->zone(), GrowableObjectArray::New()));
|
| - isolate->set_compilation_result_queue(GrowableObjectArray::Handle(
|
| + task->set_compilation_result_queue(GrowableObjectArray::Handle(
|
| thread->zone(), GrowableObjectArray::New()));
|
| start_task = true;
|
| }
|
|
|