OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/store_buffer.h" | 10 #include "vm/store_buffer.h" |
11 #include "vm/timer.h" | 11 #include "vm/timer.h" |
12 | 12 |
13 namespace dart { | 13 namespace dart { |
14 | 14 |
15 // Forward declarations. | 15 // Forward declarations. |
16 class ApiState; | 16 class ApiState; |
17 class BigintStore; | 17 class BigintStore; |
18 class CodeIndexTable; | 18 class CodeIndexTable; |
19 class Debugger; | 19 class Debugger; |
20 class HandleScope; | 20 class HandleScope; |
21 class HandleVisitor; | 21 class HandleVisitor; |
22 class Heap; | 22 class Heap; |
23 class LongJump; | 23 class LongJump; |
24 class MessageQueue; | 24 class MessageQueue; |
25 class Mutex; | 25 class Mutex; |
26 class ObjectPointerVisitor; | 26 class ObjectPointerVisitor; |
27 class ObjectStore; | 27 class ObjectStore; |
28 class RawContext; | 28 class RawContext; |
29 class RawObject; | 29 class RawError; |
30 class StackResource; | 30 class StackResource; |
31 class StubCode; | 31 class StubCode; |
32 class Zone; | 32 class Zone; |
33 | 33 |
34 class Isolate { | 34 class Isolate { |
35 public: | 35 public: |
36 ~Isolate(); | 36 ~Isolate(); |
37 | 37 |
38 static inline Isolate* Current(); | 38 static inline Isolate* Current(); |
39 static void SetCurrent(Isolate* isolate); | 39 static void SetCurrent(Isolate* isolate); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 239 |
240 enum { | 240 enum { |
241 kInterruptsMask = 0x1, | 241 kInterruptsMask = 0x1, |
242 kApiInterrupt = 0x1, // An interrupt from Dart_InterruptIsolate. | 242 kApiInterrupt = 0x1, // An interrupt from Dart_InterruptIsolate. |
243 // More interrupt types will go here. | 243 // More interrupt types will go here. |
244 }; | 244 }; |
245 | 245 |
246 void ScheduleInterrupts(uword interrupt_bits); | 246 void ScheduleInterrupts(uword interrupt_bits); |
247 uword GetAndClearInterrupts(); | 247 uword GetAndClearInterrupts(); |
248 | 248 |
249 // Returns null on success, unhandled exception on failure. | 249 // Returns null on success, a RawError on failure. |
250 RawObject* StandardRunLoop(); | 250 RawError* StandardRunLoop(); |
251 | 251 |
252 intptr_t ast_node_id() const { return ast_node_id_; } | 252 intptr_t ast_node_id() const { return ast_node_id_; } |
253 void set_ast_node_id(int value) { ast_node_id_ = value; } | 253 void set_ast_node_id(int value) { ast_node_id_ = value; } |
254 | 254 |
255 Debugger* debugger() const { return debugger_; } | 255 Debugger* debugger() const { return debugger_; } |
256 | 256 |
257 static void SetCreateCallback(Dart_IsolateCreateCallback cback); | 257 static void SetCreateCallback(Dart_IsolateCreateCallback cback); |
258 static Dart_IsolateCreateCallback CreateCallback(); | 258 static Dart_IsolateCreateCallback CreateCallback(); |
259 | 259 |
260 static void SetInterruptCallback(Dart_IsolateInterruptCallback cback); | 260 static void SetInterruptCallback(Dart_IsolateInterruptCallback cback); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 #include "vm/isolate_linux.h" | 317 #include "vm/isolate_linux.h" |
318 #elif defined(TARGET_OS_MACOS) | 318 #elif defined(TARGET_OS_MACOS) |
319 #include "vm/isolate_macos.h" | 319 #include "vm/isolate_macos.h" |
320 #elif defined(TARGET_OS_WINDOWS) | 320 #elif defined(TARGET_OS_WINDOWS) |
321 #include "vm/isolate_win.h" | 321 #include "vm/isolate_win.h" |
322 #else | 322 #else |
323 #error Unknown target os. | 323 #error Unknown target os. |
324 #endif | 324 #endif |
325 | 325 |
326 #endif // VM_ISOLATE_H_ | 326 #endif // VM_ISOLATE_H_ |
OLD | NEW |