| 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 #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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 class HandleScope; | 44 class HandleScope; |
| 45 class HandleVisitor; | 45 class HandleVisitor; |
| 46 class Heap; | 46 class Heap; |
| 47 class ICData; | 47 class ICData; |
| 48 class Instance; | 48 class Instance; |
| 49 class IsolateProfilerData; | 49 class IsolateProfilerData; |
| 50 class IsolateSpawnState; | 50 class IsolateSpawnState; |
| 51 class InterruptableThreadState; | 51 class InterruptableThreadState; |
| 52 class Library; | 52 class Library; |
| 53 class Log; | 53 class Log; |
| 54 class LongJumpScope; | |
| 55 class MessageHandler; | 54 class MessageHandler; |
| 56 class Mutex; | 55 class Mutex; |
| 57 class Object; | 56 class Object; |
| 58 class ObjectIdRing; | 57 class ObjectIdRing; |
| 59 class ObjectPointerVisitor; | 58 class ObjectPointerVisitor; |
| 60 class ObjectStore; | 59 class ObjectStore; |
| 61 class PcDescriptors; | 60 class PcDescriptors; |
| 62 class RawInstance; | 61 class RawInstance; |
| 63 class RawArray; | 62 class RawArray; |
| 64 class RawContext; | 63 class RawContext; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 void set_vm_tag(uword tag) { | 230 void set_vm_tag(uword tag) { |
| 232 vm_tag_ = tag; | 231 vm_tag_ = tag; |
| 233 } | 232 } |
| 234 static intptr_t vm_tag_offset() { | 233 static intptr_t vm_tag_offset() { |
| 235 return OFFSET_OF(Isolate, vm_tag_); | 234 return OFFSET_OF(Isolate, vm_tag_); |
| 236 } | 235 } |
| 237 | 236 |
| 238 ApiState* api_state() const { return api_state_; } | 237 ApiState* api_state() const { return api_state_; } |
| 239 void set_api_state(ApiState* value) { api_state_ = value; } | 238 void set_api_state(ApiState* value) { api_state_ = value; } |
| 240 | 239 |
| 241 LongJumpScope* long_jump_base() const { return long_jump_base_; } | |
| 242 void set_long_jump_base(LongJumpScope* value) { long_jump_base_ = value; } | |
| 243 | |
| 244 TimerList& timer_list() { return timer_list_; } | 240 TimerList& timer_list() { return timer_list_; } |
| 245 | 241 |
| 246 void set_init_callback_data(void* value) { | 242 void set_init_callback_data(void* value) { |
| 247 init_callback_data_ = value; | 243 init_callback_data_ = value; |
| 248 } | 244 } |
| 249 void* init_callback_data() const { | 245 void* init_callback_data() const { |
| 250 return init_callback_data_; | 246 return init_callback_data_; |
| 251 } | 247 } |
| 252 | 248 |
| 253 Dart_EnvironmentCallback environment_callback() const { | 249 Dart_EnvironmentCallback environment_callback() const { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 264 library_tag_handler_ = value; | 260 library_tag_handler_ = value; |
| 265 } | 261 } |
| 266 | 262 |
| 267 void InitializeStackLimit(); | 263 void InitializeStackLimit(); |
| 268 void SetStackLimit(uword value); | 264 void SetStackLimit(uword value); |
| 269 void SetStackLimitFromStackBase(uword stack_base); | 265 void SetStackLimitFromStackBase(uword stack_base); |
| 270 void ClearStackLimit(); | 266 void ClearStackLimit(); |
| 271 | 267 |
| 272 // Returns the current C++ stack pointer. Equivalent taking the address of a | 268 // Returns the current C++ stack pointer. Equivalent taking the address of a |
| 273 // stack allocated local, but plays well with AddressSanitizer. | 269 // stack allocated local, but plays well with AddressSanitizer. |
| 270 // TODO(koda): Move to Thread. |
| 274 static uword GetCurrentStackPointer(); | 271 static uword GetCurrentStackPointer(); |
| 275 | 272 |
| 276 // Returns true if any of the interrupts specified by 'interrupt_bits' are | 273 // Returns true if any of the interrupts specified by 'interrupt_bits' are |
| 277 // currently scheduled for this isolate, but leaves them unchanged. | 274 // currently scheduled for this isolate, but leaves them unchanged. |
| 278 // | 275 // |
| 279 // NOTE: The read uses relaxed memory ordering, i.e., it is atomic and | 276 // NOTE: The read uses relaxed memory ordering, i.e., it is atomic and |
| 280 // an interrupt is guaranteed to be observed eventually, but any further | 277 // an interrupt is guaranteed to be observed eventually, but any further |
| 281 // order guarantees must be ensured by other synchronization. See the | 278 // order guarantees must be ensured by other synchronization. See the |
| 282 // tests in isolate_test.cc for example usage. | 279 // tests in isolate_test.cc for example usage. |
| 283 bool HasInterruptsScheduled(uword interrupt_bits) { | 280 bool HasInterruptsScheduled(uword interrupt_bits) { |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 Dart_EnvironmentCallback environment_callback_; | 813 Dart_EnvironmentCallback environment_callback_; |
| 817 Dart_LibraryTagHandler library_tag_handler_; | 814 Dart_LibraryTagHandler library_tag_handler_; |
| 818 ApiState* api_state_; | 815 ApiState* api_state_; |
| 819 Debugger* debugger_; | 816 Debugger* debugger_; |
| 820 bool single_step_; | 817 bool single_step_; |
| 821 bool resume_request_; | 818 bool resume_request_; |
| 822 bool has_compiled_; | 819 bool has_compiled_; |
| 823 Flags flags_; | 820 Flags flags_; |
| 824 Random random_; | 821 Random random_; |
| 825 Simulator* simulator_; | 822 Simulator* simulator_; |
| 826 LongJumpScope* long_jump_base_; | |
| 827 TimerList timer_list_; | 823 TimerList timer_list_; |
| 828 intptr_t deopt_id_; | 824 intptr_t deopt_id_; |
| 829 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. | 825 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. |
| 830 uword stack_limit_; | 826 uword stack_limit_; |
| 831 uword saved_stack_limit_; | 827 uword saved_stack_limit_; |
| 832 uword stack_base_; | 828 uword stack_base_; |
| 833 uword stack_overflow_flags_; | 829 uword stack_overflow_flags_; |
| 834 int32_t stack_overflow_count_; | 830 int32_t stack_overflow_count_; |
| 835 MessageHandler* message_handler_; | 831 MessageHandler* message_handler_; |
| 836 IsolateSpawnState* spawn_state_; | 832 IsolateSpawnState* spawn_state_; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 uint8_t* serialized_message_; | 1086 uint8_t* serialized_message_; |
| 1091 intptr_t serialized_message_len_; | 1087 intptr_t serialized_message_len_; |
| 1092 Isolate::Flags isolate_flags_; | 1088 Isolate::Flags isolate_flags_; |
| 1093 bool paused_; | 1089 bool paused_; |
| 1094 bool errors_are_fatal_; | 1090 bool errors_are_fatal_; |
| 1095 }; | 1091 }; |
| 1096 | 1092 |
| 1097 } // namespace dart | 1093 } // namespace dart |
| 1098 | 1094 |
| 1099 #endif // VM_ISOLATE_H_ | 1095 #endif // VM_ISOLATE_H_ |
| OLD | NEW |