YJIT: Reject USE_FLONUM=0 builds at build time

YJIT can't support these builds so it's better to reject with a message
than to crash at runtime.
This commit is contained in:
Alan Wu 2022-05-02 12:51:40 -04:00
parent b793245dac
commit 5f20f4deee
Notes: git 2022-05-03 03:04:20 +09:00
1 changed files with 4 additions and 0 deletions

4
yjit.c
View File

@ -41,6 +41,10 @@ STATIC_ASSERT(64b_size_t, SIZE_MAX == UINT64_MAX);
// into size_t but the standard seems to allow it. // into size_t but the standard seems to allow it.
STATIC_ASSERT(size_t_no_padding_bits, sizeof(size_t) == sizeof(uint64_t)); STATIC_ASSERT(size_t_no_padding_bits, sizeof(size_t) == sizeof(uint64_t));
// This build config impacts the pointer tagging scheme and we only want to
// support one scheme for simplicity.
STATIC_ASSERT(pointer_tagging_scheme, USE_FLONUM);
// NOTE: We can trust that uint8_t has no "padding bits" since the C spec // NOTE: We can trust that uint8_t has no "padding bits" since the C spec
// guarantees it. Wording about padding bits is more explicit in C11 compared // guarantees it. Wording about padding bits is more explicit in C11 compared
// to C99. See C11 7.20.1.1p2. All this is to say we have _some_ standards backing to // to C99. See C11 7.20.1.1p2. All this is to say we have _some_ standards backing to