Skip to content

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

Merged
merged 2 commits into from
Jun 1, 2019
Merged

light refactoring of global AllocMap #61350

merged 2 commits into from
Jun 1, 2019

Conversation

RalfJung
Copy link
Member

  • 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

* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind.
* rename the methods that allocate stuff to have consistent names.
@rust-highfive
Copy link
Contributor

r? @oli-obk

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label 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?
Copy link
Member Author

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.

@oli-obk
Copy link
Contributor

oli-obk commented May 31, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented May 31, 2019

📌 Commit cf26120 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 31, 2019
@Centril Centril mentioned this pull request May 31, 2019
12 tasks
@bors
Copy link
Collaborator

bors commented Jun 1, 2019

⌛ Testing commit cf26120 with merge afaf976...

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
@bors
Copy link
Collaborator

bors commented Jun 1, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: oli-obk
Pushing afaf976 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 1, 2019
@bors bors merged commit cf26120 into rust-lang:master Jun 1, 2019
@RalfJung RalfJung deleted the alloc branch June 10, 2019 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants