3 ms·
The solution is clear: Fork TCC to use DynASM, and layout code in a way that's amenable to tracing. Extend LuaJIT to trace the TCC output, teach it to do this
by samatman 4y ago
The solution is clear:
Fork TCC to use DynASM, and layout code in a way that's amenable to tracing.
Extend LuaJIT to trace the TCC output, teach it to do this across the FFI, implement the hyperblock scheduler and quad-color GC.
Make a FreeBSD distribution which uses a one-sector Forth to bootstrap the TCCJIT, which compiles the source code directly into memory, and uses the GC for process allocation and cleanup. The JIT makes the happy path fast, until or unless it changes.
Binaries on disk being no longer a useful starting point, they can just be frozen process images. If they break, start again from source code, otherwise, incrementally compile changes into the image while it's in memory. Quitting is just writing it to SSD cache.