[wasm-split] Make mutable/immutable versions of tests - #9062
Merged
Conversation
`update_lit_checks.py` doesn't always work well with wasm-split. For example, for some tests, the test CHECK lines are mixed like this after running it: ```wast ;; PRIMARY: ... ;; SECONDARY: .... ;; PRIMARY: ... ;; SECONDARY: ... ``` A follow-up PR will change these two test files' CHECK lines to be mixed when using `update_lit_checks.py`, and making them not use in that PR will make it hard to see what actually change in that PR. To make the next PR's diff tidy, this makes a few tests not use the auto-updating script. This also adds `-all` to `transtiive-globals-multi.wast` to be consistent with other `transitive-globals*.wast` tests.
A follow-up PR will move immutable globals to secondary modules when possible, and it will make the test expectations of `transitive-globals-multi.wast` different for mutable and immutable globals. Creating a new test in that PR will make it different to see what changes in that PR. So this PR duplicates the test to make mutable and immutable versions. Note that `$f` can't be converted to mutable because it is used in a `global.get`. This also adds mutable/immutable versions of globals to `split-module-items.wast`.
tlively
approved these changes
Aug 31, 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.
A follow-up PR will move immutable globals to secondary modules when possible, and it will make the test expectations of
transitive-globals-multi.wastdifferent for mutable and immutable globals. Creating a new test in that PR will make it different to see what changes in that PR. So this PR duplicates the test to make mutable and immutable versions. Note that$fcan't be converted to mutable because it is used in aglobal.get.This also adds mutable/immutable versions of globals to
split-module-items.wast.