Skip to content
This repository was archived by the owner on May 20, 2020. It is now read-only.
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

@abrown

Description

@abrown

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions