Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: runtime/vm/dart_api_state.h

Issue 231053003: 1. Provide a framework to traverse persistent prolog weak handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698