Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion tests #87

Merged
merged 7 commits into from
Sep 29, 2015
Merged

Conversion tests #87

merged 7 commits into from
Sep 29, 2015

Conversation

sunfishcode
Copy link
Member

This adds some more tests for conversion operators, including coverage of overflow boundary conditions. It also fixes some the overflow range checks to properly detect overflows.

It also tidies up some existing tests and merges unsigned.wasm into i32/i64/conversions.wasm.

@rossberg
Copy link
Member

lgtm

@sunfishcode
Copy link
Member Author

Merging with lgtm above. If any bugs are found, please file new spec issues. For discussion of any of the semantics, please file design issues as this is implementing what's currently in the design.

sunfishcode added a commit that referenced this pull request Sep 29, 2015
@sunfishcode sunfishcode merged commit 1c9d69b into master Sep 29, 2015
@sunfishcode sunfishcode deleted the convertion-tests branch September 30, 2015 21:11
eqrion pushed a commit to eqrion/wasm-spec that referenced this pull request Jul 18, 2019
… (WebAssembly#87)

Change the test generators to use `ref.func` and remove `passive`.

At some point we'll want to remove the generators, but for let's try to
maintain them.
rossberg added a commit that referenced this pull request Feb 11, 2021
Per the vote on #69, this PR removes subtyping from the proposal. List of changes:

* Syntax:
  - remove `nullref` type
  - rename `anyref` type to `externref`
  - extend `ref.null` and `ref.is_null` instructions with new immediate of the form `func` or `extern` (this will later have to generalise to a `constype` per the [typed references proposal](https://github.com/WebAssembly/function-references))
* Typing rules:
  - `ref.null`, `ref.is_null`: determine reference type based on new immediate
  - `select`, `call_indirect`, `table.copy`, `table.init`: drop subtyping
  - `br_table`: revert to rule requiring same label types
  - `elem` segment: drop subtyping
  - `global` import: drop subtyping (link time)
* Remove subtyping rules and bottom type.
* Revert typing algorithm (interpreter and spec appendix).
* JS API:
  - remove `"nullref"`
  - rename `"anyref"` to `"externref"`
* Scripts:
  - rename `ref` result to `ref.extern`
  - rename `ref.host` value to `ref.extern`
  - drop subtyping from invocation type check
* JS translation:
  - extend harness with separate eq functions for each ref type
* Adjust tests:
  - apply syntax changes
  - remove tests for subtyping
  - change tests exercising subtyping in other ways
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
…bly#121)

Included in this PR:

- Detailed core formal spec additions aiming to fully implement:
  + the "informal formal" core spec laid out by Andreas @rossberg here: WebAssembly/exception-handling#87 (comment) and
  + the core spec outlined in the [proposal overview](https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md), while removing the mention of "events" everywhere but in the binary format ,
  + prose for the above in: syntax, validation, execution, binary format, text format, and the appendix, as well as an example for throw contexts.
- Travis-ci build status icon to `README.md`. The contents of this PR get built and deployed on my fork's github page successfully, using [the howto instructions](https://github.com/WebAssembly/proposals/blob/master/howto.md#setting-up-travis-and-github-page).

Not included in this PR:

- Neither the new values representing unresolved throw contexts, nor the additional rules for the execution contexts, which we discussed in WebAssembly#87, are added here. I plan to add these separately.
- No JS API/Web API changes.

Side comments:

- In [document/core/text/types.rst](https://ioannad.github.io/exception-handling/core/text/types.html#text-refedtype): I'm not sure whether `refedtype ::= ... | event ⇒ exnref` should have `event` there or something else (perhaps `exception`?) However, since currently the only events are exceptions, this is probably not really an issue.
- The "informal formal spec" defines the administrative instruction which represents an exception package as `exnref`, i.e.,  the same name as the type. I called this administrative instruction `ref.exn` instead for two reasons;  to match the style of `ref.null` and `ref.extern`, and to avoid ambiguity in the discussions.
- I removed multi-value mentions from `README.md` because multi-value is now part of the main spec. For the same reason I didn't add "multi-value" to the list of included proposals at the top of the core spec landing page.
rossberg pushed a commit that referenced this pull request Sep 4, 2024
rossberg pushed a commit that referenced this pull request Nov 6, 2024
This fixes four things in the JS-API tests:
1. Pass BigInt for i64 WebAssembly.Table and WebAssembly.Memory
   constructors.
2. Use reference types for tables (would throw a TypeError
   otherwise).
3. Overwrite 'toString' instead of 'valueOf' for the 'index' property
   which is a string.
4. 'index' is read after 'element' and before 'initial' in Table
   construction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants