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

Method overwrite_inst_values

cranelift/codegen/src/ir/dfg.rs:903–913  ·  view source on GitHub ↗

Overwrite the instruction's value references with values from the iterator. NOTE: the iterator provided is expected to yield at least as many values as the instruction currently has.

(&mut self, inst: Inst, mut values: I)

Source from the content-addressed store, hash-verified

901 /// NOTE: the iterator provided is expected to yield at least as many values as the instruction
902 /// currently has.
903 pub fn overwrite_inst_values<I>(&mut self, inst: Inst, mut values: I)
904 where
905 I: Iterator<Item = Value>,
906 {
907 self.insts[inst].map_values(
908 &mut self.value_lists,
909 &mut self.jump_tables,
910 &mut self.exception_tables,
911 |_| values.next().unwrap(),
912 );
913 }
914
915 /// Get all value arguments on `inst` as a slice.
916 pub fn inst_args(&self, inst: Inst) -> &[Value] {

Callers 3

rewriteMethod · 0.80
process_elab_stackMethod · 0.80
elaborate_blockMethod · 0.80

Calls 3

map_valuesMethod · 0.80
unwrapMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected