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/runtime/VM.h

    r226011 r226017  
    350350    IsoSubspace structureRareDataSpace;
    351351    IsoSubspace structureSpace;
     352    IsoSubspace weakSetSpace;
     353    IsoSubspace weakMapSpace;
    352354   
    353355    IsoCellSet inferredTypesWithFinalizers;
Note: See TracChangeset for help on using the changeset viewer.