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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 class RawError; | 48 class RawError; |
49 class RawFloat32x4; | 49 class RawFloat32x4; |
50 class RawUint32x4; | 50 class RawUint32x4; |
51 class Simulator; | 51 class Simulator; |
52 class StackResource; | 52 class StackResource; |
53 class StackZone; | 53 class StackZone; |
54 class StubCode; | 54 class StubCode; |
55 class TypeArguments; | 55 class TypeArguments; |
56 class TypeParameter; | 56 class TypeParameter; |
57 class ObjectHistogram; | 57 class ObjectHistogram; |
58 class ObjectIdRing; | |
58 | 59 |
59 | 60 |
60 // Used by the deoptimization infrastructure to defer allocation of unboxed | 61 // Used by the deoptimization infrastructure to defer allocation of unboxed |
61 // objects until frame is fully rewritten and GC is safe. | 62 // objects until frame is fully rewritten and GC is safe. |
62 // Describes a stack slot that should be populated with a reference to the | 63 // Describes a stack slot that should be populated with a reference to the |
63 // materialized object. | 64 // materialized object. |
64 class DeferredSlot { | 65 class DeferredSlot { |
65 public: | 66 public: |
66 DeferredSlot(RawInstance** slot, DeferredSlot* next) | 67 DeferredSlot(RawInstance** slot, DeferredSlot* next) |
67 : slot_(slot), next_(next) { } | 68 : slot_(slot), next_(next) { } |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
616 intptr_t UnblockClassFinalization() { | 617 intptr_t UnblockClassFinalization() { |
617 ASSERT(defer_finalization_count_ > 0); | 618 ASSERT(defer_finalization_count_ > 0); |
618 return defer_finalization_count_--; | 619 return defer_finalization_count_--; |
619 } | 620 } |
620 | 621 |
621 bool AllowClassFinalization() { | 622 bool AllowClassFinalization() { |
622 ASSERT(defer_finalization_count_ >= 0); | 623 ASSERT(defer_finalization_count_ >= 0); |
623 return defer_finalization_count_ == 0; | 624 return defer_finalization_count_ == 0; |
624 } | 625 } |
625 | 626 |
627 void set_object_id_ring(ObjectIdRing* ring); | |
Ivan Posva
2013/07/10 01:10:13
Please put this up above with the other trivial ac
Cutch
2013/07/10 17:23:10
Done.
| |
628 ObjectIdRing* get_object_id_ring() { | |
629 return object_id_ring_; | |
630 } | |
631 | |
626 private: | 632 private: |
627 Isolate(); | 633 Isolate(); |
628 | 634 |
629 void BuildName(const char* name_prefix); | 635 void BuildName(const char* name_prefix); |
630 void PrintInvokedFunctions(); | 636 void PrintInvokedFunctions(); |
631 | 637 |
632 static bool FetchStacktrace(); | 638 static bool FetchStacktrace(); |
633 static bool FetchStackFrameDetails(); | 639 static bool FetchStackFrameDetails(); |
634 char* GetStatusDetails(); | 640 char* GetStatusDetails(); |
635 char* GetStatusStacktrace(); | 641 char* GetStatusStacktrace(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
679 DeferredSlot* deferred_object_refs_; | 685 DeferredSlot* deferred_object_refs_; |
680 | 686 |
681 intptr_t deferred_objects_count_; | 687 intptr_t deferred_objects_count_; |
682 DeferredObject** deferred_objects_; | 688 DeferredObject** deferred_objects_; |
683 | 689 |
684 // Status support. | 690 // Status support. |
685 char* stacktrace_; | 691 char* stacktrace_; |
686 intptr_t stack_frame_index_; | 692 intptr_t stack_frame_index_; |
687 ObjectHistogram* object_histogram_; | 693 ObjectHistogram* object_histogram_; |
688 | 694 |
695 // Ring buffer of objects assigned an id. | |
696 ObjectIdRing* object_id_ring_; | |
697 | |
689 // Reusable handles support. | 698 // Reusable handles support. |
690 #define REUSABLE_HANDLE_FIELDS(object) \ | 699 #define REUSABLE_HANDLE_FIELDS(object) \ |
691 object* object##_handle_; \ | 700 object* object##_handle_; \ |
692 | 701 |
693 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) | 702 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) |
694 #undef REUSABLE_HANDLE_FIELDS | 703 #undef REUSABLE_HANDLE_FIELDS |
695 VMHandles reusable_handles_; | 704 VMHandles reusable_handles_; |
696 | 705 |
697 static Dart_IsolateCreateCallback create_callback_; | 706 static Dart_IsolateCreateCallback create_callback_; |
698 static Dart_IsolateInterruptCallback interrupt_callback_; | 707 static Dart_IsolateInterruptCallback interrupt_callback_; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
891 | 900 |
892 private: | 901 private: |
893 Isolate::IsolateRunState saved_state_; | 902 Isolate::IsolateRunState saved_state_; |
894 | 903 |
895 DISALLOW_COPY_AND_ASSIGN(IsolateRunStateManager); | 904 DISALLOW_COPY_AND_ASSIGN(IsolateRunStateManager); |
896 }; | 905 }; |
897 | 906 |
898 } // namespace dart | 907 } // namespace dart |
899 | 908 |
900 #endif // VM_ISOLATE_H_ | 909 #endif // VM_ISOLATE_H_ |
OLD | NEW |