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

Method prev_block

cranelift/codegen/src/cursor.rs:390–394  ·  view source on GitHub ↗

Go to the bottom of the previous block in layout order and return it. - If the cursor wasn't pointing at anything, go to the bottom of the last block in the function. - If there are no more blocks, leave the cursor pointing at nothing and return `None`. # Examples The `prev_block()` method is intended for iterating over the blocks in backwards layout order: ``` # use cranelift_codegen::ir::{Fu

(&mut self)

Source from the content-addressed store, hash-verified

388 /// }
389 /// ```
390 fn prev_block(&mut self) -> Option<ir::Block> {
391 let pos = self.prev_block_position();
392 self.set_position(pos);
393 self.current_block()
394 }
395
396 /// Get the position that a `cursor.next_inst()` call would move this cursor
397 /// to, but do not update this cursor's position.

Callers 1

prev_block_positionMethod · 0.45

Implementers 2

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

Calls 3

prev_block_positionMethod · 0.80
set_positionMethod · 0.45
current_blockMethod · 0.45

Tested by

no test coverage detected