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

Side by Side Diff: src/objects-visiting.h

Issue 7607031: Update gc branch to bleeding_edge revision 8862. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Fix bug in weak-map merge Created 9 years, 4 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 | « src/objects-printer.cc ('k') | src/objects-visiting.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 kVisitStruct9, 99 kVisitStruct9,
100 kVisitStructGeneric, 100 kVisitStructGeneric,
101 101
102 kVisitConsString, 102 kVisitConsString,
103 kVisitOddball, 103 kVisitOddball,
104 kVisitCode, 104 kVisitCode,
105 kVisitMap, 105 kVisitMap,
106 kVisitPropertyCell, 106 kVisitPropertyCell,
107 kVisitSharedFunctionInfo, 107 kVisitSharedFunctionInfo,
108 kVisitJSFunction, 108 kVisitJSFunction,
109 kVisitJSWeakMap,
109 kVisitJSRegExp, 110 kVisitJSRegExp,
110 111
111 kVisitorIdCount, 112 kVisitorIdCount,
112 kMinObjectSizeInWords = 2 113 kMinObjectSizeInWords = 2
113 }; 114 };
114 115
115 // Visitor ID should fit in one byte. 116 // Visitor ID should fit in one byte.
116 STATIC_ASSERT(kVisitorIdCount <= 256); 117 STATIC_ASSERT(kVisitorIdCount <= 256);
117 118
118 // Determine which specialized visitor should be used for given instance type 119 // Determine which specialized visitor should be used for given instance type
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 private: 286 private:
286 static inline int VisitByteArray(Map* map, HeapObject* object) { 287 static inline int VisitByteArray(Map* map, HeapObject* object) {
287 return reinterpret_cast<ByteArray*>(object)->ByteArraySize(); 288 return reinterpret_cast<ByteArray*>(object)->ByteArraySize();
288 } 289 }
289 290
290 static inline int VisitFixedDoubleArray(Map* map, HeapObject* object) { 291 static inline int VisitFixedDoubleArray(Map* map, HeapObject* object) {
291 int length = reinterpret_cast<FixedDoubleArray*>(object)->length(); 292 int length = reinterpret_cast<FixedDoubleArray*>(object)->length();
292 return FixedDoubleArray::SizeFor(length); 293 return FixedDoubleArray::SizeFor(length);
293 } 294 }
294 295
296 static inline int VisitJSObject(Map* map, HeapObject* object) {
297 return JSObjectVisitor::Visit(map, object);
298 }
299
295 static inline int VisitSeqAsciiString(Map* map, HeapObject* object) { 300 static inline int VisitSeqAsciiString(Map* map, HeapObject* object) {
296 return SeqAsciiString::cast(object)-> 301 return SeqAsciiString::cast(object)->
297 SeqAsciiStringSize(map->instance_type()); 302 SeqAsciiStringSize(map->instance_type());
298 } 303 }
299 304
300 static inline int VisitJSRegExp(Map* map, HeapObject* object) {
301 return JSObjectVisitor::Visit(map, object);
302 }
303
304 static inline int VisitSeqTwoByteString(Map* map, HeapObject* object) { 305 static inline int VisitSeqTwoByteString(Map* map, HeapObject* object) {
305 return SeqTwoByteString::cast(object)-> 306 return SeqTwoByteString::cast(object)->
306 SeqTwoByteStringSize(map->instance_type()); 307 SeqTwoByteStringSize(map->instance_type());
307 } 308 }
308 309
309 static inline int VisitFreeSpace(Map* map, HeapObject* object) { 310 static inline int VisitFreeSpace(Map* map, HeapObject* object) {
310 return FreeSpace::cast(object)->Size(); 311 return FreeSpace::cast(object)->Size();
311 } 312 }
312 313
313 class DataObjectVisitor { 314 class DataObjectVisitor {
(...skipping 23 matching lines...) Expand all
337 338
338 339
339 template<typename StaticVisitor> 340 template<typename StaticVisitor>
340 VisitorDispatchTable<typename StaticNewSpaceVisitor<StaticVisitor>::Callback> 341 VisitorDispatchTable<typename StaticNewSpaceVisitor<StaticVisitor>::Callback>
341 StaticNewSpaceVisitor<StaticVisitor>::table_; 342 StaticNewSpaceVisitor<StaticVisitor>::table_;
342 343
343 344
344 } } // namespace v8::internal 345 } } // namespace v8::internal
345 346
346 #endif // V8_OBJECTS_VISITING_H_ 347 #endif // V8_OBJECTS_VISITING_H_
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/objects-visiting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698