aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-30 15:51:32 +0100
committereunhhu <[email protected]>2026-09-30 15:51:32 +0100
commite02bfc916743a0327d76144b32b6ec6381e5907f (patch)
treefaf17d43c373e322c5b55ae8adc680d09bd49b4c /tests
parentee21aec10726863d8e812643e1419e4b7d0f2b51 (diff)
downloadpure-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 'tests')
-rw-r--r--tests/module-probe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/module-probe.c b/tests/module-probe.c
index 72d06b2..de1fbf8 100644
--- a/tests/module-probe.c
+++ b/tests/module-probe.c
@@ -103,7 +103,7 @@ int main(int argc, char **argv) {
printf("{\"inputs\":%d,\"ranged\":%u,\"states\":{", argc - 2, ranged);
for (uint32_t s = 0, shown = 0; s < modules[0].states; ++s)
if (modules[0].state_type[s] == PURE_STATE_NUM || modules[0].state_type[s] == PURE_STATE_INDEX)
- printf("%s\"%s\":%.17g", shown++ ? "," : "", modules[0].state_names[s], apps[0].values[s]);
+ printf("%s\"%s\":%.17g", shown++ ? "," : "", modules[0].state_names[s], apps[0].values[s].num);
printf("}}\n");
for (int k = 0; k < 2; ++k) {
pure_app_stop(&apps[k]);