Current interpreter (~11k lines of non-test code in internal/engine/interpreter/):
- Compiles Wasm bytecode into a flat array of
unionOperationinstructions (a custom IR) - Executes via a giant switch statement in
callNativeFunc()over 82+ operation kinds - Uses a
uint64value stack and a call frame stack - Control flow is resolved to absolute PC addresses at compile time
- Two-pass compilation: first translates opcodes, then resolves label addresses