Documentation
¶
Overview ¶
Package dis supports analysis of Risor bytecode by disassembling it. This works with the opcodes defined in the `op` package and uses the InstructionIter type from the `compiler` package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Print ¶
func Print(instructions []Instruction, writer io.Writer)
Print a string representation of the given instructions to the given writer.
Types ¶
type Instruction ¶
type Instruction struct { Offset int Name string Opcode op.Code Operands []op.Code Annotation string Constant interface{} }
Instruction represents a single bytecode instruction and its operands.
func Disassemble ¶
func Disassemble(code *compiler.Code) ([]Instruction, error)
Disassemble returns a parsed representation of the given bytecode.
Click to show internal directories.
Click to hide internal directories.