stackmachine

package
v0.0.0-...-f652df5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Op

type Op struct {
	Pc   int32
	Code OpCode
	Op   any
}

func (*Op) String

func (d *Op) String() string

type OpAdvanceOffset

type OpAdvanceOffset struct {
	Increment uint32
}

type OpCall

type OpCall struct {
	Pc uint32
}

type OpCode

type OpCode uint8
const (
	OpCodeInvalid               OpCode = 0
	OpCodeChasePointers         OpCode = 26
	OpCodeCall                  OpCode = 1
	OpCodeCondJump              OpCode = 2
	OpCodeDecrement             OpCode = 3
	OpCodeEnqueueEmptyInterface OpCode = 4
	OpCodeEnqueueInterface      OpCode = 5
	OpCodeEnqueuePointer        OpCode = 6
	OpCodeEnqueueSliceHeader    OpCode = 7
	OpCodeEnqueueStringHeader   OpCode = 8
	OpCodeEnqueueHMapHeader     OpCode = 9
	OpCodeEnqueueSwissMap       OpCode = 31
	OpCodeEnqueueSwissMapGroups OpCode = 32
	OpCodeEnqueueSubroutine     OpCode = 33
	OpCodeJump                  OpCode = 10
	OpCodePop                   OpCode = 11
	OpCodePushImm               OpCode = 12
	OpCodePushOffset            OpCode = 13
	OpCodePushSliceLen          OpCode = 14
	OpCodeReturn                OpCode = 15
	OpCodeSetOffset             OpCode = 16
	OpCodeAdvanceOffset         OpCode = 17
	OpCodeDereferenceCFAOffset  OpCode = 19
	OpCodeCopyFromRegister      OpCode = 20
	OpCodePrepareExprEval       OpCode = 36
	OpCodeSaveExprResult        OpCode = 34
	OpCodeDereferencePtr        OpCode = 35
	OpCodeZeroFill              OpCode = 21
	OpCodeSetPresenceBit        OpCode = 30
	OpCodePreparePointeeData    OpCode = 37
	OpCodePrepareFrameData      OpCode = 22
	OpCodeConcludeFrameData     OpCode = 25
	PrepareEventData            OpCode = 24
	OpCodePrepareGoContext      OpCode = 27
	OpCodeTraverseGoContext     OpCode = 28
	OpCodeConcludeGoContext     OpCode = 29
	OpCodeIllegal               OpCode = 23
)

func (OpCode) String

func (i OpCode) String() string

type OpConcludeGoContext

type OpConcludeGoContext struct{}

type OpCondJump

type OpCondJump struct {
	Pc uint32
}

type OpCopyFromRegister

type OpCopyFromRegister struct {
	Register uint16
	ByteSize uint8
}

type OpDecoder

type OpDecoder struct {
	// contains filtered or unexported fields
}

OpDecoder is a decoder for stack machine operations.

func MakeOpDecoder

func MakeOpDecoder(opBuf []byte) OpDecoder

MakeOpDecoder creates a new OpDecoder.

func (*OpDecoder) DecodeAdvanceOffset

func (d *OpDecoder) DecodeAdvanceOffset() OpAdvanceOffset

func (*OpDecoder) DecodeCall

func (d *OpDecoder) DecodeCall() OpCall

func (*OpDecoder) DecodeConcludeGoContext

func (d *OpDecoder) DecodeConcludeGoContext() OpConcludeGoContext

func (*OpDecoder) DecodeCondJump

func (d *OpDecoder) DecodeCondJump() OpCondJump

func (*OpDecoder) DecodeCopyFromRegister

func (d *OpDecoder) DecodeCopyFromRegister() OpCopyFromRegister

func (*OpDecoder) DecodeDecrement

func (d *OpDecoder) DecodeDecrement() OpDecrement

func (*OpDecoder) DecodeDereferenceCFAOffset

func (d *OpDecoder) DecodeDereferenceCFAOffset() OpDereferenceCFAOffset

func (*OpDecoder) DecodeDereferencePtr

func (d *OpDecoder) DecodeDereferencePtr() OpDereferencePtr

func (*OpDecoder) DecodeEnqueueEmptyInterface

func (d *OpDecoder) DecodeEnqueueEmptyInterface() OpEnqueueEmptyInterface

func (*OpDecoder) DecodeEnqueueHMapHeader

func (d *OpDecoder) DecodeEnqueueHMapHeader() OpEnqueueHMapHeader

func (*OpDecoder) DecodeEnqueueInterface

func (d *OpDecoder) DecodeEnqueueInterface() OpEnqueueInterface

func (*OpDecoder) DecodeEnqueuePointer

func (d *OpDecoder) DecodeEnqueuePointer() OpEnqueuePointer

func (*OpDecoder) DecodeEnqueueSliceHeader

func (d *OpDecoder) DecodeEnqueueSliceHeader() OpEnqueueSliceHeader

func (*OpDecoder) DecodeEnqueueStringHeader

func (d *OpDecoder) DecodeEnqueueStringHeader() OpEnqueueStringHeader

func (*OpDecoder) DecodeEnqueueSubroutine

func (d *OpDecoder) DecodeEnqueueSubroutine() OpEnqueueSubroutine

func (*OpDecoder) DecodeEnqueueSwissMap

