Skip to content

Get rid of double indirection in string interner #37132

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 3 commits into from
Oct 15, 2016

Conversation

petrochenkov
Copy link
Contributor

No description provided.

@rust-highfive
Copy link
Contributor

r? @alexcrichton

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

@alexcrichton
Copy link
Member

@bors: r+

cc @rust-lang/libs, just a heads up about this unstable API. Seems fine for compiler perf but I think it's something we'll want to handle regardless one day anyway.

@bors
Copy link
Collaborator

bors commented Oct 13, 2016

📌 Commit 6d06280 has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Oct 13, 2016

⌛ Testing commit 6d06280 with merge c77dcf4...

@bors
Copy link
Collaborator

bors commented Oct 13, 2016

💔 Test failed - auto-linux-cross-opt

@petrochenkov
Copy link
Contributor Author

@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented Oct 13, 2016

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.

@bors
Copy link
Collaborator

bors commented Oct 13, 2016

📌 Commit 6d06280 has been approved by alexcrichton

@petrochenkov
Copy link
Contributor Author

@bors retry

@bors
Copy link
Collaborator

bors commented Oct 13, 2016

⌛ Testing commit 6d06280 with merge bb9e151...

@bors
Copy link
Collaborator

bors commented Oct 13, 2016

💔 Test failed - auto-linux-cross-opt

@bluss
Copy link
Member

bluss commented Oct 13, 2016

Will the sized deallocation even be correct? This code is a bit Jackie than the standard for libs.

@bluss
Copy link
Member

bluss commented Oct 13, 2016

Hackier.

@petrochenkov
Copy link
Contributor Author

petrochenkov commented Oct 13, 2016

@bluss

Will the sized deallocation even be correct?

Yes, deallocation size (size_of_val) and allocation size (aligned_len * sizeof(usize)) are supposed to be equal, that's why I set the "metadata" part of the fat pointer and align up the allocation size.
It'd be nice to have some safer (non-coercion) way to create DST structs, but there's none at the moment (to my knowledge).

@petrochenkov
Copy link
Contributor Author

@bluss
I've added an assert for allocation/deallocation sizes.

@bluss
Copy link
Member

bluss commented Oct 13, 2016

Oh cool, I see. I didn't realize even the trailing end would be rounded up to alignment.

@petrochenkov
Copy link
Contributor Author

Aha, buildbot is alive again.
@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented Oct 14, 2016

📌 Commit 348c3fb has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Oct 15, 2016

⌛ Testing commit 348c3fb with merge 5bfe107...

bors added a commit that referenced this pull request Oct 15, 2016
Get rid of double indirection in string interner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants