Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ErrLabelNotAnchored is raised when a label hasn't been placed in an // isa.Instructions stream ErrLabelNotAnchored = "label not anchored: %d" // ErrLabelMultipleAnchors is raised when a label has been placed more than // once in an isa.Instructions stream ErrLabelMultipleAnchors = "label anchored multiple times: %d" )
View Source
const ( // ErrBadStackTermination is raised when the analyzer verifies a branch // that ends in a non-empty state ErrBadStackTermination = "invalid stack end-state: %d" // ErrBadBranchTermination is raised when the analyzer verifies parallel // branches that end with a different stack size ErrBadBranchTermination = "branches should end in the same state" )
Variables ¶
This section is empty.
Functions ¶
func CalculateStackSize ¶
CalculateStackSize returns the maximum and final depths for the stack based on the instructions provided. If the final depth is non-zero, this is usually an indication that bad instructions were encoded
func Verify ¶
func Verify(code isa.Instructions)
Verify checks an ISA Instruction stream for validity. Specifically, it will check that jumps do not target offsets outside the instructions provided and that the stack is left in a consistent state upon exit
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.