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

Method take_args

cranelift/codegen/src/machinst/abi.rs:2180–2190  ·  view source on GitHub ↗

Get an `args` pseudo-inst, if any, that should appear at the very top of the function body prior to regalloc.

(&mut self)

Source from the content-addressed store, hash-verified

2178 /// Get an `args` pseudo-inst, if any, that should appear at the
2179 /// very top of the function body prior to regalloc.
2180 pub fn take_args(&mut self) -> Option<M::I> {
2181 if self.reg_args.len() > 0 {
2182 // Very first instruction is an `args` pseudo-inst that
2183 // establishes live-ranges for in-register arguments and
2184 // constrains them at the start of the function to the
2185 // locations defined by the ABI.
2186 Some(M::gen_args(core::mem::take(&mut self.reg_args)))
2187 } else {
2188 None
2189 }
2190 }
2191}
2192
2193/// ### Post-Regalloc Functions

Callers 1

gen_arg_setupMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected