Skip to content

Commit e5f427d

Browse files
Remove various todos
With some items added to #674 Co-Authored-By: Chris Simpkins <[email protected]>
1 parent ce3ff58 commit e5f427d

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/overview.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ So first, let's look at what the compiler does to your code. For now, we will
1515
avoid mentioning how the compiler implements these steps except as needed;
1616
we'll talk about that later.
1717

18-
**TODO: Would be great to have a diagram of this once we nail down the details...**
1918

2019
- The compile process begins when a user writes a Rust source program in text
2120
and invokes the `rustc` compiler on it. The work that the compiler needs to
@@ -74,10 +73,9 @@ we'll talk about that later.
7473
HAIR is used for pattern and exhaustiveness checking. It is also more
7574
convenient to convert into MIR than HIR is.
7675
- The MIR is used for [borrow checking].
77-
- **TODO: const eval fits in somewhere here I think**
7876
- We (want to) do [many optimizations on the MIR][mir-opt] because it is still
7977
generic and that improves the code we generate later, improving compilation
80-
speed too. (**TODO: size optimizations too?**)
78+
speed too.
8179
- MIR is a higher level (and generic) representation, so it is easier to do
8280
some optimizations at MIR level than at LLVM-IR level. For example LLVM
8381
doesn't seem to be able to optimize the pattern the [`simplify_try`] mir
@@ -96,9 +94,8 @@ we'll talk about that later.
9694
- The LLVM IR is passed to LLVM, which does a lot more optimizations on it.
9795
It then emits machine code. It is basically assembly code with additional
9896
low-level types and annotations added. (e.g. an ELF object or wasm).
99-
**TODO: reference for this section?**
10097
- The different libraries/binaries are linked together to produce the final
101-
binary. **TODO: reference for this section?**
98+
binary.
10299

103100
[`librustc_lexer`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lexer/index.html
104101
[`librustc_driver`]: https://rustc-dev-guide.rust-lang.org/rustc-driver.html
@@ -138,13 +135,13 @@ satisfy/optimize for. For example,
138135
point.
139136
- Compiler compilation speed: how long does it take to compile the compiler?
140137
This impacts contributors and compiler maintenance.
141-
- Compiler implementation complexity: building a compiler is one of the hardest
138+
- Implementation complexity: building a compiler is one of the hardest
142139
things a person/group can do, and Rust is not a very simple language, so how
143140
do we make the compiler's code base manageable?
144141
- Compiler correctness: the binaries produced by the compiler should do what
145142
the input programs says they do, and should continue to do so despite the
146143
tremendous amount of change constantly going on.
147-
- Compiler integration: a number of other tools need to use the compiler in
144+
- Integration: a number of other tools need to use the compiler in
148145
various ways (e.g. cargo, clippy, miri, RLS) that must be supported.
149146
- Compiler stability: the compiler should not crash or fail ungracefully on the
150147
stable channel.
@@ -283,7 +280,7 @@ program) is [`rustc::ty::Ty`][ty]. This is so important that we have a whole cha
283280
on [`ty::Ty`][ty], but for now, we just want to mention that it exists and is the way
284281
`rustc` represents types!
285282

286-
Oh, and also the `rustc::ty` module defines the `TyCtxt` struct we mentioned before.
283+
Also note that the `rustc::ty` module defines the `TyCtxt` struct we mentioned before.
287284

288285
[ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.Ty.html
289286

@@ -332,7 +329,6 @@ bootstrapping compiler will support them.
332329

333330
# Unresolved Questions
334331

335-
**TODO: find answers to these**
336332

337333
- Does LLVM ever do optimizations in debug builds?
338334
- How do I explore phases of the compile process in my own sources (lexer,

0 commit comments

Comments
 (0)