From 2dc0a4df9485c0a4c08859ad81f41d6efab98dd5 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 5 Oct 2026 07:43:22 +0100 Subject: Write the hot instructions as code: constants, states, locals, rows, arithmetic, has by bits, a DENSE field by key, a FLAT item, and loop iterations (021) - module-jit.c writes CONST, LOAD, STORE, the local and row loads, INDEX_FIRST, LIST_COUNT, INDEX_MOVE, NOT, NEG, FLOOR, the number arithmetic and comparisons (DIVIDE and NON_FINITE faults where the executor gives them), LIST_HAS by a key set's bits, a joined FIND's field of a DENSE list, a FLAT list's ITEM_GET, and a walk's and a count's iteration (work charged as the executor charges it). Anything else, or a list in another form, still calls step. - module-list.c says where a list keeps what the code reads (pure_list_layout); list_of and item_field are shared. - PURE_JIT_DUMP=file writes the code made, to read with objdump. - A search (core only): 103 ms compiled, 122 ms executed; the answers (hops, reached, work) are the executor's. --- core/module.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'core/module.c') diff --git a/core/module.c b/core/module.c index 2b484a6..ff6f131 100644 --- a/core/module.c +++ b/core/module.c @@ -335,8 +335,6 @@ static bool state_of(const PureModule *m, uint32_t state, uint8_t type) { } /* The list an item operation names: its low 16 bits (the field is above). */ -static uint32_t list_of(uint32_t arg) { return arg & 0xFFFF; } -static uint32_t item_field(uint32_t arg) { return arg >> 16; } static unsigned char field_type(const PureModule *m, uint32_t list, uint32_t field) { static const unsigned char types[] = {[PURE_RECORD_NUMBER] = T_NUM, [PURE_RECORD_TEXT] = T_TEXT, -- cgit v1.2.3