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

Merge multi-value proposal into spec #1145

Merged
merged 1 commit into from
Apr 9, 2020
Merged

Merge multi-value proposal into spec #1145

merged 1 commit into from
Apr 9, 2020

Conversation

binji
Copy link
Member

@binji binji commented Mar 19, 2020

See the multi-value proposal here:

https://github.com/WebAssembly/multi-value

This PR is built on top of the following PRs:

@rossberg
Copy link
Member

Hm, GH isn't good at dealing with dependent PRs. Is there a reason that we cannot merge proposals one at a time?

@binji
Copy link
Member Author

binji commented Mar 20, 2020

Is there a reason that we cannot merge proposals one at a time?

We can, but when we discussed this in the WG meeting, we decided it would be valuable to explicitly have them ordered with the actual PRs ready to go.

I just realized I can make this a little easier to read by having each PR against the branch of the previous PR, so it's easier to see the diffs. I'll try that instead.

@binji binji changed the base branch from master to merge-sign-extension-ops March 20, 2020 19:16
@binji
Copy link
Member Author

binji commented Mar 20, 2020

OK, updated. PTAL

Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one (earlier) mistake that I fixed in the repo, see comment.

document/core/appendix/properties.rst Outdated Show resolved Hide resolved
Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

See the multi-value proposal here:

https://github.com/WebAssembly/multi-value

This PR is built on top of the following PRs:

* #1143 (merge nontrapping-float-to-int)
* #1144 (merge sign-extension-ops)
@binji binji force-pushed the merge-multi-value branch from c59da7c to d3a8b88 Compare April 9, 2020 18:08
@binji binji changed the base branch from merge-sign-extension-ops to master April 9, 2020 18:09
@binji binji merged commit 484180b into master Apr 9, 2020
@binji binji deleted the merge-multi-value branch April 9, 2020 18:09
@@ -0,0 +1,196 @@
# Multi-value Extension
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@binji I only realized now that you added the proposals/ dir too. Was that intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was; I thought we decided to do this so we could easily see that you could easily see which proposals had been merged into the spec. That said, it was a long time ago and I could be misremembering.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least it matches my memory as well. :)

alexcrichton added a commit to alexcrichton/wabt that referenced this pull request May 5, 2020
This enables three proposals by default since they've been merged into
the upstream specification:

* `saturating-float-to-int` - WebAssembly/spec#1143
* `sign-extension` - WebAssembly/spec#1144
* `multi-value` - WebAssembly/spec#1145

Most of the fallout from this is in the test suite with lots of
`--enable` flags getting removed and some tests which now
unconditionally pass also getting removed. Two spec tests explicitly
pass `--disable` until the spec test submodule is updated.
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 6, 2020
This was merged into the wasm spec upstream in WebAssembly/spec#1145, so
let's follow the spec and enable it by default here as well!
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 6, 2020
This was merged into the wasm spec upstream in WebAssembly/spec#1145, so
let's follow the spec and enable it by default here as well!
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 6, 2020
This was merged into the wasm spec upstream in WebAssembly/spec#1145, so
let's follow the spec and enable it by default here as well!
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 6, 2020
This was merged into the wasm spec upstream in WebAssembly/spec#1145, so
let's follow the spec and enable it by default here as well!
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 6, 2020
This was merged into the wasm spec upstream in WebAssembly/spec#1145, so
let's follow the spec and enable it by default here as well!
alexcrichton added a commit to bytecodealliance/wasmtime that referenced this pull request May 6, 2020
This was merged into the wasm spec upstream in WebAssembly/spec#1145, so
let's follow the spec and enable it by default here as well!
binji pushed a commit to WebAssembly/wabt that referenced this pull request May 6, 2020
This enables three proposals by default since they've been merged into
the upstream specification:

* `saturating-float-to-int` - WebAssembly/spec#1143
* `sign-extension` - WebAssembly/spec#1144
* `multi-value` - WebAssembly/spec#1145

Most of the fallout from this is in the test suite with lots of
`--enable` flags getting removed and some tests which now
unconditionally pass also getting removed. Two spec tests explicitly
pass `--disable` until the spec test submodule is updated.
@chfast
Copy link
Contributor

chfast commented Jul 7, 2020

As this extensions is merged, and it modifies existing test files, is there a way to send new tests for 1.0?

@Ms2ger
Copy link
Collaborator

Ms2ger commented Jul 7, 2020

Are you asking whether someone is maintaining a test suite specifically for Wasm 1.0, excluding tests / test changes for proposals that have been merged since? If so, I don't think so. You can always submit tests to the master branch here, of course.

@chfast
Copy link
Contributor

chfast commented Jul 7, 2020

Yes, I can submit tests to maser, but I will not be able to use them directly from master. Thanks for the answer anyway. I don't want to start longer discussion here.

