Lunacy - Lua 5.1 interpreter with Lazy Basic Block Versioning and JIT
15 points by asb
15 points by asb
Lunacy doesn’t do any pointer tagging, NaN boxing, or (the goal) NuN boxing currently
Can someone explain what NuN boxing is? I don't think it's a woman of God in a punch-up...
It’s a pun on NaN-unboxing. See float self-tagging (previously). Also, value representations in javascript implementations.
Very cool!! One thing I wanted to explore with YJIT but don't have time is if it's possible to re-compile (& optimize) JITed block traces. Like a second tier for LBBV
(I'm the author) I've been wondering if anyone else has done that! The fact that I only do the JIT compilation after a threshold means that I think it would be pretty easy to "seal" blocks when I JIT them, which would let me optimize the entire function or traces while depending on cross-block behavior. I think this would potentially be a good way for me to optimize away the redundant loads that I mentioned, instead of needing to do it incrementally in LBBV, and would avoid needing to patch JIT code for re-compiling. Worse case you duplicate sealed blocks if a new codepath does end up trying to branch to one again.