Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: af0c5b6afa7e865b98f5900f8531e6ea2bc9b197
https://github.com/WebKit/WebKit/commit/af0c5b6afa7e865b98f5900f8531e6ea2bc9b197
Author: Yusuke Suzuki <[email protected]>
Date: 2025-02-08 (Sat, 08 Feb 2025)
Changed paths:
M Source/JavaScriptCore/heap/BlockDirectory.cpp
M Source/JavaScriptCore/heap/BlockDirectory.h
M Source/JavaScriptCore/heap/DestructionMode.cpp
M Source/JavaScriptCore/heap/DestructionMode.h
M Source/JavaScriptCore/heap/HeapCell.h
M Source/JavaScriptCore/heap/HeapCellInlines.h
M Source/JavaScriptCore/heap/IsoHeapCellType.h
M Source/JavaScriptCore/heap/IsoInlinedHeapCellTypeInlines.h
M Source/JavaScriptCore/heap/MarkedBlock.cpp
M Source/JavaScriptCore/heap/MarkedBlock.h
M Source/JavaScriptCore/heap/MarkedBlockInlines.h
M Source/JavaScriptCore/heap/PreciseAllocation.cpp
M Source/JavaScriptCore/runtime/ClonedArguments.h
M Source/JavaScriptCore/runtime/DirectArguments.h
M Source/JavaScriptCore/runtime/JSLexicalEnvironment.h
M Source/JavaScriptCore/runtime/JSObjectInlines.h
M Source/JavaScriptCore/runtime/JSString.h
M Source/JavaScriptCore/runtime/JSStringInlines.h
M Source/JavaScriptCore/runtime/RegExpObject.h
M Source/JavaScriptCore/runtime/ScopedArguments.h
M Source/JavaScriptCore/testRegExp.cpp
M Source/WebCore/bindings/js/WebCoreJSClientData.h
Log Message:
-----------
[JSC] Add MayNeedDestruction mode
https://bugs.webkit.org/show_bug.cgi?id=287318
rdar://144428259
Reviewed by Yijia Huang.
This patch introduces MayNeedDestruction destruction mode. When this
mode is set, each cells need to manually track whether it should get
destruction. We use this in JSRopeString and we can mark MarkedBlock as
destructible only when we resolve JSRopeString contained in the
MarkedBlock. It is really common that we create massive amount of
JSRopeStrings and only a few gets resolved. In this case, most of
JSRopeStrings in many MarkedBlocks are not resolved. We can skip calling
destructors for these blocks.
Currently this mode is allowed only for types which only allocate cells
from MarkedBlocks. So JSRopeString is specifically made as it always
allocate cells from MarkedBlocks (not from PreciseAllocations).
* Source/JavaScriptCore/heap/BlockDirectory.cpp:
(JSC::BlockDirectory::endMarking):
* Source/JavaScriptCore/heap/BlockDirectory.h:
(JSC::BlockDirectory::attributes const):
(JSC::BlockDirectory::needsDestruction const): Deleted.
* Source/JavaScriptCore/heap/DestructionMode.cpp:
(WTF::printInternal):
* Source/JavaScriptCore/heap/DestructionMode.h:
(): Deleted.
* Source/JavaScriptCore/heap/HeapCell.h:
* Source/JavaScriptCore/heap/HeapCellInlines.h:
(JSC::HeapCell::notifyNeedsDestruction const):
* Source/JavaScriptCore/heap/IsoHeapCellType.h:
* Source/JavaScriptCore/heap/IsoInlinedHeapCellTypeInlines.h:
(JSC::IsoInlinedHeapCellType<CellType>::IsoInlinedHeapCellType):
* Source/JavaScriptCore/heap/MarkedBlock.cpp:
(JSC::MarkedBlock::Handle::stopAllocating):
(JSC::MarkedBlock::Handle::sweep):
* Source/JavaScriptCore/heap/MarkedBlock.h:
(JSC::MarkedBlock::Handle::needsDestruction const):
* Source/JavaScriptCore/heap/MarkedBlockInlines.h:
(JSC::MarkedBlock::Handle::specializedSweep):
(JSC::MarkedBlock::Handle::sweepDestructionMode):
(JSC::MarkedBlock::Handle::setIsDestructible):
* Source/JavaScriptCore/heap/PreciseAllocation.cpp:
(JSC::PreciseAllocation::sweep):
* Source/JavaScriptCore/runtime/ClonedArguments.h:
* Source/JavaScriptCore/runtime/DirectArguments.h:
* Source/JavaScriptCore/runtime/JSLexicalEnvironment.h:
(JSC::JSLexicalEnvironment::subspaceFor):
* Source/JavaScriptCore/runtime/JSObjectInlines.h:
(JSC::JSFinalObject::subspaceFor):
* Source/JavaScriptCore/runtime/JSString.h:
* Source/JavaScriptCore/runtime/JSStringInlines.h:
(JSC::JSRopeString::convertToNonRope const):
* Source/JavaScriptCore/runtime/RegExpObject.h:
* Source/JavaScriptCore/runtime/ScopedArguments.h:
* Source/JavaScriptCore/testRegExp.cpp:
* Source/WebCore/bindings/js/WebCoreJSClientData.h:
(WebCore::subspaceForImpl):
Canonical link: https://commits.webkit.org/290094@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes