(
func_w: &mut FW,
w: &mut dyn Write,
func: &Function,
aliases: &SecondaryMap<Value, Vec<Value>>,
block: Block,
)
| 250 | } |
| 251 | |
| 252 | fn decorate_block<FW: FuncWriter>( |
| 253 | func_w: &mut FW, |
| 254 | w: &mut dyn Write, |
| 255 | func: &Function, |
| 256 | aliases: &SecondaryMap<Value, Vec<Value>>, |
| 257 | block: Block, |
| 258 | ) -> fmt::Result { |
| 259 | // Indent all instructions if any srclocs or debug tags are present. |
| 260 | let indent = if func.rel_srclocs().is_empty() && func.debug_tags.is_empty() { |
| 261 | 4 |
| 262 | } else { |
| 263 | 36 |
| 264 | }; |
| 265 | |
| 266 | func_w.write_block_header(w, func, block, indent)?; |
| 267 | for a in func.dfg.block_params(block).iter().cloned() { |
| 268 | write_value_aliases(w, aliases, a, indent)?; |
| 269 | } |
| 270 | |
| 271 | for inst in func.layout.block_insts(block) { |
| 272 | func_w.write_instruction(w, func, aliases, inst, indent)?; |
| 273 | } |
| 274 | |
| 275 | Ok(()) |
| 276 | } |
| 277 | |
| 278 | //---------------------------------------------------------------------- |
| 279 | // |
no test coverage detected