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

Method update_args

cranelift/codegen/src/ir/instructions.rs:119–128  ·  view source on GitHub ↗

Traverse the arguments with a closure that can mutate them.

(
        &mut self,
        pool: &mut ValueListPool,
        mut f: F,
    )

Source from the content-addressed store, hash-verified

117
118 /// Traverse the arguments with a closure that can mutate them.
119 pub fn update_args<F: FnMut(BlockArg) -> BlockArg>(
120 &mut self,
121 pool: &mut ValueListPool,
122 mut f: F,
123 ) {
124 for raw in self.values.as_mut_slice(pool)[1..].iter_mut() {
125 let new = f(BlockArg::decode_from_value(*raw));
126 *raw = new.encode_as_value();
127 }
128 }
129
130 /// Remove the argument at ix from the argument list.
131 pub fn remove(&mut self, ix: usize, pool: &mut ValueListPool) {

Callers 1

map_valuesMethod · 0.80

Calls 4

encode_as_valueMethod · 0.80
fFunction · 0.50
iter_mutMethod · 0.45
as_mut_sliceMethod · 0.45

Tested by

no test coverage detected