Title: [295023] trunk/Source/WTF/wtf/CompactPtr.h
- Revision
- 295023
- Author
- [email protected]
- Date
- 2022-05-30 03:02:22 -0700 (Mon, 30 May 2022)
Log Message
Unreviewed, build fix for iOS debug build
* Source/WTF/wtf/CompactPtr.h:
(WTF::CompactPtr::encode):
(WTF::CompactPtr::decode):
(WTF::CompactPtr::decode const): Deleted.
Canonical link: https://commits.webkit.org/251118@main
Modified Paths
Diff
Modified: trunk/Source/WTF/wtf/CompactPtr.h (295022 => 295023)
--- trunk/Source/WTF/wtf/CompactPtr.h 2022-05-30 10:00:00 UTC (rev 295022)
+++ trunk/Source/WTF/wtf/CompactPtr.h 2022-05-30 10:02:22 UTC (rev 295023)
@@ -169,13 +169,13 @@
set(t1);
}
- static ALWAYS_INLINE constexpr StorageType encode(T* ptr)
+ static ALWAYS_INLINE StorageType encode(T* ptr)
{
uintptr_t intPtr = bitwise_cast<uintptr_t>(ptr);
#if HAVE(36BIT_ADDRESS)
- ASSERT_UNDER_CONSTEXPR_CONTEXT(!(intPtr & alignmentMask));
- StorageType encoded = static_cast<uint32_t>(intPtr >> bitsShift);
- ASSERT_UNDER_CONSTEXPR_CONTEXT(decode(encoded) == ptr);
+ ASSERT(!(intPtr & alignmentMask));
+ StorageType encoded = static_cast<StorageType>(intPtr >> bitsShift);
+ ASSERT(decode(encoded) == ptr);
return encoded;
#else
return intPtr;
@@ -182,12 +182,12 @@
#endif
}
- ALWAYS_INLINE constexpr T* decode(const StorageType& ptr) const
+ static ALWAYS_INLINE T* decode(StorageType ptr)
{
#if HAVE(36BIT_ADDRESS)
- return reinterpret_cast<T*>(static_cast<uintptr_t>(ptr) << bitsShift);
+ return bitwise_cast<T*>(static_cast<uintptr_t>(ptr) << bitsShift);
#else
- return reinterpret_cast<T*>(ptr);
+ return bitwise_cast<T*>(ptr);
#endif
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes