-
Notifications
You must be signed in to change notification settings - Fork 13.3k
light refactoring of global AllocMap #61350
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
Conversation
* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind. * rename the methods that allocate stuff to have consistent names.
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
/// `Allocation` with a different `AllocId`. | ||
// FIXME: is this really necessary? Can we ensure `FOO` and `BAR` being different after codegen | ||
// in `static FOO: u32 = 42; static BAR: u32 = 42;` even if they reuse the same allocation | ||
// inside rustc? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided that yes this is necessary, and removed the FIXME. But also I think we do reuse the Allocation
, we just don't reuse the ID! And I think that's the best we can do.
@bors r+ |
📌 Commit cf26120 has been approved by |
light refactoring of global AllocMap * rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind. * rename the methods that allocate stuff to have consistent names. Cc @oli-obk
☀️ Test successful - checks-travis, status-appveyor |
Cc @oli-obk