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

Method next_block

cranelift/codegen/src/cursor.rs:350–354  ·  view source on GitHub ↗

Go to the top of the next block in layout order and return it. - If the cursor wasn't pointing at anything, go to the top of the first block in the function. - If there are no more blocks, leave the cursor pointing at nothing and return `None`. # Examples The `next_block()` method is intended for iterating over the blocks in layout order: ``` # use cranelift_codegen::ir::{Function, Block}; # u

(&mut self)

Source from the content-addressed store, hash-verified

348 /// }
349 /// ```
350 fn next_block(&mut self) -> Option<ir::Block> {
351 let pos = self.next_block_position();
352 self.set_position(pos);
353 self.current_block()
354 }
355
356 /// Get the position that a `cursor.prev_block()` call would move this
357 /// cursor to, but do not update this cursor's position.

Callers 1

next_block_positionMethod · 0.45

Implementers 2

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

Calls 3

next_block_positionMethod · 0.80
set_positionMethod · 0.45
current_blockMethod · 0.45

Tested by

no test coverage detected