fn read_dependencies(&self, var: Var) -> Result<Vec<Assign>, Error> {
        let blocks = self.inner.global.blocks();
        let mut deps = Vec::new();

        let mut queue = VecDeque::new();

        for ancestor in &*self.inner.ancestors.borrow() {
            queue.push_back(blocks.get(*ancestor)?);
        }

        while let Some(block) = queue.pop_front() {
            if let Some(assign) = block.inner.vars.borrow().get(&var) {
                deps.push(assign.clone());
                continue;
            }

            for ancestor in &*block.inner.ancestors.borrow() {
                queue.push_back(blocks.get(*ancestor)?);
            }
        }

        Ok(deps)
    }
/// Read the given dependencies recursively.
Read the given dependencies recursively.
Read the given dependencies recursively .
fn read_dependencies(&self, var: Var) -> Result<Vec<Assign>, Error> {
        let blocks = self.inner.global.blocks();
        let mut deps = Vec::new();
        let mut queue = VecDeque::new();
        for ancestor in &*self.inner.ancestors.borrow() {
            queue.push_back(blocks.get(*ancestor)?);
        }
        while let Some(block) = queue.pop_front() {
            if let Some(assign) = block.inner.vars.borrow().get(&var) {
                deps.push(assign.clone());
                continue;
            }
            for ancestor in &*block.inner.ancestors.borrow() {
                queue.push_back(blocks.get(*ancestor)?);
            }
        }
        Ok(deps)
    }
fn read_dependencies ( & self , var : Var ) -> Result < Vec < Assign > , Error > { let blocks = self . inner . global . blocks ( ) ; let mut deps = Vec :: new ( ) ; let mut queue = VecDeque :: new ( ) ; for ancestor in & * self . inner . ancestors . borrow ( ) { queue . push_back ( blocks . get ( * ancestor ) ? ) ; } while let Some ( block ) = queue . pop_front ( ) { if let Some ( assign ) = block . inner . vars . borrow ( ) . get ( & var ) { deps . push ( assign . clone ( ) ) ; continue ; } for ancestor in & * block . inner . ancestors . borrow ( ) { queue . push_back ( blocks . get ( * ancestor ) ? ) ; } } Ok ( deps ) }
Read the given dependencies recursively.
Read the given dependencies recursively .
&self
var
Var
&self
var
Var