Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(960)

Side by Side Diff: runtime/vm/compiler.cc

Issue 1414493003: Remove some Isolate::current_zone() calls, as it gets the zone from mutator thread not the current … (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: cleanup Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698