@@ -55,7 +55,7 @@ we'll talk about that later.
55
55
- ` stmt.rs `
56
56
- This naming scheme is used across many compiler stages. You will find
57
57
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.
59
59
- Macro expansion, AST validation, name resolution, and early linting takes place
60
60
during this stage of the compile process.
61
61
- The parser uses the standard ` DiagnosticBuilder ` API for error handling, but we
@@ -69,8 +69,8 @@ we'll talk about that later.
69
69
- ** TODO: Maybe some other things are done here? I think initial type checking
70
70
happens here? And trait solving?**
71
71
- 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
74
74
convenient to convert into MIR than HIR is.
75
75
- The MIR is used for [ borrow checking] .
76
76
- We (want to) do [ many optimizations on the MIR] [ mir-opt ] because it is still
@@ -187,10 +187,10 @@ for different purposes:
187
187
- High-level IR (HIR): This is a sort of desugared AST. It's still close
188
188
to what the user wrote syntactically, but it includes some implicit things
189
189
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
192
192
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.
194
194
- Middle-level IR (MIR): This IR is basically a Control-Flow Graph (CFG). A CFG
195
195
is a type of diagram that shows the basic blocks of a program and how control
196
196
flow can go between them. Likewise, MIR also has a bunch of basic blocks with
0 commit comments