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

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

Issue 10105026: Version 3.10.3 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 8 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 | « 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 static inline int IterateBody(Map* map, HeapObject* obj) { 283 static inline int IterateBody(Map* map, HeapObject* obj) {
284 return table_.GetVisitor(map)(map, obj); 284 return table_.GetVisitor(map)(map, obj);
285 } 285 }
286 286
287 static inline void VisitPointers(Heap* heap, Object** start, Object** end) { 287 static inline void VisitPointers(Heap* heap, Object** start, Object** end) {
288 for (Object** p = start; p < end; p++) StaticVisitor::VisitPointer(heap, p); 288 for (Object** p = start; p < end; p++) StaticVisitor::VisitPointer(heap, p);
289 } 289 }
290 290
291 private: 291 private:
292 static inline int VisitJSFunction(Map* map, HeapObject* object) {
293 Heap* heap = map->GetHeap();
294 VisitPointers(heap,
295 HeapObject::RawField(object, JSFunction::kPropertiesOffset),
296 HeapObject::RawField(object, JSFunction::kCodeEntryOffset));
297
298 // Don't visit code entry. We are using this visitor only during scavenges.
299
300 VisitPointers(
301 heap,
302 HeapObject::RawField(object,
303 JSFunction::kCodeEntryOffset + kPointerSize),
304 HeapObject::RawField(object,
305 JSFunction::kNonWeakFieldsEndOffset));
306 return JSFunction::kSize;
307 }
308
292 static inline int VisitByteArray(Map* map, HeapObject* object) { 309 static inline int VisitByteArray(Map* map, HeapObject* object) {
293 return reinterpret_cast<ByteArray*>(object)->ByteArraySize(); 310 return reinterpret_cast<ByteArray*>(object)->ByteArraySize();
294 } 311 }
295 312
296 static inline int VisitFixedDoubleArray(Map* map, HeapObject* object) { 313 static inline int VisitFixedDoubleArray(Map* map, HeapObject* object) {
297 int length = reinterpret_cast<FixedDoubleArray*>(object)->length(); 314 int length = reinterpret_cast<FixedDoubleArray*>(object)->length();
298 return FixedDoubleArray::SizeFor(length); 315 return FixedDoubleArray::SizeFor(length);
299 } 316 }
300 317
301 static inline int VisitJSObject(Map* map, HeapObject* object) { 318 static inline int VisitJSObject(Map* map, HeapObject* object) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 360
344 361
345 template<typename StaticVisitor> 362 template<typename StaticVisitor>
346 VisitorDispatchTable<typename StaticNewSpaceVisitor<StaticVisitor>::Callback> 363 VisitorDispatchTable<typename StaticNewSpaceVisitor<StaticVisitor>::Callback>
347 StaticNewSpaceVisitor<StaticVisitor>::table_; 364 StaticNewSpaceVisitor<StaticVisitor>::table_;
348 365
349 366
350 } } // namespace v8::internal 367 } } // namespace v8::internal
351 368
352 #endif // V8_OBJECTS_VISITING_H_ 369 #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