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

Method cursor

cranelift/frontend/src/frontend.rs:630–635  ·  view source on GitHub ↗

Returns a [`FuncCursor`] pointed at the current position ready for inserting instructions. This can be used to insert SSA code that doesn't need to access locals and that doesn't need to know about [`FunctionBuilder`] at all.

(&mut self)

Source from the content-addressed store, hash-verified

628 /// This can be used to insert SSA code that doesn't need to access locals and that doesn't
629 /// need to know about [`FunctionBuilder`] at all.
630 pub fn cursor(&mut self) -> FuncCursor<'_> {
631 self.ensure_inserted_block();
632 FuncCursor::new(self.func)
633 .with_srcloc(self.srcloc)
634 .at_bottom(self.position.unwrap())
635 }
636
637 /// Append parameters to the given [`Block`] corresponding to the function
638 /// parameters. This can be used to set up the block parameters for the

Callers

nothing calls this directly

Calls 5

ensure_inserted_blockMethod · 0.80
at_bottomMethod · 0.80
with_srclocMethod · 0.80
newFunction · 0.50
unwrapMethod · 0.45

Tested by

no test coverage detected