Stream: t-compiler/wg-incr-comp

Topic: fingerprint questions


view this post on Zulip pnkfelix (Mar 05 2021 at 19:47):

Is anyone around who might be able to answer random Q's about the Fingerprint abstraction? @cjgillot or maybe @mw ?

view this post on Zulip pnkfelix (Mar 05 2021 at 19:47):

Context: while reviewing PR #81635, I decided to see how the to_smaller_hash and from_smaller_hash methods are used

view this post on Zulip pnkfelix (Mar 05 2021 at 19:53):

actually I think I answered my most immediate question.

view this post on Zulip pnkfelix (Mar 05 2021 at 19:55):

(I was concerned that HirId::to_fingerprint might be using an unstable value as part of its input, but I then realized that the local_id is in fact stable between compiles (because it is item local, not compilation local...)

view this post on Zulip cjgillot (Mar 05 2021 at 20:11):

What is your question @pnkfelix ?

view this post on Zulip pnkfelix (Mar 05 2021 at 20:11):

I guess I don't have one anymore

view this post on Zulip cjgillot (Mar 05 2021 at 20:12):

All for the best!

view this post on Zulip pnkfelix (Mar 05 2021 at 20:13):

I posted a note on PR #81635 about an aspect of its change that might have been a concern, where the old code had a property that from_smaller_hash composed with to_smaller_hash yields the original input

view this post on Zulip pnkfelix (Mar 05 2021 at 20:13):

and the new code doesn't observe that property

view this post on Zulip pnkfelix (Mar 05 2021 at 20:13):

but I don't think anyone needs it here. Its just potentially surprising that the relationship doesn't hold, given the names.

view this post on Zulip pnkfelix (Mar 05 2021 at 20:14):

(I also have been idly wondering whether an OIBIT to track things that are stable across compilations and things that are known to be unstable across compilations could be of use...)

view this post on Zulip cjgillot (Mar 05 2021 at 20:21):

This is pretty much the point of HashStable, isn't is?

view this post on Zulip cjgillot (Mar 05 2021 at 20:22):

from_smaller_hash may be better replaced by a call to hash_stable to avoid having this kind of expectation.

view this post on Zulip mw (Mar 08 2021 at 16:37):

That's an interesting observation about from_smaller_hash and to_smaller_hash. The two methods were created independently of each other, I think, and the previous symmetry of the two methods definitely was never intended by me. Maybe it would be a good idea to rename them or try get rid of them.

view this post on Zulip pnkfelix (Mar 08 2021 at 19:49):

cjgillot said:

This is pretty much the point of HashStable, isn't is?

yes, but, HashStable is not an OIBIT, right?

view this post on Zulip mw (Mar 09 2021 at 10:40):

It's not an OIBIT, no.


Last updated: Oct 21 2021 at 21:32 UTC