3 ms·
> the actual JIT is only a couple of thousands of lines of C Even for Ruby, a basic JIT can be implemented in a few hundred lines of C using a "threaded code"
by jashmatthews 5y ago
> the actual JIT is only a couple of thousands of lines of C
Even for Ruby, a basic JIT can be implemented in a few hundred lines of C using a "threaded code" approach.
Real JIT compilers got started this way. Safari JavaScriptCore's JIT used a "context threaded code" approach and was just 4k LOC
https://webkit.org/blog/214/introducing-squirrelfish-extreme/ https://webkit.org/blog/214/introducing-squirrelfish-extreme...