From 6894dc69374efcc23619e93b040a4224588054cd Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 11 Jan 2026 23:03:00 -0500 Subject: Refactor some AST logic to keep Ints/Reals as "Integer" and "Number" AST nodes and use improved parsing logic from Int/Real --- src/stdlib/bigint.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/stdlib/bigint.h') diff --git a/src/stdlib/bigint.h b/src/stdlib/bigint.h index ae95b224..2c93b5ec 100644 --- a/src/stdlib/bigint.h +++ b/src/stdlib/bigint.h @@ -47,7 +47,8 @@ bool Int$get_bit(Int_t x, Int_t bit_index); #define I_small(i) ((Int_t){.small = (int64_t)((uint64_t)(i) << 2L) | 1L}) #define I(i) _Generic(i, int8_t: I_small(i), int16_t: I_small(i), default: Int$from_int64(i)) -#define I_is_zero(i) ((i).small == 1L) +#define Int$is_zero(i) ((i).small == 1L) +#define Int$is_small(i) (((i).small & 1L) == 1L) Int_t Int$slow_plus(Int_t x, Int_t y); Int_t Int$slow_minus(Int_t x, Int_t y); -- cgit v1.2.3