Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAllGraph ¶
func ApplyAllGraph(graph *Graph, meta *transform.Meta, visitors []TransformGenerator)
ApplyAllGraph applies a list of transforms to a CFG graph.
Types ¶
type Branch ¶
type Branch struct { Cond ast.Expr SuccIf int SuccElse int // contains filtered or unexported fields }
Branch is a branching (ifelse, switch, for).
type EliminateCallExprStmt ¶
type EliminateCallExprStmt struct { }
EliminateCallExprStmt visitor type.
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
Empty is the final node in the graph. It has no successors.
type FunctionCalls ¶
type FunctionCalls struct {
// contains filtered or unexported fields
}
FunctionCalls visitor type.
type Graph ¶
type Graph struct {
Nodes []Node
}
Graph of instructions.
type LinkResults ¶
type LinkResults struct { }
LinkResults visitor type.
type Node ¶
type Node interface { // Succs returns all the successors of the node. Succs() []int // Index returns the index of the node inside of the graph's node array. Index() int // SetIndex updates the index of the node. SetIndex(int) }
Node represents a node of the graph, with between 0 to 2 successors.
type Transform ¶
type Transform struct { }
Transform visitor type, stateless.
type TransformGenerator ¶
A TransformGenerator is a function that returns a transformation given a specific node.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.