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

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

Issue 1412463007: Move compilation queues into BackgroundCompiler class (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « runtime/vm/isolate.h ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/json.h" 10 #include "platform/json.h"
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 stacktrace_(NULL), 781 stacktrace_(NULL),
782 stack_frame_index_(-1), 782 stack_frame_index_(-1),
783 last_allocationprofile_accumulator_reset_timestamp_(0), 783 last_allocationprofile_accumulator_reset_timestamp_(0),
784 last_allocationprofile_gc_timestamp_(0), 784 last_allocationprofile_gc_timestamp_(0),
785 object_id_ring_(NULL), 785 object_id_ring_(NULL),
786 trace_buffer_(NULL), 786 trace_buffer_(NULL),
787 profiler_data_(NULL), 787 profiler_data_(NULL),
788 tag_table_(GrowableObjectArray::null()), 788 tag_table_(GrowableObjectArray::null()),
789 deoptimized_code_array_(GrowableObjectArray::null()), 789 deoptimized_code_array_(GrowableObjectArray::null()),
790 background_compiler_(NULL), 790 background_compiler_(NULL),
791 compilation_function_queue_(GrowableObjectArray::null()),
792 compilation_result_queue_(GrowableObjectArray::null()),
793 pending_service_extension_calls_(GrowableObjectArray::null()), 791 pending_service_extension_calls_(GrowableObjectArray::null()),
794 registered_service_extension_handlers_(GrowableObjectArray::null()), 792 registered_service_extension_handlers_(GrowableObjectArray::null()),
795 metrics_list_head_(NULL), 793 metrics_list_head_(NULL),
796 compilation_allowed_(true), 794 compilation_allowed_(true),
797 all_classes_finalized_(false), 795 all_classes_finalized_(false),
798 next_(NULL), 796 next_(NULL),
799 pause_loop_monitor_(NULL), 797 pause_loop_monitor_(NULL),
800 cha_invalidation_gen_(0), 798 cha_invalidation_gen_(0),
801 field_invalidation_gen_(0), 799 field_invalidation_gen_(0),
802 prefix_invalidation_gen_(0) { 800 prefix_invalidation_gen_(0) {
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1766 1764
1767 // Visit the current tag which is stored in the isolate. 1765 // Visit the current tag which is stored in the isolate.
1768 visitor->VisitPointer(reinterpret_cast<RawObject**>(&current_tag_)); 1766 visitor->VisitPointer(reinterpret_cast<RawObject**>(&current_tag_));
1769 1767
1770 // Visit the default tag which is stored in the isolate. 1768 // Visit the default tag which is stored in the isolate.
1771 visitor->VisitPointer(reinterpret_cast<RawObject**>(&default_tag_)); 1769 visitor->VisitPointer(reinterpret_cast<RawObject**>(&default_tag_));
1772 1770
1773 // Visit the tag table which is stored in the isolate. 1771 // Visit the tag table which is stored in the isolate.
1774 visitor->VisitPointer(reinterpret_cast<RawObject**>(&tag_table_)); 1772 visitor->VisitPointer(reinterpret_cast<RawObject**>(&tag_table_));
1775 1773
1776 visitor->VisitPointer(reinterpret_cast<RawObject**>( 1774 if (background_compiler() != NULL) {
1777 &compilation_function_queue_)); 1775 background_compiler()->VisitPointers(visitor);
1778 1776 }
1779 visitor->VisitPointer(reinterpret_cast<RawObject**>(
1780 &compilation_result_queue_));
1781 1777
1782 // Visit the deoptimized code array which is stored in the isolate. 1778 // Visit the deoptimized code array which is stored in the isolate.
1783 visitor->VisitPointer( 1779 visitor->VisitPointer(
1784 reinterpret_cast<RawObject**>(&deoptimized_code_array_)); 1780 reinterpret_cast<RawObject**>(&deoptimized_code_array_));
1785 1781
1786 // Visit the pending service extension calls. 1782 // Visit the pending service extension calls.
1787 visitor->VisitPointer( 1783 visitor->VisitPointer(
1788 reinterpret_cast<RawObject**>(&pending_service_extension_calls_)); 1784 reinterpret_cast<RawObject**>(&pending_service_extension_calls_));
1789 1785
1790 // Visit the registered service extension handlers. 1786 // Visit the registered service extension handlers.
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 void Isolate::set_default_tag(const UserTag& tag) { 1993 void Isolate::set_default_tag(const UserTag& tag) {
1998 default_tag_ = tag.raw(); 1994 default_tag_ = tag.raw();
1999 } 1995 }
2000 1996
2001 1997
2002 void Isolate::set_deoptimized_code_array(const GrowableObjectArray& value) { 1998 void Isolate::set_deoptimized_code_array(const GrowableObjectArray& value) {
2003 deoptimized_code_array_ = value.raw(); 1999 deoptimized_code_array_ = value.raw();
2004 } 2000 }
2005 2001
2006 2002
2007 void Isolate::set_compilation_function_queue(
2008 const GrowableObjectArray& value) {
2009 compilation_function_queue_ = value.raw();
2010 }
2011
2012
2013 void Isolate::set_compilation_result_queue(
2014 const GrowableObjectArray& value) {
2015 compilation_result_queue_ = value.raw();
2016 }
2017
2018
2019 void Isolate::TrackDeoptimizedCode(const Code& code) { 2003 void Isolate::TrackDeoptimizedCode(const Code& code) {
2020 ASSERT(!code.IsNull()); 2004 ASSERT(!code.IsNull());
2021 const GrowableObjectArray& deoptimized_code = 2005 const GrowableObjectArray& deoptimized_code =
2022 GrowableObjectArray::Handle(deoptimized_code_array()); 2006 GrowableObjectArray::Handle(deoptimized_code_array());
2023 if (deoptimized_code.IsNull()) { 2007 if (deoptimized_code.IsNull()) {
2024 // Not tracking deoptimized code. 2008 // Not tracking deoptimized code.
2025 return; 2009 return;
2026 } 2010 }
2027 // TODO(johnmccutchan): Scan this array and the isolate's profile before 2011 // TODO(johnmccutchan): Scan this array and the isolate's profile before
2028 // old space GC and remove the keep_code flag. 2012 // old space GC and remove the keep_code flag.
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
2610 } 2594 }
2611 2595
2612 2596
2613 RawInstance* IsolateSpawnState::BuildMessage(Thread* thread) { 2597 RawInstance* IsolateSpawnState::BuildMessage(Thread* thread) {
2614 return DeserializeObject(thread, 2598 return DeserializeObject(thread,
2615 serialized_message_, serialized_message_len_); 2599 serialized_message_, serialized_message_len_);
2616 } 2600 }
2617 2601
2618 2602
2619 } // namespace dart 2603 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698