opcode

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorizeOffset

func ColorizeOffset(offset int) string

func ColorizeOpcode

func ColorizeOpcode(opcode Opcode) string

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 PatchJumpBytecode(code *[]byte, opcodeOffset int, newTarget uint16)

func PatchJumpInstruction added in v1.8.4

func PatchJumpInstruction(target []Instruction, offset int, newTarget uint16)

func PrintBytecode

func PrintBytecode(
	builder *strings.Builder,
	code []byte,
	resolve bool,
	constants []constant.DecodedConstant,
	types [][]byte,
	functionNames []string,
	colorize bool,
) error

func PrintBytecodeWithFlow added in v1.8.0

func PrintBytecodeWithFlow(
	builder *strings.Builder,
	code []byte,
	resolve bool,
	constants []constant.DecodedConstant,
	types [][]byte,
	functionNames []string,
	colorize bool,
) error

func PrintInstructions

func PrintInstructions(
	builder *strings.Builder,
	instructions []Instruction,
	resolve bool,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool,
) error

func PrintInstructionsWithFlow added in v1.8.0

func PrintInstructionsWithFlow(
	builder *strings.Builder,
	instructions []Instruction,
	resolve bool,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	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

type BlockConnection struct {
	TargetBlock int
	JumpType    JumpType
	Condition   string
	IsJump      bool
}

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,
		constants []constant.DecodedConstant,
		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.DecodedConstant,
	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.DecodedConstant,
	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) OperandsString

func (i InstructionBitwiseLeftShift) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionBitwiseLeftShift) ResolvedOperandsString

func (i InstructionBitwiseLeftShift) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionBitwiseLeftShift) 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.DecodedConstant,
	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) OperandsString

func (i InstructionBitwiseRightShift) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionBitwiseRightShift) ResolvedOperandsString

func (i InstructionBitwiseRightShift) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionBitwiseRightShift) 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.DecodedConstant,
	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) OperandsString

func (i InstructionCloseUpvalue) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionCloseUpvalue) ResolvedOperandsString

func (i InstructionCloseUpvalue) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionCloseUpvalue) String

func (i InstructionCloseUpvalue) String() string

type InstructionConvert added in v1.8.0

type InstructionConvert struct {
	Type uint16
}

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) ResolvedOperandsString added in v1.8.0

func (i InstructionConvert) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	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) ResolvedOperandsString

func (i InstructionDeref) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionDup) String

func (i InstructionDup) String() string

type InstructionEmitEvent

type InstructionEmitEvent struct {
	Type     uint16
	ArgCount uint16
}

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.DecodedConstant,
	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.DecodedConstant,
	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) OperandsString

func (i InstructionFailableCast) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionFailableCast) ResolvedOperandsString

func (i InstructionFailableCast) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionGetConstant) String

func (i InstructionGetConstant) String() string

type InstructionGetField

type InstructionGetField struct {
	FieldName    uint16
	AccessedType uint16
}

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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionGetField) String

func (i InstructionGetField) String() string

type InstructionGetFieldLocal added in v1.8.4

type InstructionGetFieldLocal struct {
	FieldName    uint16
	AccessedType uint16
	Local        uint16
}

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) OperandsString added in v1.8.4

func (i InstructionGetFieldLocal) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionGetFieldLocal) ResolvedOperandsString added in v1.8.4

func (i InstructionGetFieldLocal) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	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) ResolvedOperandsString

func (i InstructionGetGlobal) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionGetMethod) String

func (i InstructionGetMethod) String() string

type InstructionGetTypeIndex added in v1.8.0

type InstructionGetTypeIndex struct {
	Type uint16
}

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) OperandsString added in v1.8.0

func (i InstructionGetTypeIndex) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionGetTypeIndex) ResolvedOperandsString added in v1.8.0

func (i InstructionGetTypeIndex) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	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) ResolvedOperandsString

func (i InstructionGetUpvalue) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	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.DecodedConstant,
	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) OperandsString

func (i InstructionGreaterOrEqual) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionGreaterOrEqual) ResolvedOperandsString

func (i InstructionGreaterOrEqual) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionGreaterOrEqual) String

func (i InstructionGreaterOrEqual) String() string

type InstructionInvoke

type InstructionInvoke struct {
	TypeArgs []uint16
	ArgCount uint16
}

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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionInvoke) String

func (i InstructionInvoke) 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.DecodedConstant,
	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.DecodedConstant,
	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) OperandsString

func (i InstructionIteratorHasNext) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionIteratorHasNext) ResolvedOperandsString

