Create your own Interpreter with a JIT in 1 hour
summary
Shows how to use Eclipse OMR with the JITBuilder and InterpreterBuilder to write one interpreter that automatically yields a JIT for a tiny stack VM called EL, with live-coding of handlers for push/add/return/jump and helper calls. Compilation triggers after about 10 executions, produced native C-callable methods, and moves a Fibonacci-like math loop from ~120 ms in the interpreter to ~5–6 ms with the JIT (~20x). Code and demos are on GitHub.
AI-written summary · about
chapters (18)
- 0:00Start
- 1:32Important Disclaimers
- 2:27What is EL?
- 3:28EL example program
- 4:02EL instruction set
- 4:24Simple C++ interpreter loop
- 5:30Eclipse OMR Mission
- 6:18Key Goals for Eclipse OMR
- 6:54Eclipse OMR Components
- 8:44The JitBuilder Library is...
- 9:22Using JitBuilder: the basics
- 10:28Simple MethodBuilder Example (Simple.cpp)
- 11:50How to compile and execute?
- 13:07What is an II Value?
- 14:00Expression tree examples
- 14:54Interpreter Builder: the basics
- 35:15Future work
- 37:31Wrap up
related talks
44mJIT Me Baby One More Time
18mHow to Build an Interpreter in 25 Minutes or Less
44mBuild Your Own VM with JIT Compilation for Dummies
20mBYOJ: Build your own JIT with Ruby
38mGraal
45mEclipse OMR: a modern, open-source toolkit for building language runtimes
45mTwo-level Just-in-Time Compilation with One Interpreter and One Engine
30mAn Incremental Approach to JIT Construction
