Returns the i32 const on top of the stack or None if there isn't one.
(&mut self)
| 436 | |
| 437 | /// Returns the i32 const on top of the stack or None if there isn't one. |
| 438 | pub fn pop_i32_const(&mut self) -> Option<i32> { |
| 439 | let top = self.stack.peek().expect("value at stack top"); |
| 440 | |
| 441 | if top.is_i32_const() { |
| 442 | let val = self |
| 443 | .stack |
| 444 | .pop_i32_const() |
| 445 | .expect("i32 const value at stack top"); |
| 446 | Some(val) |
| 447 | } else { |
| 448 | None |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | /// Returns the i64 const on top of the stack or None if there isn't one. |
| 453 | pub fn pop_i64_const(&mut self) -> Option<i64> { |
no test coverage detected