| 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 // Populate all deferred slots that contain boxes for double, mint, simd | 576 // Populate all deferred slots that contain boxes for double, mint, simd |
| 577 // values. | 577 // values. |
| 578 void MaterializeDeferredBoxes(); | 578 void MaterializeDeferredBoxes(); |
| 579 | 579 |
| 580 // Populate all slots containing references to objects which allocations | 580 // Populate all slots containing references to objects which allocations |
| 581 // were eliminated by AllocationSinking pass. | 581 // were eliminated by AllocationSinking pass. |
| 582 void MaterializeDeferredObjects(); | 582 void MaterializeDeferredObjects(); |
| 583 | 583 |
| 584 static char* GetStatus(const char* request); | 584 static char* GetStatus(const char* request); |
| 585 | 585 |
| 586 intptr_t BlockClassFinalization() { |
| 587 ASSERT(defer_finalization_count_ >= 0); |
| 588 return defer_finalization_count_++; |
| 589 } |
| 590 |
| 591 intptr_t UnblockClassFinalization() { |
| 592 ASSERT(defer_finalization_count_ > 0); |
| 593 return defer_finalization_count_--; |
| 594 } |
| 595 |
| 596 bool AllowClassFinalization() { |
| 597 ASSERT(defer_finalization_count_ >= 0); |
| 598 return defer_finalization_count_ == 0; |
| 599 } |
| 600 |
| 586 private: | 601 private: |
| 587 Isolate(); | 602 Isolate(); |
| 588 | 603 |
| 589 void BuildName(const char* name_prefix); | 604 void BuildName(const char* name_prefix); |
| 590 void PrintInvokedFunctions(); | 605 void PrintInvokedFunctions(); |
| 591 | 606 |
| 592 static bool FetchStacktrace(); | 607 static bool FetchStacktrace(); |
| 593 static bool FetchStackFrameDetails(); | 608 static bool FetchStackFrameDetails(); |
| 594 char* GetStatusDetails(); | 609 char* GetStatusDetails(); |
| 595 char* GetStatusStacktrace(); | 610 char* GetStatusStacktrace(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 619 intptr_t deopt_id_; | 634 intptr_t deopt_id_; |
| 620 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. | 635 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. |
| 621 uword stack_limit_; | 636 uword stack_limit_; |
| 622 uword saved_stack_limit_; | 637 uword saved_stack_limit_; |
| 623 MessageHandler* message_handler_; | 638 MessageHandler* message_handler_; |
| 624 uword spawn_data_; | 639 uword spawn_data_; |
| 625 bool is_runnable_; | 640 bool is_runnable_; |
| 626 IsolateRunState running_state_; | 641 IsolateRunState running_state_; |
| 627 GcPrologueCallbacks gc_prologue_callbacks_; | 642 GcPrologueCallbacks gc_prologue_callbacks_; |
| 628 GcEpilogueCallbacks gc_epilogue_callbacks_; | 643 GcEpilogueCallbacks gc_epilogue_callbacks_; |
| 644 intptr_t defer_finalization_count_; |
| 629 | 645 |
| 630 // Deoptimization support. | 646 // Deoptimization support. |
| 631 intptr_t* deopt_cpu_registers_copy_; | 647 intptr_t* deopt_cpu_registers_copy_; |
| 632 fpu_register_t* deopt_fpu_registers_copy_; | 648 fpu_register_t* deopt_fpu_registers_copy_; |
| 633 intptr_t* deopt_frame_copy_; | 649 intptr_t* deopt_frame_copy_; |
| 634 intptr_t deopt_frame_copy_size_; | 650 intptr_t deopt_frame_copy_size_; |
| 635 DeferredSlot* deferred_boxes_; | 651 DeferredSlot* deferred_boxes_; |
| 636 DeferredSlot* deferred_object_refs_; | 652 DeferredSlot* deferred_object_refs_; |
| 637 | 653 |
| 638 intptr_t deferred_objects_count_; | 654 intptr_t deferred_objects_count_; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 | 780 |
| 765 private: | 781 private: |
| 766 Isolate::IsolateRunState saved_state_; | 782 Isolate::IsolateRunState saved_state_; |
| 767 | 783 |
| 768 DISALLOW_COPY_AND_ASSIGN(IsolateRunStateManager); | 784 DISALLOW_COPY_AND_ASSIGN(IsolateRunStateManager); |
| 769 }; | 785 }; |
| 770 | 786 |
| 771 } // namespace dart | 787 } // namespace dart |
| 772 | 788 |
| 773 #endif // VM_ISOLATE_H_ | 789 #endif // VM_ISOLATE_H_ |
| OLD | NEW |