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
Precompute: Avoid caching heap values of partial precomputations (#7766)
Fixes a regression from #7763
This is pretty subtle, unfortunately. We cache the results of a struct.new
etc as we go, so that identity is preserved for precomputing RefEq etc.
The old code always computed structs in full before checking the cache.
#7763 removed that code as an optimization. But, it turns out,
that was load-bearing in that it, by pure luck, happened to avoid a bug.
The bug that was avoided, and which this PR fixes, is that when we
partially precompute, we modify a struct.new and see if we can
precompute that version. We were still using the same heap value
cache, so we could cache the value, then later end up using it for
the original (before, we'd still compute the struct.new again and
use those values). To fix that, do such speculative precomputations on a
side (throwaway) cache.
Fixes#7765
0 commit comments