Inlined Code Generation for Smalltalk
summary
A new Smalltalk compiler named Zag Smalltalk implements semantic inlining at an intermediate level, compiling methods on-demand for a target receiver class so sends become direct code instead of dynamic lookups. It ships two execution modes—a threaded indirect-jump debugger and a native-code path—that remain semantically identical. Inlining runs breadth-first, uses polymorphic inline caches, and converts tail calls into branches (tail-call-to-branch) to turn message-based loops into fast loops. No end-to-end benchmarks are reported yet; vtables are invalidated and recompiled on method updates.
AI-written summary · about
chapters (8)
- 0:00Inlined code generation intro
- 1:01Why inlining matters in Smalltalk
- 3:52Dispatch mechanisms Smalltalk vs Java
- 5:40Native code jets in Zag Smalltalk
- 7:49On-demand compilation strategies
- 9:56Tail call optimization for loops
- 10:58Conclusions and future work
- 11:43Q&A
related talks
40mJoy of Meta-Tracing Just-in-Time Compilation: More Than Just a VM Generator
24mFunction Inlining
34mWhat happens to your code when you don't look?
16mTranspiling Slang Methods to C Functions: An Example of Static Polymorphism for S...
26mHot Call-Chain Inlining for the Glasgow Haskell Compiler
35mInlining: bright victories and hidden defeats
47mHow an Optimizing Compiler Works
54mWhat Lies Beneath
