Programming Languages · Cluster

Language Implementation Tour

How representative languages execute their semantics.

  1. 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. foundational · Feb 26, 2023
  2. 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. foundational · Jan 27, 2024
  3. 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. foundational · Jan 30, 2023
  4. 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. intermediate · Nov 14, 2025
  5. 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. intermediate · Jul 4, 2022
  6. 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. intermediate · May 12, 2026
  7. 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. intermediate · Dec 24, 2025
  8. 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. advanced · Apr 24, 2026
  9. 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. advanced · Nov 8, 2024
  10. 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. advanced · Jul 8, 2026