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

Method with_result

cranelift/codegen/src/ir/builder.rs:179–183  ·  view source on GitHub ↗

Reuse a single result value. Convert this into a builder that will reuse `v` as the single result value. The reused result value `v` must not be attached to anything. This method should only be used when building an instruction with exactly one result. Use `with_results()` for the more general case.

(self, v: Value)

Source from the content-addressed store, hash-verified

177 /// This method should only be used when building an instruction with exactly one result. Use
178 /// `with_results()` for the more general case.
179 pub fn with_result(self, v: Value) -> InsertReuseBuilder<'f, IIB, [Option<Value>; 1]> {
180 // TODO: Specialize this to return a different builder that just attaches `v` instead of
181 // calling `make_inst_results_reusing()`.
182 self.with_results([Some(v)])
183 }
184}
185
186impl<'f, IIB: InstInserterBase<'f>> InstBuilderBase<'f> for InsertBuilder<'f, IIB> {

Callers 3

replace_with_constFunction · 0.80
add_nan_canon_seqFunction · 0.80
reuse_resultsFunction · 0.80

Calls 1

with_resultsMethod · 0.80

Tested by 1

reuse_resultsFunction · 0.64