Documentation
¶
Index ¶
- func ColorizeOffset(offset int) string
- func ColorizeOpcode(opcode Opcode) string
- func DecodeStaticTypes(types [][]byte) []interpreter.StaticType
- func PatchJump(code *[]byte, opcodeOffset int, newTarget uint16)
- func PrintBytecode(builder *strings.Builder, code []byte, resolve bool, ...) error
- func PrintInstructions(builder *strings.Builder, instructions []Instruction, resolve bool, ...) error
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- func (i InstructionCloseUpvalue) 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- func (i InstructionGetField) 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- func (i InstructionGetMethod) 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- func (i InstructionInvoke) String() string
- type InstructionInvokeDynamic
- func (i InstructionInvokeDynamic) Encode(code *[]byte)
- func (InstructionInvokeDynamic) Opcode() Opcode
- func (i InstructionInvokeDynamic) OperandsString(sb *strings.Builder, colorize bool)
- func (i InstructionInvokeDynamic) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- func (i InstructionInvokeDynamic) 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- func (i InstructionRemoveIndex) 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- func (i InstructionReturnValue) 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- func (i InstructionSetLocal) 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- 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) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, ...)
- func (i InstructionWrap) String() string
- type Opcode
- 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 PrintBytecode ¶
func PrintInstructions ¶
func PrintInstructions( builder *strings.Builder, instructions []Instruction, resolve bool, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool, ) error
Types ¶
type Instruction ¶
type Instruction interface {
Encode(code *[]byte)
String() string
OperandsString(sb *strings.Builder, colorize bool)
ResolvedOperandsString(
sb *strings.Builder,
constants []constant.Constant,
types []interpreter.StaticType,
functionNames []string,
colorize bool,
)
Opcode() Opcode
}
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) ResolvedOperandsString ¶
func (i InstructionAdd) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionBitwiseAnd) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionBitwiseLeftShift) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionBitwiseOr) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionBitwiseRightShift) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionBitwiseXor) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionCloseUpvalue) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionCloseUpvalue) String ¶
func (i InstructionCloseUpvalue) 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) ResolvedOperandsString ¶
func (i InstructionDeref) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionDestroy) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionDivide) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionDrop) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionDup) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionEmitEvent) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionEqual) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionEqual) String ¶
func (i InstructionEqual) String() string
type InstructionFailableCast ¶
type InstructionFailableCast struct {
Type uint16
}
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) ResolvedOperandsString ¶
func (i InstructionFailableCast) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionFalse) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionFalse) String ¶
func (i InstructionFalse) String() string
type InstructionForceCast ¶
type InstructionForceCast struct {
Type uint16
}
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) ResolvedOperandsString ¶
func (i InstructionForceCast) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionGetConstant) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionGetField) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionGetField) String ¶
func (i InstructionGetField) 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) ResolvedOperandsString ¶
func (i InstructionGetGlobal) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionGetGlobal) String ¶
func (i InstructionGetGlobal) String() string
type InstructionGetIndex ¶
type InstructionGetIndex struct {
}
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 (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) ResolvedOperandsString ¶
func (i InstructionGetIndex) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionGetLocal) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionGetLocal) String ¶
func (i InstructionGetLocal) String() string
type InstructionGetMethod ¶
type InstructionGetMethod struct {
Method uint16
}
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) ResolvedOperandsString ¶
func (i InstructionGetMethod) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionGetMethod) String ¶
func (i InstructionGetMethod) 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) ResolvedOperandsString ¶
func (i InstructionGetUpvalue) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionGreater) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionGreaterOrEqual) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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.
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) ResolvedOperandsString ¶
func (i InstructionInvoke) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionInvoke) String ¶
func (i InstructionInvoke) String() string
type InstructionInvokeDynamic ¶
InstructionInvokeDynamic
Invokes a method with the given name dynamically. Pops the receiver and the arguments off the stack, invokes the function with the arguments, and then pushes the result back on to the stack.
func DecodeInvokeDynamic ¶
func DecodeInvokeDynamic(ip *uint16, code []byte) (i InstructionInvokeDynamic)
func (InstructionInvokeDynamic) Encode ¶
func (i InstructionInvokeDynamic) Encode(code *[]byte)
func (InstructionInvokeDynamic) Opcode ¶
func (InstructionInvokeDynamic) Opcode() Opcode
func (InstructionInvokeDynamic) OperandsString ¶
func (i InstructionInvokeDynamic) OperandsString(sb *strings.Builder, colorize bool)
func (InstructionInvokeDynamic) ResolvedOperandsString ¶
func (i InstructionInvokeDynamic) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionInvokeDynamic) String ¶
func (i InstructionInvokeDynamic) 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) ResolvedOperandsString ¶
func (i InstructionIterator) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionIteratorEnd) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionIteratorHasNext) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionIteratorNext) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionJump) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionJumpIfFalse) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionJumpIfNil) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionJumpIfTrue) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionLess) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionLessOrEqual) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionLoop) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionMod) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionMultiply) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNegate) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNewArray) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNewClosure) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNewComposite) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNewCompositeAt) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNewDictionary) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNewPath) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNewRef) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNewSimpleComposite) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNil) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNot) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionNotEqual) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionRemoveField) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionRemoveField) String ¶
func (i InstructionRemoveField) String() string
type InstructionRemoveIndex ¶
type InstructionRemoveIndex struct {
}
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.
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) ResolvedOperandsString ¶
func (i InstructionRemoveIndex) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionRemoveIndex) String ¶
func (i InstructionRemoveIndex) 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) ResolvedOperandsString ¶
func (i InstructionReturn) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionReturnValue) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionReturnValue) String ¶
func (i InstructionReturnValue) 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) ResolvedOperandsString ¶
func (i InstructionSetField) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionSetGlobal) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionSetGlobal) String ¶
func (i InstructionSetGlobal) String() string
type InstructionSetIndex ¶
type InstructionSetIndex struct {
}
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 (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) ResolvedOperandsString ¶
func (i InstructionSetIndex) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionSetIndex) String ¶
func (i InstructionSetIndex) String() string
type InstructionSetLocal ¶
type InstructionSetLocal struct {
Local uint16
}
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) ResolvedOperandsString ¶
func (i InstructionSetLocal) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionSetLocal) String ¶
func (i InstructionSetLocal) 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) ResolvedOperandsString ¶
func (i InstructionSetUpvalue) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionSetUpvalue) String ¶
func (i InstructionSetUpvalue) String() string
type InstructionSimpleCast ¶
type InstructionSimpleCast struct {
Type uint16
}
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) ResolvedOperandsString ¶
func (i InstructionSimpleCast) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionStatement) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionSubtract) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionTemplateString) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionTransfer) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionTransfer) String ¶
func (i InstructionTransfer) String() string
type InstructionTransferAndConvert ¶
type InstructionTransferAndConvert struct {
Type uint16
}
InstructionTransferAndConvert
Pops a value off the stack, transfers 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) ResolvedOperandsString ¶
func (i InstructionTransferAndConvert) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionTrue) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionUnknown) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionUnwrap) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionVoid) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, 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) ResolvedOperandsString ¶
func (i InstructionWrap) ResolvedOperandsString(sb *strings.Builder, constants []constant.Constant, types []interpreter.StaticType, functionNames []string, colorize bool)
func (InstructionWrap) String ¶
func (i InstructionWrap) String() string
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 Equal NotEqual Not Wrap Unwrap Destroy TransferAndConvert SimpleCast FailableCast ForceCast Deref Transfer 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 Invoke InvokeDynamic Drop Dup Iterator IteratorHasNext IteratorNext IteratorEnd EmitEvent Loop Statement TemplateString // NOTE: not an actual opcode, must be last item OpcodeMax )