Versions in this module Expand all Collapse all v1 v1.2.10 Dec 3, 2026 Changes in this version + const MaxSize + const Version + var Magic = [8]byte + func Constant(expr ast.Expr) (out constant.Value) + func DecodeDebugObject(obj DebugObject, typ types.Type) (types.Object, error) + func DecodeFileSet(data []byte) (*token.FileSet, error) + func Encode(p *Program) ([]byte, error) + func EncodeFileSet(fs *token.FileSet) ([]byte, error) + func Marshal(p *Program) ([]byte, error) + func ParseConstant(text string) (constant.Value, error) + func RuntimeType(t types.Type) bool + func Validate(p *Program) error + func ValidateProgram(p *Program) error + type Aux struct + Address TypeID + Body uint32 + BuiltinConstant uintptr + BuiltinRuntime BuiltinRegisters + Call CallAux + Chan TypeID + Edges [][]obj.Register + Element TypeID + Error string + Expr string + Field TypeID + Flags AuxFlags + GoType TypeID + Index int + InterfaceArgs []bool + JumpTarget int32 + Key TypeID + Kind AuxKind + Map TypeID + Method string + Object DebugObject + Offset uintptr + Op token.Token + Pos token.Pos + Preds []int32 + ReceiverCache obj.Register + Registers []obj.Register + Results int + RightType TypeID + RuntimeAddress obj.Register + RuntimeChan obj.Register + RuntimeEdges [][]obj.Register + RuntimeHigh obj.Register + RuntimeIndex obj.Register + RuntimeKey obj.Register + RuntimeLow obj.Register + RuntimeMax obj.Register + RuntimeResults []obj.Register + RuntimeSource obj.Register + RuntimeValue obj.Register + Signature TypeID + Source TypeID + States []SelectState + Symbol string + Target TypeID + Targets [2]int32 + Type TypeID + Values [2]Value + func (a *Aux) SetBasicBool(value bool) + func (a *Aux) SetBlocking(value bool) + func (a *Aux) SetCached(value bool) + func (a *Aux) SetCommaOk(value bool) + func (a *Aux) SetCondition(value bool) + func (a *Aux) SetConstant(values [2]bool) + func (a *Aux) SetGlobal(value bool) + func (a *Aux) SetHeap(value bool) + func (a *Aux) SetIsAddr(value bool) + func (a *Aux) SetIsString(value bool) + func (a *Aux) SetMakeSliceCheck(value bool) + func (a Aux) BasicBool() bool + func (a Aux) Blocking() bool + func (a Aux) Cached() bool + func (a Aux) CommaOk() bool + func (a Aux) Condition() bool + func (a Aux) Constant() [2]bool + func (a Aux) Global() bool + func (a Aux) Heap() bool + func (a Aux) IsAddr() bool + func (a Aux) IsString() bool + func (a Aux) MakeSliceCheck() bool + type AuxFlags uint16 + const AuxBasicBool + const AuxBlocking + const AuxCached + const AuxCommaOk + const AuxCondition + const AuxConstant0 + const AuxConstant1 + const AuxGlobal + const AuxHeap + const AuxIsAddr + const AuxIsString + const AuxMakeSliceCheck + func AuxConstantFlags(values [2]bool) AuxFlags + func AuxFlag(value bool, flag AuxFlags) AuxFlags + type AuxKind uint8 + const AuxBinaryOp + const AuxBodyCall + const AuxBuiltinCall + const AuxCall + const AuxCallSite + const AuxClosure + const AuxClosureCall + const AuxConversion + const AuxCreation + const AuxDirectCall + const AuxDynamicCall + const AuxExternalCall + const AuxExtract + const AuxField + const AuxIf + const AuxIndex + const AuxInstructionDebugRef + const AuxInvokeCall + const AuxJump + const AuxLookup + const AuxMapUpdate + const AuxNext + const AuxNone + const AuxPanic + const AuxPhi + const AuxRange + const AuxReturn + const AuxSelect + const AuxSend + const AuxSlice + const AuxStore + const AuxTypeAssert + const AuxUnaryOp + func (k AuxKind) String() string + type Boundary struct + Reads []obj.Register + Writes []obj.Register + type BuiltinRegisters struct + Arguments []obj.Register + Bound bool + Result obj.Register + type CallAux struct + Arguments []obj.Register + DeferStack obj.Register + ExtractResults []obj.Register + Kind obj.CallKind + Name string + Runtime CallRegisters + Signature TypeID + Target obj.Register + type CallRegisters struct + Arguments []obj.Register + DeferStack obj.Register + ExtractResults []obj.Register + Target obj.Register + type DebugObject struct + Constant string + Kind DebugObjectKind + Name string + PackageName string + PackagePath string + Pos token.Pos + Type TypeID + func EncodeDebugObject(obj types.Object, id TypeID) (DebugObject, error) + type DebugObjectKind uint8 + const DebugObjectConst + const DebugObjectNone + const DebugObjectVar + func (k DebugObjectKind) String() string + type External struct + Link bool + Name string + Package string + Receiver TypeID + Signature TypeID + Symbol string + type Function struct + Args int + Blocks []int + CacheRegs []obj.Register + ChildFrame obj.Register + ClearRanges [][2]obj.Register + Code []Instruction + Entry token.Position + EntryPos token.Pos + Env int + GCPlan *GCPlan + GCRegs [][]obj.Register + HasGC bool + InjectReturns []int + InterfaceThunk bool + LocalRefs []obj.Register + Member string + Memo *MemoDescription + Name string + NameMetadata string + NamedResults []obj.Register + Numeric *NumericInput + Package string + Positions []token.Pos + Recover bool + RecoverPC int32 + Results int + Signature TypeID + Stack []Value + func (f *Function) ValidateGC(gc bool) error + type GCBlock struct + IsRecover bool + LiveOut []obj.Register + Transfers []GCTransfer + type GCCapture struct + Binds []int + Result int + type GCPlan struct + Blocks []GCBlock + Captures []GCCapture + Points []GCPoint + Recover []obj.Register + Registers []obj.Register + Uses []obj.Register + type GCPoint struct + Block int + Instr int + type GCTransfer struct + Def obj.Register + UseEnd int + UseStart int + type Global struct + Alias string + Binding string + External bool + Host bool + Name string + Type TypeID + type Instruction struct + ArgKinds []obj.OperandKind + Args []obj.Register + Aux PackedAux + Op obj.Opcode + Result obj.Register + RuntimeArgs []obj.Register + RuntimeBound bool + RuntimeResult obj.Register + Source obj.Source + type Member struct + Kind MemberKind + Name string + Package string + Type TypeID + Value string + type MemberKind uint8 + const MemberConstant + const MemberGlobal + const MemberInvalid + const MemberType + func (k MemberKind) String() string + type MemoDescription struct + Kind uint8 + Output int + Receiver *MemoReceiver + Returns []int + State bool + Updates []MemoReceiverUpdate + type MemoReceiver struct + Additive []bool + Affine []bool + Bitwise []bool + Fields [][]int + Functions []uint32 + type MemoReceiverUpdate struct + Field int + HasOperand bool + Op token.Token + Operand int + PC int + type Method struct + Function uint32 + Name string + Type TypeID + type Mode uint + type NumericInput struct + Boundaries []Boundary + Results []TypeID + Types map[obj.Register]TypeID + type Package struct + Host bool + Name string + Path string + type PackedAssert struct + CommaOk bool + GoType TypeID + RuntimeSource obj.Register + Source TypeID + Target TypeID + type PackedAux struct + Data any + Kind AuxKind + func PackAux(a Aux) PackedAux + func (p PackedAux) Expand() Aux + type PackedBinary struct + Constant [2]bool + Op token.Token + RightType TypeID + Type TypeID + Values [2]Value + type PackedCall struct + Body uint32 + BuiltinConstant uintptr + BuiltinRuntime BuiltinRegisters + Call CallAux + Error string + InterfaceArgs []bool + Method string + Registers []obj.Register + Symbol string + type PackedClosure struct + Body uint32 + Registers []obj.Register + Signature TypeID + type PackedConversion struct + RuntimeSource obj.Register + Source TypeID + Target TypeID + type PackedCreation struct + Heap bool + Target TypeID + type PackedDebug struct + Expr string + IsAddr bool + Object DebugObject + Pos token.Pos + type PackedExtract struct + Index int + type PackedField struct + Cached bool + Field TypeID + Index int + Offset uintptr + ReceiverCache obj.Register + RuntimeSource obj.Register + Source TypeID + type PackedIf struct + BasicBool bool + Condition bool + Constant [2]bool + Targets [2]int32 + type PackedIndex struct + RuntimeIndex obj.Register + RuntimeSource obj.Register + Source TypeID + Target TypeID + type PackedJump struct + JumpTarget int32 + type PackedLookup struct + CommaOk bool + Element TypeID + Key TypeID + RuntimeKey obj.Register + RuntimeSource obj.Register + Source TypeID + type PackedMap struct + Key TypeID + Map TypeID + Type TypeID + type PackedNext struct + IsString bool + type PackedPanic struct + RuntimeValue obj.Register + Type TypeID + type PackedPhi struct + Edges [][]obj.Register + Preds []int32 + Registers []obj.Register + RuntimeEdges [][]obj.Register + RuntimeResults []obj.Register + type PackedRange struct + Element TypeID + Key TypeID + Source TypeID + type PackedReturn struct + Results int + RuntimeResults []obj.Register + type PackedSelect struct + Blocking bool + States []SelectState + type PackedSend struct + Chan TypeID + RuntimeChan obj.Register + RuntimeValue obj.Register + Type TypeID + type PackedSlice struct + MakeSliceCheck bool + RuntimeHigh obj.Register + RuntimeLow obj.Register + RuntimeMax obj.Register + RuntimeSource obj.Register + Source TypeID + Target TypeID + type PackedStore struct + Address TypeID + RuntimeAddress obj.Register + RuntimeValue obj.Register + Type TypeID + type PackedUnary struct + CommaOk bool + Constant [2]bool + Global bool + Op token.Token + Type TypeID + Values [2]Value + type Program struct + Compiler string + Externals []External + FileSet []byte + Functions []Function + GC bool + GOARCH string + GOOS string + Globals []Global + GoVersion string + Main string + Members []Member + Methods []Method + Mode Mode + Packages []Package + RuntimeTypeNames []RuntimeName + Types TypeTable + Version int + func Decode(data []byte) (Program, error) + func Read(r io.Reader, validate bool) (Program, error) + type RuntimeName struct + Name string + Package string + Type TypeID + type SelectState struct + Chan TypeID + Dir reflect.SelectDir + Send TypeID + type TypeDecoder struct + func NewTypeDecoder(table TypeTable) (d *TypeDecoder, err error) + func ValidateTypes(p *Program) (*TypeDecoder, error) + func (d *TypeDecoder) EnsurePackage(path, name string) *types.Package + func (d *TypeDecoder) Package(path string) *types.Package + func (d *TypeDecoder) Packages() map[string]*types.Package + func (d *TypeDecoder) Type(id TypeID) (types.Type, error) + type TypeEncoder struct + func NewTypeEncoder() *TypeEncoder + func (e *TypeEncoder) Add(t types.Type) TypeID + func (e *TypeEncoder) Err() error + func (e *TypeEncoder) Table() TypeTable + func (e *TypeEncoder) Type(id TypeID) types.Type + type TypeID uint32 + type TypeKind uint8 + const TypeArray + const TypeBasic + const TypeChan + const TypeError + const TypeInterface + const TypeInvalid + const TypeMap + const TypeNamed + const TypePointer + const TypeSignature + const TypeSlice + const TypeStruct + const TypeTuple + func (k TypeKind) String() string + type TypeMethod struct + Name string + Package string + Signature TypeID + type TypeNode struct + Basic int + Dir int + Elem TypeID + Embeddeds []TypeID + Fields []TypeVar + Implicit bool + Key TypeID + Kind TypeKind + Len int64 + Methods []TypeMethod + Name string + Package string + Params []TypeVar + Receiver *TypeVar + Results []TypeVar + Scope TypeID + Underlying TypeID + Variadic bool + type TypePackage struct + Name string + Path string + type TypeTable struct + Packages []TypePackage + Types []TypeNode + type TypeVar struct + Embedded bool + Name string + Package string + Tag string + Type TypeID + type Value struct + Bits uint64 + Body uint32 + Env []Value + Imag uint64 + Kind ValueKind + Text string + Type TypeID + type ValueKind uint8 + const ValueBool + const ValueComplex128 + const ValueComplex64 + const ValueExternal + const ValueFloat32 + const ValueFloat64 + const ValueFunction + const ValueGlobal + const ValueInt + const ValueInvalid + const ValueInvalidReflect + const ValueNil + const ValueReflect + const ValueString + const ValueUint + const ValueZero + func (k ValueKind) String() string