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

Function sum_unsigned

cranelift/interpreter/src/step.rs:38–44  ·  view source on GitHub ↗

Helper for summing a sequence of values.

(head: DataValue, tail: SmallVec<[DataValue; 1]>)

Source from the content-addressed store, hash-verified

36
37// Helper for summing a sequence of values.
38fn sum_unsigned(head: DataValue, tail: SmallVec<[DataValue; 1]>) -> ValueResult<u128> {
39 let mut acc = head;
40 for t in tail {
41 acc = DataValueExt::add(acc, t)?;
42 }
43 acc.into_int_unsigned()
44}
45
46/// Collect a list of block arguments.
47fn collect_block_args(

Callers 1

stepFunction · 0.85

Calls 1

into_int_unsignedMethod · 0.80

Tested by

no test coverage detected