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

Method prev_inst

cranelift/codegen/src/cursor.rs:520–524  ·  view source on GitHub ↗

Move to the previous instruction in the same block and return it. - If the cursor was positioned after a block, go to the last instruction in that block. - If there are no more instructions in the block, go to the `Before(block)` position and return `None`. - If the cursor wasn't pointing anywhere, keep doing that. This method will never move the cursor to a different block. # Examples The `pr

(&mut self)

Source from the content-addressed store, hash-verified

518 /// }
519 /// ```
520 fn prev_inst(&mut self) -> Option<ir::Inst> {
521 let pos = self.prev_inst_position()?;
522 self.set_position(pos);
523 self.current_inst()
524 }
525
526 /// Insert an instruction at the current position.
527 ///

Callers 2

prev_inst_positionMethod · 0.45

Implementers 2

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

Calls 3

prev_inst_positionMethod · 0.80
current_instMethod · 0.80
set_positionMethod · 0.45

Tested by

no test coverage detected