haikuwebkit/Source/WTF/wtf/threads
Mark Lam 2a47bc26be Define MacroAssemblerARM64E::numberOfPACBits based on OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH).
https://bugs.webkit.org/show_bug.cgi?id=227147
rdar://78785309

Reviewed by Saam Barati.

Source/bmalloc:

For OS(DARWIN), define BOS_EFFECTIVE_ADDRESS_WIDTH in terms of MACH_VM_MAX_ADDRESS,
which is provided by the SDK.  This ensures that it is correct for each target
OS(DARWIN) platform.

* bmalloc/Algorithm.h:
(bmalloc::clzConstexpr):
(bmalloc::getMSBSetConstexpr):
* bmalloc/BPlatform.h:
* bmalloc/Gigacage.h:
* bmalloc/ObjectTypeTable.h:
* bmalloc/Packed.h:

Source/JavaScriptCore:

* assembler/MacroAssemblerARM64E.h:
* bytecode/CodeOrigin.h:
* runtime/JSString.h:
* runtime/OptionsList.h:

Source/WTF:

For OS(DARWIN), define OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH) in terms of
MACH_VM_MAX_ADDRESS, which is provided by the SDK.  This ensures that it is
correct for each target OS(DARWIN) platform.

Also update an assertion in WTFAssertions.cpp to verify that address bits are
less than 48.  The purpose of this assertion is to ensure that our 64-bit NaN
boxing encoding for JSValues will work.  Hence, we should use the encoding limit
for pointers of 48 bits.  It no longer makes sense to assert based on
OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH), because OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH)
is defined in terms of MACH_VM_MAX_ADDRESS.

* wtf/CagedPtr.h:
* wtf/CompactPointerTuple.h:
* wtf/PlatformOS.h:
* wtf/WTFAssertions.cpp:
* wtf/threads/Signals.cpp:

Tools:

* TestWebKitAPI/Tests/WTF/Packed.cpp:



Canonical link: https://commits.webkit.org/238948@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-18 01:44:42 +00:00
..
BinarySemaphore.cpp Adopt CheckedLock in more places 2021-05-22 21:40:04 +00:00
BinarySemaphore.h Drop CheckedLock / CheckedCondition aliases 2021-05-24 18:29:01 +00:00
Signals.cpp Define MacroAssemblerARM64E::numberOfPACBits based on OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH). 2021-06-18 01:44:42 +00:00
Signals.h Remove <wtf/Optional.h> 2021-06-02 06:45:51 +00:00