gotools/go/cfg/builder.go

type builder

func (b *builder) stmt(_s ast.Stmt) {}

func (b *builder) stmtList(list []ast.Stmt) {}

func (b *builder) branchStmt(s *ast.BranchStmt) {}

func (b *builder) switchStmt(s *ast.SwitchStmt, label *lblock) {}

func (b *builder) typeSwitchStmt(s *ast.TypeSwitchStmt, label *lblock) {}

func (b *builder) typeCaseBody(cc *ast.CaseClause, done *Block) {}

func (b *builder) selectStmt(s *ast.SelectStmt, label *lblock) {}

func (b *builder) forStmt(s *ast.ForStmt, label *lblock) {}

func (b *builder) rangeStmt(s *ast.RangeStmt, label *lblock) {}

type targets

type lblock

// labeledBlock returns the branch target associated with the
// specified label, creating it if needed.
func (b *builder) labeledBlock(label *ast.Ident, stmt *ast.LabeledStmt) *lblock {}

// newBlock appends a new unconnected basic block to b.cfg's block
// slice and returns it.
// It does not automatically become the current block.
// comment is an optional string for more readable debugging output.
func (b *builder) newBlock(kind BlockKind, stmt ast.Stmt) *Block {}

func (b *builder) add(n ast.Node) {}

// jump adds an edge from the current block to the target block,
// and sets b.current to nil.
func (b *builder) jump(target *Block) {}

// ifelse emits edges from the current block to the t and f blocks,
// and sets b.current to nil.
func (b *builder) ifelse(t, f *Block) {}