Repository navigation
Plumb wasm features through reencoding/printing - #2797
Open
alexcrichton wants to merge 2 commits into
Open
alexcrichton wants to merge 2 commits into
alexcrichton wants to merge 2 commits into
Conversation
I've resisted doing this in the past in the hopes that it's unnecessary complexity, but it's again gotten to the point where this is becoming more painful than necessary. Upcoming proposal such as multibyte-array-access and acquire-release-atomics are reinterpreting previously invalid modules with a new meaning. This means that preexisting spec tests often fail when these proposals are implemented unless the old behavior can be preserved. This has historically been fixed for the `validate` step but the extra testing the `wast` subcommand does, such as reencoding and round-tripping through prints, does not yet support this. The goal of this commit is to close these gaps and to plumb `WasmFeatures` through more steps that `wasm-tools wast` handles. This ensures that so long as behavior is dynamically gated in `BinaryReader` and validation, which it easily is, it should be pretty easy to avoid breaking preexisting tests when new proposals are implemented.
This branch has not been deployed
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.
I've resisted doing this in the past in the hopes that it's unnecessary complexity, but it's again gotten to the point where this is becoming more painful than necessary. Upcoming proposal such as multibyte-array-access and acquire-release-atomics are reinterpreting previously invalid modules with a new meaning. This means that preexisting spec tests often fail when these proposals are implemented unless the old behavior can be preserved. This has historically been fixed for the
validatestep but the extra testing thewastsubcommand does, such as reencoding and round-tripping through prints, does not yet support this.The goal of this commit is to close these gaps and to plumb
WasmFeaturesthrough more steps thatwasm-tools wasthandles. This ensures that so long as behavior is dynamically gated inBinaryReaderand validation, which it easily is, it should be pretty easy to avoid breaking preexisting tests when new proposals are implemented.