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

Method at_top

cranelift/codegen/src/cursor.rs:193–199  ·  view source on GitHub ↗

Rebuild this cursor positioned at the top of `block`. This is intended to be used as a builder method: ``` # use cranelift_codegen::ir::{Function, Block, Inst}; # use cranelift_codegen::cursor::{Cursor, FuncCursor}; fn edit_func(func: &mut Function, block: Block) { let mut pos = FuncCursor::new(func).at_top(block); // Use `pos`... } ```

(mut self, block: ir::Block)

Source from the content-addressed store, hash-verified

191 /// }
192 /// ```
193 fn at_top(mut self, block: ir::Block) -> Self
194 where
195 Self: Sized,
196 {
197 self.goto_top(block);
198 self
199 }
200
201 /// Rebuild this cursor positioned at the bottom of `block`.
202 ///

Callers 1

append_instFunction · 0.80

Implementers 2

cursor.rscranelift/codegen/src/cursor.rs
layout.rscranelift/codegen/src/ir/layout.rs

Calls 1

goto_topMethod · 0.80

Tested by 1

append_instFunction · 0.64