Ignore:
Timestamp:
Sep 19, 2011, 10:41:51 AM (14 years ago)
Author:
[email protected]
Message:

Remove bump allocator
https://bugs.webkit.org/show_bug.cgi?id=68370

Reviewed by Sam Weinig.

Can't do anything with this allocator currently, and it's
increasing the complexity of the GC code. Slight progression
on SunSpider, slight regression (undoing the original progression)
in V8.

  • heap/Heap.cpp:

(JSC::Heap::collect):

  • heap/Heap.h:
  • heap/NewSpace.cpp:

(JSC::NewSpace::NewSpace):

  • heap/NewSpace.h:

(JSC::NewSpace::allocate):

  • runtime/JSObject.cpp:

(JSC::JSObject::allocatePropertyStorage):

  • runtime/JSObject.h:

(JSC::JSObject::~JSObject):
(JSC::JSObject::visitChildrenDirect):

  • runtime/StorageBarrier.h:

(JSC::StorageBarrier::set):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/NewSpace.h

    r94814 r95439  
    4747    public:
    4848        static const size_t maxCellSize = 1024;
    49         static const size_t PropertyStorageNurserySize = 4 * MB;
    5049
    5150        struct SizeClass {
     
    6564        SizeClass& sizeClassFor(size_t);
    6665        void* allocate(SizeClass&);
    67         inline void* allocatePropertyStorage(size_t);
    68         inline bool inPropertyStorageNursery(void* ptr);
    69         inline void resetPropertyStorageNursery();
    7066       
    7167        void resetAllocator();
     
    9793        SizeClass m_preciseSizeClasses[preciseCount];
    9894        SizeClass m_impreciseSizeClasses[impreciseCount];
    99         char* m_propertyStorageNursery;
    100         char* m_propertyStorageAllocationPoint;
    10195        size_t m_waterMark;
    10296        size_t m_highWaterMark;
     
    167161        return firstFreeCell;
    168162    }
    169 
    170     inline void NewSpace::resetPropertyStorageNursery()
    171     {
    172         m_propertyStorageAllocationPoint = m_propertyStorageNursery;
    173     }
    174    
    175     inline void* NewSpace::allocatePropertyStorage(size_t size)
    176     {
    177         char* result = m_propertyStorageAllocationPoint;
    178         if (size > PropertyStorageNurserySize)
    179             CRASH();
    180         m_propertyStorageAllocationPoint += size;
    181         if (static_cast<size_t>(m_propertyStorageAllocationPoint - m_propertyStorageNursery) > PropertyStorageNurserySize) {
    182             m_propertyStorageAllocationPoint = result;
    183             return 0;
    184         }
    185         return result;
    186     }
    187 
    188     inline bool NewSpace::inPropertyStorageNursery(void* ptr)
    189     {
    190         char* addr = static_cast<char*>(ptr);
    191         return static_cast<size_t>(addr - m_propertyStorageNursery) < PropertyStorageNurserySize;
    192     }
    193163   
    194164    template <typename Functor> inline typename Functor::ReturnType NewSpace::forEachBlock(Functor& functor)
Note: See TracChangeset for help on using the changeset viewer.