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

Method shl

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

Source from the content-addressed store, hash-verified

487 type Output = Self;
488
489 fn shl(self, rhs: Self) -> Self::Output {
490 if self.is_bottom() || rhs.is_bottom() {
491 Self::bottom()
492 } else if self.is_top() || rhs.is_top() {
493 Self::top()
494 } else if let (Ok(lval), Ok(rval)) = (Integer::try_from(self), Integer::try_from(rhs)) {
495 if let Some(u32val) = rval.to_u32() {
496 let val = lval << u32val;
497 Self::new(Bound::from(val.clone()), Bound::from(val))
498 } else {
499 Self::top()
500 }
501 } else {
502 Self::top()
503 }
504 }
505}
506
507impl Shr for Interval {

Callers

nothing calls this directly

Calls 2

is_bottomMethod · 0.45
is_topMethod · 0.45

Tested by

no test coverage detected