Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Source/JavaScriptCore/heap/BlockDirectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,17 @@ void BlockDirectory::shrink()
});
}

// FIXME: rdar://139998916
MarkedBlock::Handle* BlockDirectory::findMarkedBlockHandleDebug(MarkedBlock* block)
{
for (size_t index = 0; index < m_blocks.size(); ++index) {
MarkedBlock::Handle* handle = m_blocks[index];
if (&handle->block() == block)
return handle;
}
return nullptr;
}

void BlockDirectory::assertNoUnswept()
{
if (!ASSERT_ENABLED)
Expand Down
5 changes: 4 additions & 1 deletion Source/JavaScriptCore/heap/BlockDirectory.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ class BlockDirectory {
void setNextDirectoryInAlignedMemoryAllocator(BlockDirectory* directory) { m_nextDirectoryInAlignedMemoryAllocator = directory; }

MarkedBlock::Handle* findEmptyBlockToSteal();

MarkedBlock::Handle* findBlockToSweep();

// FIXME: rdar://139998916
MarkedBlock::Handle* findMarkedBlockHandleDebug(MarkedBlock*);

Subspace* subspace() const { return m_subspace; }
MarkedSpace& markedSpace() const;
Expand Down
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/heap/CellContainerInlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ inline WeakSet& CellContainer::weakSet() const
inline void CellContainer::aboutToMark(HeapVersion markingVersion)
{
if (!isPreciseAllocation())
markedBlock().aboutToMark(markingVersion);
markedBlock().aboutToMark(markingVersion, nullptr);
}

inline bool CellContainer::areMarksStale() const
Expand Down
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/heap/HeapInlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ALWAYS_INLINE bool Heap::testAndSetMarked(HeapVersion markingVersion, const void
if (cell->isPreciseAllocation())
return cell->preciseAllocation().testAndSetMarked();
MarkedBlock& block = cell->markedBlock();
Dependency dependency = block.aboutToMark(markingVersion);
Dependency dependency = block.aboutToMark(markingVersion, cell);
return block.testAndSetMarked(cell, dependency);
}

Expand Down
Loading