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

Method as_truthy

cranelift/codegen/src/ir/types.rs:150–156  ·  view source on GitHub ↗

Get the type of a comparison result for the given type. For vectors this will be a vector with the same number of lanes and integer elements, and for scalar types this will be `i8`, which is the result type of comparisons.

(self)

Source from the content-addressed store, hash-verified

148 /// with the same number of lanes and integer elements, and for scalar types this will be `i8`,
149 /// which is the result type of comparisons.
150 pub fn as_truthy(self) -> Self {
151 if !self.is_vector() {
152 I8
153 } else {
154 self.as_truthy_pedantic()
155 }
156 }
157
158 /// Get a type with the same number of lanes as this type, but with the lanes replaced by
159 /// integers of the same size.

Callers 3

stepFunction · 0.45
icmpFunction · 0.45
resolveMethod · 0.45

Calls 2

as_truthy_pedanticMethod · 0.80
is_vectorMethod · 0.45

Tested by

no test coverage detected