Fix type updating for indirect call effects#8874
Open
stevenfontanella wants to merge 9 commits into
Open
Conversation
7b92d58 to
9d72e54
Compare
9d72e54 to
cb25670
Compare
kripken
reviewed
Jun 30, 2026
Member
Author
|
Running a test against calcworker to confirm that the binary size savings return. |
Member
Author
The savings are more modest than before (1187 bytes), since before #8833 we were overly optimistic. I also tried with the other potential fix that I mentioned -- which is less conservative -- and only saves 5 additional bytes. |
kripken
reviewed
Jul 9, 2026
tlively
reviewed
Jul 9, 2026
kripken
reviewed
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #8615. Fixes #8833 which was wrong. The earlier fix never touched
newTypeEffectsat all. It passed tests and fixed the breakage only incidentally by being maximally conservative and losing all indirect call effects in the case of a type update. Fix this logic and add unit tests to vet this code better.Drive-by fixes:
addsEffects()is true. Clearing it when recomputing global effects is necessary to remove stale entries for types that no longer exist after type rewriting (although it should make no difference to optimizations).getMutI8Arrayand similar functions referred to an index inglobalHeapTypeStore/globalTupleStore, which gets cleared in unit tests withdestroyAllTypesForTestingPurposesOnly(), causing the index to refer to garbage. Change these to not use static storage so that they're always in sync withglobalHeapTypeStore/globalTupleStore.