From e02bfc916743a0327d76144b32b6ec6381e5907f Mon Sep 17 00:00:00 2001 From: eunhhu Date: Wed, 30 Sep 2026 15:51:32 +0100 Subject: 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. --- core/module-save.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/module-save.h') diff --git a/core/module-save.h b/core/module-save.h index 9c0f74e..991c498 100644 --- a/core/module-save.h +++ b/core/module-save.h @@ -43,7 +43,7 @@ PureList *pure_runtime_list_new(uint32_t place); /* Open the stored numbers, cursors and indices, and put each stored one of the * same name and kind that still fits into values, for the states of m that * kept marks as new (-1); texts and lists are m's. */ -PureResult pure_save_open_values(PureApp *, const PureModule *m, double *values, const int *kept, +PureResult pure_save_open_values(PureApp *, const PureModule *m, PureValue *values, const int *kept, PureDraft *const *texts, PureList *const *lists); /* The stored links of a starting app (module.h, PureApp), after its runtime * lists. The sends left in the outbox of an output whose fields changed are @@ -56,7 +56,7 @@ PureResult pure_save_open_values(PureApp *, const PureModule *m, double *values, PureResult pure_save_open_links(PureApp *, const PureModule *m, bool *heard_moved, bool *sent_moved); /* Publish the documents and every state changed since the last save * (values are the states' numbers); revisions are the documents'. */ -PureResult pure_save_commit(PureApp *, const double *values, void *const *documents, size_t document_count, +PureResult pure_save_commit(PureApp *, const PureValue *values, void *const *documents, size_t document_count, int64_t *revisions); /* A message's fields laid out as load lays them: in order, the fixed ones -- cgit v1.2.3