Loading the code workspace…
Demonstrate template JIT compilation for your VM in C.
Requirements:
Test:
The mmap(PROT_EXEC) trick you're using here is the same primitive LuaJIT's trace compiler and V8's TurboFan rely on to run generated machine code, and it's exactly what W^X policies on iOS and hardened Linux restrict — which is why real JITs like JavaScriptCore's need special entitlements. Template JIT is the simplest point on the spectrum that ends with PyPy's full meta-tracing JIT.