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

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

Issue 1351403004: Resolve some disagreements between SIMARM and XARM on offsets used in compiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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) 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 #ifndef VM_ISOLATE_H_ 5 #ifndef VM_ISOLATE_H_
6 #define VM_ISOLATE_H_ 6 #define VM_ISOLATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/atomic.h" 10 #include "vm/atomic.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 terminate_capability_ = value; 184 terminate_capability_ = value;
185 } 185 }
186 uint64_t terminate_capability() const { return terminate_capability_; } 186 uint64_t terminate_capability() const { return terminate_capability_; }
187 187
188 Heap* heap() const { return heap_; } 188 Heap* heap() const { return heap_; }
189 void set_heap(Heap* value) { heap_ = value; } 189 void set_heap(Heap* value) { heap_ = value; }
190 static intptr_t heap_offset() { return OFFSET_OF(Isolate, heap_); } 190 static intptr_t heap_offset() { return OFFSET_OF(Isolate, heap_); }
191 191
192 ObjectStore* object_store() const { return object_store_; } 192 ObjectStore* object_store() const { return object_store_; }
193 void set_object_store(ObjectStore* value) { object_store_ = value; } 193 void set_object_store(ObjectStore* value) { object_store_ = value; }
194 static intptr_t object_store_offset() {
195 return OFFSET_OF(Isolate, object_store_);
196 }
197 194
198 // DEPRECATED: Use Thread's methods instead. During migration, these default 195 // DEPRECATED: Use Thread's methods instead. During migration, these default
199 // to using the mutator thread (which must also be the current thread). 196 // to using the mutator thread (which must also be the current thread).
200 StackResource* top_resource() const { 197 StackResource* top_resource() const {
201 ASSERT(Thread::Current() == mutator_thread_); 198 ASSERT(Thread::Current() == mutator_thread_);
202 return mutator_thread_->top_resource(); 199 return mutator_thread_->top_resource();
203 } 200 }
204 void set_top_resource(StackResource* value) { 201 void set_top_resource(StackResource* value) {
205 ASSERT(Thread::Current() == mutator_thread_); 202 ASSERT(Thread::Current() == mutator_thread_);
206 mutator_thread_->set_top_resource(value); 203 mutator_thread_->set_top_resource(value);
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 ASSERT(thread == Thread::Current()); 809 ASSERT(thread == Thread::Current());
813 DEBUG_ASSERT(IsIsolateOf(thread)); 810 DEBUG_ASSERT(IsIsolateOf(thread));
814 mutator_thread_ = thread; 811 mutator_thread_ = thread;
815 } 812 }
816 #if defined(DEBUG) 813 #if defined(DEBUG)
817 bool IsIsolateOf(Thread* thread); 814 bool IsIsolateOf(Thread* thread);
818 #endif // DEBUG 815 #endif // DEBUG
819 816
820 template<class T> T* AllocateReusableHandle(); 817 template<class T> T* AllocateReusableHandle();
821 818
822 uword vm_tag_; 819 // Accessed from generated code:
820 uword stack_limit_;
Florian Schneider 2015/09/30 09:38:13 Add a COMPILE_ASSERT at for the first member, and
rmacnak 2015/10/01 22:00:49 The compiler won't allow use of OFFSET_OF in a COM
Florian Schneider 2015/10/02 13:41:09 gcc has the offsetof macro which can appear as com
823 StoreBuffer* store_buffer_; 821 StoreBuffer* store_buffer_;
824 Heap* heap_; 822 Heap* heap_;
823 uword vm_tag_;
824 uword user_tag_;
825 RawUserTag* current_tag_;
826 RawUserTag* default_tag_;
827 ClassTable class_table_;
828 bool single_step_;
829
825 ThreadRegistry* thread_registry_; 830 ThreadRegistry* thread_registry_;
826 ClassTable class_table_;
827 Dart_MessageNotifyCallback message_notify_callback_; 831 Dart_MessageNotifyCallback message_notify_callback_;
828 char* name_; 832 char* name_;
829 char* debugger_name_; 833 char* debugger_name_;
830 int64_t start_time_; 834 int64_t start_time_;
831 Dart_Port main_port_; 835 Dart_Port main_port_;
832 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. 836 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id.
833 uint64_t pause_capability_; 837 uint64_t pause_capability_;
834 uint64_t terminate_capability_; 838 uint64_t terminate_capability_;
835 bool errors_fatal_; 839 bool errors_fatal_;
836 ObjectStore* object_store_; 840 ObjectStore* object_store_;
837 uword top_exit_frame_info_; 841 uword top_exit_frame_info_;
838 void* init_callback_data_; 842 void* init_callback_data_;
839 Dart_EnvironmentCallback environment_callback_; 843 Dart_EnvironmentCallback environment_callback_;
840 Dart_LibraryTagHandler library_tag_handler_; 844 Dart_LibraryTagHandler library_tag_handler_;
841 ApiState* api_state_; 845 ApiState* api_state_;
842 Debugger* debugger_; 846 Debugger* debugger_;
843 bool single_step_;
844 bool resume_request_; 847 bool resume_request_;
845 int64_t last_resume_timestamp_; 848 int64_t last_resume_timestamp_;
846 bool has_compiled_; 849 bool has_compiled_;
847 Flags flags_; 850 Flags flags_;
848 Random random_; 851 Random random_;
849 Simulator* simulator_; 852 Simulator* simulator_;
850 TimerList timer_list_; 853 TimerList timer_list_;
851 intptr_t deopt_id_; 854 intptr_t deopt_id_;
852 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. 855 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_.
853 uword stack_limit_;
854 uword saved_stack_limit_; 856 uword saved_stack_limit_;
855 uword stack_base_; 857 uword stack_base_;
856 uword stack_overflow_flags_; 858 uword stack_overflow_flags_;
857 int32_t stack_overflow_count_; 859 int32_t stack_overflow_count_;
858 MessageHandler* message_handler_; 860 MessageHandler* message_handler_;
859 IsolateSpawnState* spawn_state_; 861 IsolateSpawnState* spawn_state_;
860 bool is_runnable_; 862 bool is_runnable_;
861 Dart_GcPrologueCallback gc_prologue_callback_; 863 Dart_GcPrologueCallback gc_prologue_callback_;
862 Dart_GcEpilogueCallback gc_epilogue_callback_; 864 Dart_GcEpilogueCallback gc_epilogue_callback_;
863 intptr_t defer_finalization_count_; 865 intptr_t defer_finalization_count_;
(...skipping 15 matching lines...) Expand all
879 // Ring buffer of objects assigned an id. 881 // Ring buffer of objects assigned an id.
880 ObjectIdRing* object_id_ring_; 882 ObjectIdRing* object_id_ring_;
881 883
882 // Trace buffer support. 884 // Trace buffer support.
883 TraceBuffer* trace_buffer_; 885 TraceBuffer* trace_buffer_;
884 886
885 IsolateProfilerData* profiler_data_; 887 IsolateProfilerData* profiler_data_;
886 Mutex profiler_data_mutex_; 888 Mutex profiler_data_mutex_;
887 889
888 VMTagCounters vm_tag_counters_; 890 VMTagCounters vm_tag_counters_;
889 uword user_tag_;
890 RawGrowableObjectArray* tag_table_; 891 RawGrowableObjectArray* tag_table_;
891 RawUserTag* current_tag_; 892
892 RawUserTag* default_tag_;
893 893
894 RawGrowableObjectArray* collected_closures_; 894 RawGrowableObjectArray* collected_closures_;
895 RawGrowableObjectArray* deoptimized_code_array_; 895 RawGrowableObjectArray* deoptimized_code_array_;
896 896
897 // We use 6 list entries for each pending service extension calls. 897 // We use 6 list entries for each pending service extension calls.
898 enum { 898 enum {
899 kPendingHandlerIndex = 0, 899 kPendingHandlerIndex = 0,
900 kPendingMethodNameIndex, 900 kPendingMethodNameIndex,
901 kPendingKeysIndex, 901 kPendingKeysIndex,
902 kPendingValuesIndex, 902 kPendingValuesIndex,
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 uint8_t* serialized_message_; 1127 uint8_t* serialized_message_;
1128 intptr_t serialized_message_len_; 1128 intptr_t serialized_message_len_;
1129 Isolate::Flags isolate_flags_; 1129 Isolate::Flags isolate_flags_;
1130 bool paused_; 1130 bool paused_;
1131 bool errors_are_fatal_; 1131 bool errors_are_fatal_;
1132 }; 1132 };
1133 1133
1134 } // namespace dart 1134 } // namespace dart
1135 1135
1136 #endif // VM_ISOLATE_H_ 1136 #endif // VM_ISOLATE_H_
OLDNEW
« runtime/vm/heap.h ('K') | « runtime/vm/heap.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698