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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 } | 751 } |
752 | 752 |
753 void VisitWeakHandles(HandleVisitor* visitor, | 753 void VisitWeakHandles(HandleVisitor* visitor, |
754 bool visit_prologue_weak_handles) { | 754 bool visit_prologue_weak_handles) { |
755 weak_persistent_handles().VisitHandles(visitor); | 755 weak_persistent_handles().VisitHandles(visitor); |
756 if (visit_prologue_weak_handles) { | 756 if (visit_prologue_weak_handles) { |
757 prologue_weak_persistent_handles().VisitHandles(visitor); | 757 prologue_weak_persistent_handles().VisitHandles(visitor); |
758 } | 758 } |
759 } | 759 } |
760 | 760 |
| 761 void VisitPrologueWeakHandles(HandleVisitor* visitor) { |
| 762 prologue_weak_persistent_handles().VisitHandles(visitor); |
| 763 } |
| 764 |
761 bool IsValidLocalHandle(Dart_Handle object) const { | 765 bool IsValidLocalHandle(Dart_Handle object) const { |
762 ApiLocalScope* scope = top_scope_; | 766 ApiLocalScope* scope = top_scope_; |
763 while (scope != NULL) { | 767 while (scope != NULL) { |
764 if (scope->local_handles()->IsValidHandle(object)) { | 768 if (scope->local_handles()->IsValidHandle(object)) { |
765 return true; | 769 return true; |
766 } | 770 } |
767 scope = scope->previous(); | 771 scope = scope->previous(); |
768 } | 772 } |
769 return false; | 773 return false; |
770 } | 774 } |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 ApiNativeScope::Current()->zone()) {} | 886 ApiNativeScope::Current()->zone()) {} |
883 ApiGrowableArray() | 887 ApiGrowableArray() |
884 : BaseGrowableArray<T, ValueObject>( | 888 : BaseGrowableArray<T, ValueObject>( |
885 ApiNativeScope::Current()->zone()) {} | 889 ApiNativeScope::Current()->zone()) {} |
886 }; | 890 }; |
887 | 891 |
888 | 892 |
889 } // namespace dart | 893 } // namespace dart |
890 | 894 |
891 #endif // VM_DART_API_STATE_H_ | 895 #endif // VM_DART_API_STATE_H_ |
OLD | NEW |