pub fn read(&self, var: Var) -> Result<Assign, Error> {
        // Local assignment that is already present.
        if let Some(assign) = self.inner.vars.borrow().get(&var) {
            return Ok(assign.clone());
        }

        let id = self.inner.global.static_id();
        let assign = Assign::new(id, self.id());

        self.inner
            .global
            .values_mut()
            .insert(id, Value::Phi(Phi::new()));

        self.inner.vars.borrow_mut().insert(var, assign.clone());

        if self.inner.open.get() {
            self.inner
                .incomplete
                .borrow_mut()
                .push((assign.clone(), var));
        } else {
            self.add_phi(id, var)?;
        }

        Ok(assign)
    }
/// Read the given variable, looking it up recursively in ancestor blocks
/// and memoizing as needed.
Read the given variable, looking it up recursively in ancestor blocks
and memoizing as needed.
Read the given variable looking it up recursively in ancestor blocks and memoizing as needed .
pub fn read(&self, var: Var) -> Result<Assign, Error> {
        // Local assignment that is already present.
        if let Some(assign) = self.inner.vars.borrow().get(&var) {
            return Ok(assign.clone());
        }
        let id = self.inner.global.static_id();
        let assign = Assign::new(id, self.id());
        self.inner
            .global
            .values_mut()
            .insert(id, Value::Phi(Phi::new()));
        self.inner.vars.borrow_mut().insert(var, assign.clone());
        if self.inner.open.get() {
            self.inner
                .incomplete
                .borrow_mut()
                .push((assign.clone(), var));
        } else {
            self.add_phi(id, var)?;
        }
        Ok(assign)
    }
pub fn read ( & self , var : Var ) -> Result < Assign , Error > { // Local assignment that is already present. if let Some ( assign ) = self . inner . vars . borrow ( ) . get ( & var ) { return Ok ( assign . clone ( ) ) ; } let id = self . inner . global . static_id ( ) ; let assign = Assign :: new ( id , self . id ( ) ) ; self . inner . global . values_mut ( ) . insert ( id , Value :: Phi ( Phi :: new ( ) ) ) ; self . inner . vars . borrow_mut ( ) . insert ( var , assign . clone ( ) ) ; if self . inner . open . get ( ) { self . inner . incomplete . borrow_mut ( ) . push ( ( assign . clone ( ) , var ) ) ; } else { self . add_phi ( id , var ) ? ; } Ok ( assign ) }
Read the given variable, looking it up recursively in ancestor blocks
and memoizing as needed.
Read the given variable looking it up recursively in ancestor blocks and memoizing as needed .
&self
var
Var
&self
var
Var