| 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 } | 527 } |
| 527 intptr_t* deopt_frame_copy() const { return deopt_frame_copy_; } | 528 intptr_t* deopt_frame_copy() const { return deopt_frame_copy_; } |
| 528 void SetDeoptFrameCopy(intptr_t* value, intptr_t size) { | 529 void SetDeoptFrameCopy(intptr_t* value, intptr_t size) { |
| 529 ASSERT((value == NULL) || (size > 0)); | 530 ASSERT((value == NULL) || (size > 0)); |
| 530 ASSERT((value == NULL) || (deopt_frame_copy_ == NULL)); | 531 ASSERT((value == NULL) || (deopt_frame_copy_ == NULL)); |
| 531 deopt_frame_copy_ = value; | 532 deopt_frame_copy_ = value; |
| 532 deopt_frame_copy_size_ = size; | 533 deopt_frame_copy_size_ = size; |
| 533 } | 534 } |
| 534 intptr_t deopt_frame_copy_size() const { return deopt_frame_copy_size_; } | 535 intptr_t deopt_frame_copy_size() const { return deopt_frame_copy_size_; } |
| 535 | 536 |
| 537 void set_object_id_ring(ObjectIdRing* ring) { |
| 538 object_id_ring_ = ring; |
| 539 } |
| 540 ObjectIdRing* object_id_ring() { |
| 541 return object_id_ring_; |
| 542 } |
| 543 |
| 536 void PrepareForDeferredMaterialization(intptr_t count) { | 544 void PrepareForDeferredMaterialization(intptr_t count) { |
| 537 if (count > 0) { | 545 if (count > 0) { |
| 538 deferred_objects_ = new DeferredObject*[count]; | 546 deferred_objects_ = new DeferredObject*[count]; |
| 539 deferred_objects_count_ = count; | 547 deferred_objects_count_ = count; |
| 540 } | 548 } |
| 541 } | 549 } |
| 542 | 550 |
| 543 void DeleteDeferredObjects() { | 551 void DeleteDeferredObjects() { |
| 544 for (intptr_t i = 0; i < deferred_objects_count_; i++) { | 552 for (intptr_t i = 0; i < deferred_objects_count_; i++) { |
| 545 delete deferred_objects_[i]; | 553 delete deferred_objects_[i]; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 DeferredSlot* deferred_object_refs_; | 687 DeferredSlot* deferred_object_refs_; |
| 680 | 688 |
| 681 intptr_t deferred_objects_count_; | 689 intptr_t deferred_objects_count_; |
| 682 DeferredObject** deferred_objects_; | 690 DeferredObject** deferred_objects_; |
| 683 | 691 |
| 684 // Status support. | 692 // Status support. |
| 685 char* stacktrace_; | 693 char* stacktrace_; |
| 686 intptr_t stack_frame_index_; | 694 intptr_t stack_frame_index_; |
| 687 ObjectHistogram* object_histogram_; | 695 ObjectHistogram* object_histogram_; |
| 688 | 696 |
| 697 // Ring buffer of objects assigned an id. |
| 698 ObjectIdRing* object_id_ring_; |
| 699 |
| 689 // Reusable handles support. | 700 // Reusable handles support. |
| 690 #define REUSABLE_HANDLE_FIELDS(object) \ | 701 #define REUSABLE_HANDLE_FIELDS(object) \ |
| 691 object* object##_handle_; \ | 702 object* object##_handle_; \ |
| 692 | 703 |
| 693 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) | 704 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) |
| 694 #undef REUSABLE_HANDLE_FIELDS | 705 #undef REUSABLE_HANDLE_FIELDS |
| 695 VMHandles reusable_handles_; | 706 VMHandles reusable_handles_; |
| 696 | 707 |
| 697 static Dart_IsolateCreateCallback create_callback_; | 708 static Dart_IsolateCreateCallback create_callback_; |
| 698 static Dart_IsolateInterruptCallback interrupt_callback_; | 709 static Dart_IsolateInterruptCallback interrupt_callback_; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 | 902 |
| 892 private: | 903 private: |
| 893 Isolate::IsolateRunState saved_state_; | 904 Isolate::IsolateRunState saved_state_; |
| 894 | 905 |
| 895 DISALLOW_COPY_AND_ASSIGN(IsolateRunStateManager); | 906 DISALLOW_COPY_AND_ASSIGN(IsolateRunStateManager); |
| 896 }; | 907 }; |
| 897 | 908 |
| 898 } // namespace dart | 909 } // namespace dart |
| 899 | 910 |
| 900 #endif // VM_ISOLATE_H_ | 911 #endif // VM_ISOLATE_H_ |
| OLD | NEW |