fn new_edge(
    cur: MuID,
    edge: BlockEdge,
    stack: &mut Vec<MuID>,
    visited: &mut Vec<MuID>,
    func: &mut MuFunctionVersion
) {
    // add current block to target's predecessors
    {
        let target = func.content.as_mut().unwrap().get_block_mut(edge.target);
        target.control_flow.preds.push(cur);
    }

    // add target as current block's successors and start dfs
    let succ = edge.target;
    {
        let cur = func.content.as_mut().unwrap().get_block_mut(cur);
        cur.control_flow.succs.push(edge);
    }

    // if we havent visited the successor, visit it
    if !visited.contains(&succ) {
        dfs(succ, stack, visited, func);
    }
}
/// creates info for a new edge (set predecessor, successors, and recursively do dfs
creates info for a new edge (set predecessor, successors, and recursively do dfs
creates info for a new edge ( set predecessor successors and recursively do dfs
fn new_edge(
    cur: MuID,
    edge: BlockEdge,
    stack: &mut Vec<MuID>,
    visited: &mut Vec<MuID>,
    func: &mut MuFunctionVersion
) {
    // add current block to target's predecessors
    {
        let target = func.content.as_mut().unwrap().get_block_mut(edge.target);
        target.control_flow.preds.push(cur);
    }
    // add target as current block's successors and start dfs
    let succ = edge.target;
    {
        let cur = func.content.as_mut().unwrap().get_block_mut(cur);
        cur.control_flow.succs.push(edge);
    }
    // if we havent visited the successor, visit it
    if !visited.contains(&succ) {
        dfs(succ, stack, visited, func);
    }
}
fn new_edge ( cur : MuID , edge : BlockEdge , stack : & mut Vec < MuID > , visited : & mut Vec < MuID > , func : & mut MuFunctionVersion ) { // add current block to target's predecessors { let target = func . content . as_mut ( ) . unwrap ( ) . get_block_mut ( edge . target ) ; target . control_flow . preds . push ( cur ) ; } // add target as current block's successors and start dfs let succ = edge . target ; { let cur = func . content . as_mut ( ) . unwrap ( ) . get_block_mut ( cur ) ; cur . control_flow . succs . push ( edge ) ; } // if we havent visited the successor, visit it if ! visited . contains ( & succ ) { dfs ( succ , stack , visited , func ) ; } }
creates info for a new edge (set predecessor, successors, and recursively do dfs
creates info for a new edge ( set predecessor successors and recursively do dfs
cur
MuID
edge
BlockEdge
stack
&mut Vec<MuID>
visited
&mut Vec<MuID>
func
&mut MuFunctionVersion
cur
MuID
edge
BlockEdge
stack
&mut Vec<MuID>
visited
&mut Vec<MuID>
func
&mut MuFunctionVersion