Ignore:
Timestamp:
Dec 17, 2017, 9:24:05 PM (8 years ago)
Author:
Yusuke Suzuki
Message:

[JSC] Use IsoSpace for JSWeakMap and JSWeakSet to use finalizeUnconditionally
https://bugs.webkit.org/show_bug.cgi?id=180916

Reviewed by Darin Adler.

This patch drops UnconditionalFinalizer for JSWeakMap and JSWeakSetby using IsoSpace.
Since these cells always require calling finalizeUnconditionally, we do not need to
track cells by using IsoCellSet.

Currently we still have WeakReferenceHarvester in JSWeakMap and JSWeakSet. We should
avoid using a global linked-list for this in the future.

(JSC::Heap::finalizeUnconditionalFinalizersInIsoSubspace):
(JSC::Heap::finalizeUnconditionalFinalizers):

  • heap/Heap.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • runtime/WeakMapImpl.cpp:

(JSC::WeakMapImpl<WeakMapBucket>::visitChildren):
(JSC::WeakMapImpl<WeakMapBucket>::finalizeUnconditionally): Deleted.

  • runtime/WeakMapImpl.h:

(JSC::WeakMapImpl::isWeakMap):
(JSC::WeakMapImpl::isWeakSet):
(JSC::WeakMapImpl::subspaceFor):

  • runtime/WeakMapImplInlines.h: Added.

(JSC::WeakMapImpl<WeakMapBucket>::finalizeUnconditionally):

File:
1 edited

Legend:

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

    r226010 r226017  
    500500    template<typename CellType, typename CellSet>
    501501    void finalizeUnconditionalFinalizers(CellSet&);
     502
     503    template<typename CellType>
     504    void finalizeUnconditionalFinalizersInIsoSubspace();
    502505   
    503506    void finalizeUnconditionalFinalizers();
Note: See TracChangeset for help on using the changeset viewer.