StructsΒ§
- Extra
Comments π - MirDumper
- Manages MIR dumping, which is MIR writing done to a file with a specific name. In particular,
it makes it impossible to dump MIR to one of these files when it hasnβt been requested from the
command line. Layered on top of
MirWriter
, which does the actual writing. - MirWriter
- Does the writing of MIR to output, e.g. a file.
- Pretty
Print MirOptions - Cosmetic options for pretty-printing the MIR contents, gathered from the CLI. Each pass can
override these when dumping its own specific MIR information with
dump_mir
.
EnumsΒ§
- Pass
Where - An indication of where we are in the control flow graph. Used for printing
extra information in
dump_mir
ConstantsΒ§
- ALIGN π
- Alignment for lining up comments following MIR statements
- BYTES_
PER_ πLINE - Number of bytes to print per allocation hex dump line.
- INDENT π
FunctionsΒ§
- comma_
sep π - comment π
- display_
allocation - 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):
- dump_
mir_ def_ ids - hex_
number_ πlength - Calc converted u64 decimal into hex and return its length in chars.
- post_
fmt_ πprojection - pre_
fmt_ πprojection - pretty_
print_ πbyte_ str - pretty_
print_ πconst_ value - pretty_
print_ πconst_ value_ tcx - use_
verbose π - write_
allocation_ bytes - 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. - write_
allocation_ πendline - write_
allocation_ πnewline - Prints the line start address and returns the new line start address.
- write_
allocations - Find all
AllocId
s mentioned (recursively) in the MIR body and print their corresponding allocations. - write_
coverage_ πinfo_ hi - write_
extra π - 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_
function_ πcoverage_ info - write_
mir_ πintro - 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_
mir_ pretty - Write out a human-readable textual representation for the given MIR, with the default PrettyPrintMirOptions.
- write_
mir_ πsig - write_
scope_ πtree - Prints local variables in a scope tree.
- write_
user_ πtype_ annotations