OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 <limits.h> | 8 #include <limits.h> |
9 | 9 |
10 #include "include/dart_api.h" | 10 #include "include/dart_api.h" |
11 #include "vm/assert.h" | 11 #include "vm/assert.h" |
12 #include "vm/store_buffer.h" | 12 #include "vm/store_buffer.h" |
13 #include "vm/timer.h" | 13 #include "vm/timer.h" |
14 | 14 |
15 namespace dart { | 15 namespace dart { |
16 | 16 |
17 // Forward declarations. | 17 // Forward declarations. |
18 class ApiState; | 18 class ApiState; |
19 class BigintStore; | 19 class BigintStore; |
20 class CodeIndexTable; | 20 class CodeIndexTable; |
21 class Debugger; | 21 class Debugger; |
22 class HandleScope; | 22 class HandleScope; |
23 class Heap; | 23 class Heap; |
24 class LongJump; | 24 class LongJump; |
25 class MessageQueue; | 25 class MessageQueue; |
26 class Monitor; | 26 class Monitor; |
27 class ObjectPointerVisitor; | 27 class ObjectPointerVisitor; |
28 class ObjectStore; | 28 class ObjectStore; |
29 class RawContext; | 29 class RawContext; |
| 30 class RawObject; |
30 class StackResource; | 31 class StackResource; |
31 class StubCode; | 32 class StubCode; |
32 class Zone; | 33 class Zone; |
33 | 34 |
34 class Isolate { | 35 class Isolate { |
35 public: | 36 public: |
36 ~Isolate(); | 37 ~Isolate(); |
37 | 38 |
38 static inline Isolate* Current(); | 39 static inline Isolate* Current(); |
39 static void SetCurrent(Isolate* isolate); | 40 static void SetCurrent(Isolate* isolate); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 224 |
224 uword stack_limit_address() const { | 225 uword stack_limit_address() const { |
225 return reinterpret_cast<uword>(&stack_limit_); | 226 return reinterpret_cast<uword>(&stack_limit_); |
226 } | 227 } |
227 | 228 |
228 void SetStackLimit(uword value); | 229 void SetStackLimit(uword value); |
229 uword stack_limit() const { return stack_limit_; } | 230 uword stack_limit() const { return stack_limit_; } |
230 | 231 |
231 void SetStackLimitFromCurrentTOS(uword isolate_stack_top); | 232 void SetStackLimitFromCurrentTOS(uword isolate_stack_top); |
232 | 233 |
233 void StandardRunLoop(); | 234 // Returns null on success, unhandled exception on failure. |
| 235 RawObject* StandardRunLoop(); |
234 | 236 |
235 intptr_t ast_node_id() const { return ast_node_id_; } | 237 intptr_t ast_node_id() const { return ast_node_id_; } |
236 void set_ast_node_id(int value) { ast_node_id_ = value; } | 238 void set_ast_node_id(int value) { ast_node_id_ = value; } |
237 | 239 |
238 Debugger* debugger() const { return debugger_; } | 240 Debugger* debugger() const { return debugger_; } |
239 | 241 |
240 private: | 242 private: |
241 Isolate(); | 243 Isolate(); |
242 | 244 |
243 void PrintInvokedFunctions(); | 245 void PrintInvokedFunctions(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 #include "vm/isolate_linux.h" | 292 #include "vm/isolate_linux.h" |
291 #elif defined(TARGET_OS_MACOS) | 293 #elif defined(TARGET_OS_MACOS) |
292 #include "vm/isolate_macos.h" | 294 #include "vm/isolate_macos.h" |
293 #elif defined(TARGET_OS_WINDOWS) | 295 #elif defined(TARGET_OS_WINDOWS) |
294 #include "vm/isolate_win.h" | 296 #include "vm/isolate_win.h" |
295 #else | 297 #else |
296 #error Unknown target os. | 298 #error Unknown target os. |
297 #endif | 299 #endif |
298 | 300 |
299 #endif // VM_ISOLATE_H_ | 301 #endif // VM_ISOLATE_H_ |
OLD | NEW |