OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "platform/thread.h" | 10 #include "platform/thread.h" |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 InterruptableThreadState* thread_state() const { | 463 InterruptableThreadState* thread_state() const { |
464 return thread_state_; | 464 return thread_state_; |
465 } | 465 } |
466 | 466 |
467 void ProfileInterrupt(); | 467 void ProfileInterrupt(); |
468 | 468 |
469 VMTagCounters* vm_tag_counters() { | 469 VMTagCounters* vm_tag_counters() { |
470 return &vm_tag_counters_; | 470 return &vm_tag_counters_; |
471 } | 471 } |
472 | 472 |
| 473 uword user_tag() const { |
| 474 return user_tag_; |
| 475 } |
| 476 void set_user_tag(uword tag) { |
| 477 user_tag_ = tag; |
| 478 } |
| 479 |
473 #if defined(DEBUG) | 480 #if defined(DEBUG) |
474 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ | 481 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ |
475 void set_reusable_##object##_handle_scope_active(bool value) { \ | 482 void set_reusable_##object##_handle_scope_active(bool value) { \ |
476 reusable_##object##_handle_scope_active_ = value; \ | 483 reusable_##object##_handle_scope_active_ = value; \ |
477 } \ | 484 } \ |
478 bool reusable_##object##_handle_scope_active() const { \ | 485 bool reusable_##object##_handle_scope_active() const { \ |
479 return reusable_##object##_handle_scope_active_; \ | 486 return reusable_##object##_handle_scope_active_; \ |
480 } | 487 } |
481 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS) | 488 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS) |
482 #undef REUSABLE_HANDLE_SCOPE_ACCESSORS | 489 #undef REUSABLE_HANDLE_SCOPE_ACCESSORS |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 bool cha_used_; | 553 bool cha_used_; |
547 | 554 |
548 // Ring buffer of objects assigned an id. | 555 // Ring buffer of objects assigned an id. |
549 ObjectIdRing* object_id_ring_; | 556 ObjectIdRing* object_id_ring_; |
550 | 557 |
551 IsolateProfilerData* profiler_data_; | 558 IsolateProfilerData* profiler_data_; |
552 Mutex profiler_data_mutex_; | 559 Mutex profiler_data_mutex_; |
553 InterruptableThreadState* thread_state_; | 560 InterruptableThreadState* thread_state_; |
554 | 561 |
555 VMTagCounters vm_tag_counters_; | 562 VMTagCounters vm_tag_counters_; |
| 563 uword user_tag_; |
556 | 564 |
557 // Isolate list next pointer. | 565 // Isolate list next pointer. |
558 Isolate* next_; | 566 Isolate* next_; |
559 | 567 |
560 // Reusable handles support. | 568 // Reusable handles support. |
561 #define REUSABLE_HANDLE_FIELDS(object) \ | 569 #define REUSABLE_HANDLE_FIELDS(object) \ |
562 object* object##_handle_; | 570 object* object##_handle_; |
563 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) | 571 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) |
564 #undef REUSABLE_HANDLE_FIELDS | 572 #undef REUSABLE_HANDLE_FIELDS |
565 | 573 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 char* script_url_; | 696 char* script_url_; |
689 char* library_url_; | 697 char* library_url_; |
690 char* class_name_; | 698 char* class_name_; |
691 char* function_name_; | 699 char* function_name_; |
692 char* exception_callback_name_; | 700 char* exception_callback_name_; |
693 }; | 701 }; |
694 | 702 |
695 } // namespace dart | 703 } // namespace dart |
696 | 704 |
697 #endif // VM_ISOLATE_H_ | 705 #endif // VM_ISOLATE_H_ |
OLD | NEW |