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

Method fmt

cranelift/codegen/src/ir/types.rs:422–437  ·  view source on GitHub ↗
(&self, f: &mut Formatter)

Source from the content-addressed store, hash-verified

420
421impl Display for Type {
422 fn fmt(&self, f: &mut Formatter) -> fmt::Result {
423 if self.is_int() {
424 write!(f, "i{}", self.lane_bits())
425 } else if self.is_float() {
426 write!(f, "f{}", self.lane_bits())
427 } else if self.is_vector() {
428 write!(f, "{}x{}", self.lane_type(), self.lane_count())
429 } else if self.is_dynamic_vector() {
430 write!(f, "{:?}x{}xN", self.lane_type(), self.min_lane_count())
431 } else {
432 match *self {
433 INVALID => panic!("INVALID encountered"),
434 _ => panic!("Unknown Type(0x{:x})", self.0),
435 }
436 }
437 }
438}
439
440impl Debug for Type {

Callers

nothing calls this directly

Calls 4

is_dynamic_vectorMethod · 0.80
is_intMethod · 0.45
is_floatMethod · 0.45
is_vectorMethod · 0.45

Tested by

no test coverage detected