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

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

Issue 1814243002: Add Thread TaskKind (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | runtime/vm/gc_marker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 queue_monitor_(new Monitor()), done_monitor_(new Monitor()), 1645 queue_monitor_(new Monitor()), done_monitor_(new Monitor()),
1646 function_queue_(new BackgroundCompilationQueue()) { 1646 function_queue_(new BackgroundCompilationQueue()) {
1647 *done_ = false; 1647 *done_ = false;
1648 } 1648 }
1649 1649
1650 1650
1651 void BackgroundCompiler::Run() { 1651 void BackgroundCompiler::Run() {
1652 while (running_) { 1652 while (running_) {
1653 // Maybe something is already in the queue, check first before waiting 1653 // Maybe something is already in the queue, check first before waiting
1654 // to be notified. 1654 // to be notified.
1655 bool result = Thread::EnterIsolateAsHelper(isolate_); 1655 bool result = Thread::EnterIsolateAsHelper(isolate_, Thread::kCompilerTask);
1656 ASSERT(result); 1656 ASSERT(result);
1657 { 1657 {
1658 Thread* thread = Thread::Current(); 1658 Thread* thread = Thread::Current();
1659 StackZone stack_zone(thread); 1659 StackZone stack_zone(thread);
1660 Zone* zone = stack_zone.GetZone(); 1660 Zone* zone = stack_zone.GetZone();
1661 HANDLESCOPE(thread); 1661 HANDLESCOPE(thread);
1662 Function& function = Function::Handle(zone); 1662 Function& function = Function::Handle(zone);
1663 function = function_queue()->PeekFunction(); 1663 function = function_queue()->PeekFunction();
1664 while (running_ && !function.IsNull()) { 1664 while (running_ && !function.IsNull()) {
1665 const Error& error = Error::Handle(zone, 1665 const Error& error = Error::Handle(zone,
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1883 } 1883 }
1884 1884
1885 1885
1886 void BackgroundCompiler::EnsureInit(Thread* thread) { 1886 void BackgroundCompiler::EnsureInit(Thread* thread) {
1887 UNREACHABLE(); 1887 UNREACHABLE();
1888 } 1888 }
1889 1889
1890 #endif // DART_PRECOMPILED_RUNTIME 1890 #endif // DART_PRECOMPILED_RUNTIME
1891 1891
1892 } // namespace dart 1892 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/gc_marker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698