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" |
11 #include "vm/base_isolate.h" | 11 #include "vm/base_isolate.h" |
12 #include "vm/class_table.h" | 12 #include "vm/class_table.h" |
13 #include "vm/handles.h" | 13 #include "vm/handles.h" |
14 #include "vm/megamorphic_cache_table.h" | 14 #include "vm/megamorphic_cache_table.h" |
15 #include "vm/random.h" | 15 #include "vm/random.h" |
16 #include "vm/store_buffer.h" | 16 #include "vm/store_buffer.h" |
17 #include "vm/tags.h" | |
17 #include "vm/timer.h" | 18 #include "vm/timer.h" |
18 | 19 |
19 namespace dart { | 20 namespace dart { |
20 | 21 |
21 // Forward declarations. | 22 // Forward declarations. |
22 class AbstractType; | 23 class AbstractType; |
23 class ApiState; | 24 class ApiState; |
24 class Array; | 25 class Array; |
25 class Class; | 26 class Class; |
26 class CodeIndexTable; | 27 class CodeIndexTable; |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
438 | 439 |
439 void set_thread_state(InterruptableThreadState* state) { | 440 void set_thread_state(InterruptableThreadState* state) { |
440 ASSERT((thread_state_ == NULL) || (state == NULL)); | 441 ASSERT((thread_state_ == NULL) || (state == NULL)); |
441 thread_state_ = state; | 442 thread_state_ = state; |
442 } | 443 } |
443 | 444 |
444 InterruptableThreadState* thread_state() const { | 445 InterruptableThreadState* thread_state() const { |
445 return thread_state_; | 446 return thread_state_; |
446 } | 447 } |
447 | 448 |
449 uword vm_tag() const { | |
450 return vm_tag_; | |
451 } | |
452 void set_vm_tag(uword tag) { | |
453 ASSERT(tag != VMTag::kInvalidTagId); | |
454 vm_tag_ = tag; | |
455 } | |
456 | |
448 #if defined(DEBUG) | 457 #if defined(DEBUG) |
449 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ | 458 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ |
450 void set_reusable_##object##_handle_scope_active(bool value) { \ | 459 void set_reusable_##object##_handle_scope_active(bool value) { \ |
451 reusable_##object##_handle_scope_active_ = value; \ | 460 reusable_##object##_handle_scope_active_ = value; \ |
452 } \ | 461 } \ |
453 bool reusable_##object##_handle_scope_active() const { \ | 462 bool reusable_##object##_handle_scope_active() const { \ |
454 return reusable_##object##_handle_scope_active_; \ | 463 return reusable_##object##_handle_scope_active_; \ |
455 } | 464 } |
456 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS) | 465 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS) |
457 #undef REUSABLE_HANDLE_SCOPE_ACCESSORS | 466 #undef REUSABLE_HANDLE_SCOPE_ACCESSORS |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
516 intptr_t stack_frame_index_; | 525 intptr_t stack_frame_index_; |
517 | 526 |
518 bool cha_used_; | 527 bool cha_used_; |
519 | 528 |
520 // Ring buffer of objects assigned an id. | 529 // Ring buffer of objects assigned an id. |
521 ObjectIdRing* object_id_ring_; | 530 ObjectIdRing* object_id_ring_; |
522 | 531 |
523 IsolateProfilerData* profiler_data_; | 532 IsolateProfilerData* profiler_data_; |
524 Mutex profiler_data_mutex_; | 533 Mutex profiler_data_mutex_; |
525 InterruptableThreadState* thread_state_; | 534 InterruptableThreadState* thread_state_; |
535 uword vm_tag_; | |
siva
2014/03/13 23:18:47
you may have to put this and the accessor method a
| |
526 | 536 |
527 // Isolate list next pointer. | 537 // Isolate list next pointer. |
528 Isolate* next_; | 538 Isolate* next_; |
529 | 539 |
530 // Reusable handles support. | 540 // Reusable handles support. |
531 #define REUSABLE_HANDLE_FIELDS(object) \ | 541 #define REUSABLE_HANDLE_FIELDS(object) \ |
532 object* object##_handle_; | 542 object* object##_handle_; |
533 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) | 543 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) |
534 #undef REUSABLE_HANDLE_FIELDS | 544 #undef REUSABLE_HANDLE_FIELDS |
535 | 545 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
658 char* script_url_; | 668 char* script_url_; |
659 char* library_url_; | 669 char* library_url_; |
660 char* class_name_; | 670 char* class_name_; |
661 char* function_name_; | 671 char* function_name_; |
662 char* exception_callback_name_; | 672 char* exception_callback_name_; |
663 }; | 673 }; |
664 | 674 |
665 } // namespace dart | 675 } // namespace dart |
666 | 676 |
667 #endif // VM_ISOLATE_H_ | 677 #endif // VM_ISOLATE_H_ |
OLD | NEW |