(op1: Constant, op2: Constant)
| 590 | // Note: Rust/num_bigint << is SHL, >> is SHR (arithmetic/sign-extending for signed) |
| 591 | pub fn shl_constants(op1: Constant, op2: Constant) -> Option<Constant> { |
| 592 | let bi1 = parse_constant_to_bigint(&op1).ok()?; |
| 593 | let amount = get_shift_amount(&op2)?; |
| 594 | bigint_to_integer_constant_like(bi1 << amount, &op1) |
| 595 | } |
| 596 | |
| 597 | pub fn shr_constants(op1: Constant, op2: Constant) -> Option<Constant> { |
no test coverage detected