Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1e5465e49a028df7828885037fd0652891f20e00
https://github.com/WebKit/WebKit/commit/1e5465e49a028df7828885037fd0652891f20e00
Author: Yusuke Suzuki <[email protected]>
Date: 2026-08-28 (Fri, 28 Aug 2026)
Changed paths:
M Source/JavaScriptCore/bytecode/ArrayProfile.h
M Source/JavaScriptCore/bytecode/CodeBlock.cpp
M Source/JavaScriptCore/bytecode/CodeBlock.h
M Source/JavaScriptCore/dfg/DFGArrayMode.cpp
M Source/JavaScriptCore/dfg/DFGArrayMode.h
M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
M Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
M Source/JavaScriptCore/dfg/DFGOSRExit.cpp
M Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp
Log Message:
-----------
[JSC] ArrayProfile read / update does not need a lock
https://bugs.webkit.org/show_bug.cgi?id=322771
rdar://186034745
Reviewed by Yijia Huang.
Reading and updating ArrayProfile is fine to be racy as it is just a
source of prediction and we are not reading complicated data from the
stored Structure. They can be read freely from the concurrent compiler
unlike reading butterfly etc. This means that we do not need to have a
lock around ArrayProfile. As sizeof(ArrayProfile) is just 16 bytes, in
DFG compiler, unless we would like to update the data, we just copy the
entire 16 bytes and read the content.
* Source/JavaScriptCore/bytecode/ArrayProfile.h:
(JSC::ArrayProfile::mayBeLargeTypedArray const):
(JSC::ArrayProfile::mayBeResizableOrGrowableSharedTypedArray const):
(JSC::ArrayProfile::observedArrayModes const):
(JSC::ArrayProfile::mayInterceptIndexedAccesses const):
(JSC::ArrayProfile::mayStoreToHole const):
(JSC::ArrayProfile::outOfBounds const):
(JSC::ArrayProfile::usesOriginalArrayStructures const):
(JSC::ArrayProfile::mayBeRegExpMatchesArray const):
* Source/JavaScriptCore/bytecode/CodeBlock.cpp:
(JSC::CodeBlock::getArrayProfile):
* Source/JavaScriptCore/bytecode/CodeBlock.h:
* Source/JavaScriptCore/dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::fromObserved):
* Source/JavaScriptCore/dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::speculationFromProfile):
(JSC::DFG::ArrayMode::withSpeculationFromProfile const):
(JSC::DFG::ArrayMode::withProfile const):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getArrayMode):
(JSC::DFG::ByteCodeParser::profiledArrayMayBeRegExpMatchesArray):
* Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeGetArrayLength):
* Source/JavaScriptCore/dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::compileExit):
* Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
Canonical link: https://commits.webkit.org/320083@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications