From 75b9c1c1e936e2b7c55275139897e1c78d7939c1 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 5 Oct 2026 07:32:17 +0100 Subject: Run a block through a frame and step, and compile blocks to AArch64 that call the same steps (021) - run() keeps a block's operand stack and open loops in a Frame; step() runs one instruction (branches and loops too, one dispatch), and enter_each, enter_loop, leave_loop and iterate are their own functions. The executor is the same machine code, 7% fewer instructions. - The verifier records each instruction's stack height (from its block's start), so compiled code knows each slot's place. - module-jit.c (AArch64 Linux; elsewhere, or PURE_JIT=0, none): a module's handlers', views' and folds' blocks compiled when it loads. Branches and loops are branches; every other instruction calls the executor's own step, so both run the same meaning. A loop that is not opened lands where its iteration would have ended; an empty loop iterates in place. - test-module recompiles a module whose code a test changes after load. - A search (100,000 nodes, 1,000,000 edges, core only) is 150 ms compiled, against 122 ms executed: a call of step for every instruction costs more than the executor's switch; the hot instructions are written as code next. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d976881..368b311 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ BUILD ?= build # store/test-log.c, link/test-link.c, serve/test-message-json.c); # tests/check.py checks the hosts end to end. INCLUDES = -Icore -MODEL = core/module.c core/module-list.c core/module-save.c core/module-text.c core/module-store.c core/flow.c +MODEL = core/module.c core/module-jit.c core/module-list.c core/module-save.c core/module-text.c core/module-store.c core/flow.c STORE = store/store-tree.c store/store-log.c LINK = link/link-protocol.c link/link.c link/sending.c link/crypto.c SERVE = serve/serve.c serve/deliver.c serve/message-json.c serve/sha256.c -- cgit v1.2.3