Documentation
¶
Index ¶
- func ColorizeOffset(offset int) string
- func ColorizeOpcode(opcode Opcode) string
- func DecodeStaticTypes(types [][]byte) []interpreter.StaticType
- func IsJump(instruction Instruction) bool
- func JumpTarget(instruction Instruction) uint16
- func PatchJumpBytecode(code *[]byte, opcodeOffset int, newTarget uint16)
- func PatchJumpInstruction(target []Instruction, offset int, newTarget uint16)
- func PrintBytecode(builder *strings.Builder, code []byte, resolve bool, ...) error
- func PrintBytecodeWithFlow(builder *strings.Builder, code []byte, resolve bool, ...) error
- func PrintInstructions(builder *strings.Builder, instructions []Instruction, resolve bool, ...) error
- func PrintInstructionsWithFlow(builder *strings.Builder, instructions []Instruction, resolve bool, ...) error
- type BasicBlock
- type BlockConnection
- type BlockRenderer
- type FlowAnalysis
- type Instruction
- type InstructionAdd
- func (i InstructionAdd) Encode(code *[]byte)
- func (InstructionAdd) Opcode() Opcode
- func (i InstructionAdd) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionAdd) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionAdd) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionAdd) String() string
- type InstructionBitwiseAnd
- func (i InstructionBitwiseAnd) Encode(code *[]byte)
- func (InstructionBitwiseAnd) Opcode() Opcode
- func (i InstructionBitwiseAnd) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionBitwiseAnd) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionBitwiseAnd) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionBitwiseAnd) String() string
- type InstructionBitwiseLeftShift
- func (i InstructionBitwiseLeftShift) Encode(code *[]byte)
- func (InstructionBitwiseLeftShift) Opcode() Opcode
- func (i InstructionBitwiseLeftShift) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionBitwiseLeftShift) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionBitwiseLeftShift) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionBitwiseLeftShift) String() string
- type InstructionBitwiseOr
- func (i InstructionBitwiseOr) Encode(code *[]byte)
- func (InstructionBitwiseOr) Opcode() Opcode
- func (i InstructionBitwiseOr) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionBitwiseOr) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionBitwiseOr) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionBitwiseOr) String() string
- type InstructionBitwiseRightShift
- func (i InstructionBitwiseRightShift) Encode(code *[]byte)
- func (InstructionBitwiseRightShift) Opcode() Opcode
- func (i InstructionBitwiseRightShift) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionBitwiseRightShift) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionBitwiseRightShift) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionBitwiseRightShift) String() string
- type InstructionBitwiseXor
- func (i InstructionBitwiseXor) Encode(code *[]byte)
- func (InstructionBitwiseXor) Opcode() Opcode
- func (i InstructionBitwiseXor) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionBitwiseXor) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionBitwiseXor) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionBitwiseXor) String() string
- type InstructionCloseUpvalue
- func (i InstructionCloseUpvalue) Encode(code *[]byte)
- func (InstructionCloseUpvalue) Opcode() Opcode
- func (i InstructionCloseUpvalue) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionCloseUpvalue) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionCloseUpvalue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionCloseUpvalue) String() string
- type InstructionConvert
- func (i InstructionConvert) Encode(code *[]byte)
- func (InstructionConvert) Opcode() Opcode
- func (i InstructionConvert) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionConvert) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionConvert) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionConvert) String() string
- type InstructionDeref
- func (i InstructionDeref) Encode(code *[]byte)
- func (InstructionDeref) Opcode() Opcode
- func (i InstructionDeref) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionDeref) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionDeref) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionDeref) String() string
- type InstructionDestroy
- func (i InstructionDestroy) Encode(code *[]byte)
- func (InstructionDestroy) Opcode() Opcode
- func (i InstructionDestroy) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionDestroy) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionDestroy) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionDestroy) String() string
- type InstructionDivide
- func (i InstructionDivide) Encode(code *[]byte)
- func (InstructionDivide) Opcode() Opcode
- func (i InstructionDivide) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionDivide) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionDivide) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionDivide) String() string
- type InstructionDrop
- func (i InstructionDrop) Encode(code *[]byte)
- func (InstructionDrop) Opcode() Opcode
- func (i InstructionDrop) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionDrop) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionDrop) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionDrop) String() string
- type InstructionDup
- func (i InstructionDup) Encode(code *[]byte)
- func (InstructionDup) Opcode() Opcode
- func (i InstructionDup) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionDup) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionDup) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionDup) String() string
- type InstructionEmitEvent
- func (i InstructionEmitEvent) Encode(code *[]byte)
- func (InstructionEmitEvent) Opcode() Opcode
- func (i InstructionEmitEvent) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionEmitEvent) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionEmitEvent) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionEmitEvent) String() string
- type InstructionEqual
- func (i InstructionEqual) Encode(code *[]byte)
- func (InstructionEqual) Opcode() Opcode
- func (i InstructionEqual) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionEqual) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionEqual) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionEqual) String() string
- type InstructionFailableCast
- func (i InstructionFailableCast) Encode(code *[]byte)
- func (InstructionFailableCast) Opcode() Opcode
- func (i InstructionFailableCast) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionFailableCast) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionFailableCast) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionFailableCast) String() string
- type InstructionFalse
- func (i InstructionFalse) Encode(code *[]byte)
- func (InstructionFalse) Opcode() Opcode
- func (i InstructionFalse) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionFalse) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionFalse) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionFalse) String() string
- type InstructionForceCast
- func (i InstructionForceCast) Encode(code *[]byte)
- func (InstructionForceCast) Opcode() Opcode
- func (i InstructionForceCast) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionForceCast) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionForceCast) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionForceCast) String() string
- type InstructionGetConstant
- func (i InstructionGetConstant) Encode(code *[]byte)
- func (InstructionGetConstant) Opcode() Opcode
- func (i InstructionGetConstant) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGetConstant) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGetConstant) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGetConstant) String() string
- type InstructionGetField
- func (i InstructionGetField) Encode(code *[]byte)
- func (InstructionGetField) Opcode() Opcode
- func (i InstructionGetField) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGetField) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGetField) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGetField) String() string
- type InstructionGetFieldLocal
- func (i InstructionGetFieldLocal) Encode(code *[]byte)
- func (InstructionGetFieldLocal) Opcode() Opcode
- func (i InstructionGetFieldLocal) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGetFieldLocal) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGetFieldLocal) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGetFieldLocal) String() string
- type InstructionGetGlobal
- func (i InstructionGetGlobal) Encode(code *[]byte)
- func (InstructionGetGlobal) Opcode() Opcode
- func (i InstructionGetGlobal) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGetGlobal) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGetGlobal) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGetGlobal) String() string
- type InstructionGetIndex
- func (i InstructionGetIndex) Encode(code *[]byte)
- func (InstructionGetIndex) Opcode() Opcode
- func (i InstructionGetIndex) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGetIndex) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGetIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGetIndex) String() string
- type InstructionGetLocal
- func (i InstructionGetLocal) Encode(code *[]byte)
- func (InstructionGetLocal) Opcode() Opcode
- func (i InstructionGetLocal) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGetLocal) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGetLocal) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGetLocal) String() string
- type InstructionGetMethod
- func (i InstructionGetMethod) Encode(code *[]byte)
- func (InstructionGetMethod) Opcode() Opcode
- func (i InstructionGetMethod) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGetMethod) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGetMethod) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGetMethod) String() string
- type InstructionGetTypeIndex
- func (i InstructionGetTypeIndex) Encode(code *[]byte)
- func (InstructionGetTypeIndex) Opcode() Opcode
- func (i InstructionGetTypeIndex) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGetTypeIndex) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGetTypeIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGetTypeIndex) String() string
- type InstructionGetUpvalue
- func (i InstructionGetUpvalue) Encode(code *[]byte)
- func (InstructionGetUpvalue) Opcode() Opcode
- func (i InstructionGetUpvalue) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGetUpvalue) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGetUpvalue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGetUpvalue) String() string
- type InstructionGreater
- func (i InstructionGreater) Encode(code *[]byte)
- func (InstructionGreater) Opcode() Opcode
- func (i InstructionGreater) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGreater) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGreater) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGreater) String() string
- type InstructionGreaterOrEqual
- func (i InstructionGreaterOrEqual) Encode(code *[]byte)
- func (InstructionGreaterOrEqual) Opcode() Opcode
- func (i InstructionGreaterOrEqual) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionGreaterOrEqual) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionGreaterOrEqual) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionGreaterOrEqual) String() string
- type InstructionInvoke
- func (i InstructionInvoke) Encode(code *[]byte)
- func (InstructionInvoke) Opcode() Opcode
- func (i InstructionInvoke) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionInvoke) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionInvoke) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionInvoke) String() string
- type InstructionInvokeTyped
- func (i InstructionInvokeTyped) Encode(code *[]byte)
- func (InstructionInvokeTyped) Opcode() Opcode
- func (i InstructionInvokeTyped) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionInvokeTyped) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionInvokeTyped) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionInvokeTyped) String() string
- type InstructionIterator
- func (i InstructionIterator) Encode(code *[]byte)
- func (InstructionIterator) Opcode() Opcode
- func (i InstructionIterator) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionIterator) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionIterator) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionIterator) String() string
- type InstructionIteratorEnd
- func (i InstructionIteratorEnd) Encode(code *[]byte)
- func (InstructionIteratorEnd) Opcode() Opcode
- func (i InstructionIteratorEnd) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionIteratorEnd) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionIteratorEnd) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionIteratorEnd) String() string
- type InstructionIteratorHasNext
- func (i InstructionIteratorHasNext) Encode(code *[]byte)
- func (InstructionIteratorHasNext) Opcode() Opcode
- func (i InstructionIteratorHasNext) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionIteratorHasNext) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionIteratorHasNext) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionIteratorHasNext) String() string
- type InstructionIteratorNext
- func (i InstructionIteratorNext) Encode(code *[]byte)
- func (InstructionIteratorNext) Opcode() Opcode
- func (i InstructionIteratorNext) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionIteratorNext) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionIteratorNext) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionIteratorNext) String() string
- type InstructionJump
- func (i InstructionJump) Encode(code *[]byte)
- func (InstructionJump) Opcode() Opcode
- func (i InstructionJump) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionJump) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionJump) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionJump) String() string
- type InstructionJumpIfFalse
- func (i InstructionJumpIfFalse) Encode(code *[]byte)
- func (InstructionJumpIfFalse) Opcode() Opcode
- func (i InstructionJumpIfFalse) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionJumpIfFalse) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionJumpIfFalse) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionJumpIfFalse) String() string
- type InstructionJumpIfNil
- func (i InstructionJumpIfNil) Encode(code *[]byte)
- func (InstructionJumpIfNil) Opcode() Opcode
- func (i InstructionJumpIfNil) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionJumpIfNil) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionJumpIfNil) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionJumpIfNil) String() string
- type InstructionJumpIfTrue
- func (i InstructionJumpIfTrue) Encode(code *[]byte)
- func (InstructionJumpIfTrue) Opcode() Opcode
- func (i InstructionJumpIfTrue) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionJumpIfTrue) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionJumpIfTrue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionJumpIfTrue) String() string
- type InstructionLess
- func (i InstructionLess) Encode(code *[]byte)
- func (InstructionLess) Opcode() Opcode
- func (i InstructionLess) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionLess) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionLess) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionLess) String() string
- type InstructionLessOrEqual
- func (i InstructionLessOrEqual) Encode(code *[]byte)
- func (InstructionLessOrEqual) Opcode() Opcode
- func (i InstructionLessOrEqual) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionLessOrEqual) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionLessOrEqual) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionLessOrEqual) String() string
- type InstructionLoop
- func (i InstructionLoop) Encode(code *[]byte)
- func (InstructionLoop) Opcode() Opcode
- func (i InstructionLoop) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionLoop) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionLoop) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionLoop) String() string
- type InstructionMod
- func (i InstructionMod) Encode(code *[]byte)
- func (InstructionMod) Opcode() Opcode
- func (i InstructionMod) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionMod) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionMod) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionMod) String() string
- type InstructionMultiply
- func (i InstructionMultiply) Encode(code *[]byte)
- func (InstructionMultiply) Opcode() Opcode
- func (i InstructionMultiply) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionMultiply) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionMultiply) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionMultiply) String() string
- type InstructionNegate
- func (i InstructionNegate) Encode(code *[]byte)
- func (InstructionNegate) Opcode() Opcode
- func (i InstructionNegate) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNegate) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNegate) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNegate) String() string
- type InstructionNewArray
- func (i InstructionNewArray) Encode(code *[]byte)
- func (InstructionNewArray) Opcode() Opcode
- func (i InstructionNewArray) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNewArray) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNewArray) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNewArray) String() string
- type InstructionNewClosure
- func (i InstructionNewClosure) Encode(code *[]byte)
- func (InstructionNewClosure) Opcode() Opcode
- func (i InstructionNewClosure) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNewClosure) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNewClosure) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNewClosure) String() string
- type InstructionNewComposite
- func (i InstructionNewComposite) Encode(code *[]byte)
- func (InstructionNewComposite) Opcode() Opcode
- func (i InstructionNewComposite) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNewComposite) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNewComposite) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNewComposite) String() string
- type InstructionNewCompositeAt
- func (i InstructionNewCompositeAt) Encode(code *[]byte)
- func (InstructionNewCompositeAt) Opcode() Opcode
- func (i InstructionNewCompositeAt) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNewCompositeAt) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNewCompositeAt) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNewCompositeAt) String() string
- type InstructionNewDictionary
- func (i InstructionNewDictionary) Encode(code *[]byte)
- func (InstructionNewDictionary) Opcode() Opcode
- func (i InstructionNewDictionary) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNewDictionary) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNewDictionary) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNewDictionary) String() string
- type InstructionNewPath
- func (i InstructionNewPath) Encode(code *[]byte)
- func (InstructionNewPath) Opcode() Opcode
- func (i InstructionNewPath) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNewPath) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNewPath) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNewPath) String() string
- type InstructionNewRef
- func (i InstructionNewRef) Encode(code *[]byte)
- func (InstructionNewRef) Opcode() Opcode
- func (i InstructionNewRef) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNewRef) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNewRef) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNewRef) String() string
- type InstructionNewSimpleComposite
- func (i InstructionNewSimpleComposite) Encode(code *[]byte)
- func (InstructionNewSimpleComposite) Opcode() Opcode
- func (i InstructionNewSimpleComposite) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNewSimpleComposite) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNewSimpleComposite) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNewSimpleComposite) String() string
- type InstructionNil
- func (i InstructionNil) Encode(code *[]byte)
- func (InstructionNil) Opcode() Opcode
- func (i InstructionNil) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNil) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNil) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNil) String() string
- type InstructionNot
- func (i InstructionNot) Encode(code *[]byte)
- func (InstructionNot) Opcode() Opcode
- func (i InstructionNot) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNot) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNot) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNot) String() string
- type InstructionNotEqual
- func (i InstructionNotEqual) Encode(code *[]byte)
- func (InstructionNotEqual) Opcode() Opcode
- func (i InstructionNotEqual) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionNotEqual) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionNotEqual) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionNotEqual) String() string
- type InstructionRemoveField
- func (i InstructionRemoveField) Encode(code *[]byte)
- func (InstructionRemoveField) Opcode() Opcode
- func (i InstructionRemoveField) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionRemoveField) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionRemoveField) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionRemoveField) String() string
- type InstructionRemoveIndex
- func (i InstructionRemoveIndex) Encode(code *[]byte)
- func (InstructionRemoveIndex) Opcode() Opcode
- func (i InstructionRemoveIndex) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionRemoveIndex) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionRemoveIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionRemoveIndex) String() string
- type InstructionRemoveTypeIndex
- func (i InstructionRemoveTypeIndex) Encode(code *[]byte)
- func (InstructionRemoveTypeIndex) Opcode() Opcode
- func (i InstructionRemoveTypeIndex) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionRemoveTypeIndex) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionRemoveTypeIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionRemoveTypeIndex) String() string
- type InstructionReturn
- func (i InstructionReturn) Encode(code *[]byte)
- func (InstructionReturn) Opcode() Opcode
- func (i InstructionReturn) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionReturn) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionReturn) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionReturn) String() string
- type InstructionReturnValue
- func (i InstructionReturnValue) Encode(code *[]byte)
- func (InstructionReturnValue) Opcode() Opcode
- func (i InstructionReturnValue) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionReturnValue) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionReturnValue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionReturnValue) String() string
- type InstructionSame
- func (i InstructionSame) Encode(code *[]byte)
- func (InstructionSame) Opcode() Opcode
- func (i InstructionSame) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionSame) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionSame) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionSame) String() string
- type InstructionSetAttachmentBase
- func (i InstructionSetAttachmentBase) Encode(code *[]byte)
- func (InstructionSetAttachmentBase) Opcode() Opcode
- func (i InstructionSetAttachmentBase) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionSetAttachmentBase) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionSetAttachmentBase) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionSetAttachmentBase) String() string
- type InstructionSetField
- func (i InstructionSetField) Encode(code *[]byte)
- func (InstructionSetField) Opcode() Opcode
- func (i InstructionSetField) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionSetField) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionSetField) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionSetField) String() string
- type InstructionSetGlobal
- func (i InstructionSetGlobal) Encode(code *[]byte)
- func (InstructionSetGlobal) Opcode() Opcode
- func (i InstructionSetGlobal) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionSetGlobal) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionSetGlobal) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionSetGlobal) String() string
- type InstructionSetIndex
- func (i InstructionSetIndex) Encode(code *[]byte)
- func (InstructionSetIndex) Opcode() Opcode
- func (i InstructionSetIndex) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionSetIndex) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionSetIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionSetIndex) String() string
- type InstructionSetLocal
- func (i InstructionSetLocal) Encode(code *[]byte)
- func (InstructionSetLocal) Opcode() Opcode
- func (i InstructionSetLocal) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionSetLocal) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionSetLocal) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionSetLocal) String() string
- type InstructionSetTypeIndex
- func (i InstructionSetTypeIndex) Encode(code *[]byte)
- func (InstructionSetTypeIndex) Opcode() Opcode
- func (i InstructionSetTypeIndex) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionSetTypeIndex) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionSetTypeIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionSetTypeIndex) String() string
- type InstructionSetUpvalue
- func (i InstructionSetUpvalue) Encode(code *[]byte)
- func (InstructionSetUpvalue) Opcode() Opcode
- func (i InstructionSetUpvalue) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionSetUpvalue) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionSetUpvalue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionSetUpvalue) String() string
- type InstructionSimpleCast
- func (i InstructionSimpleCast) Encode(code *[]byte)
- func (InstructionSimpleCast) Opcode() Opcode
- func (i InstructionSimpleCast) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionSimpleCast) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionSimpleCast) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionSimpleCast) String() string
- type InstructionStatement
- func (i InstructionStatement) Encode(code *[]byte)
- func (InstructionStatement) Opcode() Opcode
- func (i InstructionStatement) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionStatement) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionStatement) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionStatement) String() string
- type InstructionSubtract
- func (i InstructionSubtract) Encode(code *[]byte)
- func (InstructionSubtract) Opcode() Opcode
- func (i InstructionSubtract) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionSubtract) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionSubtract) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionSubtract) String() string
- type InstructionTemplateString
- func (i InstructionTemplateString) Encode(code *[]byte)
- func (InstructionTemplateString) Opcode() Opcode
- func (i InstructionTemplateString) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionTemplateString) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionTemplateString) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionTemplateString) String() string
- type InstructionTransfer
- func (i InstructionTransfer) Encode(code *[]byte)
- func (InstructionTransfer) Opcode() Opcode
- func (i InstructionTransfer) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionTransfer) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionTransfer) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionTransfer) String() string
- type InstructionTransferAndConvert
- func (i InstructionTransferAndConvert) Encode(code *[]byte)
- func (InstructionTransferAndConvert) Opcode() Opcode
- func (i InstructionTransferAndConvert) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionTransferAndConvert) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionTransferAndConvert) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionTransferAndConvert) String() string
- type InstructionTrue
- func (i InstructionTrue) Encode(code *[]byte)
- func (InstructionTrue) Opcode() Opcode
- func (i InstructionTrue) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionTrue) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionTrue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionTrue) String() string
- type InstructionUnknown
- func (i InstructionUnknown) Encode(code *[]byte)
- func (InstructionUnknown) Opcode() Opcode
- func (i InstructionUnknown) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionUnknown) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionUnknown) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionUnknown) String() string
- type InstructionUnwrap
- func (i InstructionUnwrap) Encode(code *[]byte)
- func (InstructionUnwrap) Opcode() Opcode
- func (i InstructionUnwrap) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionUnwrap) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionUnwrap) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionUnwrap) String() string
- type InstructionVoid
- func (i InstructionVoid) Encode(code *[]byte)
- func (InstructionVoid) Opcode() Opcode
- func (i InstructionVoid) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionVoid) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionVoid) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionVoid) String() string
- type InstructionWrap
- func (i InstructionWrap) Encode(code *[]byte)
- func (InstructionWrap) Opcode() Opcode
- func (i InstructionWrap) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionWrap) Pretty(program ProgramForInstructions) PrettyInstruction
- func (i InstructionWrap) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
- func (i InstructionWrap) String() string
- type JumpInfo
- type JumpType
- type Opcode
- type PrettyInstruction
- type PrettyInstructionAdd
- type PrettyInstructionBitwiseAnd
- type PrettyInstructionBitwiseLeftShift
- type PrettyInstructionBitwiseOr
- type PrettyInstructionBitwiseRightShift
- type PrettyInstructionBitwiseXor
- type PrettyInstructionCloseUpvalue
- type PrettyInstructionConvert
- type PrettyInstructionDeref
- type PrettyInstructionDestroy
- type PrettyInstructionDivide
- type PrettyInstructionDrop
- type PrettyInstructionDup
- type PrettyInstructionEmitEvent
- type PrettyInstructionEqual
- type PrettyInstructionFailableCast
- type PrettyInstructionFalse
- type PrettyInstructionForceCast
- type PrettyInstructionGetConstant
- type PrettyInstructionGetField
- type PrettyInstructionGetFieldLocal
- type PrettyInstructionGetGlobal
- type PrettyInstructionGetIndex
- type PrettyInstructionGetLocal
- type PrettyInstructionGetMethod
- type PrettyInstructionGetTypeIndex
- type PrettyInstructionGetUpvalue
- type PrettyInstructionGreater
- type PrettyInstructionGreaterOrEqual
- type PrettyInstructionInvoke
- type PrettyInstructionInvokeTyped
- type PrettyInstructionIterator
- type PrettyInstructionIteratorEnd
- type PrettyInstructionIteratorHasNext
- type PrettyInstructionIteratorNext
- type PrettyInstructionJump
- type PrettyInstructionJumpIfFalse
- type PrettyInstructionJumpIfNil
- type PrettyInstructionJumpIfTrue
- type PrettyInstructionLess
- type PrettyInstructionLessOrEqual
- type PrettyInstructionLoop
- type PrettyInstructionMod
- type PrettyInstructionMultiply
- type PrettyInstructionNegate
- type PrettyInstructionNewArray
- type PrettyInstructionNewClosure
- type PrettyInstructionNewComposite
- type PrettyInstructionNewCompositeAt
- type PrettyInstructionNewDictionary
- type PrettyInstructionNewPath
- type PrettyInstructionNewRef
- type PrettyInstructionNewSimpleComposite
- type PrettyInstructionNil
- type PrettyInstructionNot
- type PrettyInstructionNotEqual
- type PrettyInstructionRemoveField
- type PrettyInstructionRemoveIndex
- type PrettyInstructionRemoveTypeIndex
- type PrettyInstructionReturn
- type PrettyInstructionReturnValue
- type PrettyInstructionSame
- type PrettyInstructionSetAttachmentBase
- type PrettyInstructionSetField
- type PrettyInstructionSetGlobal
- type PrettyInstructionSetIndex
- type PrettyInstructionSetLocal
- type PrettyInstructionSetTypeIndex
- type PrettyInstructionSetUpvalue
- type PrettyInstructionSimpleCast
- type PrettyInstructionStatement
- type PrettyInstructionSubtract
- type PrettyInstructionTemplateString
- type PrettyInstructionTransfer
- type PrettyInstructionTransferAndConvert
- type PrettyInstructionTrue
- type PrettyInstructionUnknown
- type PrettyInstructionUnwrap
- type PrettyInstructionVoid
- type PrettyInstructionWrap
- type ProgramForInstructions
- type Upvalue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorizeOffset ¶
func ColorizeOpcode ¶
func DecodeStaticTypes ¶
func DecodeStaticTypes(types [][]byte) []interpreter.StaticType
func IsJump ¶ added in v1.8.4
func IsJump(instruction Instruction) bool
func JumpTarget ¶ added in v1.8.4
func JumpTarget(instruction Instruction) uint16
JumpTarget returns the target of a jump instruction
func PatchJumpBytecode ¶ added in v1.8.4
func PatchJumpInstruction ¶ added in v1.8.4
func PatchJumpInstruction(target []Instruction, offset int, newTarget uint16)
func PrintBytecode ¶
func PrintBytecodeWithFlow ¶ added in v1.8.0
func PrintInstructions ¶
func PrintInstructions( builder *strings.Builder, instructions []Instruction, resolve bool, program ProgramForInstructions, colorize bool, ) error
func PrintInstructionsWithFlow ¶ added in v1.8.0
func PrintInstructionsWithFlow( builder *strings.Builder, instructions []Instruction, resolve bool, program ProgramForInstructions, colorize bool, ) error
PrintInstructionsWithFlowMode prints instructions in block format with flow visualization
Types ¶
type BasicBlock ¶ added in v1.8.0
type BasicBlock struct {
Start int // first instruction index
End int // last instruction index
Successors []int // indices of blocks that can follow this one
Predecessors []int // indices of blocks that can precede this one
}
BasicBlock represents a sequence of instructions with single entry/exit
type BlockConnection ¶ added in v1.8.0
BlockConnection represents a connection between basic blocks
type BlockRenderer ¶ added in v1.8.0
type BlockRenderer struct {
// contains filtered or unexported fields
}
BlockRenderer handles basic block visualization
type FlowAnalysis ¶ added in v1.8.0
type FlowAnalysis struct {
JumpInfoMap map[int]JumpInfo // instruction index -> info for jump from this instruction
BlockLeaders []int // instruction indexes which are start instructions of basic blocks
BasicBlocks []BasicBlock // identified basic blocks
}
FlowAnalysis contains control flow information for a sequence of instructions
type Instruction ¶
type Instruction interface {
Encode(code *[]byte)
String() string
OperandsString(sb *strings.Builder, colorize bool)
ResolvedOperandsString(
sb *strings.Builder,
program ProgramForInstructions,
colorize bool,
)
Opcode() Opcode
// Pretty converts this instruction to its pretty form with resolved operands.
// Pretty instructions are for debugging and display purposes only, not for runtime execution.
// They are useful for human-readable instruction dumps, analysis tools, debugging, and testing.
Pretty(program ProgramForInstructions) PrettyInstruction
}
func DecodeInstruction ¶
func DecodeInstruction(ip *uint16, code []byte) Instruction
func DecodeInstructions ¶
func DecodeInstructions(code []byte) []Instruction
type InstructionAdd ¶
type InstructionAdd struct {
}
InstructionAdd
Pops two number values off the stack, adds them together, and then pushes the result back on to the stack.
func (InstructionAdd) Encode ¶
func (i InstructionAdd) Encode(code *[]byte)
func (InstructionAdd) Opcode ¶
func (InstructionAdd) Opcode() Opcode
func (InstructionAdd) OperandsString ¶
func (i InstructionAdd) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionAdd) Pretty ¶ added in v1.10.0
func (i InstructionAdd) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionAdd) ResolvedOperandsString ¶
func (i InstructionAdd) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionAdd) String ¶
func (i InstructionAdd) String() string
type InstructionBitwiseAnd ¶
type InstructionBitwiseAnd struct {
}
InstructionBitwiseAnd
Pops two integer values off the stack, performs a bitwise AND operation on them, and then pushes the result back on to the stack.
func (InstructionBitwiseAnd) Encode ¶
func (i InstructionBitwiseAnd) Encode(code *[]byte)
func (InstructionBitwiseAnd) Opcode ¶
func (InstructionBitwiseAnd) Opcode() Opcode
func (InstructionBitwiseAnd) OperandsString ¶
func (i InstructionBitwiseAnd) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionBitwiseAnd) Pretty ¶ added in v1.10.0
func (i InstructionBitwiseAnd) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionBitwiseAnd) ResolvedOperandsString ¶
func (i InstructionBitwiseAnd) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionBitwiseAnd) String ¶
func (i InstructionBitwiseAnd) String() string
type InstructionBitwiseLeftShift ¶
type InstructionBitwiseLeftShift struct {
}
InstructionBitwiseLeftShift
Pops two integer values off the stack, performs a bitwise left shift operation on them, and then pushes the result back on to the stack.
func (InstructionBitwiseLeftShift) Encode ¶
func (i InstructionBitwiseLeftShift) Encode(code *[]byte)
func (InstructionBitwiseLeftShift) Opcode ¶
func (InstructionBitwiseLeftShift) Opcode() Opcode
func (InstructionBitwiseLeftShift) OperandsString ¶
func (i InstructionBitwiseLeftShift) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionBitwiseLeftShift) Pretty ¶ added in v1.10.0
func (i InstructionBitwiseLeftShift) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionBitwiseLeftShift) ResolvedOperandsString ¶
func (i InstructionBitwiseLeftShift) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionBitwiseLeftShift) String ¶
func (i InstructionBitwiseLeftShift) String() string
type InstructionBitwiseOr ¶
type InstructionBitwiseOr struct {
}
InstructionBitwiseOr
Pops two integer values off the stack, performs a bitwise OR operation on them, and then pushes the result back on to the stack.
func (InstructionBitwiseOr) Encode ¶
func (i InstructionBitwiseOr) Encode(code *[]byte)
func (InstructionBitwiseOr) Opcode ¶
func (InstructionBitwiseOr) Opcode() Opcode
func (InstructionBitwiseOr) OperandsString ¶
func (i InstructionBitwiseOr) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionBitwiseOr) Pretty ¶ added in v1.10.0
func (i InstructionBitwiseOr) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionBitwiseOr) ResolvedOperandsString ¶
func (i InstructionBitwiseOr) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionBitwiseOr) String ¶
func (i InstructionBitwiseOr) String() string
type InstructionBitwiseRightShift ¶
type InstructionBitwiseRightShift struct {
}
InstructionBitwiseRightShift
Pops two integer values off the stack, performs a bitwise right shift operation on them, and then pushes the result back on to the stack.
func (InstructionBitwiseRightShift) Encode ¶
func (i InstructionBitwiseRightShift) Encode(code *[]byte)
func (InstructionBitwiseRightShift) Opcode ¶
func (InstructionBitwiseRightShift) Opcode() Opcode
func (InstructionBitwiseRightShift) OperandsString ¶
func (i InstructionBitwiseRightShift) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionBitwiseRightShift) Pretty ¶ added in v1.10.0
func (i InstructionBitwiseRightShift) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionBitwiseRightShift) ResolvedOperandsString ¶
func (i InstructionBitwiseRightShift) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionBitwiseRightShift) String ¶
func (i InstructionBitwiseRightShift) String() string
type InstructionBitwiseXor ¶
type InstructionBitwiseXor struct {
}
InstructionBitwiseXor
Pops two integer values off the stack, performs a bitwise XOR operation on them, and then pushes the result back on to the stack.
func (InstructionBitwiseXor) Encode ¶
func (i InstructionBitwiseXor) Encode(code *[]byte)
func (InstructionBitwiseXor) Opcode ¶
func (InstructionBitwiseXor) Opcode() Opcode
func (InstructionBitwiseXor) OperandsString ¶
func (i InstructionBitwiseXor) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionBitwiseXor) Pretty ¶ added in v1.10.0
func (i InstructionBitwiseXor) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionBitwiseXor) ResolvedOperandsString ¶
func (i InstructionBitwiseXor) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionBitwiseXor) String ¶
func (i InstructionBitwiseXor) String() string
type InstructionCloseUpvalue ¶
type InstructionCloseUpvalue struct {
Local uint16
}
InstructionCloseUpvalue
Closes the upvalue for the local at the given index.
func DecodeCloseUpvalue ¶
func DecodeCloseUpvalue(ip *uint16, code []byte) (i InstructionCloseUpvalue)
func (InstructionCloseUpvalue) Encode ¶
func (i InstructionCloseUpvalue) Encode(code *[]byte)
func (InstructionCloseUpvalue) Opcode ¶
func (InstructionCloseUpvalue) Opcode() Opcode
func (InstructionCloseUpvalue) OperandsString ¶
func (i InstructionCloseUpvalue) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionCloseUpvalue) Pretty ¶ added in v1.10.0
func (i InstructionCloseUpvalue) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionCloseUpvalue) ResolvedOperandsString ¶
func (i InstructionCloseUpvalue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionCloseUpvalue) String ¶
func (i InstructionCloseUpvalue) String() string
type InstructionConvert ¶ added in v1.8.0
InstructionConvert
Pops a value off the stack, converts it to the given type, and then pushes it back on to the stack.
func DecodeConvert ¶ added in v1.8.0
func DecodeConvert(ip *uint16, code []byte) (i InstructionConvert)
func (InstructionConvert) Encode ¶ added in v1.8.0
func (i InstructionConvert) Encode(code *[]byte)
func (InstructionConvert) Opcode ¶ added in v1.8.0
func (InstructionConvert) Opcode() Opcode
func (InstructionConvert) OperandsString ¶ added in v1.8.0
func (i InstructionConvert) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionConvert) Pretty ¶ added in v1.10.0
func (i InstructionConvert) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionConvert) ResolvedOperandsString ¶ added in v1.8.0
func (i InstructionConvert) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionConvert) String ¶ added in v1.8.0
func (i InstructionConvert) String() string
type InstructionDeref ¶
type InstructionDeref struct {
}
InstructionDeref
Pops an (optional) reference off the stack, dereferences it, and then pushes the value back on to the stack.
func (InstructionDeref) Encode ¶
func (i InstructionDeref) Encode(code *[]byte)
func (InstructionDeref) Opcode ¶
func (InstructionDeref) Opcode() Opcode
func (InstructionDeref) OperandsString ¶
func (i InstructionDeref) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionDeref) Pretty ¶ added in v1.10.0
func (i InstructionDeref) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionDeref) ResolvedOperandsString ¶
func (i InstructionDeref) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionDeref) String ¶
func (i InstructionDeref) String() string
type InstructionDestroy ¶
type InstructionDestroy struct {
}
InstructionDestroy
Pops a resource off the stack and then destroys it.
func (InstructionDestroy) Encode ¶
func (i InstructionDestroy) Encode(code *[]byte)
func (InstructionDestroy) Opcode ¶
func (InstructionDestroy) Opcode() Opcode
func (InstructionDestroy) OperandsString ¶
func (i InstructionDestroy) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionDestroy) Pretty ¶ added in v1.10.0
func (i InstructionDestroy) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionDestroy) ResolvedOperandsString ¶
func (i InstructionDestroy) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionDestroy) String ¶
func (i InstructionDestroy) String() string
type InstructionDivide ¶
type InstructionDivide struct {
}
InstructionDivide
Pops two number values off the stack, divides the first by the second, and then pushes the result back on to the stack.
func (InstructionDivide) Encode ¶
func (i InstructionDivide) Encode(code *[]byte)
func (InstructionDivide) Opcode ¶
func (InstructionDivide) Opcode() Opcode
func (InstructionDivide) OperandsString ¶
func (i InstructionDivide) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionDivide) Pretty ¶ added in v1.10.0
func (i InstructionDivide) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionDivide) ResolvedOperandsString ¶
func (i InstructionDivide) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionDivide) String ¶
func (i InstructionDivide) String() string
type InstructionDrop ¶
type InstructionDrop struct {
}
InstructionDrop
Pops a value off the stack and discards it.
func (InstructionDrop) Encode ¶
func (i InstructionDrop) Encode(code *[]byte)
func (InstructionDrop) Opcode ¶
func (InstructionDrop) Opcode() Opcode
func (InstructionDrop) OperandsString ¶
func (i InstructionDrop) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionDrop) Pretty ¶ added in v1.10.0
func (i InstructionDrop) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionDrop) ResolvedOperandsString ¶
func (i InstructionDrop) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionDrop) String ¶
func (i InstructionDrop) String() string
type InstructionDup ¶
type InstructionDup struct {
}
InstructionDup
Pops a value off the stack, duplicates it, and then pushes the original and the copy back on to the stack.
func (InstructionDup) Encode ¶
func (i InstructionDup) Encode(code *[]byte)
func (InstructionDup) Opcode ¶
func (InstructionDup) Opcode() Opcode
func (InstructionDup) OperandsString ¶
func (i InstructionDup) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionDup) Pretty ¶ added in v1.10.0
func (i InstructionDup) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionDup) ResolvedOperandsString ¶
func (i InstructionDup) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionDup) String ¶
func (i InstructionDup) String() string
type InstructionEmitEvent ¶
InstructionEmitEvent
Pops arguments of the stack and then emits an event with the given type with them.
func DecodeEmitEvent ¶
func DecodeEmitEvent(ip *uint16, code []byte) (i InstructionEmitEvent)
func (InstructionEmitEvent) Encode ¶
func (i InstructionEmitEvent) Encode(code *[]byte)
func (InstructionEmitEvent) Opcode ¶
func (InstructionEmitEvent) Opcode() Opcode
func (InstructionEmitEvent) OperandsString ¶
func (i InstructionEmitEvent) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionEmitEvent) Pretty ¶ added in v1.10.0
func (i InstructionEmitEvent) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionEmitEvent) ResolvedOperandsString ¶
func (i InstructionEmitEvent) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionEmitEvent) String ¶
func (i InstructionEmitEvent) String() string
type InstructionEqual ¶
type InstructionEqual struct {
}
InstructionEqual
Pops two values off the stack, checks if the first value is equal to the second, and then pushes the result back on to the stack.
func (InstructionEqual) Encode ¶
func (i InstructionEqual) Encode(code *[]byte)
func (InstructionEqual) Opcode ¶
func (InstructionEqual) Opcode() Opcode
func (InstructionEqual) OperandsString ¶
func (i InstructionEqual) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionEqual) Pretty ¶ added in v1.10.0
func (i InstructionEqual) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionEqual) ResolvedOperandsString ¶
func (i InstructionEqual) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionEqual) String ¶
func (i InstructionEqual) String() string
type InstructionFailableCast ¶
InstructionFailableCast
Pops a value off the stack and casts it to the given type. If the value is a subtype of the given type, then casted value is pushed back on to the stack. If the value is not a subtype of the given type, then a `nil` is pushed to the stack instead.
func DecodeFailableCast ¶
func DecodeFailableCast(ip *uint16, code []byte) (i InstructionFailableCast)
func (InstructionFailableCast) Encode ¶
func (i InstructionFailableCast) Encode(code *[]byte)
func (InstructionFailableCast) Opcode ¶
func (InstructionFailableCast) Opcode() Opcode
func (InstructionFailableCast) OperandsString ¶
func (i InstructionFailableCast) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionFailableCast) Pretty ¶ added in v1.10.0
func (i InstructionFailableCast) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionFailableCast) ResolvedOperandsString ¶
func (i InstructionFailableCast) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionFailableCast) String ¶
func (i InstructionFailableCast) String() string
type InstructionFalse ¶
type InstructionFalse struct {
}
InstructionFalse
Pushes the boolean value `false` onto the stack.
func (InstructionFalse) Encode ¶
func (i InstructionFalse) Encode(code *[]byte)
func (InstructionFalse) Opcode ¶
func (InstructionFalse) Opcode() Opcode
func (InstructionFalse) OperandsString ¶
func (i InstructionFalse) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionFalse) Pretty ¶ added in v1.10.0
func (i InstructionFalse) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionFalse) ResolvedOperandsString ¶
func (i InstructionFalse) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionFalse) String ¶
func (i InstructionFalse) String() string
type InstructionForceCast ¶
InstructionForceCast
Pops a value off the stack, force-casts it to the given type, and then pushes it back on to the stack. Panics if the value is not a subtype of the given type.
func DecodeForceCast ¶
func DecodeForceCast(ip *uint16, code []byte) (i InstructionForceCast)
func (InstructionForceCast) Encode ¶
func (i InstructionForceCast) Encode(code *[]byte)
func (InstructionForceCast) Opcode ¶
func (InstructionForceCast) Opcode() Opcode
func (InstructionForceCast) OperandsString ¶
func (i InstructionForceCast) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionForceCast) Pretty ¶ added in v1.10.0
func (i InstructionForceCast) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionForceCast) ResolvedOperandsString ¶
func (i InstructionForceCast) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionForceCast) String ¶
func (i InstructionForceCast) String() string
type InstructionGetConstant ¶
type InstructionGetConstant struct {
Constant uint16
}
InstructionGetConstant
Pushes the constant at the given index onto the stack.
func DecodeGetConstant ¶
func DecodeGetConstant(ip *uint16, code []byte) (i InstructionGetConstant)
func (InstructionGetConstant) Encode ¶
func (i InstructionGetConstant) Encode(code *[]byte)
func (InstructionGetConstant) Opcode ¶
func (InstructionGetConstant) Opcode() Opcode
func (InstructionGetConstant) OperandsString ¶
func (i InstructionGetConstant) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGetConstant) Pretty ¶ added in v1.10.0
func (i InstructionGetConstant) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGetConstant) ResolvedOperandsString ¶
func (i InstructionGetConstant) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGetConstant) String ¶
func (i InstructionGetConstant) String() string
type InstructionGetField ¶
InstructionGetField
Pops a value off the stack, the target, and then pushes the value of the field at the given index onto the stack.
func DecodeGetField ¶
func DecodeGetField(ip *uint16, code []byte) (i InstructionGetField)
func (InstructionGetField) Encode ¶
func (i InstructionGetField) Encode(code *[]byte)
func (InstructionGetField) Opcode ¶
func (InstructionGetField) Opcode() Opcode
func (InstructionGetField) OperandsString ¶
func (i InstructionGetField) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGetField) Pretty ¶ added in v1.10.0
func (i InstructionGetField) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGetField) ResolvedOperandsString ¶
func (i InstructionGetField) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGetField) String ¶
func (i InstructionGetField) String() string
type InstructionGetFieldLocal ¶ added in v1.8.4
InstructionGetFieldLocal
Pops a value off the stack, the target, and then pushes the value of the field at the given index onto the stack.
func DecodeGetFieldLocal ¶ added in v1.8.4
func DecodeGetFieldLocal(ip *uint16, code []byte) (i InstructionGetFieldLocal)
func (InstructionGetFieldLocal) Encode ¶ added in v1.8.4
func (i InstructionGetFieldLocal) Encode(code *[]byte)
func (InstructionGetFieldLocal) Opcode ¶ added in v1.8.4
func (InstructionGetFieldLocal) Opcode() Opcode
func (InstructionGetFieldLocal) OperandsString ¶ added in v1.8.4
func (i InstructionGetFieldLocal) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGetFieldLocal) Pretty ¶ added in v1.10.0
func (i InstructionGetFieldLocal) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGetFieldLocal) ResolvedOperandsString ¶ added in v1.8.4
func (i InstructionGetFieldLocal) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGetFieldLocal) String ¶ added in v1.8.4
func (i InstructionGetFieldLocal) String() string
type InstructionGetGlobal ¶
type InstructionGetGlobal struct {
Global uint16
}
InstructionGetGlobal
Pushes the value of the global at the given index onto the stack.
func DecodeGetGlobal ¶
func DecodeGetGlobal(ip *uint16, code []byte) (i InstructionGetGlobal)
func (InstructionGetGlobal) Encode ¶
func (i InstructionGetGlobal) Encode(code *[]byte)
func (InstructionGetGlobal) Opcode ¶
func (InstructionGetGlobal) Opcode() Opcode
func (InstructionGetGlobal) OperandsString ¶
func (i InstructionGetGlobal) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGetGlobal) Pretty ¶ added in v1.10.0
func (i InstructionGetGlobal) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGetGlobal) ResolvedOperandsString ¶
func (i InstructionGetGlobal) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGetGlobal) String ¶
func (i InstructionGetGlobal) String() string
type InstructionGetIndex ¶
type InstructionGetIndex struct {
IndexedType uint16
}
InstructionGetIndex
Pops two values off the stack, the array and the index, and then pushes the value at the given index of the array onto the stack.
func DecodeGetIndex ¶ added in v1.9.10
func DecodeGetIndex(ip *uint16, code []byte) (i InstructionGetIndex)
func (InstructionGetIndex) Encode ¶
func (i InstructionGetIndex) Encode(code *[]byte)
func (InstructionGetIndex) Opcode ¶
func (InstructionGetIndex) Opcode() Opcode
func (InstructionGetIndex) OperandsString ¶
func (i InstructionGetIndex) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGetIndex) Pretty ¶ added in v1.10.0
func (i InstructionGetIndex) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGetIndex) ResolvedOperandsString ¶
func (i InstructionGetIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGetIndex) String ¶
func (i InstructionGetIndex) String() string
type InstructionGetLocal ¶
type InstructionGetLocal struct {
Local uint16
}
InstructionGetLocal
Pushes the value of the local at the given index onto the stack.
func DecodeGetLocal ¶
func DecodeGetLocal(ip *uint16, code []byte) (i InstructionGetLocal)
func (InstructionGetLocal) Encode ¶
func (i InstructionGetLocal) Encode(code *[]byte)
func (InstructionGetLocal) Opcode ¶
func (InstructionGetLocal) Opcode() Opcode
func (InstructionGetLocal) OperandsString ¶
func (i InstructionGetLocal) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGetLocal) Pretty ¶ added in v1.10.0
func (i InstructionGetLocal) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGetLocal) ResolvedOperandsString ¶
func (i InstructionGetLocal) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGetLocal) String ¶
func (i InstructionGetLocal) String() string
type InstructionGetMethod ¶
InstructionGetMethod
Pops a value off the stack, the receiver, and then pushes the value of the function at the given index onto the stack.
func DecodeGetMethod ¶
func DecodeGetMethod(ip *uint16, code []byte) (i InstructionGetMethod)
func (InstructionGetMethod) Encode ¶
func (i InstructionGetMethod) Encode(code *[]byte)
func (InstructionGetMethod) Opcode ¶
func (InstructionGetMethod) Opcode() Opcode
func (InstructionGetMethod) OperandsString ¶
func (i InstructionGetMethod) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGetMethod) Pretty ¶ added in v1.10.0
func (i InstructionGetMethod) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGetMethod) ResolvedOperandsString ¶
func (i InstructionGetMethod) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGetMethod) String ¶
func (i InstructionGetMethod) String() string
type InstructionGetTypeIndex ¶ added in v1.8.0
InstructionGetTypeIndex
Pops a value off the stack, the target, and then pushes the value of the type key at the given index onto the stack.
func DecodeGetTypeIndex ¶ added in v1.8.0
func DecodeGetTypeIndex(ip *uint16, code []byte) (i InstructionGetTypeIndex)
func (InstructionGetTypeIndex) Encode ¶ added in v1.8.0
func (i InstructionGetTypeIndex) Encode(code *[]byte)
func (InstructionGetTypeIndex) Opcode ¶ added in v1.8.0
func (InstructionGetTypeIndex) Opcode() Opcode
func (InstructionGetTypeIndex) OperandsString ¶ added in v1.8.0
func (i InstructionGetTypeIndex) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGetTypeIndex) Pretty ¶ added in v1.10.0
func (i InstructionGetTypeIndex) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGetTypeIndex) ResolvedOperandsString ¶ added in v1.8.0
func (i InstructionGetTypeIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGetTypeIndex) String ¶ added in v1.8.0
func (i InstructionGetTypeIndex) String() string
type InstructionGetUpvalue ¶
type InstructionGetUpvalue struct {
Upvalue uint16
}
InstructionGetUpvalue
Pushes the value of the upvalue at the given index onto the stack.
func DecodeGetUpvalue ¶
func DecodeGetUpvalue(ip *uint16, code []byte) (i InstructionGetUpvalue)
func (InstructionGetUpvalue) Encode ¶
func (i InstructionGetUpvalue) Encode(code *[]byte)
func (InstructionGetUpvalue) Opcode ¶
func (InstructionGetUpvalue) Opcode() Opcode
func (InstructionGetUpvalue) OperandsString ¶
func (i InstructionGetUpvalue) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGetUpvalue) Pretty ¶ added in v1.10.0
func (i InstructionGetUpvalue) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGetUpvalue) ResolvedOperandsString ¶
func (i InstructionGetUpvalue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGetUpvalue) String ¶
func (i InstructionGetUpvalue) String() string
type InstructionGreater ¶
type InstructionGreater struct {
}
InstructionGreater
Pops two values off the stack, checks if the first value is greater than the second, and then pushes the result back on to the stack.
func (InstructionGreater) Encode ¶
func (i InstructionGreater) Encode(code *[]byte)
func (InstructionGreater) Opcode ¶
func (InstructionGreater) Opcode() Opcode
func (InstructionGreater) OperandsString ¶
func (i InstructionGreater) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGreater) Pretty ¶ added in v1.10.0
func (i InstructionGreater) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGreater) ResolvedOperandsString ¶
func (i InstructionGreater) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGreater) String ¶
func (i InstructionGreater) String() string
type InstructionGreaterOrEqual ¶
type InstructionGreaterOrEqual struct {
}
InstructionGreaterOrEqual
Pops two values off the stack, checks if the first value is greater than or equal to the second, and then pushes the result back on to the stack.
func (InstructionGreaterOrEqual) Encode ¶
func (i InstructionGreaterOrEqual) Encode(code *[]byte)
func (InstructionGreaterOrEqual) Opcode ¶
func (InstructionGreaterOrEqual) Opcode() Opcode
func (InstructionGreaterOrEqual) OperandsString ¶
func (i InstructionGreaterOrEqual) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionGreaterOrEqual) Pretty ¶ added in v1.10.0
func (i InstructionGreaterOrEqual) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionGreaterOrEqual) ResolvedOperandsString ¶
func (i InstructionGreaterOrEqual) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionGreaterOrEqual) String ¶
func (i InstructionGreaterOrEqual) String() string
type InstructionInvoke ¶
InstructionInvoke
Pops the function and arguments off the stack, invokes the function with the arguments, and then pushes the result back on to the stack. This instruction is only passes the argument count. If the argument types are needed, use `invokeTyped`.
func DecodeInvoke ¶
func DecodeInvoke(ip *uint16, code []byte) (i InstructionInvoke)
func (InstructionInvoke) Encode ¶
func (i InstructionInvoke) Encode(code *[]byte)
func (InstructionInvoke) Opcode ¶
func (InstructionInvoke) Opcode() Opcode
func (InstructionInvoke) OperandsString ¶
func (i InstructionInvoke) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionInvoke) Pretty ¶ added in v1.10.0
func (i InstructionInvoke) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionInvoke) ResolvedOperandsString ¶
func (i InstructionInvoke) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionInvoke) String ¶
func (i InstructionInvoke) String() string
type InstructionInvokeTyped ¶ added in v1.9.5
InstructionInvokeTyped
Pops the function and arguments off the stack, invokes the function with the arguments, and then pushes the result back on to the stack. This instruction is a variant of `invoke` that includes the argument types.
func DecodeInvokeTyped ¶ added in v1.9.5
func DecodeInvokeTyped(ip *uint16, code []byte) (i InstructionInvokeTyped)
func (InstructionInvokeTyped) Encode ¶ added in v1.9.5
func (i InstructionInvokeTyped) Encode(code *[]byte)
func (InstructionInvokeTyped) Opcode ¶ added in v1.9.5
func (InstructionInvokeTyped) Opcode() Opcode
func (InstructionInvokeTyped) OperandsString ¶ added in v1.9.5
func (i InstructionInvokeTyped) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionInvokeTyped) Pretty ¶ added in v1.10.0
func (i InstructionInvokeTyped) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionInvokeTyped) ResolvedOperandsString ¶ added in v1.9.5
func (i InstructionInvokeTyped) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionInvokeTyped) String ¶ added in v1.9.5
func (i InstructionInvokeTyped) String() string
type InstructionIterator ¶
type InstructionIterator struct {
}
InstructionIterator
Pops an iterable value from the stack, get an iterator to it, and push the iterator back onto the stack.
func (InstructionIterator) Encode ¶
func (i InstructionIterator) Encode(code *[]byte)
func (InstructionIterator) Opcode ¶
func (InstructionIterator) Opcode() Opcode
func (InstructionIterator) OperandsString ¶
func (i InstructionIterator) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionIterator) Pretty ¶ added in v1.10.0
func (i InstructionIterator) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionIterator) ResolvedOperandsString ¶
func (i InstructionIterator) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionIterator) String ¶
func (i InstructionIterator) String() string
type InstructionIteratorEnd ¶
type InstructionIteratorEnd struct {
}
InstructionIteratorEnd
Pops a value-iterator from the stack end invalidates it. The iterator may no longer be used after this instruction.
func (InstructionIteratorEnd) Encode ¶
func (i InstructionIteratorEnd) Encode(code *[]byte)
func (InstructionIteratorEnd) Opcode ¶
func (InstructionIteratorEnd) Opcode() Opcode
func (InstructionIteratorEnd) OperandsString ¶
func (i InstructionIteratorEnd) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionIteratorEnd) Pretty ¶ added in v1.10.0
func (i InstructionIteratorEnd) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionIteratorEnd) ResolvedOperandsString ¶
func (i InstructionIteratorEnd) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionIteratorEnd) String ¶
func (i InstructionIteratorEnd) String() string
type InstructionIteratorHasNext ¶
type InstructionIteratorHasNext struct {
}
InstructionIteratorHasNext
Pops a value-iterator from the stack, calls `hasNext()` method on it, and push the result back onto the stack.
func (InstructionIteratorHasNext) Encode ¶
func (i InstructionIteratorHasNext) Encode(code *[]byte)
func (InstructionIteratorHasNext) Opcode ¶
func (InstructionIteratorHasNext) Opcode() Opcode
func (InstructionIteratorHasNext) OperandsString ¶
func (i InstructionIteratorHasNext) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionIteratorHasNext) Pretty ¶ added in v1.10.0
func (i InstructionIteratorHasNext) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionIteratorHasNext) ResolvedOperandsString ¶
func (i InstructionIteratorHasNext) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionIteratorHasNext) String ¶
func (i InstructionIteratorHasNext) String() string
type InstructionIteratorNext ¶
type InstructionIteratorNext struct {
}
InstructionIteratorNext
Pops a value-iterator from the stack, calls `next()` method on it, and push the result back onto the stack.
func (InstructionIteratorNext) Encode ¶
func (i InstructionIteratorNext) Encode(code *[]byte)
func (InstructionIteratorNext) Opcode ¶
func (InstructionIteratorNext) Opcode() Opcode
func (InstructionIteratorNext) OperandsString ¶
func (i InstructionIteratorNext) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionIteratorNext) Pretty ¶ added in v1.10.0
func (i InstructionIteratorNext) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionIteratorNext) ResolvedOperandsString ¶
func (i InstructionIteratorNext) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionIteratorNext) String ¶
func (i InstructionIteratorNext) String() string
type InstructionJump ¶
type InstructionJump struct {
Target uint16
}
InstructionJump
Unconditionally jumps to the given instruction.
func DecodeJump ¶
func DecodeJump(ip *uint16, code []byte) (i InstructionJump)
func (InstructionJump) Encode ¶
func (i InstructionJump) Encode(code *[]byte)
func (InstructionJump) Opcode ¶
func (InstructionJump) Opcode() Opcode
func (InstructionJump) OperandsString ¶
func (i InstructionJump) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionJump) Pretty ¶ added in v1.10.0
func (i InstructionJump) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionJump) ResolvedOperandsString ¶
func (i InstructionJump) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionJump) String ¶
func (i InstructionJump) String() string
type InstructionJumpIfFalse ¶
type InstructionJumpIfFalse struct {
Target uint16
}
InstructionJumpIfFalse
Pops a value off the stack. If it is `false`, jumps to the target instruction.
func DecodeJumpIfFalse ¶
func DecodeJumpIfFalse(ip *uint16, code []byte) (i InstructionJumpIfFalse)
func (InstructionJumpIfFalse) Encode ¶
func (i InstructionJumpIfFalse) Encode(code *[]byte)
func (InstructionJumpIfFalse) Opcode ¶
func (InstructionJumpIfFalse) Opcode() Opcode
func (InstructionJumpIfFalse) OperandsString ¶
func (i InstructionJumpIfFalse) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionJumpIfFalse) Pretty ¶ added in v1.10.0
func (i InstructionJumpIfFalse) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionJumpIfFalse) ResolvedOperandsString ¶
func (i InstructionJumpIfFalse) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionJumpIfFalse) String ¶
func (i InstructionJumpIfFalse) String() string
type InstructionJumpIfNil ¶
type InstructionJumpIfNil struct {
Target uint16
}
InstructionJumpIfNil
Pops a value off the stack. If it is `nil`, jumps to the target instruction.
func DecodeJumpIfNil ¶
func DecodeJumpIfNil(ip *uint16, code []byte) (i InstructionJumpIfNil)
func (InstructionJumpIfNil) Encode ¶
func (i InstructionJumpIfNil) Encode(code *[]byte)
func (InstructionJumpIfNil) Opcode ¶
func (InstructionJumpIfNil) Opcode() Opcode
func (InstructionJumpIfNil) OperandsString ¶
func (i InstructionJumpIfNil) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionJumpIfNil) Pretty ¶ added in v1.10.0
func (i InstructionJumpIfNil) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionJumpIfNil) ResolvedOperandsString ¶
func (i InstructionJumpIfNil) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionJumpIfNil) String ¶
func (i InstructionJumpIfNil) String() string
type InstructionJumpIfTrue ¶
type InstructionJumpIfTrue struct {
Target uint16
}
InstructionJumpIfTrue
Pops a value off the stack. If it is `true`, jumps to the target instruction.
func DecodeJumpIfTrue ¶
func DecodeJumpIfTrue(ip *uint16, code []byte) (i InstructionJumpIfTrue)
func (InstructionJumpIfTrue) Encode ¶
func (i InstructionJumpIfTrue) Encode(code *[]byte)
func (InstructionJumpIfTrue) Opcode ¶
func (InstructionJumpIfTrue) Opcode() Opcode
func (InstructionJumpIfTrue) OperandsString ¶
func (i InstructionJumpIfTrue) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionJumpIfTrue) Pretty ¶ added in v1.10.0
func (i InstructionJumpIfTrue) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionJumpIfTrue) ResolvedOperandsString ¶
func (i InstructionJumpIfTrue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionJumpIfTrue) String ¶
func (i InstructionJumpIfTrue) String() string
type InstructionLess ¶
type InstructionLess struct {
}
InstructionLess
Pops two values off the stack, checks if the first value is less than the second, and then pushes the result back on to the stack.
func (InstructionLess) Encode ¶
func (i InstructionLess) Encode(code *[]byte)
func (InstructionLess) Opcode ¶
func (InstructionLess) Opcode() Opcode
func (InstructionLess) OperandsString ¶
func (i InstructionLess) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionLess) Pretty ¶ added in v1.10.0
func (i InstructionLess) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionLess) ResolvedOperandsString ¶
func (i InstructionLess) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionLess) String ¶
func (i InstructionLess) String() string
type InstructionLessOrEqual ¶
type InstructionLessOrEqual struct {
}
InstructionLessOrEqual
Pops two values off the stack, checks if the first value is less than or equal to the second, and then pushes the result back on to the stack.
func (InstructionLessOrEqual) Encode ¶
func (i InstructionLessOrEqual) Encode(code *[]byte)
func (InstructionLessOrEqual) Opcode ¶
func (InstructionLessOrEqual) Opcode() Opcode
func (InstructionLessOrEqual) OperandsString ¶
func (i InstructionLessOrEqual) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionLessOrEqual) Pretty ¶ added in v1.10.0
func (i InstructionLessOrEqual) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionLessOrEqual) ResolvedOperandsString ¶
func (i InstructionLessOrEqual) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionLessOrEqual) String ¶
func (i InstructionLessOrEqual) String() string
type InstructionLoop ¶
type InstructionLoop struct {
}
InstructionLoop
Indicates the start of a loop.
func (InstructionLoop) Encode ¶
func (i InstructionLoop) Encode(code *[]byte)
func (InstructionLoop) Opcode ¶
func (InstructionLoop) Opcode() Opcode
func (InstructionLoop) OperandsString ¶
func (i InstructionLoop) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionLoop) Pretty ¶ added in v1.10.0
func (i InstructionLoop) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionLoop) ResolvedOperandsString ¶
func (i InstructionLoop) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionLoop) String ¶
func (i InstructionLoop) String() string
type InstructionMod ¶
type InstructionMod struct {
}
InstructionMod
Pops two number values off the stack, calculates the modulus of the first by the second, and then pushes the result back on to the stack.
func (InstructionMod) Encode ¶
func (i InstructionMod) Encode(code *[]byte)
func (InstructionMod) Opcode ¶
func (InstructionMod) Opcode() Opcode
func (InstructionMod) OperandsString ¶
func (i InstructionMod) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionMod) Pretty ¶ added in v1.10.0
func (i InstructionMod) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionMod) ResolvedOperandsString ¶
func (i InstructionMod) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionMod) String ¶
func (i InstructionMod) String() string
type InstructionMultiply ¶
type InstructionMultiply struct {
}
InstructionMultiply
Pops two number values off the stack, multiplies them together, and then pushes the result back on to the stack.
func (InstructionMultiply) Encode ¶
func (i InstructionMultiply) Encode(code *[]byte)
func (InstructionMultiply) Opcode ¶
func (InstructionMultiply) Opcode() Opcode
func (InstructionMultiply) OperandsString ¶
func (i InstructionMultiply) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionMultiply) Pretty ¶ added in v1.10.0
func (i InstructionMultiply) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionMultiply) ResolvedOperandsString ¶
func (i InstructionMultiply) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionMultiply) String ¶
func (i InstructionMultiply) String() string
type InstructionNegate ¶
type InstructionNegate struct {
}
InstructionNegate
Pops a number value off the stack, negates it, and then pushes the result back on to the stack.
func (InstructionNegate) Encode ¶
func (i InstructionNegate) Encode(code *[]byte)
func (InstructionNegate) Opcode ¶
func (InstructionNegate) Opcode() Opcode
func (InstructionNegate) OperandsString ¶
func (i InstructionNegate) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNegate) Pretty ¶ added in v1.10.0
func (i InstructionNegate) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNegate) ResolvedOperandsString ¶
func (i InstructionNegate) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNegate) String ¶
func (i InstructionNegate) String() string
type InstructionNewArray ¶
InstructionNewArray
Pops the given number of elements off the stack, creates a new array with the given type, size, and elements, and then pushes it onto the stack.
func DecodeNewArray ¶
func DecodeNewArray(ip *uint16, code []byte) (i InstructionNewArray)
func (InstructionNewArray) Encode ¶
func (i InstructionNewArray) Encode(code *[]byte)
func (InstructionNewArray) Opcode ¶
func (InstructionNewArray) Opcode() Opcode
func (InstructionNewArray) OperandsString ¶
func (i InstructionNewArray) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNewArray) Pretty ¶ added in v1.10.0
func (i InstructionNewArray) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNewArray) ResolvedOperandsString ¶
func (i InstructionNewArray) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNewArray) String ¶
func (i InstructionNewArray) String() string
type InstructionNewClosure ¶
InstructionNewClosure
Creates a new closure with the function at the given index and pushes it onto the stack.
func DecodeNewClosure ¶
func DecodeNewClosure(ip *uint16, code []byte) (i InstructionNewClosure)
func (InstructionNewClosure) Encode ¶
func (i InstructionNewClosure) Encode(code *[]byte)
func (InstructionNewClosure) Opcode ¶
func (InstructionNewClosure) Opcode() Opcode
func (InstructionNewClosure) OperandsString ¶
func (i InstructionNewClosure) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNewClosure) Pretty ¶ added in v1.10.0
func (i InstructionNewClosure) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNewClosure) ResolvedOperandsString ¶
func (i InstructionNewClosure) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNewClosure) String ¶
func (i InstructionNewClosure) String() string
type InstructionNewComposite ¶
type InstructionNewComposite struct {
Kind common.CompositeKind
Type uint16
}
InstructionNewComposite
Creates a new instance of the given composite kind and type, at address 0x0, and then pushes it onto the stack.
func DecodeNewComposite ¶
func DecodeNewComposite(ip *uint16, code []byte) (i InstructionNewComposite)
func (InstructionNewComposite) Encode ¶
func (i InstructionNewComposite) Encode(code *[]byte)
func (InstructionNewComposite) Opcode ¶
func (InstructionNewComposite) Opcode() Opcode
func (InstructionNewComposite) OperandsString ¶
func (i InstructionNewComposite) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNewComposite) Pretty ¶ added in v1.10.0
func (i InstructionNewComposite) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNewComposite) ResolvedOperandsString ¶
func (i InstructionNewComposite) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNewComposite) String ¶
func (i InstructionNewComposite) String() string
type InstructionNewCompositeAt ¶
type InstructionNewCompositeAt struct {
Kind common.CompositeKind
Type uint16
Address uint16
}
InstructionNewCompositeAt
Creates a new instance of the given composite kind and type, at the given address, and then pushes it onto the stack.
func DecodeNewCompositeAt ¶
func DecodeNewCompositeAt(ip *uint16, code []byte) (i InstructionNewCompositeAt)
func (InstructionNewCompositeAt) Encode ¶
func (i InstructionNewCompositeAt) Encode(code *[]byte)
func (InstructionNewCompositeAt) Opcode ¶
func (InstructionNewCompositeAt) Opcode() Opcode
func (InstructionNewCompositeAt) OperandsString ¶
func (i InstructionNewCompositeAt) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNewCompositeAt) Pretty ¶ added in v1.10.0
func (i InstructionNewCompositeAt) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNewCompositeAt) ResolvedOperandsString ¶
func (i InstructionNewCompositeAt) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNewCompositeAt) String ¶
func (i InstructionNewCompositeAt) String() string
type InstructionNewDictionary ¶
InstructionNewDictionary
Pops the given number of entries off the stack (twice the number of the given size), creates a new dictionary with the given type, size, and entries, and then pushes it onto the stack.
func DecodeNewDictionary ¶
func DecodeNewDictionary(ip *uint16, code []byte) (i InstructionNewDictionary)
func (InstructionNewDictionary) Encode ¶
func (i InstructionNewDictionary) Encode(code *[]byte)
func (InstructionNewDictionary) Opcode ¶
func (InstructionNewDictionary) Opcode() Opcode
func (InstructionNewDictionary) OperandsString ¶
func (i InstructionNewDictionary) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNewDictionary) Pretty ¶ added in v1.10.0
func (i InstructionNewDictionary) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNewDictionary) ResolvedOperandsString ¶
func (i InstructionNewDictionary) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNewDictionary) String ¶
func (i InstructionNewDictionary) String() string
type InstructionNewPath ¶
type InstructionNewPath struct {
Domain common.PathDomain
Identifier uint16
}
InstructionNewPath
Creates a new path with the given domain and identifier and then pushes it onto the stack.
func DecodeNewPath ¶
func DecodeNewPath(ip *uint16, code []byte) (i InstructionNewPath)
func (InstructionNewPath) Encode ¶
func (i InstructionNewPath) Encode(code *[]byte)
func (InstructionNewPath) Opcode ¶
func (InstructionNewPath) Opcode() Opcode
func (InstructionNewPath) OperandsString ¶
func (i InstructionNewPath) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNewPath) Pretty ¶ added in v1.10.0
func (i InstructionNewPath) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNewPath) ResolvedOperandsString ¶
func (i InstructionNewPath) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNewPath) String ¶
func (i InstructionNewPath) String() string
type InstructionNewRef ¶
InstructionNewRef
Pops a value off the stack, creates a new reference with the given type, and then pushes it onto the stack.
func DecodeNewRef ¶
func DecodeNewRef(ip *uint16, code []byte) (i InstructionNewRef)
func (InstructionNewRef) Encode ¶
func (i InstructionNewRef) Encode(code *[]byte)
func (InstructionNewRef) Opcode ¶
func (InstructionNewRef) Opcode() Opcode
func (InstructionNewRef) OperandsString ¶
func (i InstructionNewRef) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNewRef) Pretty ¶ added in v1.10.0
func (i InstructionNewRef) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNewRef) ResolvedOperandsString ¶
func (i InstructionNewRef) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNewRef) String ¶
func (i InstructionNewRef) String() string
type InstructionNewSimpleComposite ¶
type InstructionNewSimpleComposite struct {
Kind common.CompositeKind
Type uint16
}
InstructionNewSimpleComposite
Creates a new instance of a simple composite value of given kind and type, at address 0x0, and then pushes it onto the stack.
func DecodeNewSimpleComposite ¶
func DecodeNewSimpleComposite(ip *uint16, code []byte) (i InstructionNewSimpleComposite)
func (InstructionNewSimpleComposite) Encode ¶
func (i InstructionNewSimpleComposite) Encode(code *[]byte)
func (InstructionNewSimpleComposite) Opcode ¶
func (InstructionNewSimpleComposite) Opcode() Opcode
func (InstructionNewSimpleComposite) OperandsString ¶
func (i InstructionNewSimpleComposite) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNewSimpleComposite) Pretty ¶ added in v1.10.0
func (i InstructionNewSimpleComposite) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNewSimpleComposite) ResolvedOperandsString ¶
func (i InstructionNewSimpleComposite) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNewSimpleComposite) String ¶
func (i InstructionNewSimpleComposite) String() string
type InstructionNil ¶
type InstructionNil struct {
}
InstructionNil
Pushes the value `nil` onto the stack.
func (InstructionNil) Encode ¶
func (i InstructionNil) Encode(code *[]byte)
func (InstructionNil) Opcode ¶
func (InstructionNil) Opcode() Opcode
func (InstructionNil) OperandsString ¶
func (i InstructionNil) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNil) Pretty ¶ added in v1.10.0
func (i InstructionNil) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNil) ResolvedOperandsString ¶
func (i InstructionNil) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNil) String ¶
func (i InstructionNil) String() string
type InstructionNot ¶
type InstructionNot struct {
}
InstructionNot
Pops a boolean value off the stack, negates it, and then pushes the result back on to the stack.
func (InstructionNot) Encode ¶
func (i InstructionNot) Encode(code *[]byte)
func (InstructionNot) Opcode ¶
func (InstructionNot) Opcode() Opcode
func (InstructionNot) OperandsString ¶
func (i InstructionNot) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNot) Pretty ¶ added in v1.10.0
func (i InstructionNot) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNot) ResolvedOperandsString ¶
func (i InstructionNot) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNot) String ¶
func (i InstructionNot) String() string
type InstructionNotEqual ¶
type InstructionNotEqual struct {
}
InstructionNotEqual
Pops two values off the stack, checks if the first value is not equal to the second, and then pushes the result back on to the stack.
func (InstructionNotEqual) Encode ¶
func (i InstructionNotEqual) Encode(code *[]byte)
func (InstructionNotEqual) Opcode ¶
func (InstructionNotEqual) Opcode() Opcode
func (InstructionNotEqual) OperandsString ¶
func (i InstructionNotEqual) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionNotEqual) Pretty ¶ added in v1.10.0
func (i InstructionNotEqual) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionNotEqual) ResolvedOperandsString ¶
func (i InstructionNotEqual) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionNotEqual) String ¶
func (i InstructionNotEqual) String() string
type InstructionRemoveField ¶
type InstructionRemoveField struct {
FieldName uint16
}
InstructionRemoveField
Pops a value off the stack, the target. Remove the value of the given field from the target, and pushes it onto the stack.
func DecodeRemoveField ¶
func DecodeRemoveField(ip *uint16, code []byte) (i InstructionRemoveField)
func (InstructionRemoveField) Encode ¶
func (i InstructionRemoveField) Encode(code *[]byte)
func (InstructionRemoveField) Opcode ¶
func (InstructionRemoveField) Opcode() Opcode
func (InstructionRemoveField) OperandsString ¶
func (i InstructionRemoveField) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionRemoveField) Pretty ¶ added in v1.10.0
func (i InstructionRemoveField) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionRemoveField) ResolvedOperandsString ¶
func (i InstructionRemoveField) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionRemoveField) String ¶
func (i InstructionRemoveField) String() string
type InstructionRemoveIndex ¶
InstructionRemoveIndex
Pops two values off the stack, the array and the index. Removes the value at the given index from the array and pushes it onto the stack. If pushPlaceholder is true, also pushes the placeholder value that was inserted, if any, or nil otherwise.
func DecodeRemoveIndex ¶ added in v1.9.7
func DecodeRemoveIndex(ip *uint16, code []byte) (i InstructionRemoveIndex)
func (InstructionRemoveIndex) Encode ¶
func (i InstructionRemoveIndex) Encode(code *[]byte)
func (InstructionRemoveIndex) Opcode ¶
func (InstructionRemoveIndex) Opcode() Opcode
func (InstructionRemoveIndex) OperandsString ¶
func (i InstructionRemoveIndex) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionRemoveIndex) Pretty ¶ added in v1.10.0
func (i InstructionRemoveIndex) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionRemoveIndex) ResolvedOperandsString ¶
func (i InstructionRemoveIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionRemoveIndex) String ¶
func (i InstructionRemoveIndex) String() string
type InstructionRemoveTypeIndex ¶ added in v1.8.0
InstructionRemoveTypeIndex
Pops a value off the stack, the target. Remove the value of the given type key from the target. Additionally destroy if removed type is resource.
func DecodeRemoveTypeIndex ¶ added in v1.8.0
func DecodeRemoveTypeIndex(ip *uint16, code []byte) (i InstructionRemoveTypeIndex)
func (InstructionRemoveTypeIndex) Encode ¶ added in v1.8.0
func (i InstructionRemoveTypeIndex) Encode(code *[]byte)
func (InstructionRemoveTypeIndex) Opcode ¶ added in v1.8.0
func (InstructionRemoveTypeIndex) Opcode() Opcode
func (InstructionRemoveTypeIndex) OperandsString ¶ added in v1.8.0
func (i InstructionRemoveTypeIndex) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionRemoveTypeIndex) Pretty ¶ added in v1.10.0
func (i InstructionRemoveTypeIndex) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionRemoveTypeIndex) ResolvedOperandsString ¶ added in v1.8.0
func (i InstructionRemoveTypeIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionRemoveTypeIndex) String ¶ added in v1.8.0
func (i InstructionRemoveTypeIndex) String() string
type InstructionReturn ¶
type InstructionReturn struct {
}
InstructionReturn
Returns from the current function, without a value.
func (InstructionReturn) Encode ¶
func (i InstructionReturn) Encode(code *[]byte)
func (InstructionReturn) Opcode ¶
func (InstructionReturn) Opcode() Opcode
func (InstructionReturn) OperandsString ¶
func (i InstructionReturn) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionReturn) Pretty ¶ added in v1.10.0
func (i InstructionReturn) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionReturn) ResolvedOperandsString ¶
func (i InstructionReturn) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionReturn) String ¶
func (i InstructionReturn) String() string
type InstructionReturnValue ¶
type InstructionReturnValue struct {
}
InstructionReturnValue
Pops a value off the stack and then returns from the current function with that value.
func (InstructionReturnValue) Encode ¶
func (i InstructionReturnValue) Encode(code *[]byte)
func (InstructionReturnValue) Opcode ¶
func (InstructionReturnValue) Opcode() Opcode
func (InstructionReturnValue) OperandsString ¶
func (i InstructionReturnValue) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionReturnValue) Pretty ¶ added in v1.10.0
func (i InstructionReturnValue) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionReturnValue) ResolvedOperandsString ¶
func (i InstructionReturnValue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionReturnValue) String ¶
func (i InstructionReturnValue) String() string
type InstructionSame ¶ added in v1.9.7
type InstructionSame struct {
}
InstructionSame
Pops two values off the stack, checks if the first value is the same as the second, and then pushes the result back on to the stack.
func (InstructionSame) Encode ¶ added in v1.9.7
func (i InstructionSame) Encode(code *[]byte)
func (InstructionSame) Opcode ¶ added in v1.9.7
func (InstructionSame) Opcode() Opcode
func (InstructionSame) OperandsString ¶ added in v1.9.7
func (i InstructionSame) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionSame) Pretty ¶ added in v1.10.0
func (i InstructionSame) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionSame) ResolvedOperandsString ¶ added in v1.9.7
func (i InstructionSame) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionSame) String ¶ added in v1.9.7
func (i InstructionSame) String() string
type InstructionSetAttachmentBase ¶ added in v1.8.0
type InstructionSetAttachmentBase struct {
}
InstructionSetAttachmentBase
Pops two values off the stack, the attachment and the base, sets the attachment's base value to base.
func (InstructionSetAttachmentBase) Encode ¶ added in v1.8.0
func (i InstructionSetAttachmentBase) Encode(code *[]byte)
func (InstructionSetAttachmentBase) Opcode ¶ added in v1.8.0
func (InstructionSetAttachmentBase) Opcode() Opcode
func (InstructionSetAttachmentBase) OperandsString ¶ added in v1.8.0
func (i InstructionSetAttachmentBase) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionSetAttachmentBase) Pretty ¶ added in v1.10.0
func (i InstructionSetAttachmentBase) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionSetAttachmentBase) ResolvedOperandsString ¶ added in v1.8.0
func (i InstructionSetAttachmentBase) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionSetAttachmentBase) String ¶ added in v1.8.0
func (i InstructionSetAttachmentBase) String() string
type InstructionSetField ¶
InstructionSetField
Pops two values off the stack, the target and the value, and then sets the field at the given index of the target to the value.
func DecodeSetField ¶
func DecodeSetField(ip *uint16, code []byte) (i InstructionSetField)
func (InstructionSetField) Encode ¶
func (i InstructionSetField) Encode(code *[]byte)
func (InstructionSetField) Opcode ¶
func (InstructionSetField) Opcode() Opcode
func (InstructionSetField) OperandsString ¶
func (i InstructionSetField) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionSetField) Pretty ¶ added in v1.10.0
func (i InstructionSetField) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionSetField) ResolvedOperandsString ¶
func (i InstructionSetField) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionSetField) String ¶
func (i InstructionSetField) String() string
type InstructionSetGlobal ¶
type InstructionSetGlobal struct {
Global uint16
}
InstructionSetGlobal
Pops a value off the stack and then sets the global at the given index to that value.
func DecodeSetGlobal ¶
func DecodeSetGlobal(ip *uint16, code []byte) (i InstructionSetGlobal)
func (InstructionSetGlobal) Encode ¶
func (i InstructionSetGlobal) Encode(code *[]byte)
func (InstructionSetGlobal) Opcode ¶
func (InstructionSetGlobal) Opcode() Opcode
func (InstructionSetGlobal) OperandsString ¶
func (i InstructionSetGlobal) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionSetGlobal) Pretty ¶ added in v1.10.0
func (i InstructionSetGlobal) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionSetGlobal) ResolvedOperandsString ¶
func (i InstructionSetGlobal) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionSetGlobal) String ¶
func (i InstructionSetGlobal) String() string
type InstructionSetIndex ¶
type InstructionSetIndex struct {
IndexedType uint16
}
InstructionSetIndex
Pops three values off the stack, the array, the index, and the value, and then sets the value at the given index of the array to the value.
func DecodeSetIndex ¶ added in v1.9.10
func DecodeSetIndex(ip *uint16, code []byte) (i InstructionSetIndex)
func (InstructionSetIndex) Encode ¶
func (i InstructionSetIndex) Encode(code *[]byte)
func (InstructionSetIndex) Opcode ¶
func (InstructionSetIndex) Opcode() Opcode
func (InstructionSetIndex) OperandsString ¶
func (i InstructionSetIndex) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionSetIndex) Pretty ¶ added in v1.10.0
func (i InstructionSetIndex) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionSetIndex) ResolvedOperandsString ¶
func (i InstructionSetIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionSetIndex) String ¶
func (i InstructionSetIndex) String() string
type InstructionSetLocal ¶
InstructionSetLocal
Pops a value off the stack and then sets the local at the given index to that value.
func DecodeSetLocal ¶
func DecodeSetLocal(ip *uint16, code []byte) (i InstructionSetLocal)
func (InstructionSetLocal) Encode ¶
func (i InstructionSetLocal) Encode(code *[]byte)
func (InstructionSetLocal) Opcode ¶
func (InstructionSetLocal) Opcode() Opcode
func (InstructionSetLocal) OperandsString ¶
func (i InstructionSetLocal) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionSetLocal) Pretty ¶ added in v1.10.0
func (i InstructionSetLocal) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionSetLocal) ResolvedOperandsString ¶
func (i InstructionSetLocal) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionSetLocal) String ¶
func (i InstructionSetLocal) String() string
type InstructionSetTypeIndex ¶ added in v1.8.0
InstructionSetTypeIndex
Pops two values off the stack, the target and the value, and then sets the type key at the given index of the target to the value, and pushes it onto the stack.
func DecodeSetTypeIndex ¶ added in v1.8.0
func DecodeSetTypeIndex(ip *uint16, code []byte) (i InstructionSetTypeIndex)
func (InstructionSetTypeIndex) Encode ¶ added in v1.8.0
func (i InstructionSetTypeIndex) Encode(code *[]byte)
func (InstructionSetTypeIndex) Opcode ¶ added in v1.8.0
func (InstructionSetTypeIndex) Opcode() Opcode
func (InstructionSetTypeIndex) OperandsString ¶ added in v1.8.0
func (i InstructionSetTypeIndex) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionSetTypeIndex) Pretty ¶ added in v1.10.0
func (i InstructionSetTypeIndex) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionSetTypeIndex) ResolvedOperandsString ¶ added in v1.8.0
func (i InstructionSetTypeIndex) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionSetTypeIndex) String ¶ added in v1.8.0
func (i InstructionSetTypeIndex) String() string
type InstructionSetUpvalue ¶
type InstructionSetUpvalue struct {
Upvalue uint16
}
InstructionSetUpvalue
Pops a value off the stack and then sets the upvalue at the given index to that value.
func DecodeSetUpvalue ¶
func DecodeSetUpvalue(ip *uint16, code []byte) (i InstructionSetUpvalue)
func (InstructionSetUpvalue) Encode ¶
func (i InstructionSetUpvalue) Encode(code *[]byte)
func (InstructionSetUpvalue) Opcode ¶
func (InstructionSetUpvalue) Opcode() Opcode
func (InstructionSetUpvalue) OperandsString ¶
func (i InstructionSetUpvalue) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionSetUpvalue) Pretty ¶ added in v1.10.0
func (i InstructionSetUpvalue) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionSetUpvalue) ResolvedOperandsString ¶
func (i InstructionSetUpvalue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionSetUpvalue) String ¶
func (i InstructionSetUpvalue) String() string
type InstructionSimpleCast ¶
InstructionSimpleCast
Pops a value off the stack, casts it to the given type, and then pushes it back on to the stack.
func DecodeSimpleCast ¶
func DecodeSimpleCast(ip *uint16, code []byte) (i InstructionSimpleCast)
func (InstructionSimpleCast) Encode ¶
func (i InstructionSimpleCast) Encode(code *[]byte)
func (InstructionSimpleCast) Opcode ¶
func (InstructionSimpleCast) Opcode() Opcode
func (InstructionSimpleCast) OperandsString ¶
func (i InstructionSimpleCast) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionSimpleCast) Pretty ¶ added in v1.10.0
func (i InstructionSimpleCast) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionSimpleCast) ResolvedOperandsString ¶
func (i InstructionSimpleCast) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionSimpleCast) String ¶
func (i InstructionSimpleCast) String() string
type InstructionStatement ¶
type InstructionStatement struct {
}
InstructionStatement
Indicates the start of a statement.
func (InstructionStatement) Encode ¶
func (i InstructionStatement) Encode(code *[]byte)
func (InstructionStatement) Opcode ¶
func (InstructionStatement) Opcode() Opcode
func (InstructionStatement) OperandsString ¶
func (i InstructionStatement) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionStatement) Pretty ¶ added in v1.10.0
func (i InstructionStatement) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionStatement) ResolvedOperandsString ¶
func (i InstructionStatement) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionStatement) String ¶
func (i InstructionStatement) String() string
type InstructionSubtract ¶
type InstructionSubtract struct {
}
InstructionSubtract
Pops two number values off the stack, subtracts the second from the first, and then pushes the result back on to the stack.
func (InstructionSubtract) Encode ¶
func (i InstructionSubtract) Encode(code *[]byte)
func (InstructionSubtract) Opcode ¶
func (InstructionSubtract) Opcode() Opcode
func (InstructionSubtract) OperandsString ¶
func (i InstructionSubtract) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionSubtract) Pretty ¶ added in v1.10.0
func (i InstructionSubtract) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionSubtract) ResolvedOperandsString ¶
func (i InstructionSubtract) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionSubtract) String ¶
func (i InstructionSubtract) String() string
type InstructionTemplateString ¶
type InstructionTemplateString struct {
ExprSize uint16
}
InstructionTemplateString
Represents a string template with an array of values (strings) and an array of expressions, pops both off the stack.
func DecodeTemplateString ¶
func DecodeTemplateString(ip *uint16, code []byte) (i InstructionTemplateString)
func (InstructionTemplateString) Encode ¶
func (i InstructionTemplateString) Encode(code *[]byte)
func (InstructionTemplateString) Opcode ¶
func (InstructionTemplateString) Opcode() Opcode
func (InstructionTemplateString) OperandsString ¶
func (i InstructionTemplateString) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionTemplateString) Pretty ¶ added in v1.10.0
func (i InstructionTemplateString) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionTemplateString) ResolvedOperandsString ¶
func (i InstructionTemplateString) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionTemplateString) String ¶
func (i InstructionTemplateString) String() string
type InstructionTransfer ¶
type InstructionTransfer struct {
}
InstructionTransfer
Pops a value off the stack, calls transfer, and then pushes it back on to the stack.
func (InstructionTransfer) Encode ¶
func (i InstructionTransfer) Encode(code *[]byte)
func (InstructionTransfer) Opcode ¶
func (InstructionTransfer) Opcode() Opcode
func (InstructionTransfer) OperandsString ¶
func (i InstructionTransfer) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionTransfer) Pretty ¶ added in v1.10.0
func (i InstructionTransfer) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionTransfer) ResolvedOperandsString ¶
func (i InstructionTransfer) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionTransfer) String ¶
func (i InstructionTransfer) String() string
type InstructionTransferAndConvert ¶
InstructionTransferAndConvert
Pops a value off the stack, transfer and converts it to the given type, and then pushes it back on to the stack.
func DecodeTransferAndConvert ¶
func DecodeTransferAndConvert(ip *uint16, code []byte) (i InstructionTransferAndConvert)
func (InstructionTransferAndConvert) Encode ¶
func (i InstructionTransferAndConvert) Encode(code *[]byte)
func (InstructionTransferAndConvert) Opcode ¶
func (InstructionTransferAndConvert) Opcode() Opcode
func (InstructionTransferAndConvert) OperandsString ¶
func (i InstructionTransferAndConvert) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionTransferAndConvert) Pretty ¶ added in v1.10.0
func (i InstructionTransferAndConvert) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionTransferAndConvert) ResolvedOperandsString ¶
func (i InstructionTransferAndConvert) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionTransferAndConvert) String ¶
func (i InstructionTransferAndConvert) String() string
type InstructionTrue ¶
type InstructionTrue struct {
}
InstructionTrue
Pushes the boolean value `true` onto the stack.
func (InstructionTrue) Encode ¶
func (i InstructionTrue) Encode(code *[]byte)
func (InstructionTrue) Opcode ¶
func (InstructionTrue) Opcode() Opcode
func (InstructionTrue) OperandsString ¶
func (i InstructionTrue) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionTrue) Pretty ¶ added in v1.10.0
func (i InstructionTrue) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionTrue) ResolvedOperandsString ¶
func (i InstructionTrue) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionTrue) String ¶
func (i InstructionTrue) String() string
type InstructionUnknown ¶
type InstructionUnknown struct {
}
InstructionUnknown
An unknown instruction.
func (InstructionUnknown) Encode ¶
func (i InstructionUnknown) Encode(code *[]byte)
func (InstructionUnknown) Opcode ¶
func (InstructionUnknown) Opcode() Opcode
func (InstructionUnknown) OperandsString ¶
func (i InstructionUnknown) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionUnknown) Pretty ¶ added in v1.10.0
func (i InstructionUnknown) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionUnknown) ResolvedOperandsString ¶
func (i InstructionUnknown) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionUnknown) String ¶
func (i InstructionUnknown) String() string
type InstructionUnwrap ¶
type InstructionUnwrap struct {
}
InstructionUnwrap
Pops a value off the stack. If the value is an optional, pushes the optional's inner value back on to the stack. Panics if the value is `nil`. If the value is not an option, pushes the value back on to the stack.
func (InstructionUnwrap) Encode ¶
func (i InstructionUnwrap) Encode(code *[]byte)
func (InstructionUnwrap) Opcode ¶
func (InstructionUnwrap) Opcode() Opcode
func (InstructionUnwrap) OperandsString ¶
func (i InstructionUnwrap) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionUnwrap) Pretty ¶ added in v1.10.0
func (i InstructionUnwrap) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionUnwrap) ResolvedOperandsString ¶
func (i InstructionUnwrap) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionUnwrap) String ¶
func (i InstructionUnwrap) String() string
type InstructionVoid ¶
type InstructionVoid struct {
}
InstructionVoid
Pushes the void value onto the stack.
func (InstructionVoid) Encode ¶
func (i InstructionVoid) Encode(code *[]byte)
func (InstructionVoid) Opcode ¶
func (InstructionVoid) Opcode() Opcode
func (InstructionVoid) OperandsString ¶
func (i InstructionVoid) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionVoid) Pretty ¶ added in v1.10.0
func (i InstructionVoid) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionVoid) ResolvedOperandsString ¶
func (i InstructionVoid) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionVoid) String ¶
func (i InstructionVoid) String() string
type InstructionWrap ¶
type InstructionWrap struct {
}
InstructionWrap
Pops a value off the stack, wrap it with an optional, and pushes back onto the stack.
func (InstructionWrap) Encode ¶
func (i InstructionWrap) Encode(code *[]byte)
func (InstructionWrap) Opcode ¶
func (InstructionWrap) Opcode() Opcode
func (InstructionWrap) OperandsString ¶
func (i InstructionWrap) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionWrap) Pretty ¶ added in v1.10.0
func (i InstructionWrap) Pretty(program ProgramForInstructions) PrettyInstruction
func (InstructionWrap) ResolvedOperandsString ¶
func (i InstructionWrap) ResolvedOperandsString(sb *strings.Builder, program ProgramForInstructions, colorize bool)
func (InstructionWrap) String ¶
func (i InstructionWrap) String() string
type JumpInfo ¶ added in v1.8.0
type JumpInfo struct {
Target int // target instruction index
JumpType JumpType // conditional, unconditional, call, return
Condition string // condition description (e.g., "if false", "if nil")
}
JumpInfo describes a jump from one instruction to another
type JumpType ¶ added in v1.8.0
type JumpType int
JumpType categorizes different kinds of control flow
type Opcode ¶
type Opcode byte
const ( Unknown Opcode = iota Return ReturnValue Jump JumpIfFalse JumpIfTrue JumpIfNil Add Subtract Multiply Divide Mod Negate BitwiseOr BitwiseAnd BitwiseXor BitwiseLeftShift BitwiseRightShift Less Greater LessOrEqual GreaterOrEqual Same Equal NotEqual Not Wrap Unwrap Destroy TransferAndConvert SimpleCast FailableCast ForceCast Deref Transfer Convert True False Void Nil NewSimpleComposite NewComposite NewCompositeAt NewPath NewArray NewDictionary NewRef NewClosure GetConstant GetLocal SetLocal GetUpvalue SetUpvalue CloseUpvalue GetGlobal SetGlobal GetField RemoveField SetField SetIndex GetIndex RemoveIndex GetMethod GetTypeIndex SetTypeIndex RemoveTypeIndex SetAttachmentBase GetFieldLocal Invoke InvokeTyped Drop Dup Iterator IteratorHasNext IteratorNext IteratorEnd EmitEvent Loop Statement TemplateString // NOTE: not an actual opcode, must be last item OpcodeMax )
func (Opcode) IsControlFlow ¶
type PrettyInstruction ¶ added in v1.10.0
PrettyInstruction represents an instruction with resolved operands. Pretty instructions are for debugging and display purposes only, not for runtime execution. They are useful for human-readable instruction dumps, analysis tools, debugging, and testing. They replace index-based operands (constantIndex, typeIndex, functionIndex) with their resolved values (DecodedConstant, StaticType, string) for easier human readability.
type PrettyInstructionAdd ¶ added in v1.10.0
type PrettyInstructionAdd struct {
}
PrettyInstructionAdd
Pretty form of InstructionAdd with resolved operands. Pops two number values off the stack, adds them together, and then pushes the result back on to the stack.
func (PrettyInstructionAdd) Opcode ¶ added in v1.10.0
func (PrettyInstructionAdd) Opcode() Opcode
func (PrettyInstructionAdd) String ¶ added in v1.10.0
func (i PrettyInstructionAdd) String() string
type PrettyInstructionBitwiseAnd ¶ added in v1.10.0
type PrettyInstructionBitwiseAnd struct {
}
PrettyInstructionBitwiseAnd
Pretty form of InstructionBitwiseAnd with resolved operands. Pops two integer values off the stack, performs a bitwise AND operation on them, and then pushes the result back on to the stack.
func (PrettyInstructionBitwiseAnd) Opcode ¶ added in v1.10.0
func (PrettyInstructionBitwiseAnd) Opcode() Opcode
func (PrettyInstructionBitwiseAnd) String ¶ added in v1.10.0
func (i PrettyInstructionBitwiseAnd) String() string
type PrettyInstructionBitwiseLeftShift ¶ added in v1.10.0
type PrettyInstructionBitwiseLeftShift struct {
}
PrettyInstructionBitwiseLeftShift
Pretty form of InstructionBitwiseLeftShift with resolved operands. Pops two integer values off the stack, performs a bitwise left shift operation on them, and then pushes the result back on to the stack.
func (PrettyInstructionBitwiseLeftShift) Opcode ¶ added in v1.10.0
func (PrettyInstructionBitwiseLeftShift) Opcode() Opcode
func (PrettyInstructionBitwiseLeftShift) String ¶ added in v1.10.0
func (i PrettyInstructionBitwiseLeftShift) String() string
type PrettyInstructionBitwiseOr ¶ added in v1.10.0
type PrettyInstructionBitwiseOr struct {
}
PrettyInstructionBitwiseOr
Pretty form of InstructionBitwiseOr with resolved operands. Pops two integer values off the stack, performs a bitwise OR operation on them, and then pushes the result back on to the stack.
func (PrettyInstructionBitwiseOr) Opcode ¶ added in v1.10.0
func (PrettyInstructionBitwiseOr) Opcode() Opcode
func (PrettyInstructionBitwiseOr) String ¶ added in v1.10.0
func (i PrettyInstructionBitwiseOr) String() string
type PrettyInstructionBitwiseRightShift ¶ added in v1.10.0
type PrettyInstructionBitwiseRightShift struct {
}
PrettyInstructionBitwiseRightShift
Pretty form of InstructionBitwiseRightShift with resolved operands. Pops two integer values off the stack, performs a bitwise right shift operation on them, and then pushes the result back on to the stack.
func (PrettyInstructionBitwiseRightShift) Opcode ¶ added in v1.10.0
func (PrettyInstructionBitwiseRightShift) Opcode() Opcode
func (PrettyInstructionBitwiseRightShift) String ¶ added in v1.10.0
func (i PrettyInstructionBitwiseRightShift) String() string
type PrettyInstructionBitwiseXor ¶ added in v1.10.0
type PrettyInstructionBitwiseXor struct {
}
PrettyInstructionBitwiseXor
Pretty form of InstructionBitwiseXor with resolved operands. Pops two integer values off the stack, performs a bitwise XOR operation on them, and then pushes the result back on to the stack.
func (PrettyInstructionBitwiseXor) Opcode ¶ added in v1.10.0
func (PrettyInstructionBitwiseXor) Opcode() Opcode
func (PrettyInstructionBitwiseXor) String ¶ added in v1.10.0
func (i PrettyInstructionBitwiseXor) String() string
type PrettyInstructionCloseUpvalue ¶ added in v1.10.0
type PrettyInstructionCloseUpvalue struct {
Local uint16
}
PrettyInstructionCloseUpvalue
Pretty form of InstructionCloseUpvalue with resolved operands. Closes the upvalue for the local at the given index.
func (PrettyInstructionCloseUpvalue) Opcode ¶ added in v1.10.0
func (PrettyInstructionCloseUpvalue) Opcode() Opcode
func (PrettyInstructionCloseUpvalue) String ¶ added in v1.10.0
func (i PrettyInstructionCloseUpvalue) String() string
type PrettyInstructionConvert ¶ added in v1.10.0
type PrettyInstructionConvert struct {
ValueType interpreter.StaticType
TargetType interpreter.StaticType
}
PrettyInstructionConvert
Pretty form of InstructionConvert with resolved operands. Pops a value off the stack, converts it to the given type, and then pushes it back on to the stack.
func (PrettyInstructionConvert) Opcode ¶ added in v1.10.0
func (PrettyInstructionConvert) Opcode() Opcode
func (PrettyInstructionConvert) String ¶ added in v1.10.0
func (i PrettyInstructionConvert) String() string
type PrettyInstructionDeref ¶ added in v1.10.0
type PrettyInstructionDeref struct {
}
PrettyInstructionDeref
Pretty form of InstructionDeref with resolved operands. Pops an (optional) reference off the stack, dereferences it, and then pushes the value back on to the stack.
func (PrettyInstructionDeref) Opcode ¶ added in v1.10.0
func (PrettyInstructionDeref) Opcode() Opcode
func (PrettyInstructionDeref) String ¶ added in v1.10.0
func (i PrettyInstructionDeref) String() string
type PrettyInstructionDestroy ¶ added in v1.10.0
type PrettyInstructionDestroy struct {
}
PrettyInstructionDestroy
Pretty form of InstructionDestroy with resolved operands. Pops a resource off the stack and then destroys it.
func (PrettyInstructionDestroy) Opcode ¶ added in v1.10.0
func (PrettyInstructionDestroy) Opcode() Opcode
func (PrettyInstructionDestroy) String ¶ added in v1.10.0
func (i PrettyInstructionDestroy) String() string
type PrettyInstructionDivide ¶ added in v1.10.0
type PrettyInstructionDivide struct {
}
PrettyInstructionDivide
Pretty form of InstructionDivide with resolved operands. Pops two number values off the stack, divides the first by the second, and then pushes the result back on to the stack.
func (PrettyInstructionDivide) Opcode ¶ added in v1.10.0
func (PrettyInstructionDivide) Opcode() Opcode
func (PrettyInstructionDivide) String ¶ added in v1.10.0
func (i PrettyInstructionDivide) String() string
type PrettyInstructionDrop ¶ added in v1.10.0
type PrettyInstructionDrop struct {
}
PrettyInstructionDrop
Pretty form of InstructionDrop with resolved operands. Pops a value off the stack and discards it.
func (PrettyInstructionDrop) Opcode ¶ added in v1.10.0
func (PrettyInstructionDrop) Opcode() Opcode
func (PrettyInstructionDrop) String ¶ added in v1.10.0
func (i PrettyInstructionDrop) String() string
type PrettyInstructionDup ¶ added in v1.10.0
type PrettyInstructionDup struct {
}
PrettyInstructionDup
Pretty form of InstructionDup with resolved operands. Pops a value off the stack, duplicates it, and then pushes the original and the copy back on to the stack.
func (PrettyInstructionDup) Opcode ¶ added in v1.10.0
func (PrettyInstructionDup) Opcode() Opcode
func (PrettyInstructionDup) String ¶ added in v1.10.0
func (i PrettyInstructionDup) String() string
type PrettyInstructionEmitEvent ¶ added in v1.10.0
type PrettyInstructionEmitEvent struct {
Type interpreter.StaticType
ArgCount uint16
}
PrettyInstructionEmitEvent
Pretty form of InstructionEmitEvent with resolved operands. Pops arguments of the stack and then emits an event with the given type with them.
func (PrettyInstructionEmitEvent) Opcode ¶ added in v1.10.0
func (PrettyInstructionEmitEvent) Opcode() Opcode
func (PrettyInstructionEmitEvent) String ¶ added in v1.10.0
func (i PrettyInstructionEmitEvent) String() string
type PrettyInstructionEqual ¶ added in v1.10.0
type PrettyInstructionEqual struct {
}
PrettyInstructionEqual
Pretty form of InstructionEqual with resolved operands. Pops two values off the stack, checks if the first value is equal to the second, and then pushes the result back on to the stack.
func (PrettyInstructionEqual) Opcode ¶ added in v1.10.0
func (PrettyInstructionEqual) Opcode() Opcode
func (PrettyInstructionEqual) String ¶ added in v1.10.0
func (i PrettyInstructionEqual) String() string
type PrettyInstructionFailableCast ¶ added in v1.10.0
type PrettyInstructionFailableCast struct {
TargetType interpreter.StaticType
ValueType interpreter.StaticType
}
PrettyInstructionFailableCast
Pretty form of InstructionFailableCast with resolved operands. Pops a value off the stack and casts it to the given type. If the value is a subtype of the given type, then casted value is pushed back on to the stack. If the value is not a subtype of the given type, then a `nil` is pushed to the stack instead.
func (PrettyInstructionFailableCast) Opcode ¶ added in v1.10.0
func (PrettyInstructionFailableCast) Opcode() Opcode
func (PrettyInstructionFailableCast) String ¶ added in v1.10.0
func (i PrettyInstructionFailableCast) String() string
type PrettyInstructionFalse ¶ added in v1.10.0
type PrettyInstructionFalse struct {
}
PrettyInstructionFalse
Pretty form of InstructionFalse with resolved operands. Pushes the boolean value `false` onto the stack.
func (PrettyInstructionFalse) Opcode ¶ added in v1.10.0
func (PrettyInstructionFalse) Opcode() Opcode
func (PrettyInstructionFalse) String ¶ added in v1.10.0
func (i PrettyInstructionFalse) String() string
type PrettyInstructionForceCast ¶ added in v1.10.0
type PrettyInstructionForceCast struct {
TargetType interpreter.StaticType
ValueType interpreter.StaticType
}
PrettyInstructionForceCast
Pretty form of InstructionForceCast with resolved operands. Pops a value off the stack, force-casts it to the given type, and then pushes it back on to the stack. Panics if the value is not a subtype of the given type.
func (PrettyInstructionForceCast) Opcode ¶ added in v1.10.0
func (PrettyInstructionForceCast) Opcode() Opcode
func (PrettyInstructionForceCast) String ¶ added in v1.10.0
func (i PrettyInstructionForceCast) String() string
type PrettyInstructionGetConstant ¶ added in v1.10.0
type PrettyInstructionGetConstant struct {
Constant constant.DecodedConstant
}
PrettyInstructionGetConstant
Pretty form of InstructionGetConstant with resolved operands. Pushes the constant at the given index onto the stack.
func (PrettyInstructionGetConstant) Opcode ¶ added in v1.10.0
func (PrettyInstructionGetConstant) Opcode() Opcode
func (PrettyInstructionGetConstant) String ¶ added in v1.10.0
func (i PrettyInstructionGetConstant) String() string
type PrettyInstructionGetField ¶ added in v1.10.0
type PrettyInstructionGetField struct {
FieldName constant.DecodedConstant
AccessedType interpreter.StaticType
}
PrettyInstructionGetField
Pretty form of InstructionGetField with resolved operands. Pops a value off the stack, the target, and then pushes the value of the field at the given index onto the stack.
func (PrettyInstructionGetField) Opcode ¶ added in v1.10.0
func (PrettyInstructionGetField) Opcode() Opcode
func (PrettyInstructionGetField) String ¶ added in v1.10.0
func (i PrettyInstructionGetField) String() string
type PrettyInstructionGetFieldLocal ¶ added in v1.10.0
type PrettyInstructionGetFieldLocal struct {
FieldName constant.DecodedConstant
AccessedType interpreter.StaticType
Local uint16
}
PrettyInstructionGetFieldLocal
Pretty form of InstructionGetFieldLocal with resolved operands. Pops a value off the stack, the target, and then pushes the value of the field at the given index onto the stack.
func (PrettyInstructionGetFieldLocal) Opcode ¶ added in v1.10.0
func (PrettyInstructionGetFieldLocal) Opcode() Opcode
func (PrettyInstructionGetFieldLocal) String ¶ added in v1.10.0
func (i PrettyInstructionGetFieldLocal) String() string
type PrettyInstructionGetGlobal ¶ added in v1.10.0
type PrettyInstructionGetGlobal struct {
Global uint16
}
PrettyInstructionGetGlobal
Pretty form of InstructionGetGlobal with resolved operands. Pushes the value of the global at the given index onto the stack.
func (PrettyInstructionGetGlobal) Opcode ¶ added in v1.10.0
func (PrettyInstructionGetGlobal) Opcode() Opcode
func (PrettyInstructionGetGlobal) String ¶ added in v1.10.0
func (i PrettyInstructionGetGlobal) String() string
type PrettyInstructionGetIndex ¶ added in v1.10.0
type PrettyInstructionGetIndex struct {
IndexedType interpreter.StaticType
}
PrettyInstructionGetIndex
Pretty form of InstructionGetIndex with resolved operands. Pops two values off the stack, the array and the index, and then pushes the value at the given index of the array onto the stack.
func (PrettyInstructionGetIndex) Opcode ¶ added in v1.10.0
func (PrettyInstructionGetIndex) Opcode() Opcode
func (PrettyInstructionGetIndex) String ¶ added in v1.10.0
func (i PrettyInstructionGetIndex) String() string
type PrettyInstructionGetLocal ¶ added in v1.10.0
type PrettyInstructionGetLocal struct {
Local uint16
}
PrettyInstructionGetLocal
Pretty form of InstructionGetLocal with resolved operands. Pushes the value of the local at the given index onto the stack.
func (PrettyInstructionGetLocal) Opcode ¶ added in v1.10.0
func (PrettyInstructionGetLocal) Opcode() Opcode
func (PrettyInstructionGetLocal) String ¶ added in v1.10.0
func (i PrettyInstructionGetLocal) String() string
type PrettyInstructionGetMethod ¶ added in v1.10.0
type PrettyInstructionGetMethod struct {
Method uint16
ReceiverType interpreter.StaticType
}
PrettyInstructionGetMethod
Pretty form of InstructionGetMethod with resolved operands. Pops a value off the stack, the receiver, and then pushes the value of the function at the given index onto the stack.
func (PrettyInstructionGetMethod) Opcode ¶ added in v1.10.0
func (PrettyInstructionGetMethod) Opcode() Opcode
func (PrettyInstructionGetMethod) String ¶ added in v1.10.0
func (i PrettyInstructionGetMethod) String() string
type PrettyInstructionGetTypeIndex ¶ added in v1.10.0
type PrettyInstructionGetTypeIndex struct {
IndexedType interpreter.StaticType
IndexingType interpreter.StaticType
}
PrettyInstructionGetTypeIndex
Pretty form of InstructionGetTypeIndex with resolved operands. Pops a value off the stack, the target, and then pushes the value of the type key at the given index onto the stack.
func (PrettyInstructionGetTypeIndex) Opcode ¶ added in v1.10.0
func (PrettyInstructionGetTypeIndex) Opcode() Opcode
func (PrettyInstructionGetTypeIndex) String ¶ added in v1.10.0
func (i PrettyInstructionGetTypeIndex) String() string
type PrettyInstructionGetUpvalue ¶ added in v1.10.0
type PrettyInstructionGetUpvalue struct {
Upvalue uint16
}
PrettyInstructionGetUpvalue
Pretty form of InstructionGetUpvalue with resolved operands. Pushes the value of the upvalue at the given index onto the stack.
func (PrettyInstructionGetUpvalue) Opcode ¶ added in v1.10.0
func (PrettyInstructionGetUpvalue) Opcode() Opcode
func (PrettyInstructionGetUpvalue) String ¶ added in v1.10.0
func (i PrettyInstructionGetUpvalue) String() string
type PrettyInstructionGreater ¶ added in v1.10.0
type PrettyInstructionGreater struct {
}
PrettyInstructionGreater
Pretty form of InstructionGreater with resolved operands. Pops two values off the stack, checks if the first value is greater than the second, and then pushes the result back on to the stack.
func (PrettyInstructionGreater) Opcode ¶ added in v1.10.0
func (PrettyInstructionGreater) Opcode() Opcode
func (PrettyInstructionGreater) String ¶ added in v1.10.0
func (i PrettyInstructionGreater) String() string
type PrettyInstructionGreaterOrEqual ¶ added in v1.10.0
type PrettyInstructionGreaterOrEqual struct {
}
PrettyInstructionGreaterOrEqual
Pretty form of InstructionGreaterOrEqual with resolved operands. Pops two values off the stack, checks if the first value is greater than or equal to the second, and then pushes the result back on to the stack.
func (PrettyInstructionGreaterOrEqual) Opcode ¶ added in v1.10.0
func (PrettyInstructionGreaterOrEqual) Opcode() Opcode
func (PrettyInstructionGreaterOrEqual) String ¶ added in v1.10.0
func (i PrettyInstructionGreaterOrEqual) String() string
type PrettyInstructionInvoke ¶ added in v1.10.0
type PrettyInstructionInvoke struct {
TypeArgs []interpreter.StaticType
ArgCount uint16
ReturnType interpreter.StaticType
}
PrettyInstructionInvoke
Pretty form of InstructionInvoke with resolved operands. Pops the function and arguments off the stack, invokes the function with the arguments, and then pushes the result back on to the stack. This instruction is only passes the argument count. If the argument types are needed, use `invokeTyped`.
func (PrettyInstructionInvoke) Opcode ¶ added in v1.10.0
func (PrettyInstructionInvoke) Opcode() Opcode
func (PrettyInstructionInvoke) String ¶ added in v1.10.0
func (i PrettyInstructionInvoke) String() string
type PrettyInstructionInvokeTyped ¶ added in v1.10.0
type PrettyInstructionInvokeTyped struct {
TypeArgs []interpreter.StaticType
ArgTypes []interpreter.StaticType
ReturnType interpreter.StaticType
}
PrettyInstructionInvokeTyped
Pretty form of InstructionInvokeTyped with resolved operands. Pops the function and arguments off the stack, invokes the function with the arguments, and then pushes the result back on to the stack. This instruction is a variant of `invoke` that includes the argument types.
func (PrettyInstructionInvokeTyped) Opcode ¶ added in v1.10.0
func (PrettyInstructionInvokeTyped) Opcode() Opcode
func (PrettyInstructionInvokeTyped) String ¶ added in v1.10.0
func (i PrettyInstructionInvokeTyped) String() string
type PrettyInstructionIterator ¶ added in v1.10.0
type PrettyInstructionIterator struct {
}
PrettyInstructionIterator
Pretty form of InstructionIterator with resolved operands. Pops an iterable value from the stack, get an iterator to it, and push the iterator back onto the stack.
func (PrettyInstructionIterator) Opcode ¶ added in v1.10.0
func (PrettyInstructionIterator) Opcode() Opcode
func (PrettyInstructionIterator) String ¶ added in v1.10.0
func (i PrettyInstructionIterator) String() string
type PrettyInstructionIteratorEnd ¶ added in v1.10.0
type PrettyInstructionIteratorEnd struct {
}
PrettyInstructionIteratorEnd
Pretty form of InstructionIteratorEnd with resolved operands. Pops a value-iterator from the stack end invalidates it. The iterator may no longer be used after this instruction.
func (PrettyInstructionIteratorEnd) Opcode ¶ added in v1.10.0
func (PrettyInstructionIteratorEnd) Opcode() Opcode
func (PrettyInstructionIteratorEnd) String ¶ added in v1.10.0
func (i PrettyInstructionIteratorEnd) String() string
type PrettyInstructionIteratorHasNext ¶ added in v1.10.0
type PrettyInstructionIteratorHasNext struct {
}
PrettyInstructionIteratorHasNext
Pretty form of InstructionIteratorHasNext with resolved operands. Pops a value-iterator from the stack, calls `hasNext()` method on it, and push the result back onto the stack.
func (PrettyInstructionIteratorHasNext) Opcode ¶ added in v1.10.0
func (PrettyInstructionIteratorHasNext) Opcode() Opcode
func (PrettyInstructionIteratorHasNext) String ¶ added in v1.10.0
func (i PrettyInstructionIteratorHasNext) String() string
type PrettyInstructionIteratorNext ¶ added in v1.10.0
type PrettyInstructionIteratorNext struct {
}
PrettyInstructionIteratorNext
Pretty form of InstructionIteratorNext with resolved operands. Pops a value-iterator from the stack, calls `next()` method on it, and push the result back onto the stack.
func (PrettyInstructionIteratorNext) Opcode ¶ added in v1.10.0
func (PrettyInstructionIteratorNext) Opcode() Opcode
func (PrettyInstructionIteratorNext) String ¶ added in v1.10.0
func (i PrettyInstructionIteratorNext) String() string
type PrettyInstructionJump ¶ added in v1.10.0
type PrettyInstructionJump struct {
Target uint16
}
PrettyInstructionJump
Pretty form of InstructionJump with resolved operands. Unconditionally jumps to the given instruction.
func (PrettyInstructionJump) Opcode ¶ added in v1.10.0
func (PrettyInstructionJump) Opcode() Opcode
func (PrettyInstructionJump) String ¶ added in v1.10.0
func (i PrettyInstructionJump) String() string
type PrettyInstructionJumpIfFalse ¶ added in v1.10.0
type PrettyInstructionJumpIfFalse struct {
Target uint16
}
PrettyInstructionJumpIfFalse
Pretty form of InstructionJumpIfFalse with resolved operands. Pops a value off the stack. If it is `false`, jumps to the target instruction.
func (PrettyInstructionJumpIfFalse) Opcode ¶ added in v1.10.0
func (PrettyInstructionJumpIfFalse) Opcode() Opcode
func (PrettyInstructionJumpIfFalse) String ¶ added in v1.10.0
func (i PrettyInstructionJumpIfFalse) String() string
type PrettyInstructionJumpIfNil ¶ added in v1.10.0
type PrettyInstructionJumpIfNil struct {
Target uint16
}
PrettyInstructionJumpIfNil
Pretty form of InstructionJumpIfNil with resolved operands. Pops a value off the stack. If it is `nil`, jumps to the target instruction.
func (PrettyInstructionJumpIfNil) Opcode ¶ added in v1.10.0
func (PrettyInstructionJumpIfNil) Opcode() Opcode
func (PrettyInstructionJumpIfNil) String ¶ added in v1.10.0
func (i PrettyInstructionJumpIfNil) String() string
type PrettyInstructionJumpIfTrue ¶ added in v1.10.0
type PrettyInstructionJumpIfTrue struct {
Target uint16
}
PrettyInstructionJumpIfTrue
Pretty form of InstructionJumpIfTrue with resolved operands. Pops a value off the stack. If it is `true`, jumps to the target instruction.
func (PrettyInstructionJumpIfTrue) Opcode ¶ added in v1.10.0
func (PrettyInstructionJumpIfTrue) Opcode() Opcode
func (PrettyInstructionJumpIfTrue) String ¶ added in v1.10.0
func (i PrettyInstructionJumpIfTrue) String() string
type PrettyInstructionLess ¶ added in v1.10.0
type PrettyInstructionLess struct {
}
PrettyInstructionLess
Pretty form of InstructionLess with resolved operands. Pops two values off the stack, checks if the first value is less than the second, and then pushes the result back on to the stack.
func (PrettyInstructionLess) Opcode ¶ added in v1.10.0
func (PrettyInstructionLess) Opcode() Opcode
func (PrettyInstructionLess) String ¶ added in v1.10.0
func (i PrettyInstructionLess) String() string
type PrettyInstructionLessOrEqual ¶ added in v1.10.0
type PrettyInstructionLessOrEqual struct {
}
PrettyInstructionLessOrEqual
Pretty form of InstructionLessOrEqual with resolved operands. Pops two values off the stack, checks if the first value is less than or equal to the second, and then pushes the result back on to the stack.
func (PrettyInstructionLessOrEqual) Opcode ¶ added in v1.10.0
func (PrettyInstructionLessOrEqual) Opcode() Opcode
func (PrettyInstructionLessOrEqual) String ¶ added in v1.10.0
func (i PrettyInstructionLessOrEqual) String() string
type PrettyInstructionLoop ¶ added in v1.10.0
type PrettyInstructionLoop struct {
}
PrettyInstructionLoop
Pretty form of InstructionLoop with resolved operands. Indicates the start of a loop.
func (PrettyInstructionLoop) Opcode ¶ added in v1.10.0
func (PrettyInstructionLoop) Opcode() Opcode
func (PrettyInstructionLoop) String ¶ added in v1.10.0
func (i PrettyInstructionLoop) String() string
type PrettyInstructionMod ¶ added in v1.10.0
type PrettyInstructionMod struct {
}
PrettyInstructionMod
Pretty form of InstructionMod with resolved operands. Pops two number values off the stack, calculates the modulus of the first by the second, and then pushes the result back on to the stack.
func (PrettyInstructionMod) Opcode ¶ added in v1.10.0
func (PrettyInstructionMod) Opcode() Opcode
func (PrettyInstructionMod) String ¶ added in v1.10.0
func (i PrettyInstructionMod) String() string
type PrettyInstructionMultiply ¶ added in v1.10.0
type PrettyInstructionMultiply struct {
}
PrettyInstructionMultiply
Pretty form of InstructionMultiply with resolved operands. Pops two number values off the stack, multiplies them together, and then pushes the result back on to the stack.
func (PrettyInstructionMultiply) Opcode ¶ added in v1.10.0
func (PrettyInstructionMultiply) Opcode() Opcode
func (PrettyInstructionMultiply) String ¶ added in v1.10.0
func (i PrettyInstructionMultiply) String() string
type PrettyInstructionNegate ¶ added in v1.10.0
type PrettyInstructionNegate struct {
}
PrettyInstructionNegate
Pretty form of InstructionNegate with resolved operands. Pops a number value off the stack, negates it, and then pushes the result back on to the stack.
func (PrettyInstructionNegate) Opcode ¶ added in v1.10.0
func (PrettyInstructionNegate) Opcode() Opcode
func (PrettyInstructionNegate) String ¶ added in v1.10.0
func (i PrettyInstructionNegate) String() string
type PrettyInstructionNewArray ¶ added in v1.10.0
type PrettyInstructionNewArray struct {
Type interpreter.StaticType
Size uint16
IsResource bool
}
PrettyInstructionNewArray
Pretty form of InstructionNewArray with resolved operands. Pops the given number of elements off the stack, creates a new array with the given type, size, and elements, and then pushes it onto the stack.
func (PrettyInstructionNewArray) Opcode ¶ added in v1.10.0
func (PrettyInstructionNewArray) Opcode() Opcode
func (PrettyInstructionNewArray) String ¶ added in v1.10.0
func (i PrettyInstructionNewArray) String() string
type PrettyInstructionNewClosure ¶ added in v1.10.0
PrettyInstructionNewClosure
Pretty form of InstructionNewClosure with resolved operands. Creates a new closure with the function at the given index and pushes it onto the stack.
func (PrettyInstructionNewClosure) Opcode ¶ added in v1.10.0
func (PrettyInstructionNewClosure) Opcode() Opcode
func (PrettyInstructionNewClosure) String ¶ added in v1.10.0
func (i PrettyInstructionNewClosure) String() string
type PrettyInstructionNewComposite ¶ added in v1.10.0
type PrettyInstructionNewComposite struct {
Kind common.CompositeKind
Type interpreter.StaticType
}
PrettyInstructionNewComposite
Pretty form of InstructionNewComposite with resolved operands. Creates a new instance of the given composite kind and type, at address 0x0, and then pushes it onto the stack.
func (PrettyInstructionNewComposite) Opcode ¶ added in v1.10.0
func (PrettyInstructionNewComposite) Opcode() Opcode
func (PrettyInstructionNewComposite) String ¶ added in v1.10.0
func (i PrettyInstructionNewComposite) String() string
type PrettyInstructionNewCompositeAt ¶ added in v1.10.0
type PrettyInstructionNewCompositeAt struct {
Kind common.CompositeKind
Type interpreter.StaticType
Address constant.DecodedConstant
}
PrettyInstructionNewCompositeAt
Pretty form of InstructionNewCompositeAt with resolved operands. Creates a new instance of the given composite kind and type, at the given address, and then pushes it onto the stack.
func (PrettyInstructionNewCompositeAt) Opcode ¶ added in v1.10.0
func (PrettyInstructionNewCompositeAt) Opcode() Opcode
func (PrettyInstructionNewCompositeAt) String ¶ added in v1.10.0
func (i PrettyInstructionNewCompositeAt) String() string
type PrettyInstructionNewDictionary ¶ added in v1.10.0
type PrettyInstructionNewDictionary struct {
Type interpreter.StaticType
Size uint16
IsResource bool
}
PrettyInstructionNewDictionary
Pretty form of InstructionNewDictionary with resolved operands. Pops the given number of entries off the stack (twice the number of the given size), creates a new dictionary with the given type, size, and entries, and then pushes it onto the stack.
func (PrettyInstructionNewDictionary) Opcode ¶ added in v1.10.0
func (PrettyInstructionNewDictionary) Opcode() Opcode
func (PrettyInstructionNewDictionary) String ¶ added in v1.10.0
func (i PrettyInstructionNewDictionary) String() string
type PrettyInstructionNewPath ¶ added in v1.10.0
type PrettyInstructionNewPath struct {
Domain common.PathDomain
Identifier constant.DecodedConstant
}
PrettyInstructionNewPath
Pretty form of InstructionNewPath with resolved operands. Creates a new path with the given domain and identifier and then pushes it onto the stack.
func (PrettyInstructionNewPath) Opcode ¶ added in v1.10.0
func (PrettyInstructionNewPath) Opcode() Opcode
func (PrettyInstructionNewPath) String ¶ added in v1.10.0
func (i PrettyInstructionNewPath) String() string
type PrettyInstructionNewRef ¶ added in v1.10.0
type PrettyInstructionNewRef struct {
Type interpreter.StaticType
IsImplicit bool
}
PrettyInstructionNewRef
Pretty form of InstructionNewRef with resolved operands. Pops a value off the stack, creates a new reference with the given type, and then pushes it onto the stack.
func (PrettyInstructionNewRef) Opcode ¶ added in v1.10.0
func (PrettyInstructionNewRef) Opcode() Opcode
func (PrettyInstructionNewRef) String ¶ added in v1.10.0
func (i PrettyInstructionNewRef) String() string
type PrettyInstructionNewSimpleComposite ¶ added in v1.10.0
type PrettyInstructionNewSimpleComposite struct {
Kind common.CompositeKind
Type interpreter.StaticType
}
PrettyInstructionNewSimpleComposite
Pretty form of InstructionNewSimpleComposite with resolved operands. Creates a new instance of a simple composite value of given kind and type, at address 0x0, and then pushes it onto the stack.
func (PrettyInstructionNewSimpleComposite) Opcode ¶ added in v1.10.0
func (PrettyInstructionNewSimpleComposite) Opcode() Opcode
func (PrettyInstructionNewSimpleComposite) String ¶ added in v1.10.0
func (i PrettyInstructionNewSimpleComposite) String() string
type PrettyInstructionNil ¶ added in v1.10.0
type PrettyInstructionNil struct {
}
PrettyInstructionNil
Pretty form of InstructionNil with resolved operands. Pushes the value `nil` onto the stack.
func (PrettyInstructionNil) Opcode ¶ added in v1.10.0
func (PrettyInstructionNil) Opcode() Opcode
func (PrettyInstructionNil) String ¶ added in v1.10.0
func (i PrettyInstructionNil) String() string
type PrettyInstructionNot ¶ added in v1.10.0
type PrettyInstructionNot struct {
}
PrettyInstructionNot
Pretty form of InstructionNot with resolved operands. Pops a boolean value off the stack, negates it, and then pushes the result back on to the stack.
func (PrettyInstructionNot) Opcode ¶ added in v1.10.0
func (PrettyInstructionNot) Opcode() Opcode
func (PrettyInstructionNot) String ¶ added in v1.10.0
func (i PrettyInstructionNot) String() string
type PrettyInstructionNotEqual ¶ added in v1.10.0
type PrettyInstructionNotEqual struct {
}
PrettyInstructionNotEqual
Pretty form of InstructionNotEqual with resolved operands. Pops two values off the stack, checks if the first value is not equal to the second, and then pushes the result back on to the stack.
func (PrettyInstructionNotEqual) Opcode ¶ added in v1.10.0
func (PrettyInstructionNotEqual) Opcode() Opcode
func (PrettyInstructionNotEqual) String ¶ added in v1.10.0
func (i PrettyInstructionNotEqual) String() string
type PrettyInstructionRemoveField ¶ added in v1.10.0
type PrettyInstructionRemoveField struct {
FieldName constant.DecodedConstant
}
PrettyInstructionRemoveField
Pretty form of InstructionRemoveField with resolved operands. Pops a value off the stack, the target. Remove the value of the given field from the target, and pushes it onto the stack.
func (PrettyInstructionRemoveField) Opcode ¶ added in v1.10.0
func (PrettyInstructionRemoveField) Opcode() Opcode
func (PrettyInstructionRemoveField) String ¶ added in v1.10.0
func (i PrettyInstructionRemoveField) String() string
type PrettyInstructionRemoveIndex ¶ added in v1.10.0
type PrettyInstructionRemoveIndex struct {
IndexedType interpreter.StaticType
PushPlaceholder bool
}
PrettyInstructionRemoveIndex
Pretty form of InstructionRemoveIndex with resolved operands. Pops two values off the stack, the array and the index. Removes the value at the given index from the array and pushes it onto the stack. If pushPlaceholder is true, also pushes the placeholder value that was inserted, if any, or nil otherwise.
func (PrettyInstructionRemoveIndex) Opcode ¶ added in v1.10.0
func (PrettyInstructionRemoveIndex) Opcode() Opcode
func (PrettyInstructionRemoveIndex) String ¶ added in v1.10.0
func (i PrettyInstructionRemoveIndex) String() string
type PrettyInstructionRemoveTypeIndex ¶ added in v1.10.0
type PrettyInstructionRemoveTypeIndex struct {
IndexedType interpreter.StaticType
IndexingType interpreter.StaticType
}
PrettyInstructionRemoveTypeIndex
Pretty form of InstructionRemoveTypeIndex with resolved operands. Pops a value off the stack, the target. Remove the value of the given type key from the target. Additionally destroy if removed type is resource.
func (PrettyInstructionRemoveTypeIndex) Opcode ¶ added in v1.10.0
func (PrettyInstructionRemoveTypeIndex) Opcode() Opcode
func (PrettyInstructionRemoveTypeIndex) String ¶ added in v1.10.0
func (i PrettyInstructionRemoveTypeIndex) String() string
type PrettyInstructionReturn ¶ added in v1.10.0
type PrettyInstructionReturn struct {
}
PrettyInstructionReturn
Pretty form of InstructionReturn with resolved operands. Returns from the current function, without a value.
func (PrettyInstructionReturn) Opcode ¶ added in v1.10.0
func (PrettyInstructionReturn) Opcode() Opcode
func (PrettyInstructionReturn) String ¶ added in v1.10.0
func (i PrettyInstructionReturn) String() string
type PrettyInstructionReturnValue ¶ added in v1.10.0
type PrettyInstructionReturnValue struct {
}
PrettyInstructionReturnValue
Pretty form of InstructionReturnValue with resolved operands. Pops a value off the stack and then returns from the current function with that value.
func (PrettyInstructionReturnValue) Opcode ¶ added in v1.10.0
func (PrettyInstructionReturnValue) Opcode() Opcode
func (PrettyInstructionReturnValue) String ¶ added in v1.10.0
func (i PrettyInstructionReturnValue) String() string
type PrettyInstructionSame ¶ added in v1.10.0
type PrettyInstructionSame struct {
}
PrettyInstructionSame
Pretty form of InstructionSame with resolved operands. Pops two values off the stack, checks if the first value is the same as the second, and then pushes the result back on to the stack.
func (PrettyInstructionSame) Opcode ¶ added in v1.10.0
func (PrettyInstructionSame) Opcode() Opcode
func (PrettyInstructionSame) String ¶ added in v1.10.0
func (i PrettyInstructionSame) String() string
type PrettyInstructionSetAttachmentBase ¶ added in v1.10.0
type PrettyInstructionSetAttachmentBase struct {
}
PrettyInstructionSetAttachmentBase
Pretty form of InstructionSetAttachmentBase with resolved operands. Pops two values off the stack, the attachment and the base, sets the attachment's base value to base.
func (PrettyInstructionSetAttachmentBase) Opcode ¶ added in v1.10.0
func (PrettyInstructionSetAttachmentBase) Opcode() Opcode
func (PrettyInstructionSetAttachmentBase) String ¶ added in v1.10.0
func (i PrettyInstructionSetAttachmentBase) String() string
type PrettyInstructionSetField ¶ added in v1.10.0
type PrettyInstructionSetField struct {
FieldName constant.DecodedConstant
AccessedType interpreter.StaticType
}
PrettyInstructionSetField
Pretty form of InstructionSetField with resolved operands. Pops two values off the stack, the target and the value, and then sets the field at the given index of the target to the value.
func (PrettyInstructionSetField) Opcode ¶ added in v1.10.0
func (PrettyInstructionSetField) Opcode() Opcode
func (PrettyInstructionSetField) String ¶ added in v1.10.0
func (i PrettyInstructionSetField) String() string
type PrettyInstructionSetGlobal ¶ added in v1.10.0
type PrettyInstructionSetGlobal struct {
Global uint16
}
PrettyInstructionSetGlobal
Pretty form of InstructionSetGlobal with resolved operands. Pops a value off the stack and then sets the global at the given index to that value.
func (PrettyInstructionSetGlobal) Opcode ¶ added in v1.10.0
func (PrettyInstructionSetGlobal) Opcode() Opcode
func (PrettyInstructionSetGlobal) String ¶ added in v1.10.0
func (i PrettyInstructionSetGlobal) String() string
type PrettyInstructionSetIndex ¶ added in v1.10.0
type PrettyInstructionSetIndex struct {
IndexedType interpreter.StaticType
}
PrettyInstructionSetIndex
Pretty form of InstructionSetIndex with resolved operands. Pops three values off the stack, the array, the index, and the value, and then sets the value at the given index of the array to the value.
func (PrettyInstructionSetIndex) Opcode ¶ added in v1.10.0
func (PrettyInstructionSetIndex) Opcode() Opcode
func (PrettyInstructionSetIndex) String ¶ added in v1.10.0
func (i PrettyInstructionSetIndex) String() string
type PrettyInstructionSetLocal ¶ added in v1.10.0
PrettyInstructionSetLocal
Pretty form of InstructionSetLocal with resolved operands. Pops a value off the stack and then sets the local at the given index to that value.
func (PrettyInstructionSetLocal) Opcode ¶ added in v1.10.0
func (PrettyInstructionSetLocal) Opcode() Opcode
func (PrettyInstructionSetLocal) String ¶ added in v1.10.0
func (i PrettyInstructionSetLocal) String() string
type PrettyInstructionSetTypeIndex ¶ added in v1.10.0
type PrettyInstructionSetTypeIndex struct {
IndexedType interpreter.StaticType
IndexingType interpreter.StaticType
}
PrettyInstructionSetTypeIndex
Pretty form of InstructionSetTypeIndex with resolved operands. Pops two values off the stack, the target and the value, and then sets the type key at the given index of the target to the value, and pushes it onto the stack.
func (PrettyInstructionSetTypeIndex) Opcode ¶ added in v1.10.0
func (PrettyInstructionSetTypeIndex) Opcode() Opcode
func (PrettyInstructionSetTypeIndex) String ¶ added in v1.10.0
func (i PrettyInstructionSetTypeIndex) String() string
type PrettyInstructionSetUpvalue ¶ added in v1.10.0
type PrettyInstructionSetUpvalue struct {
Upvalue uint16
}
PrettyInstructionSetUpvalue
Pretty form of InstructionSetUpvalue with resolved operands. Pops a value off the stack and then sets the upvalue at the given index to that value.
func (PrettyInstructionSetUpvalue) Opcode ¶ added in v1.10.0
func (PrettyInstructionSetUpvalue) Opcode() Opcode
func (PrettyInstructionSetUpvalue) String ¶ added in v1.10.0
func (i PrettyInstructionSetUpvalue) String() string
type PrettyInstructionSimpleCast ¶ added in v1.10.0
type PrettyInstructionSimpleCast struct {
TargetType interpreter.StaticType
ValueType interpreter.StaticType
}
PrettyInstructionSimpleCast
Pretty form of InstructionSimpleCast with resolved operands. Pops a value off the stack, casts it to the given type, and then pushes it back on to the stack.
func (PrettyInstructionSimpleCast) Opcode ¶ added in v1.10.0
func (PrettyInstructionSimpleCast) Opcode() Opcode
func (PrettyInstructionSimpleCast) String ¶ added in v1.10.0
func (i PrettyInstructionSimpleCast) String() string
type PrettyInstructionStatement ¶ added in v1.10.0
type PrettyInstructionStatement struct {
}
PrettyInstructionStatement
Pretty form of InstructionStatement with resolved operands. Indicates the start of a statement.
func (PrettyInstructionStatement) Opcode ¶ added in v1.10.0
func (PrettyInstructionStatement) Opcode() Opcode
func (PrettyInstructionStatement) String ¶ added in v1.10.0
func (i PrettyInstructionStatement) String() string
type PrettyInstructionSubtract ¶ added in v1.10.0
type PrettyInstructionSubtract struct {
}
PrettyInstructionSubtract
Pretty form of InstructionSubtract with resolved operands. Pops two number values off the stack, subtracts the second from the first, and then pushes the result back on to the stack.
func (PrettyInstructionSubtract) Opcode ¶ added in v1.10.0
func (PrettyInstructionSubtract) Opcode() Opcode
func (PrettyInstructionSubtract) String ¶ added in v1.10.0
func (i PrettyInstructionSubtract) String() string
type PrettyInstructionTemplateString ¶ added in v1.10.0
type PrettyInstructionTemplateString struct {
ExprSize uint16
}
PrettyInstructionTemplateString
Pretty form of InstructionTemplateString with resolved operands. Represents a string template with an array of values (strings) and an array of expressions, pops both off the stack.
func (PrettyInstructionTemplateString) Opcode ¶ added in v1.10.0
func (PrettyInstructionTemplateString) Opcode() Opcode
func (PrettyInstructionTemplateString) String ¶ added in v1.10.0
func (i PrettyInstructionTemplateString) String() string
type PrettyInstructionTransfer ¶ added in v1.10.0
type PrettyInstructionTransfer struct {
}
PrettyInstructionTransfer
Pretty form of InstructionTransfer with resolved operands. Pops a value off the stack, calls transfer, and then pushes it back on to the stack.
func (PrettyInstructionTransfer) Opcode ¶ added in v1.10.0
func (PrettyInstructionTransfer) Opcode() Opcode
func (PrettyInstructionTransfer) String ¶ added in v1.10.0
func (i PrettyInstructionTransfer) String() string
type PrettyInstructionTransferAndConvert ¶ added in v1.10.0
type PrettyInstructionTransferAndConvert struct {
ValueType interpreter.StaticType
TargetType interpreter.StaticType
}
PrettyInstructionTransferAndConvert
Pretty form of InstructionTransferAndConvert with resolved operands. Pops a value off the stack, transfer and converts it to the given type, and then pushes it back on to the stack.
func (PrettyInstructionTransferAndConvert) Opcode ¶ added in v1.10.0
func (PrettyInstructionTransferAndConvert) Opcode() Opcode
func (PrettyInstructionTransferAndConvert) String ¶ added in v1.10.0
func (i PrettyInstructionTransferAndConvert) String() string
type PrettyInstructionTrue ¶ added in v1.10.0
type PrettyInstructionTrue struct {
}
PrettyInstructionTrue
Pretty form of InstructionTrue with resolved operands. Pushes the boolean value `true` onto the stack.
func (PrettyInstructionTrue) Opcode ¶ added in v1.10.0
func (PrettyInstructionTrue) Opcode() Opcode
func (PrettyInstructionTrue) String ¶ added in v1.10.0
func (i PrettyInstructionTrue) String() string
type PrettyInstructionUnknown ¶ added in v1.10.0
type PrettyInstructionUnknown struct {
}
PrettyInstructionUnknown
Pretty form of InstructionUnknown with resolved operands. An unknown instruction.
func (PrettyInstructionUnknown) Opcode ¶ added in v1.10.0
func (PrettyInstructionUnknown) Opcode() Opcode
func (PrettyInstructionUnknown) String ¶ added in v1.10.0
func (i PrettyInstructionUnknown) String() string
type PrettyInstructionUnwrap ¶ added in v1.10.0
type PrettyInstructionUnwrap struct {
}
PrettyInstructionUnwrap
Pretty form of InstructionUnwrap with resolved operands. Pops a value off the stack. If the value is an optional, pushes the optional's inner value back on to the stack. Panics if the value is `nil`. If the value is not an option, pushes the value back on to the stack.
func (PrettyInstructionUnwrap) Opcode ¶ added in v1.10.0
func (PrettyInstructionUnwrap) Opcode() Opcode
func (PrettyInstructionUnwrap) String ¶ added in v1.10.0
func (i PrettyInstructionUnwrap) String() string
type PrettyInstructionVoid ¶ added in v1.10.0
type PrettyInstructionVoid struct {
}
PrettyInstructionVoid
Pretty form of InstructionVoid with resolved operands. Pushes the void value onto the stack.
func (PrettyInstructionVoid) Opcode ¶ added in v1.10.0
func (PrettyInstructionVoid) Opcode() Opcode
func (PrettyInstructionVoid) String ¶ added in v1.10.0
func (i PrettyInstructionVoid) String() string
type PrettyInstructionWrap ¶ added in v1.10.0
type PrettyInstructionWrap struct {
}
PrettyInstructionWrap
Pretty form of InstructionWrap with resolved operands. Pops a value off the stack, wrap it with an optional, and pushes back onto the stack.
func (PrettyInstructionWrap) Opcode ¶ added in v1.10.0
func (PrettyInstructionWrap) Opcode() Opcode
func (PrettyInstructionWrap) String ¶ added in v1.10.0
func (i PrettyInstructionWrap) String() string
type ProgramForInstructions ¶ added in v1.10.0
type ProgramForInstructions interface {
GetConstants() []constant.DecodedConstant
GetTypes() []interpreter.StaticType
GetFunctionName(index uint16) string
}
ProgramForInstructions represents a program that can resolve instruction operands. This is defined as an interface to avoid circular dependency with the bbq package.