Skip to main content

Module register

Module register 

Source
Expand description

Register-based bytecode and a stack→register translator.

The classic compiler emits stack bytecode. A real register VM executes three-address instructions (Add dst, lhs, rhs) with a flat register file. This module defines that IR and a translator that lowers stack bytecode to register bytecode by simulating the operand stack and assigning each stack slot a virtual register.

Structs§

RegChunk
A register-mode chunk (function body).
StackToRegister
Lower a stack instruction stream to register form.

Enums§

BinKind
CmpKind
RegOp
Three-address register instruction. Registers are u16 indices into a flat frame-local register file. Constants live in the chunk const table.
UnKind
WrapKind