Changeset 41443 in webkit for trunk/JavaScriptCore/wtf/TCPageMap.h
- Timestamp:
- Mar 4, 2009, 10:04:18 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/TCPageMap.h
r28434 r41443 55 55 56 56 #include <string.h> 57 58 57 #include "Assertions.h" 59 58 … … 165 164 #ifdef WTF_CHANGES 166 165 template<class Visitor, class MemoryReader> 167 void visit (constVisitor& visitor, const MemoryReader& reader)166 void visitValues(Visitor& visitor, const MemoryReader& reader) 168 167 { 169 168 for (int i = 0; i < ROOT_LENGTH; i++) { … … 174 173 for (int j = 0; j < LEAF_LENGTH; j += visitor.visit(l->values[j])) 175 174 ; 175 } 176 } 177 178 template<class Visitor, class MemoryReader> 179 void visitAllocations(Visitor& visitor, const MemoryReader&) { 180 for (int i = 0; i < ROOT_LENGTH; i++) { 181 if (root_[i]) 182 visitor.visit(root_[i], sizeof(Leaf)); 176 183 } 177 184 } … … 267 274 #ifdef WTF_CHANGES 268 275 template<class Visitor, class MemoryReader> 269 void visit (constVisitor& visitor, const MemoryReader& reader) {276 void visitValues(Visitor& visitor, const MemoryReader& reader) { 270 277 Node* root = reader(root_); 271 278 for (int i = 0; i < INTERIOR_LENGTH; i++) { … … 284 291 } 285 292 } 293 294 template<class Visitor, class MemoryReader> 295 void visitAllocations(Visitor& visitor, const MemoryReader& reader) { 296 visitor.visit(root_, sizeof(Node)); 297 298 Node* root = reader(root_); 299 for (int i = 0; i < INTERIOR_LENGTH; i++) { 300 if (!root->ptrs[i]) 301 continue; 302 303 visitor.visit(root->ptrs[i], sizeof(Node)); 304 Node* n = reader(root->ptrs[i]); 305 for (int j = 0; j < INTERIOR_LENGTH; j++) { 306 if (!n->ptrs[j]) 307 continue; 308 309 visitor.visit(n->ptrs[j], sizeof(Leaf)); 310 } 311 } 312 } 286 313 #endif 287 314 };
Note:
See TracChangeset
for help on using the changeset viewer.