| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 void SetStackLimitFromStackBase(uword stack_base); | 233 void SetStackLimitFromStackBase(uword stack_base); |
| 234 void ClearStackLimit(); | 234 void ClearStackLimit(); |
| 235 | 235 |
| 236 // Returns the current C++ stack pointer. Equivalent taking the address of a | 236 // Returns the current C++ stack pointer. Equivalent taking the address of a |
| 237 // stack allocated local, but plays well with AddressSanitizer. | 237 // stack allocated local, but plays well with AddressSanitizer. |
| 238 // TODO(koda): Move to Thread. | 238 // TODO(koda): Move to Thread. |
| 239 static uword GetCurrentStackPointer(); | 239 static uword GetCurrentStackPointer(); |
| 240 | 240 |
| 241 void SetupInstructionsSnapshotPage( | 241 void SetupInstructionsSnapshotPage( |
| 242 const uint8_t* instructions_snapshot_buffer); | 242 const uint8_t* instructions_snapshot_buffer); |
| 243 void SetupDataSnapshotPage( |
| 244 const uint8_t* instructions_snapshot_buffer); |
| 243 | 245 |
| 244 // Returns true if any of the interrupts specified by 'interrupt_bits' are | 246 // Returns true if any of the interrupts specified by 'interrupt_bits' are |
| 245 // currently scheduled for this isolate, but leaves them unchanged. | 247 // currently scheduled for this isolate, but leaves them unchanged. |
| 246 // | 248 // |
| 247 // NOTE: The read uses relaxed memory ordering, i.e., it is atomic and | 249 // NOTE: The read uses relaxed memory ordering, i.e., it is atomic and |
| 248 // an interrupt is guaranteed to be observed eventually, but any further | 250 // an interrupt is guaranteed to be observed eventually, but any further |
| 249 // order guarantees must be ensured by other synchronization. See the | 251 // order guarantees must be ensured by other synchronization. See the |
| 250 // tests in isolate_test.cc for example usage. | 252 // tests in isolate_test.cc for example usage. |
| 251 bool HasInterruptsScheduled(uword interrupt_bits) { | 253 bool HasInterruptsScheduled(uword interrupt_bits) { |
| 252 ASSERT(interrupt_bits == (interrupt_bits & kInterruptsMask)); | 254 ASSERT(interrupt_bits == (interrupt_bits & kInterruptsMask)); |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 intptr_t* spawn_count_; | 1037 intptr_t* spawn_count_; |
| 1036 | 1038 |
| 1037 Isolate::Flags isolate_flags_; | 1039 Isolate::Flags isolate_flags_; |
| 1038 bool paused_; | 1040 bool paused_; |
| 1039 bool errors_are_fatal_; | 1041 bool errors_are_fatal_; |
| 1040 }; | 1042 }; |
| 1041 | 1043 |
| 1042 } // namespace dart | 1044 } // namespace dart |
| 1043 | 1045 |
| 1044 #endif // VM_ISOLATE_H_ | 1046 #endif // VM_ISOLATE_H_ |
| OLD | NEW |