rossberg added a commit that referenced this pull request Feb 11, 2021
* Upgrade to latest Sphinx release (2.4.4) (#1171)

Fixes #1157

* Support 4GB of memory both in initial and max.

* [interpreter] Strictify and specify .bin.wast format (#1173)

* Merge nontrapping-float-to-int proposal into spec (#1143)

See the non-trapping-float-to-int-conversions proposal here:

https://github.com/WebAssembly/nontrapping-float-to-int-conversions

* Merge sign-extension-ops proposal into spec (#1144)

See the sign-extension-ops proposal here:

https://github.com/WebAssembly/sign-extension-ops

This PR is built on top of #1143 (merge nontrapping-float-to-int).

* Merge multi-value proposal into spec (#1145)

See the multi-value proposal here:

https://github.com/WebAssembly/multi-value

This PR is built on top of the following PRs:

* #1143 (merge nontrapping-float-to-int)
* #1144 (merge sign-extension-ops)

* [interpreter] Remove junk in README

* [interpreter] Remove junk in README

* [spec] Fix grammar for fractions (#1178)

* [spec] Add missing i64.extend32_s syntax (#1179)

* [js-api][web-api] Fix some markup errors.

* Add a README to the proposals directory.

* Add more address overflow tests (#1188)

There are already tests for effective address overflow, but those have a
large value baked into the offset. These tests all use `1` as the
immediate offset, and use `-1` for the address on the stack, which may
be compiled differently.

* Add a test for non-treelike behavior of stack (#961)

We've recently found a bug in a WebAssembly library we've been working
with where we're mapping WebAssembly to a tree-like IR internally. The
way we parse into this representation, however, has a bug when the
function isn't itself tree-like but rather exibits properties that
exploit a stack machine. For example this isn't so straightforward to
represent in a tree-like fashion:

    (import "" "a" (func $foo))
    (import "" "b" (func $foo (result i32)))
    (func (result i32)
      call $b
      call $b
      call $a
      i32.xor)

The extra `call $a` in the middle is valid `WebAssembly` but needs
special treatment when converting to a more tree-like IR format. I
figured it'd be good to ensure there's a spec test covering this case as
we currently pass the suite of spec tests but still contain this bug!

* [js-api] Various editorial improvements.

* [js-api] Replace pseudo-ASCII characters by normal ones.

This also required disambiguating the references to "module", as there are now
two definitions by that name.

* [js-api] Improve prose in 'run a host function'.

* [js-api] Improve some of the multi-value prose.

* Synchronize js-api tests.

* Add script to synchronize js-api tests.

Co-authored-by: Ng Zhi An <[email protected]>
Co-authored-by: Alon Zakai <[email protected]>
Co-authored-by: Ben Smith <[email protected]>
Co-authored-by: Ms2ger <[email protected]>
Co-authored-by: Alex Crichton <[email protected]>
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 25, 2023
This bumps the `haskell-wasm` submodule to include the changes from
SPY/haskell-wasm@b1874df
and
SPY/haskell-wasm@b816e04,
which change the `Block`, `Loop`, and `If` instructions to use a `BlockType`
instead of a `ResultType`. This allows these instructions to have multiple
result values, as described in this WebAssembly proposal:
WebAssembly/spec#1145

To adapt the code on the `crucible-wasm` side, I have introduced a
`getBlockResultType` function to convert from a `BlockType` to a `ResultType`,
which is heavily inspired by a similar function in `haskell-wasm`. I have also
factored out some code shared in common between `translateFunction` and
`genInstruction`'s case for `Block` so that I do not have to conjure up a fresh
`BlockType` in `translateFunction`.

Part of #1069.
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 26, 2023
This bumps the `haskell-wasm` submodule to include the changes from
SPY/haskell-wasm@b1874df
and
SPY/haskell-wasm@b816e04,
which change the `Block`, `Loop`, and `If` instructions to use a `BlockType`
instead of a `ResultType`. This allows these instructions to have multiple
result values, as described in this WebAssembly proposal:
WebAssembly/spec#1145

To adapt the code on the `crucible-wasm` side, I have introduced a
`getBlockResultType` function to convert from a `BlockType` to a `ResultType`,
which is heavily inspired by a similar function in `haskell-wasm`. I have also
factored out some code shared in common between `translateFunction` and
`genInstruction`'s case for `Block` so that I do not have to conjure up a fresh
`BlockType` in `translateFunction`.

Part of #1069.
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 27, 2023
This bumps the `haskell-wasm` submodule to include the changes from
SPY/haskell-wasm@b1874df
and
SPY/haskell-wasm@b816e04,
which change the `Block`, `Loop`, and `If` instructions to use a `BlockType`
instead of a `ResultType`. This allows these instructions to have multiple
result values, as described in this WebAssembly proposal:
WebAssembly/spec#1145

To adapt the code on the `crucible-wasm` side, I have introduced a
`getBlockResultType` function to convert from a `BlockType` to a `ResultType`,
which is heavily inspired by a similar function in `haskell-wasm`. I have also
factored out some code shared in common between `translateFunction` and
`genInstruction`'s case for `Block` so that I do not have to conjure up a fresh
`BlockType` in `translateFunction`.

Part of #1069.
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 27, 2023
This bumps the `haskell-wasm` submodule to include the changes from
SPY/haskell-wasm@b1874df
and
SPY/haskell-wasm@b816e04,
which change the `Block`, `Loop`, and `If` instructions to use a `BlockType`
instead of a `ResultType`. This allows these instructions to have multiple
result values, as described in this WebAssembly proposal:
WebAssembly/spec#1145

To adapt the code on the `crucible-wasm` side, I have introduced a
`getBlockResultType` function to convert from a `BlockType` to a `ResultType`,
which is heavily inspired by a similar function in `haskell-wasm`. I have also
factored out some code shared in common between `translateFunction` and
`genInstruction`'s case for `Block` so that I do not have to conjure up a fresh
`BlockType` in `translateFunction`.

Part of #1069.
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.

4 participants