func (i InstructionIteratorHasNext) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionIteratorHasNext) 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) OperandsString

func (i InstructionIteratorNext) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionIteratorNext) ResolvedOperandsString

func (i InstructionIteratorNext) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionNegate) String

func (i InstructionNegate) String() string

type InstructionNewArray

type InstructionNewArray struct {
	Type       uint16
	Size       uint16
	IsResource bool
}

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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionNewArray) String

func (i InstructionNewArray) String() string

type InstructionNewClosure

type InstructionNewClosure struct {
	Function uint16
	Upvalues []Upvalue
}

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.DecodedConstant,
	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) OperandsString

func (i InstructionNewComposite) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionNewComposite) ResolvedOperandsString

func (i InstructionNewComposite) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	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) OperandsString

func (i InstructionNewCompositeAt) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionNewCompositeAt) ResolvedOperandsString

func (i InstructionNewCompositeAt) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionNewCompositeAt) String

func (i InstructionNewCompositeAt) String() string

type InstructionNewDictionary

type InstructionNewDictionary struct {
	Type       uint16
	Size       uint16
	IsResource bool
}

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) OperandsString

func (i InstructionNewDictionary) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionNewDictionary) ResolvedOperandsString

func (i InstructionNewDictionary) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionNewPath) String

func (i InstructionNewPath) String() string

type InstructionNewRef

type InstructionNewRef struct {
	Type       uint16
	IsImplicit bool
}

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.DecodedConstant,
	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) OperandsString

func (i InstructionNewSimpleComposite) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionNewSimpleComposite) ResolvedOperandsString

func (i InstructionNewSimpleComposite) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionNewSimpleComposite) 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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionRemoveIndex) String

func (i InstructionRemoveIndex) String() string

type InstructionRemoveTypeIndex added in v1.8.0

type InstructionRemoveTypeIndex struct {
	Type uint16
}

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) OperandsString added in v1.8.0

func (i InstructionRemoveTypeIndex) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionRemoveTypeIndex) ResolvedOperandsString added in v1.8.0

func (i InstructionRemoveTypeIndex) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionRemoveTypeIndex) String added in v1.8.0

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.DecodedConstant,
	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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionReturnValue) String

func (i InstructionReturnValue) 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) OperandsString added in v1.8.0

func (i InstructionSetAttachmentBase) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionSetAttachmentBase) ResolvedOperandsString added in v1.8.0

func (i InstructionSetAttachmentBase) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionSetAttachmentBase) String added in v1.8.0

type InstructionSetField

type InstructionSetField struct {
	FieldName    uint16
	AccessedType uint16
}

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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionSetIndex) String

func (i InstructionSetIndex) String() string

type InstructionSetLocal

type InstructionSetLocal struct {
	Local     uint16
	IsTempVar bool
}

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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionSetLocal) String

func (i InstructionSetLocal) String() string

type InstructionSetTypeIndex added in v1.8.0

type InstructionSetTypeIndex struct {
	Type uint16
}

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) OperandsString added in v1.8.0

func (i InstructionSetTypeIndex) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionSetTypeIndex) ResolvedOperandsString added in v1.8.0

func (i InstructionSetTypeIndex) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	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) ResolvedOperandsString

func (i InstructionSetUpvalue) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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) OperandsString

func (i InstructionTemplateString) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionTemplateString) ResolvedOperandsString

func (i InstructionTemplateString) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	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.DecodedConstant,
	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, 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) OperandsString

func (i InstructionTransferAndConvert) OperandsString(sb *strings.Builder, colorize bool)

func (InstructionTransferAndConvert) ResolvedOperandsString

func (i InstructionTransferAndConvert) ResolvedOperandsString(sb *strings.Builder,
	constants []constant.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	colorize bool)

func (InstructionTransferAndConvert) 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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	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.DecodedConstant,
	types []interpreter.StaticType,
	functionNames []string,
	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

const (
	JumpTypeUnconditional JumpType = iota
	JumpTypeConditional
	JumpTypeCall
	JumpTypeReturn
)

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
	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

	Drop
	Dup

	Iterator
	IteratorHasNext
	IteratorNext
	IteratorEnd

	EmitEvent
	Loop
	Statement
	TemplateString

	// NOTE: not an actual opcode, must be last item
	OpcodeMax
)

func (Opcode) IsControlFlow

func (i Opcode) IsControlFlow() bool

func (Opcode) String

func (i Opcode) String() string

type Upvalue

type Upvalue struct {
	TargetIndex uint16
	IsLocal     bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL