You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.
At present we hash a value by computing the AVM hash of its AVM representation. This means that some objects that have different types at the language level can have equal hashes.
This is confusing, and it violates the expectation that two values test as equal if and only if their hashes are equal.
The fix is to include some kind of type-code into the hash. For compound types, the type code could be constructed by hashing together values the component types, in appropriate ways. (The type codes would all be computed at compile time.)
One tricky aspect of the type-codes business is that we would need to have the linker propagate type-codes of exported/imported types across files. Otherwise the results would be surprising--a client to an interface could have a different hash value than the implementer of the interface, for the same value.
The text was updated successfully, but these errors were encountered:
At present we hash a value by computing the AVM hash of its AVM representation. This means that some objects that have different types at the language level can have equal hashes.
This is confusing, and it violates the expectation that two values test as equal if and only if their hashes are equal.
The fix is to include some kind of type-code into the hash. For compound types, the type code could be constructed by hashing together values the component types, in appropriate ways. (The type codes would all be computed at compile time.)
One tricky aspect of the type-codes business is that we would need to have the linker propagate type-codes of exported/imported types across files. Otherwise the results would be surprising--a client to an interface could have a different hash value than the implementer of the interface, for the same value.
The text was updated successfully, but these errors were encountered: