Changeset 226725 in webkit for trunk/Source/JavaScriptCore/heap/HeapUtil.h
- Timestamp:
- Jan 10, 2018, 11:41:12 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/heap/HeapUtil.h
r226667 r226725 67 67 [] (LargeAllocation** ptr) -> LargeAllocation* { return *ptr; }); 68 68 if (result) { 69 auto attemptLarge = [&] (LargeAllocation* allocation) { 70 if (allocation->contains(pointer)) 71 func(allocation->cell(), allocation->attributes().cellKind); 72 }; 73 74 if (result > heap.objectSpace().largeAllocationsForThisCollectionBegin()) 75 attemptLarge(result[-1]); 76 attemptLarge(result[0]); 77 if (result + 1 < heap.objectSpace().largeAllocationsForThisCollectionEnd()) 78 attemptLarge(result[1]); 69 if (result > heap.objectSpace().largeAllocationsForThisCollectionBegin() 70 && result[-1]->contains(pointer)) 71 func(result[-1]->cell()); 72 if (result[0]->contains(pointer)) 73 func(result[0]->cell()); 74 if (result + 1 < heap.objectSpace().largeAllocationsForThisCollectionEnd() 75 && result[1]->contains(pointer)) 76 func(result[1]->cell()); 79 77 } 80 78 } … … 92 90 previousPointer = static_cast<char*>(previousCandidate->handle().cellAlign(previousPointer)); 93 91 if (previousCandidate->handle().isLiveCell(markingVersion, newlyAllocatedVersion, isMarking, previousPointer)) 94 func(previousPointer , previousCandidate->handle().cellKind());92 func(previousPointer); 95 93 } 96 94 } … … 103 101 if (!set.contains(candidate)) 104 102 return; 105 106 HeapCell::Kind cellKind = candidate->handle().cellKind();107 103 108 104 auto tryPointer = [&] (void* pointer) { 109 105 if (candidate->handle().isLiveCell(markingVersion, newlyAllocatedVersion, isMarking, pointer)) 110 func(pointer , cellKind);106 func(pointer); 111 107 }; 112 108
Note:
See TracChangeset
for help on using the changeset viewer.