func (d *OpDecoder) DecodeEnqueueSwissMap() OpEnqueueSwissMap

func (*OpDecoder) DecodeEnqueueSwissMapGroups

func (d *OpDecoder) DecodeEnqueueSwissMapGroups() OpEnqueueSwissMapGroups

func (*OpDecoder) DecodeIllegal

func (d *OpDecoder) DecodeIllegal() OpIllegal

func (*OpDecoder) DecodeJump

func (d *OpDecoder) DecodeJump() OpJump

func (*OpDecoder) DecodePop

func (d *OpDecoder) DecodePop() OpPop

func (*OpDecoder) DecodePrepareFrameData

func (d *OpDecoder) DecodePrepareFrameData() OpPrepareFrameData

func (*OpDecoder) DecodePrepareGoContext

func (d *OpDecoder) DecodePrepareGoContext() OpPrepareGoContext

func (*OpDecoder) DecodePushImm

func (d *OpDecoder) DecodePushImm() OpPushImm

func (*OpDecoder) DecodePushOffset

func (d *OpDecoder) DecodePushOffset() OpPushOffset

func (*OpDecoder) DecodePushSliceLen

func (d *OpDecoder) DecodePushSliceLen() OpPushSliceLen

func (*OpDecoder) DecodeReturn

func (d *OpDecoder) DecodeReturn() OpReturn

func (*OpDecoder) DecodeSaveExprResult

func (d *OpDecoder) DecodeSaveExprResult() OpSaveExprResult

func (*OpDecoder) DecodeSetOffset

func (d *OpDecoder) DecodeSetOffset() OpSetOffset

func (*OpDecoder) DecodeSetPresenceBit

func (d *OpDecoder) DecodeSetPresenceBit() OpSetPresenceBit

func (*OpDecoder) DecodeTraverseGoContext

func (d *OpDecoder) DecodeTraverseGoContext() OpTraverseGoContext

func (*OpDecoder) DecodeZeroFill

func (d *OpDecoder) DecodeZeroFill() OpZeroFill

func (*OpDecoder) PC

func (d *OpDecoder) PC() uint32

PC returns the program counter of the decoder.

func (*OpDecoder) PopOpCode

func (d *OpDecoder) PopOpCode() OpCode

func (*OpDecoder) SetPC

func (d *OpDecoder) SetPC(pc uint32) bool

SetPC sets the program counter of the decoder.

type OpDecrement

type OpDecrement struct{}

type OpDereferenceCFAOffset

type OpDereferenceCFAOffset struct {
	Offset      int32
	ByteLen     uint32
	PointerBias uint32
}

type OpDereferencePtr

type OpDereferencePtr struct {
	Bias    uint32
	ByteLen uint32
}

type OpEnqueueEmptyInterface

type OpEnqueueEmptyInterface struct{}

type OpEnqueueHMapHeader

type OpEnqueueHMapHeader struct {
	BucketsArrayType uint32
	BucketByteLen    uint32
	FlagsOffset      uint8
	BOffset          uint8
	BucketsOffset    uint8
	OldBucketsOffset uint8
}

type OpEnqueueInterface

type OpEnqueueInterface struct{}

type OpEnqueuePointer

type OpEnqueuePointer struct {
	ElemType uint32
}

type OpEnqueueSliceHeader

type OpEnqueueSliceHeader struct {
	ArrayType   uint32
	ElemByteLen uint32
}

type OpEnqueueStringHeader

type OpEnqueueStringHeader struct {
	StringDataType uint32
}

type OpEnqueueSubroutine

type OpEnqueueSubroutine struct{}

type OpEnqueueSwissMap

type OpEnqueueSwissMap struct {
	TablePtrSliceType uint32
	GroupType         uint32
	DirPtrOffset      uint8
	DirLenOffset      uint8
}

type OpEnqueueSwissMapGroups

type OpEnqueueSwissMapGroups struct {
	GroupSliceType   uint32
	GroupByteLen     uint32
	DataOffset       uint8
	LengthMaskOffset uint8
}

type OpIllegal

type OpIllegal struct{}

type OpJump

type OpJump struct {
	Pc uint32
}

type OpPop

type OpPop struct{}

type OpPrepareFrameData

type OpPrepareFrameData struct {
	ProgID      uint32
	DataByteLen uint32
	TypeID      uint32
}

type OpPrepareGoContext

type OpPrepareGoContext struct {
	DataByteLen  uint32
	TypeID       uint32
	CaptureCount uint8
}

type OpPushImm

type OpPushImm struct {
	Value uint32
}

type OpPushOffset

type OpPushOffset struct{}

type OpPushSliceLen

type OpPushSliceLen struct {
	ElemByteLen uint32
}

type OpReturn

type OpReturn struct{}

type OpSaveExprResult

type OpSaveExprResult struct {
	ResultOffset uint32
	ByteLen      uint32
}

type OpSetOffset

type OpSetOffset struct{}

type OpSetPresenceBit

type OpSetPresenceBit struct {
	BitOffset uint32
}

type OpTraverseGoContext

type OpTraverseGoContext struct{}

type OpZeroFill

type OpZeroFill struct {
	ByteLen uint32
}

Jump to

Keyboard shortcuts

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