Improve OwnedSlice and use it in HIR #30095
Conversation
Why aren't we using |
|
Yep, |
Updated. |
For reference, the RawVec type enables |
|
Rebased. |
|
Rebased. |
Still failing a test and looks genuine |
I think the end result would be less confusing if you don't use the name |
r+ with the above two comments addressed |
The idea was to 1) Keep the code changes small (so, the name
Hmm, it certainly doesn't segfault on my machine, I'll try to rerun on something else. |
there is already code churn from |
I've renamed |
Some investigation results: First of all, I don't know if this PR introduces this codegen bug, or just uncovers some existing one. |
|
This sounds like a great case for RR |
|
|
|
Part of rust-lang#30095 not causing mysterious segfaults. r? @nrc
Part of rust-lang#30095 not causing mysterious segfaults. r? @nrc
Part of rust-lang#30095 not causing mysterious segfaults. r? @nrc
Part of rust-lang#30095 not causing mysterious segfaults. r? @nrc
Part of rust-lang#30095 not causing mysterious segfaults. r? @nrc
Part of rust-lang/rust#30095 not causing mysterious segfaults. r? @nrc
Most of the changes are to support switching between vector-like containers in HIR and beefing up
OwnedSlice
's interface.The actual change from
Vec
toOwnedSlice
is one line, and it can be changed back if necessary.Memory consumption for librustc, libcore and libstd is below under the spoilers - the changes are small, but consistent.
libcore is the most noticeable, 5.7% less memory immediately after lowering to HIR, 4% less memory during type checking.
Before:
After:
r? @nrc or @eddyb