| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_DART_API_STATE_H_ | 5 #ifndef VM_DART_API_STATE_H_ |
| 6 #define VM_DART_API_STATE_H_ | 6 #define VM_DART_API_STATE_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 #include "platform/thread.h" | 10 #include "platform/thread.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 return prologue_weak_persistent_handles_; | 566 return prologue_weak_persistent_handles_; |
| 567 } | 567 } |
| 568 | 568 |
| 569 WeakReferenceSet* delayed_weak_reference_sets() { | 569 WeakReferenceSet* delayed_weak_reference_sets() { |
| 570 return delayed_weak_reference_sets_; | 570 return delayed_weak_reference_sets_; |
| 571 } | 571 } |
| 572 void set_delayed_weak_reference_sets(WeakReferenceSet* reference_set) { | 572 void set_delayed_weak_reference_sets(WeakReferenceSet* reference_set) { |
| 573 delayed_weak_reference_sets_ = reference_set; | 573 delayed_weak_reference_sets_ = reference_set; |
| 574 } | 574 } |
| 575 | 575 |
| 576 void UnwindScopes(uword sp) { | 576 void UnwindScopes(uword stack_marker) { |
| 577 // Unwind all scopes using the same stack_marker, i.e. all scopes allocated |
| 578 // under the same top_exit_frame_info. |
| 577 while (top_scope_ != NULL && | 579 while (top_scope_ != NULL && |
| 578 top_scope_->stack_marker() != 0 && | 580 top_scope_->stack_marker() != 0 && |
| 579 top_scope_->stack_marker() <= sp) { | 581 top_scope_->stack_marker() == stack_marker) { |
| 580 ApiLocalScope* scope = top_scope_; | 582 ApiLocalScope* scope = top_scope_; |
| 581 top_scope_ = top_scope_->previous(); | 583 top_scope_ = top_scope_->previous(); |
| 582 delete scope; | 584 delete scope; |
| 583 } | 585 } |
| 584 } | 586 } |
| 585 | 587 |
| 586 void VisitObjectPointers(ObjectPointerVisitor* visitor, | 588 void VisitObjectPointers(ObjectPointerVisitor* visitor, |
| 587 bool visit_prologue_weak_handles) { | 589 bool visit_prologue_weak_handles) { |
| 588 ApiLocalScope* scope = top_scope_; | 590 ApiLocalScope* scope = top_scope_; |
| 589 while (scope != NULL) { | 591 while (scope != NULL) { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 ApiNativeScope::Current()->zone()) {} | 750 ApiNativeScope::Current()->zone()) {} |
| 749 ApiGrowableArray() | 751 ApiGrowableArray() |
| 750 : BaseGrowableArray<T, ValueObject>( | 752 : BaseGrowableArray<T, ValueObject>( |
| 751 ApiNativeScope::Current()->zone()) {} | 753 ApiNativeScope::Current()->zone()) {} |
| 752 }; | 754 }; |
| 753 | 755 |
| 754 | 756 |
| 755 } // namespace dart | 757 } // namespace dart |
| 756 | 758 |
| 757 #endif // VM_DART_API_STATE_H_ | 759 #endif // VM_DART_API_STATE_H_ |
| OLD | NEW |