@@ -36,20 +36,15 @@ namespace JSC {
3636
3737WTF_MAKE_TZONE_ALLOCATED_IMPL (IsoSubspace);
3838
39- IsoSubspace::IsoSubspace (CString name, JSC ::Heap& heap, const HeapCellType& heapCellType, size_t size, bool preciseOnly, uint8_t numberOfLowerTierPreciseCells, std::unique_ptr<IsoMemoryAllocatorBase>&& allocator)
40- : Subspace(name, heap)
39+ IsoSubspace::IsoSubspace (CString name, JSC ::Heap& heap, const HeapCellType& heapCellType, size_t size, uint8_t numberOfLowerTierPreciseCells, std::unique_ptr<IsoMemoryAllocatorBase>&& allocator)
40+ : Subspace(SubspaceKind::IsoSubspace, name, heap)
4141 , m_directory(WTF ::roundUpToMultipleOf<MarkedBlock::atomSize>(size))
4242 , m_isoAlignedMemoryAllocator(allocator ? WTFMove(allocator) : makeUnique<IsoAlignedMemoryAllocator>(name))
4343{
44- if (preciseOnly)
45- m_isPreciseOnly = true ;
46- else {
47- m_remainingLowerTierPreciseCount = numberOfLowerTierPreciseCells;
48- ASSERT (WTF ::roundUpToMultipleOf<MarkedBlock::atomSize>(size) == cellSize ());
49- ASSERT (m_remainingLowerTierPreciseCount <= MarkedBlock::maxNumberOfLowerTierPreciseCells);
50- }
44+ m_remainingLowerTierPreciseCount = numberOfLowerTierPreciseCells;
45+ ASSERT (WTF ::roundUpToMultipleOf<MarkedBlock::atomSize>(size) == cellSize ());
46+ ASSERT (m_remainingLowerTierPreciseCount <= MarkedBlock::maxNumberOfLowerTierPreciseCells);
5147
52- m_isIsoSubspace = true ;
5348 initialize (heapCellType, m_isoAlignedMemoryAllocator.get ());
5449
5550 Locker locker { m_space.directoryLock () };
@@ -85,7 +80,7 @@ void IsoSubspace::didBeginSweepingToFreeList(MarkedBlock::Handle* block)
8580 });
8681}
8782
88- void * IsoSubspace::tryAllocatePreciseOrLowerTierPrecise (size_t size)
83+ void * IsoSubspace::tryAllocateLowerTierPrecise (size_t size)
8984{
9085 auto revive = [&] (PreciseAllocation* allocation, bool isNewAllocation) {
9186 m_space.registerPreciseAllocation (allocation, isNewAllocation);
@@ -94,11 +89,6 @@ void* IsoSubspace::tryAllocatePreciseOrLowerTierPrecise(size_t size)
9489 return allocation->cell ();
9590 };
9691
97- if (UNLIKELY (m_isPreciseOnly)) {
98- PreciseAllocation* allocation = PreciseAllocation::tryCreate (m_space.heap (), size, this , 0 );
99- return allocation ? revive (allocation, true ) : nullptr ;
100- }
101-
10292 ASSERT_WITH_MESSAGE (cellSize () == size, " non-preciseOnly IsoSubspaces shouldn't have variable size" );
10393 if (!m_lowerTierPreciseFreeList.isEmpty ()) {
10494 PreciseAllocation* allocation = &*m_lowerTierPreciseFreeList.begin ();
@@ -117,7 +107,6 @@ void* IsoSubspace::tryAllocatePreciseOrLowerTierPrecise(size_t size)
117107
118108void IsoSubspace::sweepLowerTierPreciseCell (PreciseAllocation* preciseAllocation)
119109{
120- ASSERT (!m_isPreciseOnly);
121110 preciseAllocation = preciseAllocation->reuseForLowerTierPrecise ();
122111 m_lowerTierPreciseFreeList.append (preciseAllocation);
123112}
0 commit comments