Rust Engine: add interning table, intern GlobalIds#1689
Merged
Conversation
e225caf to
14c8f61
Compare
maximebuyse
approved these changes
Sep 16, 2025
Contributor
maximebuyse
left a comment
There was a problem hiding this comment.
I left a few comments, but it generally looks good to me! I didn't look deeply into the rust design (I leave that for the rust review)
keks
requested changes
Sep 18, 2025
Member
keks
left a comment
There was a problem hiding this comment.
This looks pretty good. Just a few questions and comments.
27b7b07 to
4a3ed0b
Compare
Contributor
Author
|
(I will rebase this branch and thus solve conflict after reviews) |
keks
approved these changes
Sep 22, 2025
Member
keks
left a comment
There was a problem hiding this comment.
Just a few nits, otherwise I think this is ready to be merged!
This is now possible, since the implementation of `names` is now below `mod global_id`.
Co-authored-by: Jan Winkelmann <146678+keks@users.noreply.github.com>
923280a to
8bd565d
Compare
Rust Engine: refactor names, change tuples representation
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.
Summary
This PR introduces a simple interning mechanism and improves the handling of global identifiers.
What's Changed
Added
interningmoduleO(1)equality checks and hashing.Refactored
names::*to constantshax_rust_engine::names::core::ops::arith::Add::addwas a function returning&'static GlobalId.GlobalId.hax_rust_engine::interning::InterningTable::new_with_values.How to Review
Issue
That's addressing half of #1666.
Future work: span interning.