Skip to content

Commit

Permalink
LibJS: Export MAX_ARRAY_LIKE_INDEX & NEGATIVE_ZERO_BITS in JS namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
shannonbooth authored and awesomekling committed Jan 2, 2024
1 parent f86ec46 commit 56ec36a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Userland/Libraries/LibJS/Runtime/Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
#include <LibJS/Heap/GCPtr.h>
#include <math.h>

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
Expand Down

0 comments on commit 56ec36a

Please sign in to comment.