light refactoring of global AllocMap#61350
Merged
bors merged 2 commits intorust-lang:masterfrom Jun 1, 2019
Merged
Conversation
* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind. * rename the methods that allocate stuff to have consistent names.
Contributor
|
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
RalfJung
commented
May 30, 2019
| /// `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? |
Member
Author
There was a problem hiding this comment.
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.
Centril
reviewed
May 30, 2019
Centril
reviewed
May 30, 2019
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit cf26120 has been approved by |
Collaborator
bors
added a commit
that referenced
this pull request
Jun 1, 2019
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
Collaborator
|
☀️ Test successful - checks-travis, status-appveyor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cc @oli-obk