From e8b3499289022c8729900a58ed218d961a85fec8 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 18 Oct 2026 18:52:48 +0100 Subject: Module format and executor: 027's 4b-1, a record field holding bytes (type 5): held as a text is but for UTF-8, its default a constant; a function's bytes in a signature this type too (PURE_SIGNATURE_BYTES gone); no list keyed by bytes; replaced, a text field becomes a bytes field keeping its value (pure_cell_as, kinds_carry); images' headers take its kind; the JSON edge reads it from a string; pure-run shows it as hex; an append asks a record's fields held as bytes from a mask the load makes (record_held) instead of each field's type twice, so b32 runs fewer instructions than b30 (BFS without batches -1.05%, join -0.25%, BFS with batches -0.36%, the rest within 0.04%; the bank's queries s30 against s32 -0.01% to +0.30%); unit test bytes_fields (bytes not UTF-8, a text field replaced by a bytes field, three refused); server_trees with a bytes field; 008 and 027 --- core/module-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/module-list.c') diff --git a/core/module-list.c b/core/module-list.c index 57e44c4..2f2c359 100644 --- a/core/module-list.c +++ b/core/module-list.c @@ -2072,7 +2072,7 @@ bool pure_cell_fits(uint8_t kind, PureCell cell) { } bool pure_cell_as(uint8_t from, uint8_t to, PureCell *cell) { - if (from == to) return true; + if (from == to || (from == PURE_CELL_TEXT && to == PURE_CELL_BYTES)) return true; /* a text is bytes */ if (pure_cell_text(from) || pure_cell_text(to)) return false; if (to == PURE_CELL_INTEGER) { /* a whole number in range: -2^63 is, 2^63 is not */ double v = cell->num; -- cgit v1.2.3