Attempts to open a file where we should dump a given MIR or other
bit of MIR-related data. Used by mir-dump
, but also by other
bits of code (e.g., NLL inference) that dump graphviz data or
other things, and hence takes the extension as an argument.
Dumps the size and metadata and content of an allocation to the given writer.
The expectation is that the caller first prints other relevant metadata, so the exact
format of this function is (without leading or trailing newline):
If the session is properly configured, dumps a human-readable
representation of the mir into:
Returns the path to the filename where we should dump a given MIR.
Also used by other bits of code (e.g., NLL inference) that dump
graphviz data or other things.
Calc converted u64 decimal into hex and return itβs length in chars
The prefix
argument allows callers to add an arbitrary prefix before each line (even if there
is only one line). Note that your prefix should contain a trailing space as the lines are
printed directly after it.
Prints the line start address and returns the new line start address.
Find all AllocId
s mentioned (recursively) in the MIR body and print their corresponding
allocations.
Write out a human-readable textual representation for the given basic block.
After we print the main statement, we sometimes dump extra
information. Thereβs often a lot of little things βnuzzled upβ in
a statement.
Write out a human-readable textual representation for the given function.
Write out a human-readable textual representation of the MIRβs fn
type and the types of its
local variables (both user-defined bindings and compiler temporaries).
Write out a human-readable textual representation for the given MIR.
Prints local variables in a scope tree.