Pops the given register if it is at the top of the stack; returns `None` otherwise.
(&mut self, reg: Reg)
| 448 | /// Pops the given register if it is at the top of the stack; |
| 449 | /// returns `None` otherwise. |
| 450 | pub fn pop_named_reg(&mut self, reg: Reg) -> Option<TypedReg> { |
| 451 | match self.peek() { |
| 452 | Some(v) => { |
| 453 | (v.is_reg() && v.unwrap_reg().reg == reg).then(|| self.pop().unwrap().unwrap_reg()) |
| 454 | } |
| 455 | _ => None, |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | /// Get a mutable reference to the inner stack representation. |
| 460 | pub fn inner_mut(&mut self) -> &mut SmallVec<[Val; 64]> { |
no test coverage detected