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

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

Issue 10675010: - Premark vm_isolate objects to avoid having to test for them (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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/gc_marker.cc ('k') | runtime/vm/heap.cc » ('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_HEAP_H_ 5 #ifndef VM_HEAP_H_
6 #define VM_HEAP_H_ 6 #define VM_HEAP_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 // Heap contains the specified address. 78 // Heap contains the specified address.
79 bool Contains(uword addr) const; 79 bool Contains(uword addr) const;
80 bool CodeContains(uword addr) const; 80 bool CodeContains(uword addr) const;
81 bool StubCodeContains(uword addr) const; 81 bool StubCodeContains(uword addr) const;
82 82
83 // Visit all pointers in the space. 83 // Visit all pointers in the space.
84 void IterateNewPointers(ObjectPointerVisitor* visitor); 84 void IterateNewPointers(ObjectPointerVisitor* visitor);
85 void IterateOldPointers(ObjectPointerVisitor* visitor); 85 void IterateOldPointers(ObjectPointerVisitor* visitor);
86 void IterateCodePointers(ObjectPointerVisitor* visitor); 86 void IterateCodePointers(ObjectPointerVisitor* visitor);
87 void IterateStubCodePointers(ObjectPointerVisitor* visitor); 87
88 // Visit all object in the space.
89 void IterateNewObjects(ObjectVisitor* visitor);
90 void IterateOldObjects(ObjectVisitor* visitor);
91 void IterateCodeObjects(ObjectVisitor* visitor);
88 92
89 // Find an object by visiting all pointers in the specified heap space, 93 // Find an object by visiting all pointers in the specified heap space,
90 // the 'visitor' is used to determine if an object is found or not. 94 // the 'visitor' is used to determine if an object is found or not.
91 // The 'visitor' function should be set up to return true if the 95 // The 'visitor' function should be set up to return true if the
92 // object is found, traversal through the heap space stops at that 96 // object is found, traversal through the heap space stops at that
93 // point. 97 // point.
94 // The 'visitor' function should return false if the object is not found, 98 // The 'visitor' function should return false if the object is not found,
95 // traversal through the heap space continues. 99 // traversal through the heap space continues.
96 RawInstructions* FindObjectInCodeSpace(FindObjectVisitor* visitor); 100 RawInstructions* FindObjectInCodeSpace(FindObjectVisitor* visitor);
97 RawInstructions* FindObjectInStubCodeSpace(FindObjectVisitor* visitor); 101 RawInstructions* FindObjectInStubCodeSpace(FindObjectVisitor* visitor);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 public: 154 public:
151 NoGCScope() {} 155 NoGCScope() {}
152 private: 156 private:
153 DISALLOW_COPY_AND_ASSIGN(NoGCScope); 157 DISALLOW_COPY_AND_ASSIGN(NoGCScope);
154 }; 158 };
155 #endif // defined(DEBUG) 159 #endif // defined(DEBUG)
156 160
157 } // namespace dart 161 } // namespace dart
158 162
159 #endif // VM_HEAP_H_ 163 #endif // VM_HEAP_H_
OLDNEW
« no previous file with comments | « runtime/vm/gc_marker.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698