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

Method block

winch/codegen/src/codegen/control.rs:278–292  ·  view source on GitHub ↗

Returns [`ControlStackFrame`] for a block.

(
        sig: BlockSig,
        masm: &mut M,
        context: &mut CodeGenContext<Emission>,
    )

Source from the content-addressed store, hash-verified

276
277 /// Returns [`ControlStackFrame`] for a block.
278 pub fn block<M: MacroAssembler>(
279 sig: BlockSig,
280 masm: &mut M,
281 context: &mut CodeGenContext<Emission>,
282 ) -> Result<Self> {
283 let mut control = Self::Block {
284 sig,
285 is_branch_target: false,
286 exit: masm.get_label()?,
287 stack_state: Default::default(),
288 };
289
290 control.emit(masm, context)?;
291 Ok(control)
292 }
293
294 /// Returns [`ControlStackFrame`] for a loop.
295 pub fn r#loop<M: MacroAssembler>(

Callers

nothing calls this directly

Calls 3

OkFunction · 0.85
get_labelMethod · 0.45
emitMethod · 0.45

Tested by

no test coverage detected