[webkit-changes] [WebKit/WebKit] 6f9503: [JSC] Fix thread-local AssemblerBuffer
Yusuke Suzuki
noreply at github.com
Fri Mar 8 10:28:18 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6f9503bb480411badefe27802aff3edc4dc131a9
https://github.com/WebKit/WebKit/commit/6f9503bb480411badefe27802aff3edc4dc131a9
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2024-03-08 (Fri, 08 Mar 2024)
Changed paths:
M Source/JavaScriptCore/assembler/AssemblerBuffer.cpp
M Source/JavaScriptCore/assembler/AssemblerBuffer.h
M Source/JavaScriptCore/assembler/LinkBuffer.h
Log Message:
-----------
[JSC] Fix thread-local AssemblerBuffer
https://bugs.webkit.org/show_bug.cgi?id=270642
rdar://124221850
Reviewed by Keith Miller.
ARM64EHash broke thread-local AssemblerBuffer mechanism since it took the ownership of AssemblerData (not AssemblerBuffer) from MacroAssembler to LinkBuffer.
So when destroying AssemblerBuffer, its underlying AssemblerData is always zero-sized. This broke thread-local AssemblerBuffer mechanism.
This patch fixes it by
1. Moving thread-local AssemblerData access code from AssemblerBuffer to AssemblerData.
2. Tagging AssemblerData with enum class AssemblerDataType to specify which thread-local should be used.
* Source/JavaScriptCore/assembler/AssemblerBuffer.cpp:
(JSC::threadSpecificAssemblerHashes):
* Source/JavaScriptCore/assembler/AssemblerBuffer.h:
(JSC::AssemblerDataImpl::AssemblerDataImpl):
(JSC::AssemblerDataImpl::operator=):
(JSC::AssemblerDataImpl::takeBufferIfLarger):
(JSC::AssemblerDataImpl::~AssemblerDataImpl):
(JSC::AssemblerBuffer::AssemblerBuffer):
(JSC::AssemblerBuffer::~AssemblerBuffer):
(JSC::AssemblerBuffer::releaseAssemblerHashes):
(JSC::AssemblerData::AssemblerData): Deleted.
(JSC::AssemblerData::operator=): Deleted.
(JSC::AssemblerData::takeBufferIfLarger): Deleted.
(JSC::AssemblerData::~AssemblerData): Deleted.
(JSC::AssemblerData::clear): Deleted.
(JSC::AssemblerData::buffer const): Deleted.
(JSC::AssemblerData::capacity const): Deleted.
(JSC::AssemblerData::grow): Deleted.
(JSC::AssemblerData::isInlineBuffer const): Deleted.
* Source/JavaScriptCore/assembler/LinkBuffer.h:
Canonical link: https://commits.webkit.org/275845@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list