Add some comments to Mir struct.
This commit is contained in:
parent
2a0ce4a629
commit
29a3fe32eb
1 changed files with 12 additions and 3 deletions
|
@ -23,15 +23,24 @@ use std::u32;
|
||||||
|
|
||||||
/// Lowered representation of a single function.
|
/// Lowered representation of a single function.
|
||||||
pub struct Mir<'tcx> {
|
pub struct Mir<'tcx> {
|
||||||
|
/// List of basic blocks. References to basic block use a newtyped index type `BasicBlock`
|
||||||
|
/// that indexes into this vector.
|
||||||
pub basic_blocks: Vec<BasicBlockData<'tcx>>,
|
pub basic_blocks: Vec<BasicBlockData<'tcx>>,
|
||||||
|
|
||||||
|
/// Return type of the function.
|
||||||
pub return_ty: FnOutput<'tcx>,
|
pub return_ty: FnOutput<'tcx>,
|
||||||
|
|
||||||
// for every node id
|
/// Variables: these are stack slots corresponding to user variables. They may be
|
||||||
pub extents: FnvHashMap<CodeExtent, Vec<GraphExtent>>,
|
/// assigned many times.
|
||||||
|
|
||||||
pub var_decls: Vec<VarDecl<'tcx>>,
|
pub var_decls: Vec<VarDecl<'tcx>>,
|
||||||
|
|
||||||
|
/// Args: these are stack slots corresponding to the input arguments.
|
||||||
pub arg_decls: Vec<ArgDecl<'tcx>>,
|
pub arg_decls: Vec<ArgDecl<'tcx>>,
|
||||||
|
|
||||||
|
/// Temp declarations: stack slots that for temporaries created by
|
||||||
|
/// the compiler. These are assigned once, but they are not SSA
|
||||||
|
/// values in that it is possible to borrow them and mutate them
|
||||||
|
/// through the resulting reference.
|
||||||
pub temp_decls: Vec<TempDecl<'tcx>>,
|
pub temp_decls: Vec<TempDecl<'tcx>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue