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

Method ensure_inserted_block

cranelift/frontend/src/frontend.rs:611–624  ·  view source on GitHub ↗

Make sure that the current block is inserted in the layout.

(&mut self)

Source from the content-addressed store, hash-verified

609
610 /// Make sure that the current block is inserted in the layout.
611 pub fn ensure_inserted_block(&mut self) {
612 let block = self.position.unwrap();
613 if self.is_pristine(block) {
614 if !self.func.layout.is_block_inserted(block) {
615 self.func.layout.append_block(block);
616 }
617 self.func_ctx.status[block] = BlockStatus::Partial;
618 } else {
619 debug_assert!(
620 !self.is_filled(block),
621 "you cannot add an instruction to a block already filled"
622 );
623 }
624 }
625
626 /// Returns a [`FuncCursor`] pointed at the current position ready for inserting instructions.
627 ///

Callers 15

buildMethod · 0.80
try_use_varMethod · 0.80
cursorMethod · 0.80
builderMethod · 0.80
emit_maybe_force_gcMethod · 0.80

Calls 4

is_pristineMethod · 0.80
is_block_insertedMethod · 0.80
append_blockMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected