Skip to content

light refactoring of global AllocMap#61350

Merged
bors merged 2 commits intorust-lang:masterfrom
RalfJung:alloc
Jun 1, 2019
Merged

light refactoring of global AllocMap#61350
bors merged 2 commits intorust-lang:masterfrom
RalfJung:alloc

Conversation

@RalfJung
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread src/librustc_mir/monomorphize/collector.rs Outdated
Comment thread src/librustc/mir/interpret/mod.rs
@oli-obk
Copy link
Copy Markdown
Contributor

oli-obk commented May 31, 2019

@bors r+

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