diff options
| author | eunhhu <[email protected]> | 2026-10-18 20:54:10 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-18 20:54:10 +0100 |
| commit | da0d7514b058f1baa99a8bcc8f9e23b43cac12de (patch) | |
| tree | 688106ea656946bd74f36259c2dd2316b9a429d8 /core/module-jit.c | |
| parent | 936c08e3424c606855051ee86f25a7df0f162c62 (diff) | |
| download | pure-da0d7514b058f1baa99a8bcc8f9e23b43cac12de.tar.gz pure-da0d7514b058f1baa99a8bcc8f9e23b43cac12de.zip | |
Module format v7, 027's 4d: every input a message: a module's inputs are messages, outputs and arguments (kinds 1 to 3), a message bound to what makes it (PureBinding: a key's press or its release, a text input, a timer, a frame, a pointing at a table), each binding's fields fixed (none; one text; one number, dt; one u32, the item's position, the table its view), one frame input at most; a handler's event its input's number; no DT or TEXT_INPUT (97 opcodes now 95, FIELD reads dt and the text), pure_app_input, frame, tick, text and point, pure_module_position, PureEdge or an app's ticks: every event is pure_app_message, saved after it unless deferred; pure-run sends each command's message to the input bound so (a release or a frame no input takes still an event, clearing the fault, so the workbench parity holds) and defers a stored app's saves past frames as before; pure-serve posts a press with its key's release, refuses timers, frames and pointings (no_input) and ticks timers as messages; holes closed: the tier found a handler's input by the old numbering, reading a message's number field as another input's (aup's numbers caught it), and serve's replies_borrow did too; module-probe presses as messages; unit tests: the test modules' builder (expand) writes the old shapes as bound messages, pointing over a pointing input and its table, stored frames deferred as a host defers them, a press's handler refused a FIELD; counts: b35 against b34 with batches BFS +0.03%, the rest within 0.001%, without batches BFS +0.12%, join +0.01%; the bank's queries (s34 on the 4c aup's module, s35 on 4d's, six each in turns) field -0.23%, found -0.14%, large -0.12%, in_credit +0.11%, the rest within 0.06%; 008 and 027
Diffstat (limited to 'core/module-jit.c')
| -rw-r--r-- | core/module-jit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/module-jit.c b/core/module-jit.c index 3a3a354..5ba9f03 100644 --- a/core/module-jit.c +++ b/core/module-jit.c @@ -2386,7 +2386,7 @@ static uint32_t changes(const PureModule *m, const PureOp *op) { switch (op->op) { case PURE_OP_LIST_APPEND: case PURE_OP_LIST_INSERT: case PURE_OP_LIST_REMOVE: return UINT32_C(1) << (op->arg & 31); case PURE_OP_ITEM_SET: return UINT32_C(1) << (list_of(op->arg) & 31); - case PURE_OP_CONST: case PURE_OP_LOAD: case PURE_OP_DT: case PURE_OP_ADD: case PURE_OP_SUB: case PURE_OP_MUL: + case PURE_OP_CONST: case PURE_OP_LOAD: case PURE_OP_ADD: case PURE_OP_SUB: case PURE_OP_MUL: case PURE_OP_DIV: case PURE_OP_NEG: case PURE_OP_LT: case PURE_OP_LE: case PURE_OP_GT: case PURE_OP_GE: case PURE_OP_EQ: case PURE_OP_NE: case PURE_OP_AND: case PURE_OP_OR: case PURE_OP_NOT: case PURE_OP_MIN: case PURE_OP_MAX: case PURE_OP_CLAMP: case PURE_OP_STORE: case PURE_OP_JZ: case PURE_OP_JMP: case PURE_OP_FIELD: case PURE_OP_LIST_COUNT: case PURE_OP_ITEM_GET: @@ -5556,10 +5556,8 @@ static void tier_free(Tier *t) { /* The handler's message input the block is, or -1. */ static int tier_input(const PureModule *m, PureBlock block) { for (uint32_t i = 0; i < m->handlers; ++i) - if (m->handler[i].code.start == block.start && m->handler[i].code.length == block.length && m->handler[i].event) { - int input = (int)((m->handler[i].event - 1) / 2); - return m->input[input].kind == PURE_KIND_MESSAGE ? input : -1; - } + if (m->handler[i].code.start == block.start && m->handler[i].code.length == block.length) + return (int)m->handler[i].event; /* a message input's (027's 4d) */ return -1; } |
