-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shrink LocalDecl
#71942
Shrink LocalDecl
#71942
Conversation
This commit adds some new `LocalDecl` methods: - `with_source_info`, a most general constructor. - `new`, a variant of `with_source_info` which represents the most common use case. - `internal` a modifying method (like the already present `immutable`). It removes some old `LocalDecl` methods: - `new_internal` and `new_local`, because they're subsumed by the new methods. - `new_return_place`, because it was identical to `new_temp`. Finally, it cleans up all the use sites.
By boxing `local_info`.
By boxing `user_ty`.
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 001496c with merge a6ea00593c7d5c879795df6aeb2621d5acc9a924... |
☀️ Try build successful - checks-actions, checks-azure |
@rust-timer build a6ea00593c7d5c879795df6aeb2621d5acc9a924 |
Queued a6ea00593c7d5c879795df6aeb2621d5acc9a924 with parent 43271a3, future comparison URL. |
Finished benchmarking try commit a6ea00593c7d5c879795df6aeb2621d5acc9a924, comparison URL. |
@bors r+ |
📌 Commit 001496c has been approved by |
Rollup of 8 pull requests Successful merges: - rust-lang#70834 (Add core::future::{pending,ready}) - rust-lang#71839 (Make BTreeMap::new and BTreeSet::new const) - rust-lang#71890 (Simplify the error Registry methods a little) - rust-lang#71942 (Shrink `LocalDecl`) - rust-lang#71947 (Dead-code pass highlights too much of impl functions) - rust-lang#71981 (Fix `strip-priv-imports` pass name in the rustdoc documentation) - rust-lang#72018 (Fix canonicalization links) - rust-lang#72031 (Better documentation for io::Read::read() return value) Failed merges: r? @ghost
This was a max-rss win for |
LocalDecl
contributes 4-8% of peak heap memory usage on a range of benchmarks. This PR reduces its size from 128 bytes to 56 bytes on 64-bit, and does some clean-ups as well.r? @matthewjasper