@@ -55,7 +55,7 @@ we'll talk about that later.
5555 - ` stmt.rs `
5656- This naming scheme is used across many compiler stages. You will find
5757 either a file or directory with the same name across the parsing, lowering,
58- type checking, HAIR lowering, and MIR building sources.
58+ type checking, THIR lowering, and MIR building sources.
5959- Macro expansion, AST validation, name resolution, and early linting takes place
6060 during this stage of the compile process.
6161- The parser uses the standard ` DiagnosticBuilder ` API for error handling, but we
@@ -69,8 +69,8 @@ we'll talk about that later.
6969- ** TODO: Maybe some other things are done here? I think initial type checking
7070 happens here? And trait solving?**
7171- The HIR is then [ lowered to Mid-Level Intermediate Representation (MIR)] [ mir ] .
72- - Along the way, we construct the HAIR , which is an even more desugared HIR.
73- HAIR is used for pattern and exhaustiveness checking. It is also more
72+ - Along the way, we construct the THIR , which is an even more desugared HIR.
73+ THIR is used for pattern and exhaustiveness checking. It is also more
7474 convenient to convert into MIR than HIR is.
7575- The MIR is used for [ borrow checking] .
7676- We (want to) do [ many optimizations on the MIR] [ mir-opt ] because it is still
@@ -187,10 +187,10 @@ for different purposes:
187187- High-level IR (HIR): This is a sort of desugared AST. It's still close
188188 to what the user wrote syntactically, but it includes some implicit things
189189 such as some elided lifetimes, etc. This IR is amenable to type checking.
190- - HAIR : This is an intermediate between HIR and MIR. It is like the HIR but it
191- is fully typed and a bit more desugared (e.g. method calls and implicit
190+ - Typed HIR (THIR) : This is an intermediate between HIR and MIR. It is like the HIR
191+ but it is fully typed and a bit more desugared (e.g. method calls and implicit
192192 dereferences are made fully explicit). Moreover, it is easier to lower to MIR
193- from HAIR than from HIR.
193+ from THIR than from HIR.
194194- Middle-level IR (MIR): This IR is basically a Control-Flow Graph (CFG). A CFG
195195 is a type of diagram that shows the basic blocks of a program and how control
196196 flow can go between them. Likewise, MIR also has a bunch of basic blocks with
0 commit comments