Versions in this module Expand all Collapse all v0 v0.0.1 Sep 17, 2017 Changes in this version + var ErrBadBlock = errors.New("internal error: Block is nil") + var ErrBadNode = errors.New("VisitNode does not contain block (or has nil block)") + var ErrBadParentFn = errors.New("internal error: Block has nil parent Fn") + var ErrEdgesStackEmpty = errors.New("blockgraph: cannot pop edges: stack empty") + func TraverseEdges(fn *ssa.Function, visit func(from, to *ssa.BasicBlock)) + type Analyser interface + CurrBlk func() *ssa.BasicBlock + EnterBlk func(blk *ssa.BasicBlock) + ExitBlk func(blk *ssa.BasicBlock) + JumpBlk func(curr, next *ssa.BasicBlock) + PrevBlk func() *ssa.BasicBlock + type VisitGraph struct + func NewVisitGraph(reentrant bool) *VisitGraph + func (g *VisitGraph) EdgeVisited(from, to *VisitNode) bool + func (g *VisitGraph) LastNode() *VisitNode + func (g *VisitGraph) MarkLast(n *VisitNode) + func (g *VisitGraph) NodePartialVisited(toVisit *VisitNode) bool + func (g *VisitGraph) NodeVisited(toVisit *VisitNode) bool + func (g *VisitGraph) Size() int + func (g *VisitGraph) Visit(n *VisitNode) + func (g *VisitGraph) VisitFrom(prev, n *VisitNode) + func (g *VisitGraph) VisitedOnce(toVisit *VisitNode) bool + type VisitNode struct + Next *VisitNode + Prev *VisitNode + func NewVisitNode(block *ssa.BasicBlock) *VisitNode + func (n *VisitNode) Blk() *ssa.BasicBlock + func (n *VisitNode) Fn() *ssa.Function + func (n *VisitNode) Index() int + func (n *VisitNode) String() string