Image missing.
JIT-ing a stack machine (with SLJIT)

created: Sept. 16, 2025, 2:09 a.m. | updated: Sept. 19, 2025, 3:48 p.m.

jit = jit , . const_value ); // Queue the target for JIT compilation buxn_jit_entry_t * entry = buxn_jit_alloc_entry ( ctx -> jit ); entry -> link_type = BUXN_JIT_LINK_TO_BODY ; entry -> block = buxn_jit_queue_block ( ctx -> jit , target . const_value ); entry -> compiler = ctx -> compiler ; entry -> jump = jump ; buxn_jit_enqueue ( & ctx -> jit -> link_queue , entry ); } else { // Check assumed constant value before calling struct sljit_jump * skip_call = sljit_emit_cmp ( ctx -> compiler , SLJIT_NOT_EQUAL , target . const_value ); entry -> compiler = ctx -> compiler ; entry -> jump = call ; buxn_jit_enqueue ( & ctx -> jit -> link_queue , entry ); } } // Return to trampoline. With the memory stack having 01 02 , the stack cache is now correct since together, they form: 01 02 03 .

1 month ago: Hacker News