Skip to content

Conversation

kitbellew
Copy link
Collaborator

State column is unlikely to exceed 24 bits (or 16+ mln bytes), but even in cases when it might, a given token (that is, at a given State depth) cannot conceivably be formatted at two different column values which are a multiple of 2^24 bytes apart.

Hence, let's form state key by keeping indentation (just like before) at 8 bits, limiting column to 24 bits and combining with depth in the remaining 32 bits (and this combining is what ensures no hash conflict).

State column is unlikely to exceed 24 bits (or 16+ mln bytes), but even
in cases when it might, a given token (that is, at a given State depth)
cannot conceivably be formatted at two different column values which are
a multiple of 2^24 bytes apart.

Hence, let's form state key by keeping indentation (just like before)
at 8 bits, limiting column to 24 bits and combining with depth in the
remaining 32 bits (and this combining is what ensures no hash conflict).
@kitbellew kitbellew merged commit c3d0a1e into scalameta:master Apr 28, 2024
@kitbellew kitbellew deleted the 3942 branch April 28, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants