-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove TypeIdHasher and replace it with StableHasher in debuginfo and symbol hashing #50424
Comments
I'd like to work on this one, please. |
Sure! The first thing I would do is handling the debuginfo case linked above. Here is an example where you can see how to use the Lines 239 to 254 in d68b0ec
Let me know if you need further directions. |
@michaelwoerister how best to show you any progress I've made? |
I removed the TypeIdHasher instance in the debuginfo case and replaced it with this. I have some questions arising from reading the code you showed me, and code that TypeIdHasher uses: |
You can just post here, as you already did. Alternatively, you can open a work-in-progress PR. Both are fine.
Yes, we want to ignore differences in regions for debuginfo.
Yes. The |
So does the code I wrote also cover the use of hash_discriminant_u8? How do I write tests for the changes I've made? Is it now fine to move on to the symbol hash generation code? |
Yes, the corresponding code is here: rust/src/librustc/ich/impls_ty.rs Line 860 in 6288970
The existing tests should cover it. Especially the
Yes. Feel free to open a PR with the changes you did so far, as those should be independent of the symbol hash changes. |
Ah okay, seems as though I missed that implementation for TypeVariants during my searches. Thanks. |
[WIP] Cleanup uses of TypeIdHasher and replace them with StableHasher Fixes #50424 r? @michaelwoerister
…nup, r=michaelwoerister Cleanup uses of TypeIdHasher and replace them with StableHasher Fixes rust-lang#50424 r? @michaelwoerister
At the moment we have two implementations for hashing
Ty
values, theStableHasher
(which is used for incr. comp. andTypeId
) and the TypeIdHasher which was formerly used forTypeId
and has some leftover uses in symbol hash generation and debuginfo.We should be able to switch the two remaining uses to
StableHasher
quite easily. This might also be a small performance win, since StableHasher is more optimized.cc @rust-lang/wg-compiler-performance
The text was updated successfully, but these errors were encountered: