InferredType should not use UnconditionalFinalizer
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Dec 2017 19:48:04 +0000 (19:48 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Dec 2017 19:48:04 +0000 (19:48 +0000)
commit46b4f4ed1afe3dbe743d575530993e40366f6b2e
tree64bfc6da5df704ccfb7d29815b77be3b5471c931
parent41cd749e661987c9cd5fd0bee4b82739adf13b11
InferredType should not use UnconditionalFinalizer
https://bugs.webkit.org/show_bug.cgi?id=180456

Reviewed by Saam Barati.

This turns InferredStructure into a cell so that we can unconditionally finalize them without
having to add things to the UnconditionalFinalizer list. I'm removing all uses of
UnconditionalFinalizers and WeakReferenceHarvesters because the data structures used to manage
them are a top cause of lock contention in the parallel GC. Also, we don't need those data
structures if we use IsoSubspaces, subspace iteration, and marking constraints.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* heap/Heap.cpp:
(JSC::Heap::finalizeUnconditionalFinalizers):
* heap/Heap.h:
* runtime/InferredStructure.cpp: Added.
(JSC::InferredStructure::create):
(JSC::InferredStructure::destroy):
(JSC::InferredStructure::createStructure):
(JSC::InferredStructure::visitChildren):
(JSC::InferredStructure::finalizeUnconditionally):
(JSC::InferredStructure::InferredStructure):
(JSC::InferredStructure::finishCreation):
* runtime/InferredStructure.h: Added.
* runtime/InferredStructureWatchpoint.cpp: Added.
(JSC::InferredStructureWatchpoint::fireInternal):
* runtime/InferredStructureWatchpoint.h: Added.
* runtime/InferredType.cpp:
(JSC::InferredType::visitChildren):
(JSC::InferredType::willStoreValueSlow):
(JSC::InferredType::makeTopSlow):
(JSC::InferredType::set):
(JSC::InferredType::removeStructure):
(JSC::InferredType::InferredStructureWatchpoint::fireInternal): Deleted.
(JSC::InferredType::InferredStructureFinalizer::finalizeUnconditionally): Deleted.
(JSC::InferredType::InferredStructure::InferredStructure): Deleted.
* runtime/InferredType.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/Sources.txt
Source/JavaScriptCore/heap/GCDeferralContextInlines.h
Source/JavaScriptCore/heap/Heap.cpp
Source/JavaScriptCore/heap/Heap.h
Source/JavaScriptCore/runtime/InferredStructure.cpp [new file with mode: 0644]
Source/JavaScriptCore/runtime/InferredStructure.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/InferredStructureWatchpoint.cpp [new file with mode: 0644]
Source/JavaScriptCore/runtime/InferredStructureWatchpoint.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/InferredType.cpp
Source/JavaScriptCore/runtime/InferredType.h
Source/JavaScriptCore/runtime/PrototypeKey.h
Source/JavaScriptCore/runtime/VM.cpp
Source/JavaScriptCore/runtime/VM.h