Skip to content
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 #41

Closed
4 tasks
abrown opened this issue Jan 8, 2020 · 0 comments
Closed
4 tasks

Add support for nan:canonical and nan:arithmetic in assert_return #41

abrown opened this issue Jan 8, 2020 · 0 comments

Comments

@abrown
Copy link
Contributor

abrown commented Jan 8, 2020

Now that WebAssembly/spec#1104 is merged and the new syntax is appearing in spec tests, I am hoping to add support for nan:canonical and nan:arithmetic to assert_return in wast. Here's what I think is necessary:

  • deprecate WastDirective::AssertReturn[.+] with #[deprecated(since = "5.1.0", note = "Please use AssertReturn instead")]; I think it makes sense to leave these around until all of the spec tests are converted over and users of wast update their spec tests
  • modify Lexer::number to lex nan:arithmetic to a new variant FloatVal::NanArithmetic and nan:canonical to a new variant FloatVal::NanCanonical (I was thinking of just lexing to FloatVal::Nan and setting val but I'm not sure this works for different sizes)
  • in float!, implement the variants FloatVal::NanArithmetic and FloatVal::NanCanonical; note that this means that Float32 and Float64 will be able to be parsed from nan:canonical and nan:arithmetic everywhere (not just in assert_return statements) which I don't think is technically correct but might actually be useful
  • bump to 5.1.0; I think this should be a minor version bump because no existing functionality is removed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant