From 56ec36a9dc4a507d03778352af92139a8aec8c0c Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Wed, 27 Dec 2023 20:59:53 +1300 Subject: [PATCH] LibJS: Export MAX_ARRAY_LIKE_INDEX & NEGATIVE_ZERO_BITS in JS namespace --- Userland/Libraries/LibJS/Runtime/Value.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Value.h b/Userland/Libraries/LibJS/Runtime/Value.h index 2e3e0eca74..d63f53357a 100644 --- a/Userland/Libraries/LibJS/Runtime/Value.h +++ b/Userland/Libraries/LibJS/Runtime/Value.h @@ -21,13 +21,13 @@ #include #include +namespace JS { + // 2 ** 53 - 1 static constexpr double MAX_ARRAY_LIKE_INDEX = 9007199254740991.0; // Unique bit representation of negative zero (only sign bit set) static constexpr u64 NEGATIVE_ZERO_BITS = ((u64)1 << 63); -namespace JS { - static_assert(sizeof(double) == 8); static_assert(sizeof(void*) == sizeof(double) || sizeof(void*) == sizeof(u32)); // To make our Value representation compact we can use the fact that IEEE