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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 // an interrupt is guaranteed to be observed eventually, but any further | 250 // an interrupt is guaranteed to be observed eventually, but any further |
251 // order guarantees must be ensured by other synchronization. See the | 251 // order guarantees must be ensured by other synchronization. See the |
252 // tests in isolate_test.cc for example usage. | 252 // tests in isolate_test.cc for example usage. |
253 bool HasInterruptsScheduled(uword interrupt_bits) { | 253 bool HasInterruptsScheduled(uword interrupt_bits) { |
254 ASSERT(interrupt_bits == (interrupt_bits & kInterruptsMask)); | 254 ASSERT(interrupt_bits == (interrupt_bits & kInterruptsMask)); |
255 uword limit = AtomicOperations::LoadRelaxed(&stack_limit_); | 255 uword limit = AtomicOperations::LoadRelaxed(&stack_limit_); |
256 return (limit != saved_stack_limit_) && | 256 return (limit != saved_stack_limit_) && |
257 (((limit & kInterruptsMask) & interrupt_bits) != 0); | 257 (((limit & kInterruptsMask) & interrupt_bits) != 0); |
258 } | 258 } |
259 | 259 |
| 260 #if defined(TARGET_ARCH_DBC) |
| 261 // Access to the current stack limit for DBC interpreter. |
| 262 uword stack_limit() const { |
| 263 return stack_limit_; |
| 264 } |
| 265 #endif |
| 266 |
260 // Access to the current stack limit for generated code. This may be | 267 // Access to the current stack limit for generated code. This may be |
261 // overwritten with a special value to trigger interrupts. | 268 // overwritten with a special value to trigger interrupts. |
262 uword stack_limit_address() const { | 269 uword stack_limit_address() const { |
263 return reinterpret_cast<uword>(&stack_limit_); | 270 return reinterpret_cast<uword>(&stack_limit_); |
264 } | 271 } |
265 static intptr_t stack_limit_offset() { | 272 static intptr_t stack_limit_offset() { |
266 return OFFSET_OF(Isolate, stack_limit_); | 273 return OFFSET_OF(Isolate, stack_limit_); |
267 } | 274 } |
268 | 275 |
269 // The true stack limit for this isolate. | 276 // The true stack limit for this isolate. |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 intptr_t* spawn_count_; | 1037 intptr_t* spawn_count_; |
1031 | 1038 |
1032 Dart_IsolateFlags isolate_flags_; | 1039 Dart_IsolateFlags isolate_flags_; |
1033 bool paused_; | 1040 bool paused_; |
1034 bool errors_are_fatal_; | 1041 bool errors_are_fatal_; |
1035 }; | 1042 }; |
1036 | 1043 |
1037 } // namespace dart | 1044 } // namespace dart |
1038 | 1045 |
1039 #endif // VM_ISOLATE_H_ | 1046 #endif // VM_ISOLATE_H_ |
OLD | NEW |