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