| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 void InitializeStackLimit(); | 255 void InitializeStackLimit(); |
| 256 void SetStackLimit(uword value); | 256 void SetStackLimit(uword value); |
| 257 void SetStackLimitFromStackBase(uword stack_base); | 257 void SetStackLimitFromStackBase(uword stack_base); |
| 258 void ClearStackLimit(); | 258 void ClearStackLimit(); |
| 259 | 259 |
| 260 // Returns the current C++ stack pointer. Equivalent taking the address of a | 260 // Returns the current C++ stack pointer. Equivalent taking the address of a |
| 261 // stack allocated local, but plays well with AddressSanitizer. | 261 // stack allocated local, but plays well with AddressSanitizer. |
| 262 // TODO(koda): Move to Thread. | 262 // TODO(koda): Move to Thread. |
| 263 static uword GetCurrentStackPointer(); | 263 static uword GetCurrentStackPointer(); |
| 264 | 264 |
| 265 void SetupInstructionsSnapshotPage( |
| 266 const uint8_t* instructions_snapshot_buffer); |
| 267 |
| 265 // Returns true if any of the interrupts specified by 'interrupt_bits' are | 268 // Returns true if any of the interrupts specified by 'interrupt_bits' are |
| 266 // currently scheduled for this isolate, but leaves them unchanged. | 269 // currently scheduled for this isolate, but leaves them unchanged. |
| 267 // | 270 // |
| 268 // NOTE: The read uses relaxed memory ordering, i.e., it is atomic and | 271 // NOTE: The read uses relaxed memory ordering, i.e., it is atomic and |
| 269 // an interrupt is guaranteed to be observed eventually, but any further | 272 // an interrupt is guaranteed to be observed eventually, but any further |
| 270 // order guarantees must be ensured by other synchronization. See the | 273 // order guarantees must be ensured by other synchronization. See the |
| 271 // tests in isolate_test.cc for example usage. | 274 // tests in isolate_test.cc for example usage. |
| 272 bool HasInterruptsScheduled(uword interrupt_bits) { | 275 bool HasInterruptsScheduled(uword interrupt_bits) { |
| 273 ASSERT(interrupt_bits == (interrupt_bits & kInterruptsMask)); | 276 ASSERT(interrupt_bits == (interrupt_bits & kInterruptsMask)); |
| 274 uword limit = AtomicOperations::LoadRelaxed(&stack_limit_); | 277 uword limit = AtomicOperations::LoadRelaxed(&stack_limit_); |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 uint8_t* serialized_message_; | 1132 uint8_t* serialized_message_; |
| 1130 intptr_t serialized_message_len_; | 1133 intptr_t serialized_message_len_; |
| 1131 Isolate::Flags isolate_flags_; | 1134 Isolate::Flags isolate_flags_; |
| 1132 bool paused_; | 1135 bool paused_; |
| 1133 bool errors_are_fatal_; | 1136 bool errors_are_fatal_; |
| 1134 }; | 1137 }; |
| 1135 | 1138 |
| 1136 } // namespace dart | 1139 } // namespace dart |
| 1137 | 1140 |
| 1138 #endif // VM_ISOLATE_H_ | 1141 #endif // VM_ISOLATE_H_ |
| OLD | NEW |