Add ability to parse an optional WastCheckType for assert_return_*_nan directives#24
Add ability to parse an optional WastCheckType for assert_return_*_nan directives#24abrown wants to merge 1 commit intobytecodealliance:masterfrom
assert_return_*_nan directives#24Conversation
…n directives; closes bytecodealliance#23 Prior to this, WAST code like `(assert_return_canonical_nan (invoke ...) f32x4)` would fail. This change optionally parses the final `f32x4` to enable both pre-existing tests that do not include this and future tests that will include it.
|
👍 Lemme know how the wavm discussion goes and we can merge this once that's sorted out! |
|
@Honry, any update from WAVM on whether there will be a change to these directives? |
|
Still waiting for @AndrewScheidecker's response. See WAVM/WAVM#187 (comment) |
|
@alexcrichton, I created a spec issue for this; hopefully we can get some consensus there and then merge this. |
|
I'm seeing updates like WebAssembly/testsuite#9 include directives like |
|
Well, it sounds like in WebAssembly/simd#137 we might just change the syntax right away. So I started a WIP PR to do just that in WebAssembly/simd#142. So I'm more interested in getting that done first and coming back to this especially since we can control which SIMD spec tests get run on a per-file basis in wasmtime. |
@alexcrichton, please take a look but we can wait to merge until I hear from @Honry if WAVM moves to this style. Things I was not too confident about:
ParseBuffer::parserpublic so I could write a test but there may be a less API-altering way to do thisRParentype so I could create a helper for parsingOption<WastCheckType>s; I see theimplforOptioninparser.rsbut I don't think the logic in there would work (?).