fn traverse_by(&self, block_id: BlockId) -> Vec<BlockId> {
        let mut ret = Vec::new();
        // We use this index to keep track of our frontier.
        let mut index = 0;
        // Guard against cycles
        let mut seen = Set::new();

        ret.push(block_id);
        seen.insert(&block_id);

        while index < ret.len() {
            let block_id = ret[index];
            index += 1;
            let successors = self.successors(block_id);
            for block_id in successors.iter() {
                if !seen.contains(&block_id) {
                    ret.push(*block_id);
                    seen.insert(block_id);
                }
            }
        }

        ret
    }
/// A utility function that implements BFS-reachability from block_id with
/// respect to get_targets function
A utility function that implements BFS-reachability from block_id with
respect to get_targets function
A utility function that implements BFS - reachability from block_id with respect to get_targets function
fn traverse_by(&self, block_id: BlockId) -> Vec<BlockId> {
        let mut ret = Vec::new();
        // We use this index to keep track of our frontier.
        let mut index = 0;
        // Guard against cycles
        let mut seen = Set::new();
        ret.push(block_id);
        seen.insert(&block_id);
        while index < ret.len() {
            let block_id = ret[index];
            index += 1;
            let successors = self.successors(block_id);
            for block_id in successors.iter() {
                if !seen.contains(&block_id) {
                    ret.push(*block_id);
                    seen.insert(block_id);
                }
            }
        }
        ret
    }
fn traverse_by ( & self , block_id : BlockId ) -> Vec < BlockId > { let mut ret = Vec :: new ( ) ; // We use this index to keep track of our frontier. let mut index = 0 ; // Guard against cycles let mut seen = Set :: new ( ) ; ret . push ( block_id ) ; seen . insert ( & block_id ) ; while index < ret . len ( ) { let block_id = ret [ index ] ; index += 1 ; let successors = self . successors ( block_id ) ; for block_id in successors . iter ( ) { if ! seen . contains ( & block_id ) { ret . push ( * block_id ) ; seen . insert ( block_id ) ; } } } ret }
A utility function that implements BFS-reachability from block_id with
respect to get_targets function
A utility function that implements BFS - reachability from block_id with respect to get_targets function
&self
block_id
BlockId