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

Method prev_block_position

cranelift/codegen/src/cursor.rs:358–368  ·  view source on GitHub ↗

Get the position that a `cursor.prev_block()` call would move this cursor to, but do not update this cursor's position.

(&self)

Source from the content-addressed store, hash-verified

356 /// Get the position that a `cursor.prev_block()` call would move this
357 /// cursor to, but do not update this cursor's position.
358 fn prev_block_position(&self) -> CursorPosition {
359 let prev = if let Some(block) = self.current_block() {
360 self.layout().prev_block(block)
361 } else {
362 self.layout().last_block()
363 };
364 match prev {
365 Some(block) => CursorPosition::After(block),
366 None => CursorPosition::Nowhere,
367 }
368 }
369
370 /// Go to the bottom of the previous block in layout order and return it.
371 ///

Callers 2

prev_positionMethod · 0.80
prev_blockMethod · 0.80

Implementers 2

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

Calls 4

last_blockMethod · 0.80
current_blockMethod · 0.45
prev_blockMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected