Commit 1b38776
committed
Auto merge of #38302 - Mark-Simulacrum:trans-cleanup, r=eddyb
Cleanup old trans
This is a cleanup of old trans, with the following main points:
- Remove the `build.rs` API (prefer using `Builder` directly, which is now passed where needed through `BlockAndBuilder`).
- Remove `Block` (inlining it into `BlockAndBuilder`)
- Remove `Callee::call`, primarily through inlining and simplification of code.
- Thinned `FunctionContext`:
- `mir`, `debug_scopes`, `scopes`, and `fn_ty` are moved to `MirContext`.
- `param_env` is moved to `SharedCrateContext` and renamed to `empty_param_env`.
- `llretslotptr` is removed, replaced with more careful management of the return values in calls.
- `landingpad_alloca` is inlined into cleanup.
- `param_substs` are moved to `MirContext`.
- `span` is removed, it was never set to anything but `None`.
- `block_arena` and `lpad_arena` are removed, since neither was necessary (landing pads and block are quite small, and neither needs arena allocation).
- Fixed `drop_in_place` not running other destructors in the same function.
Fixes #35566 (thanks to @est31 for confirming).File tree
37 files changed
+1904
-5020
lines changed- src
- liballoc
- librustc_llvm
- librustc_trans
- debuginfo
- mir
- test/run-pass
37 files changed
+1904
-5020
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
| 713 | + | |
713 | 714 | | |
714 | 715 | | |
715 | 716 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | 101 | | |
108 | 102 | | |
109 | 103 | | |
110 | 104 | | |
111 | 105 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | 106 | | |
118 | 107 | | |
119 | 108 | | |
| |||
246 | 235 | | |
247 | 236 | | |
248 | 237 | | |
249 | | - | |
| 238 | + | |
250 | 239 | | |
251 | 240 | | |
252 | 241 | | |
| |||
278 | 267 | | |
279 | 268 | | |
280 | 269 | | |
281 | | - | |
| 270 | + | |
282 | 271 | | |
283 | 272 | | |
284 | 273 | | |
| |||
431 | 420 | | |
432 | 421 | | |
433 | 422 | | |
434 | | - | |
| 423 | + | |
435 | 424 | | |
436 | 425 | | |
437 | 426 | | |
| |||
496 | 485 | | |
497 | 486 | | |
498 | 487 | | |
499 | | - | |
| 488 | + | |
500 | 489 | | |
501 | 490 | | |
502 | 491 | | |
| |||
569 | 558 | | |
570 | 559 | | |
571 | 560 | | |
572 | | - | |
| 561 | + | |
573 | 562 | | |
574 | 563 | | |
575 | 564 | | |
| |||
0 commit comments