glados-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Compiler.Bytecode.Serializer

Synopsis

Documentation

serializeInstruction :: Instruction -> Builder Source #

Serializes an Instruction to a Builder for binary encoding.

@args - instr: the Instruction to serialize

@details Converts the instruction into its binary representation using the appropriate opcode and payload encoding defined in ASM_SPEC.md.

@return The encoded instruction as a Builder.