diff options
| author | eunhhu <[email protected]> | 2026-09-30 15:51:32 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-30 15:51:32 +0100 |
| commit | e02bfc916743a0327d76144b32b6ec6381e5907f (patch) | |
| tree | faf17d43c373e322c5b55ae8adc680d09bd49b4c /core/module-list.h | |
| parent | ee21aec10726863d8e812643e1419e4b7d0f2b51 (diff) | |
| download | pure-e02bfc916743a0327d76144b32b6ec6381e5907f.tar.gz pure-e02bfc916743a0327d76144b32b6ec6381e5907f.zip | |
Let a value's 8 bytes hold a number or an integer
Before i64 (016 stage 2): a state's value, a record field's default, a
list cell's number, the interpreter's stack slot and an instruction's
constant become unions of a double and an int64_t (PureValue, anonymous
unions in PureCell, Slot and PureOp). LOAD and STORE, and a list cell
made from the stack, copy the bits; everything else reads .num as before.
No behaviour changes: every check passes as it did.
Diffstat (limited to 'core/module-list.h')
| -rw-r--r-- | core/module-list.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/module-list.h b/core/module-list.h index d97aa77..603134a 100644 --- a/core/module-list.h +++ b/core/module-list.h @@ -19,7 +19,7 @@ * cell per field: a number, or text bytes the list owns. Every change made * during an event is logged; a failed event undoes the log in reverse and a * successful one frees what it replaced. */ -typedef struct { double num; unsigned char *text; size_t size; } PureCell; +typedef struct { union { double num; int64_t i64; }; unsigned char *text; size_t size; } PureCell; typedef struct PureList PureList; /* An event's list changes; a removed item's cells wait in cells. */ typedef struct { |
