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

Method fmt

cranelift/codegen/src/ir/dfg.rs:1435–1454  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter)

Source from the content-addressed store, hash-verified

1433
1434impl<'a> fmt::Display for DisplayInst<'a> {
1435 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1436 let dfg = self.0;
1437 let inst = self.1;
1438
1439 if let Some((first, rest)) = dfg.inst_results(inst).split_first() {
1440 write!(f, "{first}")?;
1441 for v in rest {
1442 write!(f, ", {v}")?;
1443 }
1444 write!(f, " = ")?;
1445 }
1446
1447 let typevar = dfg.ctrl_typevar(inst);
1448 if typevar.is_invalid() {
1449 write!(f, "{}", dfg.insts[inst].opcode())?;
1450 } else {
1451 write!(f, "{}.{}", dfg.insts[inst].opcode(), typevar)?;
1452 }
1453 write_operands(f, dfg, inst)
1454 }
1455}
1456
1457/// Parser routines. These routines should not be used outside the parser.

Callers

nothing calls this directly

Calls 4

write_operandsFunction · 0.85
ctrl_typevarMethod · 0.80
inst_resultsMethod · 0.45
is_invalidMethod · 0.45

Tested by

no test coverage detected