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 HandleScope; | 22 class HandleScope; |
22 class Heap; | 23 class Heap; |
23 class LongJump; | 24 class LongJump; |
24 class MessageQueue; | 25 class MessageQueue; |
25 class Monitor; | 26 class Monitor; |
26 class ObjectPointerVisitor; | 27 class ObjectPointerVisitor; |
27 class ObjectStore; | 28 class ObjectStore; |
28 class RawContext; | 29 class RawContext; |
29 class StackResource; | 30 class StackResource; |
30 class StubCode; | 31 class StubCode; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 219 |
219 void AdjustStackLimitForException() { | 220 void AdjustStackLimitForException() { |
220 stack_limit_ = stack_limit_on_overflow_exception_; | 221 stack_limit_ = stack_limit_on_overflow_exception_; |
221 } | 222 } |
222 | 223 |
223 void StandardRunLoop(); | 224 void StandardRunLoop(); |
224 | 225 |
225 intptr_t ast_node_id() const { return ast_node_id_; } | 226 intptr_t ast_node_id() const { return ast_node_id_; } |
226 void set_ast_node_id(int value) { ast_node_id_ = value; } | 227 void set_ast_node_id(int value) { ast_node_id_ = value; } |
227 | 228 |
| 229 Debugger* debugger() const { return debugger_; } |
| 230 |
228 private: | 231 private: |
229 Isolate(); | 232 Isolate(); |
230 | 233 |
231 void PrintInvokedFunctions(); | 234 void PrintInvokedFunctions(); |
232 | 235 |
233 static uword GetSpecifiedStackSize(); | 236 static uword GetSpecifiedStackSize(); |
234 | 237 |
235 static const uword kStackSizeBuffer = (128 * KB); | 238 static const uword kStackSizeBuffer = (128 * KB); |
236 static const uword kDefaultStackSize = (1 * MB); | 239 static const uword kDefaultStackSize = (1 * MB); |
237 | 240 |
(...skipping 14 matching lines...) Expand all Loading... |
252 HandleScope* top_handle_scope_; | 255 HandleScope* top_handle_scope_; |
253 #endif | 256 #endif |
254 int32_t random_seed_; | 257 int32_t random_seed_; |
255 BigintStore* bigint_store_; | 258 BigintStore* bigint_store_; |
256 uword top_exit_frame_info_; | 259 uword top_exit_frame_info_; |
257 void* init_callback_data_; | 260 void* init_callback_data_; |
258 Dart_LibraryTagHandler library_tag_handler_; | 261 Dart_LibraryTagHandler library_tag_handler_; |
259 ApiState* api_state_; | 262 ApiState* api_state_; |
260 StubCode* stub_code_; | 263 StubCode* stub_code_; |
261 CodeIndexTable* code_index_table_; | 264 CodeIndexTable* code_index_table_; |
| 265 Debugger* debugger_; |
262 LongJump* long_jump_base_; | 266 LongJump* long_jump_base_; |
263 TimerList timer_list_; | 267 TimerList timer_list_; |
264 uword stack_limit_; | 268 uword stack_limit_; |
265 uword stack_limit_on_overflow_exception_; | 269 uword stack_limit_on_overflow_exception_; |
266 intptr_t ast_node_id_; | 270 intptr_t ast_node_id_; |
267 | 271 |
268 static Dart_IsolateInitCallback init_callback_; | 272 static Dart_IsolateInitCallback init_callback_; |
269 | 273 |
270 DISALLOW_COPY_AND_ASSIGN(Isolate); | 274 DISALLOW_COPY_AND_ASSIGN(Isolate); |
271 }; | 275 }; |
272 | 276 |
273 } // namespace dart | 277 } // namespace dart |
274 | 278 |
275 #if defined(TARGET_OS_LINUX) | 279 #if defined(TARGET_OS_LINUX) |
276 #include "vm/isolate_linux.h" | 280 #include "vm/isolate_linux.h" |
277 #elif defined(TARGET_OS_MACOS) | 281 #elif defined(TARGET_OS_MACOS) |
278 #include "vm/isolate_macos.h" | 282 #include "vm/isolate_macos.h" |
279 #elif defined(TARGET_OS_WINDOWS) | 283 #elif defined(TARGET_OS_WINDOWS) |
280 #include "vm/isolate_win.h" | 284 #include "vm/isolate_win.h" |
281 #else | 285 #else |
282 #error Unknown target os. | 286 #error Unknown target os. |
283 #endif | 287 #endif |
284 | 288 |
285 #endif // VM_ISOLATE_H_ | 289 #endif // VM_ISOLATE_H_ |
OLD | NEW |