This commit is contained in:
2026-01-29 20:33:38 -06:00
parent bcd6e641a5
commit 561ab9d917
4 changed files with 100 additions and 11 deletions

View File

@@ -34,17 +34,12 @@ extern "C" {
#endif
#if defined(__GNUC__) || defined(__clang__)
#define js_likely(x) __builtin_expect(!!(x), 1)
#define js_unlikely(x) __builtin_expect(!!(x), 0)
#define js_force_inline inline __attribute__((always_inline))
#define __js_printf_like(f, a) __attribute__((format(printf, f, a)))
#else
#define js_likely(x) (x)
#define js_unlikely(x) (x)
#define js_force_inline inline
#define __js_printf_like(a, b)
#endif
// #define BINARY16 // 16 bit word type (half)
// #define BINARY32 // 32 bit word type (float)
// #define BINARY64 // 64 bit word type (double)
// #define DEC64 // 64 bit word type (dec)
@@ -54,6 +49,8 @@ extern "C" {
Half: 10 bits
Float: 23 bits
Double: 52 bits
Dec16: 11 bits
Dec32: 26 bits
Dec64: 56 bits
On double builds, 48 bits
@@ -105,10 +102,9 @@ static inline KeyId key_rec(uint32_t payload) { return (K_REC << KEY_KIND_SHIFT)
/*
Mist tags:
0: false
1: true
2: null
4: object
0: object
1: special (null, true, false)
2: number
*/
enum {