Closed clonker closed 5 days ago
the tests are now failing due to the change in expression hasher. what do you think @cameel, should I undo it? or rather update test expectations? Intuitively I would say undo, feels more natural to have a true
instead of 1
. But either is fine for me
Well, it's definitely better to have true
there, but why exactly does the BlockHasher
affect that? Does the less specific hash result in some extra optimization kicking in that wasn't before? The change did seem correct so maybe the actual problem is outside of BlockHasher
. If we locate that then maybe we could keep the change and still keep it at true
?
In any case, it would still probably be best to have the same thing in both functions, since I don't see why we'd ever want them to behave differently. They should both hash kind
or both hash unlimited()
. Perhaps you could just pull the code it into a common local helper for hashing a Literal
since they've been getting out of sync all the time in this PR? :)
Changed the definition of the
solidity::yul::Literal
to carry its value not asYulString
but asLiteralValue
struct, consisting of au256
and an optional string representation hint. Upon converting from its data back to a string representation, it is first checked if the hint is not empty and in that case, whethervalue == parseValue(hint)
.