For those wondering, it's a specializer, applied to an interpreter, to specialize the interpreter into a jit. This is a pretty well explored technique, it's rarely done these days because historically, people could not get good enough performance. (I am not trying to knock them, just put it in context) For more context on how you'd do something like this, read this: https://en.wikipedia.org/wiki/Partial_evaluation#Fu…
PyPy and Graal show good performance. The can be considered special cases of partial evaluation, where the first Futamura project works. They are not generic enough for the second and third projections, though. They even require some help (e.g. annotations) for the first.