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

Method pop_reg

winch/codegen/src/stack.rs:441–446  ·  view source on GitHub ↗

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

(&mut self)

Source from the content-addressed store, hash-verified

439 /// Pops the element at the top of the stack if it is a register;
440 /// returns `None` otherwise.
441 pub fn pop_reg(&mut self) -> Option<TypedReg> {
442 match self.peek() {
443 Some(v) => v.is_reg().then(|| self.pop().unwrap().unwrap_reg()),
444 _ => None,
445 }
446 }
447
448 /// Pops the given register if it is at the top of the stack;
449 /// returns `None` otherwise.

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