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

Function collect_block_args

cranelift/interpreter/src/step.rs:47–57  ·  view source on GitHub ↗

Collect a list of block arguments.

(
    frame: &Frame,
    args: impl Iterator<Item = BlockArg>,
)

Source from the content-addressed store, hash-verified

45
46/// Collect a list of block arguments.
47fn collect_block_args(
48 frame: &Frame,
49 args: impl Iterator<Item = BlockArg>,
50) -> SmallVec<[DataValue; 1]> {
51 args.into_iter()
52 .map(|n| match n {
53 BlockArg::Value(n) => frame.get(n).clone(),
54 _ => panic!("exceptions not supported"),
55 })
56 .collect()
57}
58
59/// Interpret a single Cranelift instruction. Note that program traps and interpreter errors are
60/// distinct: a program trap results in `Ok(Flow::Trap(...))` whereas an interpretation error (e.g.

Callers 1

stepFunction · 0.85

Calls 5

collectMethod · 0.80
mapMethod · 0.45
into_iterMethod · 0.45
cloneMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected