From d5f0cac74721863a91b0a799256b62c0b7b2a3c1 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 18 Oct 2026 17:45:16 +0100 Subject: Module executor: a kept list's lists through steps of their own (027's stage 3): the load gives ITEM_GET and ITEM_SET of a kept list's list field, and LIST_APPEND, LIST_INSERT and APPEND_IN of a kept list whose record holds lists, numbers past the module's (OP_KEPT_*, after verifying and planning: no module holds them, the JIT leaves their blocks to the executor), so the instructions' own steps are as before stage 3; the list module holds a list field's value as bytes (PURE_CELL_LIST only in images' headers and layouts) and text_field is a text's alone again: the stage 3 commit had cost BFS 1.4% of its instructions with batches and 1.7% without (its millions of appends asking each field twice), the five works now within 0.04% of before it --- core/module-list.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'core/module-list.h') diff --git a/core/module-list.h b/core/module-list.h index d1f27b2..928b12a 100644 --- a/core/module-list.h +++ b/core/module-list.h @@ -51,12 +51,13 @@ typedef struct { enum { PURE_LIST_ITEMS = 1 << 24, PURE_LIST_RUN = 32 }; /* A field's kind: a number, a text (UTF-8, checked when read), bytes (any: a - * runtime list's), a bool (a number 0 or 1, kept as a number is), an - * integer (an int64_t, ordered as one) or a list (027's stage 3: a list - * value in a list kept past an event, in its items' stored form, held as - * bytes are). A stored list's header names its fields by these kinds. */ + * runtime list's), a bool (a number 0 or 1, kept as a number is) or an + * integer (an int64_t, ordered as one). A stored list's header names its + * fields by these kinds, and by PURE_CELL_LIST a list field of a list kept + * past an event (027's stage 3), which the list itself holds as bytes: its + * value in its items' stored form. */ enum { PURE_CELL_NUMBER = 0, PURE_CELL_TEXT = 1, PURE_CELL_BYTES = 2, PURE_CELL_BOOL = 3, PURE_CELL_INTEGER = 4, PURE_CELL_LIST = 5 }; -static inline bool pure_cell_text(uint8_t kind) { return kind == PURE_CELL_TEXT || kind == PURE_CELL_BYTES || kind == PURE_CELL_LIST; } +static inline bool pure_cell_text(uint8_t kind) { return kind == PURE_CELL_TEXT || kind == PURE_CELL_BYTES; } /* Whether a number, bool or integer cell holds what its kind may: a finite * number, a bool 0 or 1 (either zero), any integer. */ bool pure_cell_fits(uint8_t kind, PureCell cell); -- cgit v1.2.3