Fantastic read.
I wish I had something like this to read a few years ago. Having always worked with x86_64, I didn't know about constant pools or veneers, but in fact they are clever tricks.
To be honest I'm not sure if like #JIT compliation.
On one hand, it makes clear that code is data and data is code, that is a good thing.
But on the other it means that at runtime you cannot mark all writable memory as No Execute, that is a valuable security feature (I do this by default in #Jehanne and there is no mmap there).
Obviously a JIT compiler could compile the program, save it into a ELF executable file and fork/exec/wait for it, but all the speedup would probably go with the context switches.
As an alternative (fantasticating of a homoiconic language to build an homogeneous OS) could be to turn the kernel itself into a JIT compiler.
This way, the both the readonly and executable permission of a script would just be preserved in the compiled memory, while allowing the kernel to write it.
Well just thinking aloud... you know...
Anyway, great read Ekaitz, thanks for sharing! You are becoming incredibly good at writing divulgative texts about #Informatics!
Compliments!