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" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 uword stack_limit_address() const { | 224 uword stack_limit_address() const { |
225 return reinterpret_cast<uword>(&stack_limit_); | 225 return reinterpret_cast<uword>(&stack_limit_); |
226 } | 226 } |
227 | 227 |
228 void SetStackLimit(uword value); | 228 void SetStackLimit(uword value); |
229 uword stack_limit() const { return stack_limit_; } | 229 uword stack_limit() const { return stack_limit_; } |
230 | 230 |
231 void SetStackLimitFromCurrentTOS(uword isolate_stack_top); | 231 void SetStackLimitFromCurrentTOS(uword isolate_stack_top); |
232 | 232 |
233 void ResetStackLimitAfterException() { | |
234 stack_limit_ = stack_limit_on_overflow_exception_ + kStackSizeBuffer; | |
235 } | |
236 | |
237 void AdjustStackLimitForException() { | |
238 stack_limit_ = stack_limit_on_overflow_exception_; | |
239 } | |
240 | |
241 void StandardRunLoop(); | 233 void StandardRunLoop(); |
242 | 234 |
243 intptr_t ast_node_id() const { return ast_node_id_; } | 235 intptr_t ast_node_id() const { return ast_node_id_; } |
244 void set_ast_node_id(int value) { ast_node_id_ = value; } | 236 void set_ast_node_id(int value) { ast_node_id_ = value; } |
245 | 237 |
246 Debugger* debugger() const { return debugger_; } | 238 Debugger* debugger() const { return debugger_; } |
247 | 239 |
248 private: | 240 private: |
249 Isolate(); | 241 Isolate(); |
250 | 242 |
(...skipping 27 matching lines...) Expand all Loading... |
278 uword top_exit_frame_info_; | 270 uword top_exit_frame_info_; |
279 void* init_callback_data_; | 271 void* init_callback_data_; |
280 Dart_LibraryTagHandler library_tag_handler_; | 272 Dart_LibraryTagHandler library_tag_handler_; |
281 ApiState* api_state_; | 273 ApiState* api_state_; |
282 StubCode* stub_code_; | 274 StubCode* stub_code_; |
283 CodeIndexTable* code_index_table_; | 275 CodeIndexTable* code_index_table_; |
284 Debugger* debugger_; | 276 Debugger* debugger_; |
285 LongJump* long_jump_base_; | 277 LongJump* long_jump_base_; |
286 TimerList timer_list_; | 278 TimerList timer_list_; |
287 uword stack_limit_; | 279 uword stack_limit_; |
288 uword stack_limit_on_overflow_exception_; | |
289 intptr_t ast_node_id_; | 280 intptr_t ast_node_id_; |
290 | 281 |
291 static Dart_IsolateCreateCallback create_callback_; | 282 static Dart_IsolateCreateCallback create_callback_; |
292 | 283 |
293 DISALLOW_COPY_AND_ASSIGN(Isolate); | 284 DISALLOW_COPY_AND_ASSIGN(Isolate); |
294 }; | 285 }; |
295 | 286 |
296 } // namespace dart | 287 } // namespace dart |
297 | 288 |
298 #if defined(TARGET_OS_LINUX) | 289 #if defined(TARGET_OS_LINUX) |
299 #include "vm/isolate_linux.h" | 290 #include "vm/isolate_linux.h" |
300 #elif defined(TARGET_OS_MACOS) | 291 #elif defined(TARGET_OS_MACOS) |
301 #include "vm/isolate_macos.h" | 292 #include "vm/isolate_macos.h" |
302 #elif defined(TARGET_OS_WINDOWS) | 293 #elif defined(TARGET_OS_WINDOWS) |
303 #include "vm/isolate_win.h" | 294 #include "vm/isolate_win.h" |
304 #else | 295 #else |
305 #error Unknown target os. | 296 #error Unknown target os. |
306 #endif | 297 #endif |
307 | 298 |
308 #endif // VM_ISOLATE_H_ | 299 #endif // VM_ISOLATE_H_ |
OLD | NEW |