And unlike most compilers, Sparkplug does not generate any intermediate representation. Instead, it compiles directly to machine code via a single linear pass over the bytecode, emitting code that matches the execution of that bytecode. The entire compiler is a
switch statement inside a
for loop that dispatches machine code generation functions.