Closed MichaelRawson closed 10 months ago
Let's be the tough guys and just fix the expression (proposal incoming), what do you think?
By the way, isn't it suspicious we didn't see this crashing in any way? (Or could some heuristics have been broken?)
Otherwise, nice!
Let's be the tough guys and just fix the expression (proposal incoming), what do you think?
Good idea! I even checked the compiler output this time, just to be extra-safe.
#define TERM_DIST_VAR_UNKNOWN (1 << 21)-1
...better, but could it even be
#define TERM_DIST_VAR_UNKNOWN (1 << TERM_DIST_VAR_BITS) - 1
?
Yes, and between parentheses. Just fixed and force-pushed.
In #337 there was two separate mishaps.
_id
could be moved fromTerm
itself to its "info"TermList
, but I failed to actually remove it fromTerm
so there's been some waste bytes knocking around inTerm
. Aside: we might actually want to move it back if we can fit more useful stuff into the 32 bits inTermList
.(2^21) - 1
to work out the maximum value ofTERM_DIST_VAR_UNKNOWN
, but instead wrote it down literally - where the^
is interpreted as XOR. This means that since thenTERM_DIST_VAR_UNKNOWN
has been ...22. :facepalm: