MCPcopy Create free account
hub / github.com/Rust-API/Rust-API-Bypass-Checker / shr

Method shr

src/analysis/numerical/interval.rs:510–525  ·  view source on GitHub ↗
(self, rhs: Self)

Source from the content-addressed store, hash-verified

508 type Output = Self;
509
510 fn shr(self, rhs: Self) -> Self::Output {
511 if self.is_bottom() || rhs.is_bottom() {
512 Self::bottom()
513 } else if self.is_top() || rhs.is_top() {
514 Self::top()
515 } else if let (Ok(lval), Ok(rval)) = (Integer::try_from(self), Integer::try_from(rhs)) {
516 if let Some(u32val) = rval.to_u32() {
517 let val = lval >> u32val;
518 Self::new(Bound::from(val.clone()), Bound::from(val))
519 } else {
520 Self::top()
521 }
522 } else {
523 Self::top()
524 }
525 }
526}
527
528#[cfg(test)]

Callers

nothing calls this directly

Calls 2

is_bottomMethod · 0.45
is_topMethod · 0.45

Tested by

no test coverage detected