diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-05-02 09:09:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-02 09:09:55 -0400 |
| commit | 137660763b0802b9e394112b306775b5f5759723 (patch) | |
| tree | 4968fd4455304d950a20e2b636c8fba917f208b3 /src/test/incremental/thinlto | |
| parent | 5b4e8d0917f3c1d2fa746c5fd1bef86f05d75132 (diff) | |
| parent | c008f0540e786b54e799ffed372adb4648d07e87 (diff) | |
| download | rust-137660763b0802b9e394112b306775b5f5759723.tar.gz rust-137660763b0802b9e394112b306775b5f5759723.zip | |
Rollup merge of #41662 - nikomatsakis:on-demandify-region-mapping, r=eddyb
On demandify region mapping This is an adaptation of @cramertj's PR. I am sort of tempted to keep simplifying it, but also tempted to land it so and we can refactor more in follow-up PRs. As is, it does the following things: - makes the region-maps an on-demand query, per function `tcx.region_maps(def_id)` - interns code extents instead of of having them be integers - remove the "root region extent" and (to some extent) item extents; instead we use `Option<CodeExtent<'tcx>>` in a few places (no space inefficiency since `CodeExtent<'tcx>` is now a pointer). I'm not entirely happy with the way I have it setup though. Here are some of the changes I was considering (I'm not sure if they would work out well): 1. Removing `item_extents` entirely -- they are rarely used now, because most of the relevant places now accept an `Option<Region<'tcx>>` or an `Option<CodeExtent<'tcx>>`, but I think still used in a few places. 2. Merging `RegionMaps` into the typeck tables, instead of having it be its own query. 3. Change `CodeExtent<'tcx>` to store the parent pointer. This would mean that fewer places in the code actually *need* a `RegionMaps` anyhow, since most of them just want to be able to walk "up the tree". On the other hand, you wouldn't be able to intern a `CodeExtent<'tcx>` for some random node-id, you'd need to look it up in the table (since there'd be more information). Most of this code is semi-temporary -- I expect it to largely go away as we move to NLL -- so I'm also not *that* concerned with making it perfect. r? @eddyb
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
