OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/compiler.h" | 5 #include "vm/compiler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 | 8 |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 | 1546 |
1547 | 1547 |
1548 void BackgroundCompiler::EnsureInit(Isolate* isolate) { | 1548 void BackgroundCompiler::EnsureInit(Isolate* isolate) { |
1549 bool start_task = false; | 1549 bool start_task = false; |
1550 { | 1550 { |
1551 MutexLocker ml(isolate->mutex()); | 1551 MutexLocker ml(isolate->mutex()); |
1552 if (isolate->background_compiler() == NULL) { | 1552 if (isolate->background_compiler() == NULL) { |
1553 BackgroundCompiler* task = new BackgroundCompiler(isolate); | 1553 BackgroundCompiler* task = new BackgroundCompiler(isolate); |
1554 isolate->set_background_compiler(task); | 1554 isolate->set_background_compiler(task); |
1555 isolate->set_background_compilation_queue(GrowableObjectArray::Handle( | 1555 isolate->set_background_compilation_queue(GrowableObjectArray::Handle( |
1556 isolate->current_zone(), GrowableObjectArray::New())); | 1556 GrowableObjectArray::New())); |
1557 start_task = true; | 1557 start_task = true; |
1558 } | 1558 } |
1559 } | 1559 } |
1560 if (start_task) { | 1560 if (start_task) { |
1561 Dart::thread_pool()->Run(isolate->background_compiler()); | 1561 Dart::thread_pool()->Run(isolate->background_compiler()); |
1562 } | 1562 } |
1563 } | 1563 } |
1564 | 1564 |
1565 } // namespace dart | 1565 } // namespace dart |
OLD | NEW |