Programming Languages · Cluster
Language Implementation Tour
How representative languages execute their semantics.
- 01 Tree-Walking Interpretation and the Cost of Re-Deciding at Every Node Why an interpreter that evaluates syntax nodes spends most of its time on type dispatch and environment lookup, and which of those costs a bytecode compiler removes.
- 02 Stack Bytecode: Fixed Stack Effects and the Dispatch Loop How a stack machine encodes operands implicitly in the stack pointer, why verifiers care about static stack depth, and what the dispatch loop costs per instruction.
- 03 Register Bytecode and Windowed Register Allocation in Lua How a register-based VM names operands inside a per-call window, why that cuts instruction count, and what the compiler must compute to keep the window small.
- 04 Value Representation: Tagged Pointers and NaN Boxing How a dynamically typed runtime distinguishes integers, heap objects, and doubles inside one machine word, and what each encoding costs in branches, memory, and portability.
- 05 Closure Conversion: Flat Closures, Displays, and Boxed Upvalues How a nested function that references an outer variable becomes a heap object with a specific layout, and what each representation of the captured environment costs per call.
- 06 Hidden Classes and Inline Caches in Dynamic Object Models How a runtime gives dictionary-shaped objects a fixed layout, why each property access site remembers its last hit, and when the cache is invalidated.
- 07 Safepoints and Stack Maps: Letting a Collector Find Roots Why compiled code must describe its live pointers at specific instruction offsets, how the runtime gets control there, and what polling costs in the hot path.
- 08 Tiered Compilation and Deoptimization: Undoing a Speculation How a runtime decides when to compile, what a speculation record contains, and how execution resumes in the interpreter when a guard fails.
- 09 Exception Unwinding: Table-Driven Cleanup and the Cost of Try How a raise becomes a search through per-function tables, why some runtimes walk the stack twice, and what the zero-cost claim about exceptions really means.
- 10 Growable Stacks and Reduction Budgets in Coroutine Runtimes How a runtime gives each coroutine its own stack segment, why segmented and copied stacks differ, and how a preemption counter bounds the work a coroutine can do.