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

Method at_bottom

cranelift/codegen/src/cursor.rs:214–220  ·  view source on GitHub ↗

Rebuild this cursor positioned at the bottom 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_bottom(block); // Use `pos`... } ```

(mut self, block: ir::Block)

Source from the content-addressed store, hash-verified

212 /// }
213 /// ```
214 fn at_bottom(mut self, block: ir::Block) -> Self
215 where
216 Self: Sized,
217 {
218 self.goto_bottom(block);
219 self
220 }
221
222 /// Get the block corresponding to the current position.
223 fn current_block(&self) -> Option<ir::Block> {

Callers 9

cursorMethod · 0.80
simple_blockFunction · 0.80
sequence_of_blocksFunction · 0.80
program_with_loopFunction · 0.80
br_table_with_argsFunction · 0.80
undef_values_reorderingFunction · 0.80
unreachable_useFunction · 0.80

Implementers 2

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

Calls 1

goto_bottomMethod · 0.80

Tested by 8

simple_blockFunction · 0.64
sequence_of_blocksFunction · 0.64
program_with_loopFunction · 0.64
br_table_with_argsFunction · 0.64
undef_values_reorderingFunction · 0.64
unreachable_useFunction · 0.64