55 Commits

Author SHA1 Message Date
Santiago Pastorino
812e62f146
Make PlaceRef lifetimes of LocalAnalyzer::process_place be both 'tcx 2020-03-02 22:02:52 -03:00
Eduard-Mihai Burtescu
1a8f5efab8 rustc_codegen_ssa: only "spill" SSA-like values to the stack for debuginfo. 2020-02-09 16:39:23 +02:00
Santiago Pastorino
22a4827dcb
Place::ty_from takes local by value 2020-01-28 10:12:53 -03:00
Santiago Pastorino
b5b6be0ab7
Local field on PlaceRef and RootPlace is not a reference anymore 2020-01-28 10:12:53 -03:00
Santiago Pastorino
5d9b399044 Remove PlaceBase enum and make Place base field be local: Local 2020-01-10 09:08:25 +01:00
Santiago Pastorino
fd5aa32c35 Remove Static from PlaceBase 2020-01-10 09:08:24 +01:00
Vadim Petrochenkov
70f1d57048 Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
Mark Rousskov
a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Matthew Jasper
3a19fbf95d Add Rvalue::AddressOf to MIR
This operator creates a raw pointer to a Place directly, without first
creating a reference. See RFC #2582 for motivation.

The Rvalue is currently unused.
2019-12-18 20:09:10 +00:00
Eduard-Mihai Burtescu
a57aea88d4 rustc: expose the mir::Body reference lifetime from mir::ReadOnlyBodyCache (#64736 fallout). 2019-12-03 13:04:28 +02:00
Paul Daniel Faria
b2fe254c98 Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, rename all body_cache back to body 2019-12-02 08:40:56 -05:00
Paul Daniel Faria
595d161d36 Remove BodyCache.body and rely on Deref as much as possible for ReadOnlyBodyCache 2019-12-02 08:38:16 -05:00
Paul Daniel Faria
c42bdb8c74 Undo minor changes that weren't needed, fix one lifetime typo 2019-12-02 08:38:16 -05:00
Paul Daniel Faria
e54c610f85 Fix compilation errors created during rebase 2019-12-02 08:38:16 -05:00
Paul Daniel Faria
fc6b58d0a8 Simplify BodyCache impl and fix all remaining type errors in librustc_mir (lifetime errors still exist) 2019-12-02 08:35:08 -05:00
Paul Daniel Faria
2eed90a621 Account for new maybe_sideeffect helper that requires predecessors 2019-12-02 08:30:30 -05:00
Paul Daniel Faria
c8c266a0fb Convert &mut to & since the reference didn't need to be mutable 2019-12-02 08:30:30 -05:00
Paul Daniel Faria
66279d12f9 Revert back to using FunctionCx's Body 2019-12-02 08:30:30 -05:00
Paul Daniel Faria
16952cce01 Add Body back as field of FunctionCx, but under a different lifetime 2019-12-02 08:30:30 -05:00
Paul Daniel Faria
3d68f5f3e7 Improved BodyCache body impl so it only returns a sharable ref, add new body_mut method, fix visit macros, simplify usage in codegen_ssa analyzer 2019-12-02 08:30:30 -05:00
Paul Daniel Faria
30b1d9e798 Remove Body from FunctionCx, pass it along during librustc_codegen_ssa 2019-12-02 08:30:30 -05:00
Paul Daniel Faria
649c73f96d Simplify Cache wrapper to single type, impl Deref on it, fix all compilation errors in librustc_codegen_ssa 2019-12-02 08:30:30 -05:00
Eduard-Mihai Burtescu
563ed27c01 rustc: move debug info from LocalDecl and UpvarDecl into a dedicated VarDebugInfo. 2019-11-27 19:22:03 +02:00
Eduard-Mihai Burtescu
c58e6b5752 rustc_codegen_ssa: move local variable debuginfo to mir::debuginfo. 2019-10-31 20:00:16 +02:00
Santiago Pastorino
190802cfca
Pattern match over PlaceRef rather than Place
This prepares the code base for when projection is interned. Place's
projection field is going to be `&List<PlaceElem<'tcx>>` so we won't be
able to pattern match against it.
2019-10-22 10:33:30 -03:00
csmoe
64f61c7888 remove indexed_vec re-export from rustc_data_structures 2019-09-29 16:48:31 +00:00
csmoe
d20183dbbf remove bit_set re-export from rustc_data_structures 2019-09-29 16:11:30 +00:00
varkor
e2e0f9af85 Rename sty to kind 2019-09-25 15:50:04 +01:00
Santiago Pastorino
e73d189e4e
Use slice patterns to match projection base 2019-09-09 18:16:49 -03:00
Santiago Pastorino
e9c41148c0
Convert Place's projection to a boxed slice 2019-09-09 18:16:49 -03:00
Eduard-Mihai Burtescu
b565ece5d8 Remove redundant ty fields from mir::Constant and hair::pattern::PatternRange. 2019-08-16 15:20:27 +03:00
Esteban Küber
bdd79b849e tweak output and tests 2019-08-04 12:23:05 -07:00
Esteban Küber
387dcff796 review comments: clean up 2019-08-04 10:42:46 -07:00
Esteban Küber
db099fb491 Point to local place span on "type too big" error 2019-08-03 21:59:51 -07:00
Santiago Pastorino
795d96d87b Place::as_place_ref is now Place::as_ref 2019-07-22 00:25:07 +02:00
Santiago Pastorino
e11adb13b6 Implement Place::as_place_ref 2019-07-20 05:08:38 +02:00
Santiago Pastorino
98d2324875 Avoid cloning place in LocalAnalyzer visitor 2019-07-20 05:08:38 +02:00
Santiago Pastorino
d0accade3e Migrate from Place enum to Place struct 2019-07-20 05:08:38 +02:00
Jeremy Stucki
d28832dde9
Remove needless lifetimes 2019-07-03 10:01:02 +02:00
Eduard-Mihai Burtescu
ea78c3aa33 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-18 18:10:26 +03:00
Eduard-Mihai Burtescu
b25b466a88 rustc: remove 'x: 'y bounds (except from comments/strings). 2019-06-18 18:10:21 +03:00
Eduard-Mihai Burtescu
8ee1814062 rustc_codegen_*: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Santiago Pastorino
4c326174d2 Revert "Make LocalAnalizer visitor iterate instead of recurse"
This reverts commit 0cfaa28bc5edda198571fca9410cbc9f71b8d17a.
2019-06-07 23:43:19 +02:00
Santiago Pastorino
0cfaa28bc5 Make LocalAnalizer visitor iterate instead of recurse 2019-06-06 05:17:26 +02:00
Claude-Alban RANÉLY-VERGÉ-DÉPRÉ
6e5e0daff2 Changes the type mir::Mir into mir::Body
The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.

Revisions asked by eddyb :
- Renamed of all the occurences of {visit/super}_mir
- Renamed test structures `CachedMir` to `Cached`

Fixing the missing import on `AggregateKind`
2019-05-28 19:17:51 +02:00
Santiago Pastorino
6d207f53a4 Get ty from local_decls instead of using Place 2019-05-15 21:24:18 +02:00
Matthew Jasper
22226fa7fb Remove region from borrow place contexts 2019-04-26 21:35:10 +01:00
Matthew Jasper
0eeab6b9a6 Remove BasicBlock parameter from mir visitor methods 2019-04-26 21:35:10 +01:00
Tyler Mandry
4122d2221e Remove adt_def from PlaceTy and make it a struct 2019-04-02 12:02:17 -07:00
Santiago Pastorino
0f993d5a7a Put Local, Static and Promoted as one Base variant of Place 2019-03-01 05:02:00 +01:00