Returns the i64 const on top of the stack or None if there isn't one.
(&mut self)
| 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> { |
| 454 | let top = self.stack.peek().expect("value at stack top"); |
| 455 | |
| 456 | if top.is_i64_const() { |
| 457 | let val = self |
| 458 | .stack |
| 459 | .pop_i64_const() |
| 460 | .expect("i64 const value at stack top"); |
| 461 | Some(val) |
| 462 | } else { |
| 463 | None |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | /// Returns the f32 const on top of the stack or None if there isn't one. |
| 468 | pub fn pop_f32_const(&mut self) -> Option<Ieee32> { |
no test coverage detected