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/class_table.h" | 10 #include "vm/class_table.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 return create_callback_; | 246 return create_callback_; |
247 } | 247 } |
248 | 248 |
249 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) { | 249 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) { |
250 interrupt_callback_ = cb; | 250 interrupt_callback_ = cb; |
251 } | 251 } |
252 static Dart_IsolateInterruptCallback InterruptCallback() { | 252 static Dart_IsolateInterruptCallback InterruptCallback() { |
253 return interrupt_callback_; | 253 return interrupt_callback_; |
254 } | 254 } |
255 | 255 |
| 256 static void SetUnhandledExceptionCallback( |
| 257 Dart_IsolateUnhandledExceptionCallback cb) { |
| 258 unhandled_exception_callback_ = cb; |
| 259 } |
| 260 static Dart_IsolateUnhandledExceptionCallback UnhandledExceptionCallback() { |
| 261 return unhandled_exception_callback_; |
| 262 } |
| 263 |
256 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) { | 264 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) { |
257 shutdown_callback_ = cb; | 265 shutdown_callback_ = cb; |
258 } | 266 } |
259 static Dart_IsolateShutdownCallback ShutdownCallback() { | 267 static Dart_IsolateShutdownCallback ShutdownCallback() { |
260 return shutdown_callback_; | 268 return shutdown_callback_; |
261 } | 269 } |
262 | 270 |
263 intptr_t* deopt_cpu_registers_copy() const { | 271 intptr_t* deopt_cpu_registers_copy() const { |
264 return deopt_cpu_registers_copy_; | 272 return deopt_cpu_registers_copy_; |
265 } | 273 } |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 // Deoptimization support. | 351 // Deoptimization support. |
344 intptr_t* deopt_cpu_registers_copy_; | 352 intptr_t* deopt_cpu_registers_copy_; |
345 double* deopt_xmm_registers_copy_; | 353 double* deopt_xmm_registers_copy_; |
346 intptr_t* deopt_frame_copy_; | 354 intptr_t* deopt_frame_copy_; |
347 intptr_t deopt_frame_copy_size_; | 355 intptr_t deopt_frame_copy_size_; |
348 DeferredDouble* deferred_doubles_; | 356 DeferredDouble* deferred_doubles_; |
349 DeferredMint* deferred_mints_; | 357 DeferredMint* deferred_mints_; |
350 | 358 |
351 static Dart_IsolateCreateCallback create_callback_; | 359 static Dart_IsolateCreateCallback create_callback_; |
352 static Dart_IsolateInterruptCallback interrupt_callback_; | 360 static Dart_IsolateInterruptCallback interrupt_callback_; |
| 361 static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_; |
353 static Dart_IsolateShutdownCallback shutdown_callback_; | 362 static Dart_IsolateShutdownCallback shutdown_callback_; |
354 | 363 |
355 DISALLOW_COPY_AND_ASSIGN(Isolate); | 364 DISALLOW_COPY_AND_ASSIGN(Isolate); |
356 }; | 365 }; |
357 | 366 |
358 // When we need to execute code in an isolate, we use the | 367 // When we need to execute code in an isolate, we use the |
359 // StartIsolateScope. | 368 // StartIsolateScope. |
360 class StartIsolateScope { | 369 class StartIsolateScope { |
361 public: | 370 public: |
362 explicit StartIsolateScope(Isolate* new_isolate) | 371 explicit StartIsolateScope(Isolate* new_isolate) |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 Isolate* new_isolate_; | 424 Isolate* new_isolate_; |
416 Isolate* saved_isolate_; | 425 Isolate* saved_isolate_; |
417 uword saved_stack_limit_; | 426 uword saved_stack_limit_; |
418 | 427 |
419 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); | 428 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); |
420 }; | 429 }; |
421 | 430 |
422 } // namespace dart | 431 } // namespace dart |
423 | 432 |
424 #endif // VM_ISOLATE_H_ | 433 #endif // VM_ISOLATE_H_ |
OLD | NEW |