This repository was archived by the owner on May 20, 2020. It is now read-only.
Add support for nan:canonical and nan:arithmetic in assert_return#42
Merged
alexcrichton merged 9 commits intobytecodealliance:masterfrom Jan 9, 2020
Merged
Add support for nan:canonical and nan:arithmetic in assert_return#42alexcrichton merged 9 commits intobytecodealliance:masterfrom
nan:canonical and nan:arithmetic in assert_return#42alexcrichton merged 9 commits intobytecodealliance:masterfrom
Conversation
Member
Author
|
@alexcrichton, this is still a WIP. Here are some questions I had as I started this:
|
alexcrichton
reviewed
Jan 9, 2020
Member
alexcrichton
left a comment
There was a problem hiding this comment.
it felt less invasive; thoughts?
Looks good to me!
What's the right way to do lifetimes for what I'm trying to do in the tests?
I think it's fine to skip the tests here since this repository already parses all the *.wast files. Otherwise I'd add infrastructure to parse a *.wast file itself rather than adding a parsing function.
This creates a new AssertExpression type that parses `[type].const [value]` expressions in a way that allows the `nan:canonical` and `nan:arithmetic` patterns to appear in these expressions; this is separate from the `Expression` implementation to disallow using these patterns in regular code (they are only valid in `assert_return` directives).
No need for it!
We have exact v128 type information on the old assertions so we can avoid using the legacy variant. Additionally ensure that the legacy variant indicates canonical/arithmetic nans.
abrown
added a commit
to abrown/wasmtime
that referenced
this pull request
Jan 10, 2020
Due to API changes in wast, this removes all AssertReturn* directives and expands the functionality the single AssertReturn directive with the `nan:canonical` and `nan:arithmetic` patterns. See bytecodealliance/wat#42 and WebAssembly/spec#1104 for context.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This creates a new
AssertExpressiontype that parses[type].const [value]expressions in a way that allows thenan:canonicalandnan:arithmeticpatterns to appear in these expressions; this is separate from theExpressionimplementation to disallow using these patterns in regular code (they are only valid inassert_returndirectives).