How to write a simple JIT compiler
github.com
github.com
[0] https://eli.thegreenplace.net/2013/11/05/how-to-jit-an-intro...
[1] https://eli.thegreenplace.net/2017/adventures-in-jit-compila...
Mine uses the DynASM framework developed for LuaJIT, so that the assembly instructions can be written symbolically: https://luajit.org/dynasm.html
A couple of years ago I did the JIT 'kickstarting' machinery for fun in the Nim language: https://github.com/eterps/loader/blob/master/syscall.nim
https://en.wikipedia.org/wiki/Multi-stage_programming
The classic example is MetaOCaml:
Not necessarily. You might want to JIT a domain-specific abstraction, like a regular expression engine.
As an example, here's a JIT compiler I made for BrainFuck that defers the compilation of some loops: https://github.com/danthedaniel/BF-JIT/blob/master/src/runna...
I wish there was terminology to differentiate between kind of "on demand AOT compilation" and jits that do jitty stuff that can't be done ahead of time.
If the code isn't compiled until it's executed, "ahead of time" seems extremely confusing
Some people differentiate between dynamic JIT compilation and static JIT compilation.
I assume you mean something like Common Lisp does with COMPILE? (http://clhs.lisp.se/Body/f_cmp.htm) That's just called "compilation" in some circles.
A Basic Just-In-Time Compiler https://nullprogram.com/blog/2015/03/19/
A JIT Compiler Skirmish with SELinux https://nullprogram.com/blog/2018/11/15/
E.g. here's a recent video: https://www.youtube.com/watch?v=fZj3uljJl_k
Actually... http://www.softwarepreservation.org/projects/apl/Papers/DYNA...
TempleOS wasn't the first thing he worked on after becoming ill, he'd previously been working on a three-axis milling machine. https://en.wikipedia.org/wiki/Terry_A._Davis#Onset_of_illnes...