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

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

Issue 10091027: Process weak references between optimized JSFunctions on scavenges. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix incremental marking and slot recording 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
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));
Michael Starzinger 2012/04/17 09:53:18 Can we put a comment here saying that we don't vis
297 VisitPointers(
298 heap,
299 HeapObject::RawField(object,
300 JSFunction::kCodeEntryOffset + kPointerSize),
301 HeapObject::RawField(object,
302 JSFunction::kNonWeakFieldsEndOffset));
303 return JSFunction::kSize;
304 }
305
292 static inline int VisitByteArray(Map* map, HeapObject* object) { 306 static inline int VisitByteArray(Map* map, HeapObject* object) {
293 return reinterpret_cast<ByteArray*>(object)->ByteArraySize(); 307 return reinterpret_cast<ByteArray*>(object)->ByteArraySize();
294 } 308 }
295 309
296 static inline int VisitFixedDoubleArray(Map* map, HeapObject* object) { 310 static inline int VisitFixedDoubleArray(Map* map, HeapObject* object) {
297 int length = reinterpret_cast<FixedDoubleArray*>(object)->length(); 311 int length = reinterpret_cast<FixedDoubleArray*>(object)->length();
298 return FixedDoubleArray::SizeFor(length); 312 return FixedDoubleArray::SizeFor(length);
299 } 313 }
300 314
301 static inline int VisitJSObject(Map* map, HeapObject* object) { 315 static inline int VisitJSObject(Map* map, HeapObject* object) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 357
344 358
345 template<typename StaticVisitor> 359 template<typename StaticVisitor>
346 VisitorDispatchTable<typename StaticNewSpaceVisitor<StaticVisitor>::Callback> 360 VisitorDispatchTable<typename StaticNewSpaceVisitor<StaticVisitor>::Callback>
347 StaticNewSpaceVisitor<StaticVisitor>::table_; 361 StaticNewSpaceVisitor<StaticVisitor>::table_;
348 362
349 363
350 } } // namespace v8::internal 364 } } // namespace v8::internal
351 365
352 #endif // V8_OBJECTS_VISITING_H_ 366 #endif // V8_OBJECTS_VISITING_H_
OLDNEW
« src/heap.cc ('K') | « src/mark-compact.cc ('k') | src/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698