| OLD | NEW |
| 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 Loading... |
| 781 compiler_stats_(NULL), | 781 compiler_stats_(NULL), |
| 782 is_service_isolate_(false), | 782 is_service_isolate_(false), |
| 783 stacktrace_(NULL), | 783 stacktrace_(NULL), |
| 784 stack_frame_index_(-1), | 784 stack_frame_index_(-1), |
| 785 last_allocationprofile_accumulator_reset_timestamp_(0), | 785 last_allocationprofile_accumulator_reset_timestamp_(0), |
| 786 last_allocationprofile_gc_timestamp_(0), | 786 last_allocationprofile_gc_timestamp_(0), |
| 787 object_id_ring_(NULL), | 787 object_id_ring_(NULL), |
| 788 trace_buffer_(NULL), | 788 trace_buffer_(NULL), |
| 789 profiler_data_(NULL), | 789 profiler_data_(NULL), |
| 790 tag_table_(GrowableObjectArray::null()), | 790 tag_table_(GrowableObjectArray::null()), |
| 791 collected_closures_(GrowableObjectArray::null()), | |
| 792 deoptimized_code_array_(GrowableObjectArray::null()), | 791 deoptimized_code_array_(GrowableObjectArray::null()), |
| 793 background_compilation_queue_(GrowableObjectArray::null()), | 792 background_compilation_queue_(GrowableObjectArray::null()), |
| 794 pending_service_extension_calls_(GrowableObjectArray::null()), | 793 pending_service_extension_calls_(GrowableObjectArray::null()), |
| 795 registered_service_extension_handlers_(GrowableObjectArray::null()), | 794 registered_service_extension_handlers_(GrowableObjectArray::null()), |
| 796 metrics_list_head_(NULL), | 795 metrics_list_head_(NULL), |
| 797 compilation_allowed_(true), | 796 compilation_allowed_(true), |
| 798 all_classes_finalized_(false), | 797 all_classes_finalized_(false), |
| 799 next_(NULL), | 798 next_(NULL), |
| 800 pause_loop_monitor_(NULL) { | 799 pause_loop_monitor_(NULL) { |
| 801 flags_.CopyFrom(api_flags); | 800 flags_.CopyFrom(api_flags); |
| (...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1772 | 1771 |
| 1773 // Visit the current tag which is stored in the isolate. | 1772 // Visit the current tag which is stored in the isolate. |
| 1774 visitor->VisitPointer(reinterpret_cast<RawObject**>(¤t_tag_)); | 1773 visitor->VisitPointer(reinterpret_cast<RawObject**>(¤t_tag_)); |
| 1775 | 1774 |
| 1776 // Visit the default tag which is stored in the isolate. | 1775 // Visit the default tag which is stored in the isolate. |
| 1777 visitor->VisitPointer(reinterpret_cast<RawObject**>(&default_tag_)); | 1776 visitor->VisitPointer(reinterpret_cast<RawObject**>(&default_tag_)); |
| 1778 | 1777 |
| 1779 // Visit the tag table which is stored in the isolate. | 1778 // Visit the tag table which is stored in the isolate. |
| 1780 visitor->VisitPointer(reinterpret_cast<RawObject**>(&tag_table_)); | 1779 visitor->VisitPointer(reinterpret_cast<RawObject**>(&tag_table_)); |
| 1781 | 1780 |
| 1782 // Visit array of closures pending precompilation. | |
| 1783 visitor->VisitPointer(reinterpret_cast<RawObject**>(&collected_closures_)); | |
| 1784 | |
| 1785 visitor->VisitPointer(reinterpret_cast<RawObject**>( | 1781 visitor->VisitPointer(reinterpret_cast<RawObject**>( |
| 1786 &background_compilation_queue_)); | 1782 &background_compilation_queue_)); |
| 1787 | 1783 |
| 1788 // Visit the deoptimized code array which is stored in the isolate. | 1784 // Visit the deoptimized code array which is stored in the isolate. |
| 1789 visitor->VisitPointer( | 1785 visitor->VisitPointer( |
| 1790 reinterpret_cast<RawObject**>(&deoptimized_code_array_)); | 1786 reinterpret_cast<RawObject**>(&deoptimized_code_array_)); |
| 1791 | 1787 |
| 1792 // Visit the pending service extension calls. | 1788 // Visit the pending service extension calls. |
| 1793 visitor->VisitPointer( | 1789 visitor->VisitPointer( |
| 1794 reinterpret_cast<RawObject**>(&pending_service_extension_calls_)); | 1790 reinterpret_cast<RawObject**>(&pending_service_extension_calls_)); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 set_user_tag(user_tag); | 1995 set_user_tag(user_tag); |
| 2000 current_tag_ = tag.raw(); | 1996 current_tag_ = tag.raw(); |
| 2001 } | 1997 } |
| 2002 | 1998 |
| 2003 | 1999 |
| 2004 void Isolate::set_default_tag(const UserTag& tag) { | 2000 void Isolate::set_default_tag(const UserTag& tag) { |
| 2005 default_tag_ = tag.raw(); | 2001 default_tag_ = tag.raw(); |
| 2006 } | 2002 } |
| 2007 | 2003 |
| 2008 | 2004 |
| 2009 void Isolate::set_collected_closures(const GrowableObjectArray& value) { | |
| 2010 collected_closures_ = value.raw(); | |
| 2011 } | |
| 2012 | |
| 2013 | |
| 2014 void Isolate::set_deoptimized_code_array(const GrowableObjectArray& value) { | 2005 void Isolate::set_deoptimized_code_array(const GrowableObjectArray& value) { |
| 2015 deoptimized_code_array_ = value.raw(); | 2006 deoptimized_code_array_ = value.raw(); |
| 2016 } | 2007 } |
| 2017 | 2008 |
| 2018 | 2009 |
| 2019 void Isolate::set_background_compilation_queue( | 2010 void Isolate::set_background_compilation_queue( |
| 2020 const GrowableObjectArray& value) { | 2011 const GrowableObjectArray& value) { |
| 2021 background_compilation_queue_ = value.raw(); | 2012 background_compilation_queue_ = value.raw(); |
| 2022 } | 2013 } |
| 2023 | 2014 |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2621 serialized_message_, serialized_message_len_); | 2612 serialized_message_, serialized_message_len_); |
| 2622 } | 2613 } |
| 2623 | 2614 |
| 2624 | 2615 |
| 2625 void IsolateSpawnState::Cleanup() { | 2616 void IsolateSpawnState::Cleanup() { |
| 2626 SwitchIsolateScope switch_scope(I); | 2617 SwitchIsolateScope switch_scope(I); |
| 2627 Dart::ShutdownIsolate(); | 2618 Dart::ShutdownIsolate(); |
| 2628 } | 2619 } |
| 2629 | 2620 |
| 2630 } // namespace dart | 2621 } // namespace dart |
| OLD | NEW |