Versions in this module Expand all Collapse all v1 v1.1.1 Dec 12, 2020 v1.0.2 Dec 12, 2020 v1.0.1 Dec 12, 2020 v1.0.0 Dec 12, 2020 Changes in this version + const BuilderModeDoc + func HasEnclosingFunction(pkg *Package, path []ast.Node) bool + func WriteFunction(buf *bytes.Buffer, f *Function) + func WritePackage(buf *bytes.Buffer, p *Package) + type Alloc struct + Heap bool + func (v *Alloc) Name() string + func (v *Alloc) Operands(rands []*Value) []*Value + func (v *Alloc) Referrers() *[]Instruction + func (v *Alloc) String() string + func (v *Alloc) Type() types.Type + type BasicBlock struct + Comment string + Index int + Instrs []Instruction + Preds []*BasicBlock + Succs []*BasicBlock + func (b *BasicBlock) Control() Instruction + func (b *BasicBlock) Dominates(c *BasicBlock) bool + func (b *BasicBlock) Dominees() []*BasicBlock + func (b *BasicBlock) Idom() *BasicBlock + func (b *BasicBlock) Parent() *Function + func (b *BasicBlock) Phis() []Instruction + func (b *BasicBlock) SigmaFor(v Value, pred *BasicBlock) *Sigma + func (b *BasicBlock) String() string + type BinOp struct + Op token.Token + X Value + Y Value + func (v *BinOp) Name() string + func (v *BinOp) Operands(rands []*Value) []*Value + func (v *BinOp) Referrers() *[]Instruction + func (v *BinOp) String() string + func (v *BinOp) Type() types.Type + type BlankStore struct + Val Value + func (s *BlankStore) Operands(rands []*Value) []*Value + func (s *BlankStore) String() string + func (v *BlankStore) Block() *BasicBlock + func (v *BlankStore) Parent() *Function + func (v *BlankStore) Referrers() *[]Instruction + type BlockSet struct + func NewBlockSet(size int) *BlockSet + func (s *BlockSet) Add(b *BasicBlock) bool + func (s *BlockSet) Clear() + func (s *BlockSet) Has(b *BasicBlock) bool + func (s *BlockSet) Num() int + func (s *BlockSet) Set(s2 *BlockSet) + func (s *BlockSet) Take() int + type BuilderMode uint + const GlobalDebug + const LogSource + const NaiveForm + const PrintFunctions + const PrintPackages + const PrintSource + const SanityCheckFunctions + func (m *BuilderMode) Set(s string) error + func (m BuilderMode) Get() interface{} + func (m BuilderMode) String() string + type Builtin struct + func (*Builtin) Referrers() *[]Instruction + func (n *Builtin) Source() ast.Node + func (n Builtin) ID() ID + func (v *Builtin) Name() string + func (v *Builtin) Object() types.Object + func (v *Builtin) Operands(rands []*Value) []*Value + func (v *Builtin) Parent() *Function + func (v *Builtin) Pos() token.Pos + func (v *Builtin) String() string + func (v *Builtin) Type() types.Type + type Call struct + Call CallCommon + func (s *Call) Common() *CallCommon + func (s *Call) Operands(rands []*Value) []*Value + func (s *Call) Value() *Call + func (v *Call) Name() string + func (v *Call) Referrers() *[]Instruction + func (v *Call) String() string + func (v *Call) Type() types.Type + type CallCommon struct + Args []Value + Method *types.Func + Results Value + Value Value + func (c *CallCommon) Description() string + func (c *CallCommon) IsInvoke() bool + func (c *CallCommon) Operands(rands []*Value) []*Value + func (c *CallCommon) Signature() *types.Signature + func (c *CallCommon) StaticCallee() *Function + func (c *CallCommon) String() string + type CallInstruction interface + Common func() *CallCommon + Value func() *Call + type ChangeInterface struct + X Value + func (v *ChangeInterface) Name() string + func (v *ChangeInterface) Operands(rands []*Value) []*Value + func (v *ChangeInterface) Referrers() *[]Instruction + func (v *ChangeInterface) String() string + func (v *ChangeInterface) Type() types.Type + type ChangeType struct + X Value + func (v *ChangeType) Name() string + func (v *ChangeType) Operands(rands []*Value) []*Value + func (v *ChangeType) Referrers() *[]Instruction + func (v *ChangeType) String() string + func (v *ChangeType) Type() types.Type + type Const struct + Value constant.Value + func NewConst(val constant.Value, typ types.Type) *Const + func (c *Const) Complex128() complex128 + func (c *Const) Float64() float64 + func (c *Const) Int64() int64 + func (c *Const) IsNil() bool + func (c *Const) RelString(from *types.Package) string + func (c *Const) String() string + func (c *Const) Uint64() uint64 + func (v *Const) Name() string + func (v *Const) Operands(rands []*Value) []*Value + func (v *Const) Referrers() *[]Instruction + func (v *Const) Type() types.Type + type ConstantSwitch struct + Conds []Value + Tag Value + func (s *ConstantSwitch) Operands(rands []*Value) []*Value + func (s *ConstantSwitch) String() string + func (v *ConstantSwitch) Block() *BasicBlock + func (v *ConstantSwitch) Parent() *Function + func (v *ConstantSwitch) Referrers() *[]Instruction + type Convert struct + X Value + func (v *Convert) Name() string + func (v *Convert) Operands(rands []*Value) []*Value + func (v *Convert) Referrers() *[]Instruction + func (v *Convert) String() string + func (v *Convert) Type() types.Type + type DebugRef struct + Expr ast.Expr + IsAddr bool + X Value + func (s *DebugRef) Operands(rands []*Value) []*Value + func (s *DebugRef) Pos() token.Pos + func (s *DebugRef) String() string + func (v *DebugRef) Block() *BasicBlock + func (v *DebugRef) Parent() *Function + func (v *DebugRef) Referrers() *[]Instruction + type Defer struct + Call CallCommon + func (s *Defer) Common() *CallCommon + func (s *Defer) Operands(rands []*Value) []*Value + func (s *Defer) String() string + func (s *Defer) Value() *Call + func (v *Defer) Block() *BasicBlock + func (v *Defer) Parent() *Function + func (v *Defer) Referrers() *[]Instruction + type Extract struct + Index int + Tuple Value + func (v *Extract) Name() string + func (v *Extract) Operands(rands []*Value) []*Value + func (v *Extract) Referrers() *[]Instruction + func (v *Extract) String() string + func (v *Extract) Type() types.Type + type Field struct + Field int + X Value + func (v *Field) Name() string + func (v *Field) Operands(rands []*Value) []*Value + func (v *Field) Referrers() *[]Instruction + func (v *Field) String() string + func (v *Field) Type() types.Type + type FieldAddr struct + Field int + X Value + func (v *FieldAddr) Name() string + func (v *FieldAddr) Operands(rands []*Value) []*Value + func (v *FieldAddr) Referrers() *[]Instruction + func (v *FieldAddr) String() string + func (v *FieldAddr) Type() types.Type + type FreeVar struct + func (n *FreeVar) Pos() token.Pos + func (n *FreeVar) Source() ast.Node + func (n FreeVar) ID() ID + func (v *FreeVar) Name() string + func (v *FreeVar) Operands(rands []*Value) []*Value + func (v *FreeVar) Parent() *Function + func (v *FreeVar) Referrers() *[]Instruction + func (v *FreeVar) String() string + func (v *FreeVar) Type() types.Type + type Function struct + AnonFuncs []*Function + Blocks []*BasicBlock + Exit *BasicBlock + FreeVars []*FreeVar + Locals []*Alloc + NoReturn NoReturn + Params []*Parameter + Pkg *Package + Prog *Program + Signature *types.Signature + Synthetic Synthetic + func EnclosingFunction(pkg *Package, path []ast.Node) *Function + func (f *Function) DomPreorder() []*BasicBlock + func (f *Function) RelString(from *types.Package) string + func (f *Function) RemoveNilBlocks() + func (f *Function) ValueForExpr(e ast.Expr) (value Value, isAddr bool) + func (f *Function) WriteTo(w io.Writer) (int64, error) + func (n *Function) Pos() token.Pos + func (n *Function) Source() ast.Node + func (n Function) ID() ID + func (v *Function) Name() string + func (v *Function) Object() types.Object + func (v *Function) Operands(rands []*Value) []*Value + func (v *Function) Package() *Package + func (v *Function) Parent() *Function + func (v *Function) Referrers() *[]Instruction + func (v *Function) String() string + func (v *Function) Token() token.Token + func (v *Function) Type() types.Type + type Global struct + Pkg *Package + func (n *Global) Pos() token.Pos + func (n *Global) Source() ast.Node + func (n Global) ID() ID + func (v *Global) Name() string + func (v *Global) Object() types.Object + func (v *Global) Operands(rands []*Value) []*Value + func (v *Global) Package() *Package + func (v *Global) Parent() *Function + func (v *Global) Referrers() *[]Instruction + func (v *Global) RelString(from *types.Package) string + func (v *Global) String() string + func (v *Global) Token() token.Token + func (v *Global) Type() types.Type + type Go struct + Call CallCommon + func (s *Go) Common() *CallCommon + func (s *Go) Operands(rands []*Value) []*Value + func (s *Go) String() string + func (s *Go) Value() *Call + func (v *Go) Block() *BasicBlock + func (v *Go) Parent() *Function + func (v *Go) Referrers() *[]Instruction + type HTMLWriter struct + func NewHTMLWriter(path string, funcname, cfgMask string) *HTMLWriter + func (w *HTMLWriter) Close() + func (w *HTMLWriter) Printf(msg string, v ...interface{}) + func (w *HTMLWriter) WriteColumn(phase, title, class, html string) + func (w *HTMLWriter) WriteFunc(phase, title string, f *Function) + func (w *HTMLWriter) WriteString(s string) + type ID int + type If struct + Cond Value + func (s *If) Operands(rands []*Value) []*Value + func (s *If) String() string + func (v *If) Block() *BasicBlock + func (v *If) Parent() *Function + func (v *If) Referrers() *[]Instruction + type Index struct + Index Value + X Value + func (v *Index) Name() string + func (v *Index) Operands(rands []*Value) []*Value + func (v *Index) Referrers() *[]Instruction + func (v *Index) String() string + func (v *Index) Type() types.Type + type IndexAddr struct + Index Value + X Value + func (v *IndexAddr) Name() string + func (v *IndexAddr) Operands(rands []*Value) []*Value + func (v *IndexAddr) Referrers() *[]Instruction + func (v *IndexAddr) String() string + func (v *IndexAddr) Type() types.Type + type Instruction interface + Block func() *BasicBlock + ID func() ID + Operands func(rands []*Value) []*Value + Parent func() *Function + Pos func() token.Pos + Referrers func() *[]Instruction + Source func() ast.Node + String func() string + type Jump struct + Comment string + func NewJump(parent *BasicBlock) *Jump + func (*Jump) Operands(rands []*Value) []*Value + func (s *Jump) String() string + func (v *Jump) Block() *BasicBlock + func (v *Jump) Parent() *Function + func (v *Jump) Referrers() *[]Instruction + type Load struct + X Value + func (v *Load) Name() string + func (v *Load) Operands(rands []*Value) []*Value + func (v *Load) Referrers() *[]Instruction + func (v *Load) String() string + func (v *Load) Type() types.Type + type MakeChan struct + Size Value + func (v *MakeChan) Name() string + func (v *MakeChan) Operands(rands []*Value) []*Value + func (v *MakeChan) Referrers() *[]Instruction + func (v *MakeChan) String() string + func (v *MakeChan) Type() types.Type + type MakeClosure struct + Bindings []Value + Fn Value + func (v *MakeClosure) Name() string + func (v *MakeClosure) Operands(rands []*Value) []*Value + func (v *MakeClosure) Referrers() *[]Instruction + func (v *MakeClosure) String() string + func (v *MakeClosure) Type() types.Type + type MakeInterface struct + X Value + func (v *MakeInterface) Name() string + func (v *MakeInterface) Operands(rands []*Value) []*Value + func (v *MakeInterface) Referrers() *[]Instruction + func (v *MakeInterface) String() string + func (v *MakeInterface) Type() types.Type + type MakeMap struct + Reserve Value + func (v *MakeMap) Name() string + func (v *MakeMap) Operands(rands []*Value) []*Value + func (v *MakeMap) Referrers() *[]Instruction + func (v *MakeMap) String() string + func (v *MakeMap) Type() types.Type + type MakeSlice struct + Cap Value + Len Value + func (v *MakeSlice) Name() string + func (v *MakeSlice) Operands(rands []*Value) []*Value + func (v *MakeSlice) Referrers() *[]Instruction + func (v *MakeSlice) String() string + func (v *MakeSlice) Type() types.Type + type MapLookup struct + CommaOk bool + Index Value + X Value + func (v *MapLookup) Name() string + func (v *MapLookup) Operands(rands []*Value) []*Value + func (v *MapLookup) Referrers() *[]Instruction + func (v *MapLookup) String() string + func (v *MapLookup) Type() types.Type + type MapUpdate struct + Key Value + Map Value + Value Value + func (s *MapUpdate) String() string + func (v *MapUpdate) Block() *BasicBlock + func (v *MapUpdate) Operands(rands []*Value) []*Value + func (v *MapUpdate) Parent() *Function + func (v *MapUpdate) Referrers() *[]Instruction + type Member interface + Name func() string + Object func() types.Object + Package func() *Package + RelString func(*types.Package) string + String func() string + Token func() token.Token + Type func() types.Type + type NamedConst struct + Value *Const + func (c *NamedConst) Name() string + func (c *NamedConst) Object() types.Object + func (c *NamedConst) Package() *Package + func (c *NamedConst) Pos() token.Pos + func (c *NamedConst) RelString(from *types.Package) string + func (c *NamedConst) String() string + func (c *NamedConst) Token() token.Token + func (c *NamedConst) Type() types.Type + type Next struct + IsString bool + Iter Value + func (v *Next) Name() string + func (v *Next) Operands(rands []*Value) []*Value + func (v *Next) Referrers() *[]Instruction + func (v *Next) String() string + func (v *Next) Type() types.Type + type NoReturn uint8 + const AlwaysExits + const AlwaysUnwinds + const NeverReturns + const Returns + type Node interface + ID func() ID + Operands func(rands []*Value) []*Value + Parent func() *Function + Pos func() token.Pos + Referrers func() *[]Instruction + Source func() ast.Node + String func() string + type Package struct + Functions []*Function + Members map[string]Member + Pkg *types.Package + Prog *Program + func (p *Package) Build() + func (p *Package) Const(name string) (c *NamedConst) + func (p *Package) Func(name string) (f *Function) + func (p *Package) String() string + func (p *Package) Type(name string) (t *Type) + func (p *Package) Var(name string) (g *Global) + func (p *Package) WriteTo(w io.Writer) (int64, error) + func (pkg *Package) SetDebugMode(debug bool) + type Panic struct + X Value + func (s *Panic) Operands(rands []*Value) []*Value + func (s *Panic) String() string + func (v *Panic) Block() *BasicBlock + func (v *Panic) Parent() *Function + func (v *Panic) Referrers() *[]Instruction + type Parameter struct + func (v *Parameter) Name() string + func (v *Parameter) Object() types.Object + func (v *Parameter) Operands(rands []*Value) []*Value + func (v *Parameter) Referrers() *[]Instruction + func (v *Parameter) String() string + func (v *Parameter) Type() types.Type + type Phi struct + Edges []Value + func (v *Phi) Name() string + func (v *Phi) Operands(rands []*Value) []*Value + func (v *Phi) Referrers() *[]Instruction + func (v *Phi) String() string + func (v *Phi) Type() types.Type + type Program struct + Fset *token.FileSet + MethodSets typeutil.MethodSetCache + PrintFunc string + func NewProgram(fset *token.FileSet, mode BuilderMode) *Program + func (prog *Program) AllPackages() []*Package + func (prog *Program) Build() + func (prog *Program) ConstValue(obj *types.Const) *Const + func (prog *Program) CreatePackage(pkg *types.Package, files []*ast.File, info *types.Info, importable bool) *Package + func (prog *Program) FuncValue(obj *types.Func) *Function + func (prog *Program) ImportedPackage(path string) *Package + func (prog *Program) LookupMethod(T types.Type, pkg *types.Package, name string) *Function + func (prog *Program) MethodValue(sel *types.Selection) *Function + func (prog *Program) NewFunction(name string, sig *types.Signature, provenance Synthetic) *Function + func (prog *Program) Package(obj *types.Package) *Package + func (prog *Program) RuntimeTypes() []types.Type + func (prog *Program) VarValue(obj *types.Var, pkg *Package, ref []ast.Node) (value Value, isAddr bool) + type Range struct + X Value + func (v *Range) Name() string + func (v *Range) Operands(rands []*Value) []*Value + func (v *Range) Referrers() *[]Instruction + func (v *Range) String() string + func (v *Range) Type() types.Type + type Recv struct + Chan Value + CommaOk bool + func (recv *Recv) Operands(rands []*Value) []*Value + func (recv *Recv) String() string + func (v *Recv) Name() string + func (v *Recv) Referrers() *[]Instruction + func (v *Recv) Type() types.Type + type Return struct + Results []Value + func (s *Return) Operands(rands []*Value) []*Value + func (s *Return) String() string + func (v *Return) Block() *BasicBlock + func (v *Return) Parent() *Function + func (v *Return) Referrers() *[]Instruction + type RunDefers struct + func (*RunDefers) Operands(rands []*Value) []*Value + func (*RunDefers) String() string + func (v *RunDefers) Block() *BasicBlock + func (v *RunDefers) Parent() *Function + func (v *RunDefers) Referrers() *[]Instruction + type Select struct + Blocking bool + States []*SelectState + func (s *Select) String() string + func (v *Select) Name() string + func (v *Select) Operands(rands []*Value) []*Value + func (v *Select) Referrers() *[]Instruction + func (v *Select) Type() types.Type + type SelectState struct + Chan Value + DebugNode ast.Node + Dir types.ChanDir + Pos token.Pos + Send Value + type Send struct + Chan Value + X Value + func (s *Send) Operands(rands []*Value) []*Value + func (s *Send) String() string + func (v *Send) Block() *BasicBlock + func (v *Send) Parent() *Function + func (v *Send) Referrers() *[]Instruction + type Sigma struct + From *BasicBlock + X Value + func (v *Sigma) Name() string + func (v *Sigma) Operands(rands []*Value) []*Value + func (v *Sigma) Referrers() *[]Instruction + func (v *Sigma) String() string + func (v *Sigma) Type() types.Type + type Slice struct + High Value + Low Value + Max Value + X Value + func (v *Slice) Name() string + func (v *Slice) Operands(rands []*Value) []*Value + func (v *Slice) Referrers() *[]Instruction + func (v *Slice) String() string + func (v *Slice) Type() types.Type + type Store struct + Addr Value + Val Value + func (s *Store) Operands(rands []*Value) []*Value + func (s *Store) String() string + func (v *Store) Block() *BasicBlock + func (v *Store) Parent() *Function + func (v *Store) Referrers() *[]Instruction + type StringLookup struct + Index Value + X Value + func (v *StringLookup) Name() string + func (v *StringLookup) Operands(rands []*Value) []*Value + func (v *StringLookup) Referrers() *[]Instruction + func (v *StringLookup) String() string + func (v *StringLookup) Type() types.Type + type Synthetic int + const SyntheticBound + const SyntheticLoadedFromExportData + const SyntheticPackageInitializer + const SyntheticThunk + const SyntheticWrapper + func (syn Synthetic) String() string + type Type struct + func (t *Type) Name() string + func (t *Type) Object() types.Object + func (t *Type) Package() *Package + func (t *Type) Pos() token.Pos + func (t *Type) RelString(from *types.Package) string + func (t *Type) String() string + func (t *Type) Token() token.Token + func (t *Type) Type() types.Type + type TypeAssert struct + AssertedType types.Type + CommaOk bool + X Value + func (v *TypeAssert) Name() string + func (v *TypeAssert) Operands(rands []*Value) []*Value + func (v *TypeAssert) Referrers() *[]Instruction + func (v *TypeAssert) String() string + func (v *TypeAssert) Type() types.Type + type TypeSwitch struct + Conds []types.Type + Tag Value + func (s *TypeSwitch) Operands(rands []*Value) []*Value + func (s *TypeSwitch) String() string + func (v *TypeSwitch) Name() string + func (v *TypeSwitch) Referrers() *[]Instruction + func (v *TypeSwitch) Type() types.Type + type UnOp struct + Op token.Token + X Value + func (v *UnOp) Name() string + func (v *UnOp) Operands(rands []*Value) []*Value + func (v *UnOp) Referrers() *[]Instruction + func (v *UnOp) String() string + func (v *UnOp) Type() types.Type + type Unreachable struct + func (*Unreachable) Operands(rands []*Value) []*Value + func (s *Unreachable) String() string + func (v *Unreachable) Block() *BasicBlock + func (v *Unreachable) Parent() *Function + func (v *Unreachable) Referrers() *[]Instruction + type Value interface + ID func() ID + Name func() string + Operands func(rands []*Value) []*Value + Parent func() *Function + Pos func() token.Pos + Referrers func() *[]Instruction + Source func() ast.Node + String func() string + Type func() types.Type