/// Perform a conditional jump to the given block with the specified inputs
/// if the given condition is true.
Perform a conditional jump to the given block with the specified inputs
if the given condition is true.
Perform a conditional jump to the given block with the specified inputs if the given condition is true .
pub fn jump_if(
        &mut self,
        cond: ValueId,
        block: &Block,
        input: &[ValueId],
    ) -> Result<(), Error> {
        let expected = block.inner.entry.borrow().len();
        if expected != input.len() {
            return Err(Error::BlockInputMismatch {
                expected,
                actual: input.len(),
            });
        }
        self.inner
            .instructions
            .borrow_mut()
            .push(Inst::JumpIf(cond, block.id(), input.to_vec()));
        Ok(())
    }
pub fn jump_if ( & mut self , cond : ValueId , block : & Block , input : & [ ValueId ] , ) -> Result < ( ) , Error > { let expected = block . inner . entry . borrow ( ) . len ( ) ; if expected != input . len ( ) { return Err ( Error :: BlockInputMismatch { expected , actual : input . len ( ) , } ) ; } self . inner . instructions . borrow_mut ( ) . push ( Inst :: JumpIf ( cond , block . id ( ) , input . to_vec ( ) ) ) ; Ok ( ( ) ) }
Perform a conditional jump to the given block with the specified inputs
if the given condition is true.
Perform a conditional jump to the given block with the specified inputs if the given condition is true .
&mut self
cond
ValueId
block
&Block
input
&[ValueId]