pub fn all_constants(&self) -> bool {
        match *self {
            Expression::Scalar(_) => false,
            Expression::Constant(_) => true,
            Expression::Add(ref lhs, ref rhs)
            | Expression::Sub(ref lhs, ref rhs)
            | Expression::Mul(ref lhs, ref rhs)
            | Expression::Divu(ref lhs, ref rhs)
            | Expression::Modu(ref lhs, ref rhs)
            | Expression::Divs(ref lhs, ref rhs)
            | Expression::Mods(ref lhs, ref rhs)
            | Expression::And(ref lhs, ref rhs)
            | Expression::Or(ref lhs, ref rhs)
            | Expression::Xor(ref lhs, ref rhs)
            | Expression::Shl(ref lhs, ref rhs)
            | Expression::Shr(ref lhs, ref rhs)
            | Expression::Cmpeq(ref lhs, ref rhs)
            | Expression::Cmpneq(ref lhs, ref rhs)
            | Expression::Cmplts(ref lhs, ref rhs)
            | Expression::Cmpltu(ref lhs, ref rhs) => lhs.all_constants() && rhs.all_constants(),
            #[cfg(feature = "il-expression-ashr")]
            Expression::AShr(ref lhs, ref rhs) => lhs.all_constants() && rhs.all_constants(),
            Expression::Zext(_, ref rhs)
            | Expression::Sext(_, ref rhs)
            | Expression::Trun(_, ref rhs) => rhs.all_constants(),
            Expression::Ite(ref cond, ref then, ref else_) => {
                cond.all_constants() && then.all_constants() && else_.all_constants()
            }
        }
    }
/// Return true if all terminals in this expression are Constant
Return true if all terminals in this expression are Constant
Return true if all terminals in this expression are Constant
pub fn all_constants(&self) -> bool {
        match *self {
            Expression::Scalar(_) => false,
            Expression::Constant(_) => true,
            Expression::Add(ref lhs, ref rhs)
            | Expression::Sub(ref lhs, ref rhs)
            | Expression::Mul(ref lhs, ref rhs)
            | Expression::Divu(ref lhs, ref rhs)
            | Expression::Modu(ref lhs, ref rhs)
            | Expression::Divs(ref lhs, ref rhs)
            | Expression::Mods(ref lhs, ref rhs)
            | Expression::And(ref lhs, ref rhs)
            | Expression::Or(ref lhs, ref rhs)
            | Expression::Xor(ref lhs, ref rhs)
            | Expression::Shl(ref lhs, ref rhs)
            | Expression::Shr(ref lhs, ref rhs)
            | Expression::Cmpeq(ref lhs, ref rhs)
            | Expression::Cmpneq(ref lhs, ref rhs)
            | Expression::Cmplts(ref lhs, ref rhs)
            | Expression::Cmpltu(ref lhs, ref rhs) => lhs.all_constants() && rhs.all_constants(),
            #[cfg(feature = "il-expression-ashr")]
            Expression::AShr(ref lhs, ref rhs) => lhs.all_constants() && rhs.all_constants(),
            Expression::Zext(_, ref rhs)
            | Expression::Sext(_, ref rhs)
            | Expression::Trun(_, ref rhs) => rhs.all_constants(),
            Expression::Ite(ref cond, ref then, ref else_) => {
                cond.all_constants() && then.all_constants() && else_.all_constants()
            }
        }
    }
pub fn all_constants ( & self ) -> bool { match * self { Expression :: Scalar ( _ ) => false , Expression :: Constant ( _ ) => true , Expression :: Add ( ref lhs , ref rhs ) | Expression :: Sub ( ref lhs , ref rhs ) | Expression :: Mul ( ref lhs , ref rhs ) | Expression :: Divu ( ref lhs , ref rhs ) | Expression :: Modu ( ref lhs , ref rhs ) | Expression :: Divs ( ref lhs , ref rhs ) | Expression :: Mods ( ref lhs , ref rhs ) | Expression :: And ( ref lhs , ref rhs ) | Expression :: Or ( ref lhs , ref rhs ) | Expression :: Xor ( ref lhs , ref rhs ) | Expression :: Shl ( ref lhs , ref rhs ) | Expression :: Shr ( ref lhs , ref rhs ) | Expression :: Cmpeq ( ref lhs , ref rhs ) | Expression :: Cmpneq ( ref lhs , ref rhs ) | Expression :: Cmplts ( ref lhs , ref rhs ) | Expression :: Cmpltu ( ref lhs , ref rhs ) => lhs . all_constants ( ) && rhs . all_constants ( ) , # [ cfg ( feature " " ) ] Expression :: AShr ( ref lhs , ref rhs ) => lhs . all_constants ( ) && rhs . all_constants ( ) , Expression :: Zext ( _ , ref rhs ) | Expression :: Sext ( _ , ref rhs ) | Expression :: Trun ( _ , ref rhs ) => rhs . all_constants ( ) , Expression :: Ite ( ref cond , ref then , ref else_ ) => { cond . all_constants ( ) && then . all_constants ( ) && else_ . all_constants ( ) } } }
Return true if all terminals in this expression are Constant
Return true if all terminals in this expression are Constant
&self
&self