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

Method result_type

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

Get the value type of result number `n`, having resolved the controlling type variable to `ctrl_type`.

(self, n: usize, ctrl_type: Type)

Source from the content-addressed store, hash-verified

765 /// Get the value type of result number `n`, having resolved the controlling type variable to
766 /// `ctrl_type`.
767 pub fn result_type(self, n: usize, ctrl_type: Type) -> Type {
768 debug_assert!(n < self.num_fixed_results(), "Invalid result index");
769 match OPERAND_CONSTRAINTS[self.constraint_offset() + n].resolve(ctrl_type) {
770 ResolvedConstraint::Bound(t) => t,
771 ResolvedConstraint::Free(ts) => panic!("Result constraints can't be free: {ts:?}"),
772 }
773 }
774
775 /// Get the value type of input value number `n`, having resolved the controlling type variable
776 /// to `ctrl_type`.

Callers 2

nextMethod · 0.45

Calls 2

constraint_offsetMethod · 0.80
resolveMethod · 0.45

Tested by

no test coverage detected