MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / pop_named_reg

Method pop_named_reg

winch/codegen/src/stack.rs:450–457  ·  view source on GitHub ↗

Pops the given register if it is at the top of the stack; returns `None` otherwise.

(&mut self, reg: Reg)

Source from the content-addressed store, hash-verified

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]> {

Callers 1

pop_to_regMethod · 0.80

Calls 5

peekMethod · 0.45
is_regMethod · 0.45
unwrap_regMethod · 0.45
unwrapMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected