Language Runtimes · Cluster
Virtual Machines
Bytecode dispatch, stack frames, and interpreters.
- 01 Stack Machines and Register Machines as Bytecode Targets Why bytecode formats choose implicit stack operands or named registers, and what that choice costs in encoding width, instruction count, and verifier complexity.
- 02 Computed Goto and Direct Threading in Bytecode Interpreters How the dispatch loop dominates interpreter cost, and why a table of label addresses beats a switch statement on the same instruction stream.
- 03 How an Interpreter Lays Out a Stack Frame The header, locals, operand stack, and spill area of an interpreter frame, and why the frame is allocated as one block with a fixed maximum size.
- 04 Constant Pools and Operand Encoding in Bytecode Why bytecode instructions reference large constants indirectly through a pool, how the pool is laid out, and what the fixed-width index fields cost.
- 05 Calling Conventions on an Operand Stack How arguments, return values, receivers, and frame transitions are encoded in a stack machine, and why the receiver occupies slot zero of a method frame.
- 06 Exception Tables and Frame Unwinding in Bytecode How a thrown exception finds its handler using a table of protected ranges, and why the table is separate from the code rather than encoded as instructions.
- 07 Bytecode Verification and Stack Map Frames How a verifier proves that operand stack depths and types are consistent at every branch target, and why stack map frames replaced full dataflow analysis.
- 08 Superinstruction Selection and In-Place Opcode Quickening How interpreters fuse frequent opcode pairs and rewrite instructions after first execution, and why every such rewrite needs an invalidation path.
- 09 Resumable Frames for Generators and Coroutines Why a generator cannot keep its state on the machine stack, how its frame is moved to the heap, and what suspension costs in copying and in bookkeeping.
- 10 Line Tables, Breakpoints, and Single Stepping in an Interpreter How a debugger maps a bytecode offset back to a source line, how breakpoints are placed without corrupting the code, and what stepping costs per instruction.