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

Method current_block

cranelift/codegen/src/cursor.rs:223–230  ·  view source on GitHub ↗

Get the block corresponding to the current position.

(&self)

Source from the content-addressed store, hash-verified

221
222 /// Get the block corresponding to the current position.
223 fn current_block(&self) -> Option<ir::Block> {
224 use self::CursorPosition::*;
225 match self.position() {
226 Nowhere => None,
227 At(inst) => self.layout().inst_block(inst),
228 Before(block) | After(block) => Some(block),
229 }
230 }
231
232 /// Get the instruction corresponding to the current position, if any.
233 fn current_inst(&self) -> Option<ir::Inst> {

Callers 4

next_block_positionMethod · 0.45
next_blockMethod · 0.45
prev_block_positionMethod · 0.45
prev_blockMethod · 0.45

Implementers 2

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

Calls 3

inst_blockMethod · 0.80
positionMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected