35 ms·
Simple VM JIT with LLVM
- spooneybarger 16y agothe comments are where this starts to get really interesting.
- pieter 16y ago(This is from 2008)
- rue 16y agoYep, indeed. Though still worth a read for the comments alone. Nowadays Rubinius' JIT VM is implemented with LLVM and, obviously, is much more sophisticated.
- deleted 16y ago[deleted]
- losethos 16y agoYou're a pussy. Just do a compiler. You can transition from interpretor to compiler really easily by having templates for each operation that get concatinated and patched for specific values. See http://www.losethos.com http://www.losethos.com . There's a mini compiler there for teaching purposes that is 200 lines and makes x86_64 assembly to evaluate an expression, a true compiler. The file in LoseThos is ::/LT/Demo/MiniCompiler.CPZ My compiler's optimization stages resemble an interpretor with a big switch statement. It simplifies constant expressions with what is, essentually, an interpretor but it produces machine code, in the end.