summaryrefslogtreecommitdiff
path: root/yjit.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2022-05-02 12:51:40 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2022-05-02 14:03:56 -0400
commit5f20f4deeea29641096f9863e8cdce13cca478da (patch)
treec007517ae1d6b3b48e593f6f7eab21f5a781a0e9 /yjit.c
parentb793245dacca942ca6842692aa9bbc06cde217fd (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5873
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/yjit.c b/yjit.c
index 7ec3b0566c..3b4a9907be 100644
--- a/yjit.c
+++ b/yjit.c
@@ -41,6 +41,10 @@ STATIC_ASSERT(64b_size_t, SIZE_MAX == UINT64_MAX);
// into size_t but the standard seems to allow it.
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
// 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