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

Progress toward phase 4 #15

Closed
tlively opened this issue Nov 19, 2021 · 78 comments
Closed

Progress toward phase 4 #15

tlively opened this issue Nov 19, 2021 · 78 comments

Comments

@tlively
Copy link
Member

tlively commented Nov 19, 2021

The phase 4 requirements are:

  • Two or more Web VMs implement the feature.

    • Partially done. Chrome supports tail calls behind the #enable-experimental-webassembly-features flag. No other engines have implementations according to https://webassembly.org/roadmap/.
  • At least one toolchain implements the feature.

    • Done. LLVM and Binaryen have complete support.
  • The formalization and the reference interpreter are usually updated (though these two can be done as part of step 3 at the Working Group chair's discretion).

    • Done (AFAICT).
  • Community Group has reached consensus in support of the feature.

    • Judging from the lack of open issues on this repo, this shouldn't be a problem.

Is there anything left to do besides get another web engine implementation?

@lars-t-hansen
Copy link

@tlively, do you feel that the lack of tail call support is blocking important work? Notably, is it or will it be blocking the work on wasm GC in any significant way, or to put it another way, will the j2cl and dart pipelines depend on tail calls for performance or significant functionality?

@rossberg
Copy link
Member

Yes, spec, interpreter, and test suite have been done long ago. The second engine has been the main blocker for the last 2-3 years. I was hoping that JSC would be particularly motivated to implement this one. :)

@lars-t-hansen, I think this feature is independent of GC, and it has been requested from various sides. I of course understand the need for prioritisation, but it looks somewhat troublesome for the health of the Wasm process if a feature that is basically done and everybody agrees is wanted does not make any progress for years.

@lars-t-hansen
Copy link

@rossberg, this is simply a prioritization issue for us, as you already observed - small team, competing pressures, and a question of utility relative to other proposals and ongoing infrastructural work.

In general - this has come up in a couple of threads recently - I feel that a number of wasm proposals could be more explicit about their expected utility. The tail call proposal (not worse than any other in this regard!) doesn't even name a single concrete language that would benefit from this proposal, nor does it try to quantify, even informally, the amount of pain that would result from not having tail calls in wasm, for each specific such language (or other use case). We could all name such languages, but how interested are we in trying to understand the alternatives for translators from those languages, and would any of them actually have translators absent some other feature X that is also missing (frequently X = the GC feature)? I think that often, utility is discussed in meetings during the early stages of the proposals, but by capturing the claims of utility directly and in some detail in the proposal it would be easier to understand later why a proposal should be prioritized for implementation.

Consider Scheme, which requires proper tail calls. Several successful translators from Scheme to C were written that circumvent the lack of tail calls in C in various ways, either by some sort of fairly efficient trampoline+longjmp system and/or by translating calls that implement loops to actual loops and translating the remaining tail calls as non-tail calls. Static compilers would also use the larger (whole-module) context to make such a translation more effective. At least Stalin, Bigloo, Gambit-C, and Petit Larceny are examples of translators in this class; there were others (but it's such a long time ago and I've forgotten).

So if Scheme is one of the languages named in a list of languages that would benefit from proper tail calls, it would be appropriate to mention these techniques as some that could be used by Scheme translators in the absence of tail calls, along with the problems that using these techniques might create for the translator and/or language user, and some assessment of how bad those problems are in practice. And it might also be appropriate to mention that a successful Scheme translator would require many other things (GC, call tags, a very powerful variant of stack switching, and reasonable solutions for generic arithmetic and variable-length argument lists) and is therefore not a powerful driver for tail calls at this time.

@lars-t-hansen
Copy link

@tlively, I see you added this to tomorrow's meeting agenda. Unfortunately I'll miss that meeting, so a brief remark here. Our position is that the utility of tail calls is unclear enough that it is not a priority for us to implement it soon, nor would we want to speculate about when we might implement it.

@tlively
Copy link
Member Author

tlively commented Nov 22, 2021

Thanks, @lars-t-hansen! Your position that we should concretely motivate further work makes perfect sense. I started thinking about tail calls again because they came up in an Emscripten issue about supporting C++20 coroutines: emscripten-core/emscripten#10991. I don't know have firsthand knowledge about it yet, but according to that issue, Clang can use tail calls to make coroutines much more efficient.

Do you think that finding "X C++ workloads get faster by Y% with tail calls enabled" could be sufficient motivation (for some X and Y) to prioritize tail calls? Or would you want to see new languages, etc. rather than just performance improvement?

@tlively
Copy link
Member Author

tlively commented Nov 22, 2021

@tlively, do you feel that the lack of tail call support is blocking important work? Notably, is it or will it be blocking the work on wasm GC in any significant way, or to put it another way, will the j2cl and dart pipelines depend on tail calls for performance or significant functionality?

No, as far as I know this is orthogonal to the GC work.

@lars-t-hansen
Copy link

@tlively,

Do you think that finding "X C++ workloads get faster by Y% with tail calls enabled" could be sufficient motivation (for some X and Y) to prioritize tail calls? Or would you want to see new languages, etc. rather than just performance improvement?

Every bit helps, IMO. As always, the more use cases and the more compelling they are the more it makes sense to prioritize work on a feature. If real C++ code that we might want to run on the web improves significantly then that's an important fact to consider.

@KronicDeth
Copy link

Lumen (an AOT compiler for Erlang) that we’re building to support Erlang, Elixir, Gleam and other languages that work on BEAM will be heavily dependent on tail calls as all those languages write their code assuming that tail calls are cheap and do not extend the stack. They also assume that tail calls don’t have to be recursive tail calls.

Lumen also would use the stack switching protocol to implement Erlang processes.

@TerrorJack
Copy link

Asterius (experimental haskell-to-wasm compiler) is also heavily dependent on tail calls, since the Haskell stack is managed explicitly as heap data, and we do need the guarantee that control flow transfer has O(1) memory overhead. We emulate tail calls via trampolines by default for now, no concrete numbers on how much performance gain tail calls will bring, but it's surely an upstream feature we wholeheartedly welcome.

@tlively
Copy link
Member Author

tlively commented Nov 22, 2021

@TerrorJack, would you be able to measure the performance overhead of the trampoline approach? Binaryen (if you use it) supports tail calls with --enable-tail-call and V8/Node supports them with --experimental-wasm-return-call. Chrome supports them (IIRC) if you enable chrome://flags/#enable-experimental-webassembly-features.

@lorenzleutgeb
Copy link

lorenzleutgeb commented Nov 23, 2021

I tried to implement a compiler from CakeML (or rather, some much simpler intermediate language in the CakeML compiler) to WebAssembly. While a trampoline approach might be possible to implement, it's too hard to verify (CakeML is a verified compiler). Relying on tail calls would be easier.

Edit: So probably you should not only think in terms of improvements that tail calls will yield for existing code, but also what it would enable.

@unicomp21
Copy link

@lars-t-hansen looking at the performance benchmarks for Seastar and Redpanda, which are pretty breath taking, they both rely heavily on co_await, which relies on tail calls. We could do some pretty incredible webassembly stuff. Even the chirp guys have been asking for tail calls in their efforts.

http://seastar.io/http-performance/

Until recently, I didn't realize what a massive impact tail calls could make when it comes to co_await and the compiler optimizations which come from it.

@unicomp21
Copy link

I'd suggest getting the change released on chrome asap. Once webassembly workloads start showing up which only run fast on chrome, others will follow.

@unicomp21
Copy link

emscripten-core/emscripten#10991 (comment)

@yuri91
Copy link

yuri91 commented Nov 23, 2021

@unicomp21 indeed we (Leaning Technologies) are interested in tail calls for CheerpX.

We use them to implement X86 indirect jumps.

The alternative is a trampoline-like solution, but it is quite slower. We tried really hard to avoid the problem altogether in many cases (by "devirtualizing" the jumps), but it is not always possible of course (see here for some more info).

I don't have numbers at hand, but since we have a flag to toggle tail call support in our JIT, I could try to set up some benchmarks.

We are even considering to implement it in JSC or SpiderMonkey ourselves to move things forward.

@lars-t-hansen
Copy link

@yuri91,

Thanks for the input. (Thanks also goes to everyone else on the thread.) Now we can hopefully count on @tlively to summarize these (and other) findings into the proposal's overview ;-)

We are even considering to implement it in JSC or SpiderMonkey ourselves to move things forward.

If you're planning anything for SpiderMonkey we'd appreciate knowing about it beforehand, as we are implementing other large changes to the ABI and there would be an inevitable conflict with tail calls if these changes were to happen concurrently without synchronization.

@yuri91
Copy link

yuri91 commented Nov 23, 2021

@lars-t-hansen Good to know! We haven't seriously looked into doing this yet, but if/when we do we will get in touch for sure.

@mshinwell
Copy link

Some work has started on a compilation strategy from the OCaml language to WebAssembly. This work unfortunately had to be paused due to the pandemic, but hopefully it's not too far away from restarting. OCaml relies heavily on tail calls (both direct tail calls where the callee is known and indirect tail calls where it is not) for loops involving one or more functions. Within approximately the next year we should be in a position to have an optimiser that can compile some of these situations to loops, via contification, but it is likely that tail calls will remain important. As such it would be very welcome if there were to be further progress on the implementation of tail calls within the WebAssembly ecosystem.

@KronicDeth
Copy link

indirect tail calls where it is not

apply(module, function, arguments) and apply(anonymous_function, arguments) also occur in tail position in Erlang and Elixir.

@unicomp21
Copy link

unicomp21 commented Nov 24, 2021

@lars-t-hansen these might be useful ...

https://github.com/scylladb/seastar/blob/9cb2d51ed19b63cd81d25ba9efa512f5ca01f500/doc/tutorial.md

https://github.com/vectorizedio/redpanda/search?q=co_await

https://github.com/chriskohlhoff/asio/search?q=co_await

https://github.com/search?q=org%3Afacebook+co_await&type=code

my understanding is co_await leverages tail calls heavily.

Per the last link, perhaps we could get facebook to start asking for tail call support in webassembly? I'm guessing they would be interested in having them for all the meta stuff going on.

@wingo
Copy link
Contributor

wingo commented Nov 24, 2021

Just as a data point, for the Guile implementation of Scheme, tail calls would be useful but not necessary to enable Scheme on wasm and not sufficient on their own for high performance. Because of varargs and multiple return values, we end up having to pass arguments and return values via tables anyway, in the general case. Because we want to capture multi-shot delimited continuations, we also have to CPS-convert and push return continuations on an explicitly-managed stack also, converting all calls and returns to tail calls, implemented via a trampoline loop. At least we can contify loops & control flow without calls.

Tail calls in wasm would do away with the need for the trampoline loop but is just one piece. See https://lists.gnu.org/archive/html/guile-devel/2021-06/msg00005.html for a further discussion.

@rossberg
Copy link
Member

@wingo, I'm curious why multiple return values are an issue, given that Wasm has them, too. Does that have to do with the untyped nature of Scheme?

@wingo
Copy link
Contributor

wingo commented Nov 24, 2021

@rossberg yes it is the lack of types. same issue as varargs, really.

@lars-t-hansen
Copy link

lars-t-hansen commented Dec 15, 2021

@tlively and @rossberg,

Community Group has reached consensus in support of the feature.

  * Judging from the lack of open issues on this repo, this shouldn't be a problem.

The overview lists one open issue, all the way down at the bottom:

Can tail calls across module boundaries guarantee tail behaviour?

There isn't an open or closed github issue whose title speaks to that problem; possibly a resolution lurks in a discussion somewhere. In any case, can we either have that open issue removed / clarified in the overview if it has been resolved, or a github issue opened for discussion and eventual resolution otherwise? Thanks.

@unicomp21
Copy link

Aren't they already adding it to chrome? @lars-t-hansen

https://bugs.chromium.org/p/v8/issues/detail?id=7431

@rossberg
Copy link
Member

@lars-t-hansen, yes, good question. My recollection of the state of that debate is that multiple implementers were positive that this could be implemented just fine, e.g. using auxiliary stubs or pushing custom stack frames. But I don't know if that has actually been proven in practice, e.g., in V8.

@lukewagner, @titzer, @jakobkummerow

@thibaudmichaud
Copy link

Cross-module tail-calls should work just fine in chrome. The only difference with regular tail-calls is that we pass the target instance to the callee instead of the current instance, like we do for regular import calls.
However the implementation is still unstable and we don't have plans to enable it by default yet.

tlively added a commit that referenced this issue Dec 15, 2021
Whether tail calls across module boundaries would guarantee tail call behavior was previously an open question, but @thibaudmichaud confirmed that they would guarantee tail call behavior in V8 in #15 (comment).
@unicomp21
Copy link

@gahaas is there an eta on phase 4?

@gahaas
Copy link
Contributor

gahaas commented Dec 12, 2022

I don't know more than what is mentioned in #15 (comment). @rossberg what are your plans on moving tail calls to phase 4?

@rossberg
Copy link
Member

rossberg commented Dec 12, 2022

@gahaas, nothing new, the lack of a second implementation still is the (only) blocker as per our process requirements. I intend to push to phase 4 as soon as that's out of the way, i.e., either JSC or SpiderMonkey have finished their's. @tomoliv30, having high hopes for your work. ;)

@alexp-sssup
Copy link

A second implementation of Wasm tail calls has been merged into WebKit [1] and enabled by default [2].

@rossberg can you take from here?

[1] WebKit/WebKit@5ee0680
[2] WebKit/WebKit@57da434

@RyanBrewer317
Copy link

Yay! Is there any expected ETA at this point? I'm quite excited for more functional languages working with/compiling to web assembly :)

@titzer
Copy link
Contributor

titzer commented Dec 19, 2022

I've created a PR to add a Phase 4 poll to tomorrow's meeting agenda.

@tomoliv30
Copy link

@titzer @dschuff any chance to have the poll on next week's agenda?

@unicomp21
Copy link

@tomoliv30 does chrome have tail call support yet?

@gahaas
Copy link
Contributor

gahaas commented Jan 12, 2023

@unicomp21 The tail call proposal is completely implemented in Chrome.

@unicomp21
Copy link

Thanks @gahaas ! Which version?

@unicomp21
Copy link

@tlively does this mean emscripten can now support co_await in the above chrome version?

@gahaas
Copy link
Contributor

gahaas commented Jan 12, 2023

@unicomp21 Tail calls in Chrome are shipped behind the flag chrome://flags/#enable-experimental-webassembly-features, already since version 87 or so.

@unicomp21
Copy link

@gahaas is there a GA version and date?

@gahaas
Copy link
Contributor

gahaas commented Jan 12, 2023

@unicomp21 No, we will ship it as soon as the proposal reaches Phase 4.

@tlively
Copy link
Member Author

tlively commented Jan 12, 2023

@tlively does this mean emscripten can now support co_await in the above chrome version?

Yes, if you pass -mtail-call to Emscripten and enable tail call support in the browser, co_await should work. I don't remember if I've tried it myself, though. If you try it out and it doesn't work, let me know.

@dschuff
Copy link
Member

dschuff commented Jan 12, 2023

let's put it on the agenda for next week: WebAssembly/meetings#1196

@titzer
Copy link
Contributor

titzer commented Jan 17, 2023

Today the CG voted to advance to Phase 4! Woohoo!

@titzer titzer closed this as completed Jan 17, 2023
@unicomp21
Copy link

@gahaas ship date? chrome version?

@thibaudmichaud
Copy link

@unicomp21 we're aiming for chrome 112, no guarantees yet.

@unicomp21
Copy link

thanks @thibaudmichaud !

@unicomp21

This comment was marked as off-topic.

dhil added a commit to effect-handlers/wasm-spec that referenced this issue Mar 17, 2023
* [spec] Add reference types to overview (WebAssembly#1394)

* [interpreter] Remove use of physical equality on characters (WebAssembly#1396)

* Merge SIMD proposal (WebAssembly#1391)

SIMD is [phase 5](WebAssembly/simd#507), merge all the changes back into main spec.

* Remove merge conflict marker

* [spec] Handle v128 in validation algorithm (WebAssembly#1399)

* [spec] Fix instruction table (WebAssembly#1402)

* Add tests for functions without end marker. NFC (WebAssembly#1405)

Inspired by this downstream test in wabt:
WebAssembly/wabt#1775

Fixes: WebAssembly#1404

* Describe correct tail call behavior across modules

Whether tail calls across module boundaries would guarantee tail call behavior was previously an open question, but @thibaudmichaud confirmed that they would guarantee tail call behavior in V8 in WebAssembly/tail-call#15 (comment).

* [interpreter] Fix a typo in README (WebAssembly#1406)

* Add a link to the proposals repo (WebAssembly#1409)

Fixes WebAssembly#1407.

* [spec] Add note regarding parameter names (WebAssembly#1412)

* Comments WIP

* Merge upstream (WebAssembly#55)

* Typo

* [spec] Clarifying note on text format (WebAssembly#1420)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>

* Eps

* Eps

* [test] Fix section size in binary test (WebAssembly#1424)

* Update document README to install six

* Disallow type recursion (WebAssembly#56)

* Fix import order

* Add --generate-js-only flag to test runner

This will return early right after generating JS from the wast test
files. It will not attempt to run the tests, or do the round trip
conversion from wasm <-> wast.

This is convenient for proposals to add tests without having to
update the reference interpreter with implementation, and generate those
tests to JS to run in other Wasm engines.

Fixes WebAssembly#1430.

* Remove use of let from func.bind test

* Add call3

* [spec] Fix missing mention of vectype (WebAssembly#1436)

Fixed WebAssembly#1435.

* [spec] Fix single-table limitation in module instantiation (WebAssembly#1434)

* [spec] Fix missing immediate on table.set (WebAssembly#1441)

* [docs] Update syntax in examples (WebAssembly#1442)

* Clarification in proposals README

* [interpreter] Tweak start section AST to match spec

* [spec] Bump release to 2 (WebAssembly#1443)

At yesterday's WG meeting, we decided to make a new release, now switching to the Evergreen model. For administrative and technical reasons having to do with W3C procedure, we decided to bump the release number to 2.

From now on, the standard will iterate at version 2 from the W3C's official perspective. We use minor release numbers internally to distinguish different iterations.

(@ericprud, I hope I understood correctly that the Bikeshed "level" also needed to be bumped to 2.)

* Remove test cases with let

* Sync wpt test (WebAssembly#1449)

* [spec] Fix typo (WebAssembly#1448)

* [proposals] Add missing start to example (WebAssembly#1454)

* [spec] "version 2.0" -> "release 2.0" (WebAssembly#1452)

* [spec] Fix typo (WebAssembly#1458)

* [test] Add assert_trap for unreached valid case (WebAssembly#1460)

* [interpreter] Name the type Utf8.unicode

* [spec] Fix binary format of data/elem tags to allow LEB (WebAssembly#1461)

* [spec] Fix typos in numeric operations (WebAssembly#1467)

* [spec] Fix syntax error in element segments validation rule (WebAssembly#1465)

* [spec] Fix typo in global instance syntax (WebAssembly#1466)

* [spec] Fix typos in module instantiation (WebAssembly#1468)

* [interpreter] Turn into a Dune package (WebAssembly#1459)

* [spec] Fix typos in instruction validation rules (WebAssembly#1462)

* [bib] Update latex .bib file for webassembly 2.0 (WebAssembly#1463)

* [spec] Add missing default for vector types (WebAssembly#1464)

* [spec] Fix typos in binary and text formats (WebAssembly#1469)

* [spec] Fix various typos (WebAssembly#1470)

* TypeError for Global constructor with v128

At the moment the spec requires a `LinkError` to be thrown when the `WebAssembly.Global` constructor is called for type `v128`. This was introduced in WebAssembly/simd#360, but according to the PR description, actually a `TypeError` should be thrown. The PR refers to https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#javascript-api-and-simd-values, and there a `TypeError` is required.

* [spec] Fix LEB opcodes in instruction index (WebAssembly#1475)

* [spec] Fix v128.loadX_splat in instruction index (WebAssembly#1477)

* [interpreter] Dune test suite (WebAssembly#1478)

* [interpreter] Fix warning flags for OCaml 4.13 (WebAssembly#1481)

* [interpreter] Simplify lexer and avoid table overflow on some architectures (WebAssembly#1482)

* [spec] Editorial nit (WebAssembly#1484)

* [interpreter] Produce error messages in encoder (WebAssembly#1488)

* [spec] Add missing close paren on table abbreviation (WebAssembly#1486)

Also remove an unnecessary space in the previous table abbreviation.

* [spec] Remove outdated note (WebAssembly#1491)

* Eps

* [interpreter] Factor data and element segments into abstract types (WebAssembly#1492)

* [spec] Update note on module initialization trapping (WebAssembly#1493)

* Fix type equality

* Fix typo

* [spec] Add note about control stack invariant to algorithm (WebAssembly#1498)

* [spec] Tweak tokenisation for text format (WebAssembly#1499)

* [test] Use still-illegal opcode (func-refs) (WebAssembly#1501)

* Fix minor typos and consistency issues in the validation algorithm. (WebAssembly#61)

* Add definition of defaultable types (WebAssembly#62)

No rules for locals yet, since those are still being discussed.

* Remove func.bind (WebAssembly#64)

* Implement 1a (WebAssembly#63)

* Subtyping on vector types & heap bottom check (WebAssembly#66)

* [interpreter] Bring AST closer to spec

* [spec] Fix typo (WebAssembly#1508)

* WIP

* Remove polymorphic variants

* Minor syntactic consistency fix (WebAssembly#68)

Change pseudo equality operator from `==` to `=`.

* Bump version

* [spec] Fix table.copy validation typo (WebAssembly#1511)

* More fixes

* Fix Latex

* Adjust intro

* Spec local initialization (WebAssembly#67)

* Add table initialiser (WebAssembly#65)

* [spec] Remove outdated note (WebAssembly#1491)

* [interpreter] Factor data and element segments into abstract types (WebAssembly#1492)

* [spec] Update note on module initialization trapping (WebAssembly#1493)

* [spec] Add note about control stack invariant to algorithm (WebAssembly#1498)

* [spec] Tweak tokenisation for text format (WebAssembly#1499)

* [test] Use still-illegal opcode (func-refs) (WebAssembly#1501)

* [spec] Fix typo (WebAssembly#1508)

* [spec] Fix table.copy validation typo (WebAssembly#1511)

* Merge fallout

* Latex fixes

* [spec] Minor copy edit (WebAssembly#1512)

* Spec changelog

* [spec] Trivial editorial fix

* Update embedding

* Oops

* Argh

* Rename Sem to Dyn

* Readd match.mli

* [interpreter] Build wast.js with Js_of_ocaml (WebAssembly#1507)

* [interpreter] Add flag for controlling call budget

* Spec zero byte

* Fix table/elem expansion (WebAssembly#71)

* Fix merge artefact

* Restrict init from stack-polymorphism (WebAssembly#75)

* [spec] Simplify exec rule for if (WebAssembly#1517)

* [spec] Formatting tweak (WebAssembly#1519)

* [spec] Fix typing rule in appendix (WebAssembly#1516)

* [spec] Fix “invertible” typo (WebAssembly#1520)

* [spec] Correct use of opdtype and stacktype (WebAssembly#1524)

* [spec] Add note to instruction index (WebAssembly#1528)

* Add type annotation to call_ref (WebAssembly#76)

* [spec] Tweak wording to avoid first person

* Eps

* Eps2

* Eps3

* Remove unneeded assumption type

* [spec/test] Fix scoping of non-imported globals (WebAssembly#1525)

* Fix test

* A couple of tests

* Performance improvement

* Typo

* Another typo

* [spec] Fix language config

* Fix null subtyping being wrong way around (WebAssembly#79)

* [spec] Fix naming typo (WebAssembly#1532)

* Defunctorise types again

* [spec] Add citation for WasmCert (WebAssembly#1533)

* [test] Fix async_index.js

* [test] Enable the i64 tests in imports.wast.

Fixes WebAssembly#1514.

* Minor tweak

* [js-api][web-api] Editorial: Fix some minor issues.

Fixes WebAssembly#1064.

* Update README.md (WebAssembly#1540)

Improve wording.

* [spec] Fix typo in element execution (WebAssembly#1544)

* [spec] Remove obsolete note (WebAssembly#1545)

* cccccc[klghketetivvtnnhvntikigrnueuhdkkukljgjuest/meta/generate_*.js: sync upstream JS with tests (WebAssembly#1546)

* [spec] Editorial tweak

* [test] test segment/table mismatch and externref segment (WebAssembly#1547)

* [interpreter] Remove duplicate token declarations (WebAssembly#1548)

* Update Soundness appendix (WebAssembly#72)

* [spec] Formatting eps

* Remove oboslete note in README (WebAssembly#82)

* Add `print_i64` to generated spec tests

WebAssembly@82a613d added `print_i64` to the standalone test files, but not to the ones generated by the spec interpreter.

* [test] Tweak binary-leb128 and simd_lane (WebAssembly#1555)

* [spec] Allow explicit keyword definitions (WebAssembly#1553)

Rather than describing keyword tokens as always being defined implicitly by terminal symbols in syntactic productions, describe them as being defined implicitly or explicitly. This accounts for the explicit definitions of `offset` and `align` phrases, which are lexically keywords, later in the chapter.

Fixes WebAssembly#1552.

* [js-api] editorial: adjust link for v128 type

* Factor local init tests to local_init.wast; add more (WebAssembly#84)

* Update JS API for no-frills

* [spec] Add missing case for declarative elem segments

Fixes WebAssembly#1562.

* [spec] Hotfix last accidental commit

* [spec] Fix hyperref (WebAssembly#1563)

* [spec] Bump sphinx version to fix Python problem

* [spec] Fix minor errors and inconsistencies (WebAssembly#1564)

* Spacing

* Fix a couple more superfluous brackets

* [spec] Eps

* [interpreter] Refactor parser to handle select & call_indirect correctly (WebAssembly#1567)

* [spec] Remove dead piece of grammar

* [test] elem.wast: force to use exprs in a element (WebAssembly#1561)

* Fix typos in SIMD exec/instructions

* Update interpreter README (WebAssembly#1571)

It previously stated that the formal spec did not exist, but the spec has existed for years now.

* [spec] Remove an obsolete exec step (WebAssembly#1580)

* [test] Optional tableidx for table.{get,set,size,grow,fill} (WebAssembly#1582)

* [spec] Fix abstract grammar for const immediate (WebAssembly#1577)

* [spec] Fix context composition in text format (WebAssembly#1578)

* [spec] Fix label shadowing (WebAssembly#1579)

* Try bumping OCaml

* Try bumping checkout

* Adjust for multi-return

* Tweak reduction rules

* Spec return_call_ref

* Fix

* Text format

* [spec] Fix typos in instruction index (WebAssembly#1584)

* [spec] Fix typo (WebAssembly#1587)

* [spec] Remove inconsistent newline (WebAssembly#1589)

* [interpreter] Remove legacy bigarray linking (WebAssembly#1593)

* [spec] Show scrolls for overflow math blocks (WebAssembly#1594)

* [interpreter] Run JS tests via node.js (WebAssembly#1595)

* [spec] Remove stray `x` indices (WebAssembly#1598)

* [spec] Style tweak for cross-refs

* [spec] Style eps (WebAssembly#1601)

* Separate subsumption from instr sequencing

* State principal types

* Add statements about glbs, lubs, and disjoint hierarchies

* Add missing bot

* [spec] Clarify that atoms can be symbolic (WebAssembly#1602)

* [test] Import v128 global (WebAssembly#1597)

* Update Overview.md

* [js-api] Expose everywhere

* [js-api] Try to clarify NaN/infinity handling. (WebAssembly#1535)

* [web-api] Correct MIME type check. (WebAssembly#1537)

Fixes WebAssembly#1138.

* [ci] Pin nodejs version to avoid fetching failures (WebAssembly#1603)

The issues appears to be related to actions/runner-images#7002.

Co-authored-by: Ms2ger <Ms2ger@igalia.com>

* [spec] Add missing value to table.grow reduction rule (WebAssembly#1607)

* [test] Move SIMD linking test to simd dir (WebAssembly#1610)

* Editorial: Clarify the name of the instantiate algorithm.

* Add notes to discourage using synchronous APIs.

* [jsapi] Normative: Always queue a task during asynchronous instantiation

JSC will have to do asynchronous compilation work during some instantiations.
To be consistent, this PR always queues a task to complete instantiation,
except through the synchronous Instance(module) API, to ensure consistency
across platforms.

This patch also cleans up the specification in various surrounding ways:
- Include notes about APIs whose use is discouraged/may be limited

Closes WebAssembly#741
See also webpack/webpack#6433

* [test] Exception -> Tag in wasm-module-builder.js

The section name has changed to the tag section a few years ago. This
adds the corresponding changes added in
WebAssembly/exception-handling#252 and
WebAssembly/exception-handling#256.

* [spec] Fix reduction rule for label (WebAssembly#1612)

Fix WebAssembly#1605.

* [spec] Clarifying note about canonical NaNs (WebAssembly#1614)

* [spec] Tweak crossref

* [test] Fix invalid section ID tests (WebAssembly#1615)

* [tests] Disable node run for now

* [spec] Don't check in generated index, to avoid spurious merge conflicts

* [spec] Rename script

* [ci] deactivate node run for now

* Fix uses of \to; compositionality

* Fix typo in text expansion

* Follow-up fix

* Fix compilation errors after merge.

This commit fixes the errors introduced by the merge of
function-references/main into this tree.

---------

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Co-authored-by: Andreas Rossberg <rossberg@dfinity.org>
Co-authored-by: Hans Höglund <hanshoglund@users.noreply.github.com>
Co-authored-by: Ng Zhi An <zhin@chromium.org>
Co-authored-by: Ng Zhi An <zhin@google.com>
Co-authored-by: Sam Clegg <sbc@chromium.org>
Co-authored-by: Thomas Lively <7121787+tlively@users.noreply.github.com>
Co-authored-by: Gabor Greif <ggreif@gmail.com>
Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
Co-authored-by: Crypt Keeper <64215+codefromthecrypt@users.noreply.github.com>
Co-authored-by: Andreas Rossberg <rossberg@chromium.org>
Co-authored-by: Ng Zhi An <ngzhian@gmail.com>
Co-authored-by: Ben L. Titzer <ben.titzer@gmail.com>
Co-authored-by: Keith Winstein <keithw@cs.stanford.edu>
Co-authored-by: gahaas <ahaas@google.com>
Co-authored-by: r00ster <r00ster91@protonmail.com>
Co-authored-by: Timothy McCallum <tpmccallum@users.noreply.github.com>
Co-authored-by: Julien Cretin <github@ia0.eu>
Co-authored-by: Julien Cretin <cretin@google.com>
Co-authored-by: Ole Krüger <ole@vprsm.de>
Co-authored-by: Jämes Ménétrey <james@menetrey.me>
Co-authored-by: Ivan Panchenko <39594356+ivan-pan@users.noreply.github.com>
Co-authored-by: Ethan Jones <ictrobot@outlook.com>
Co-authored-by: Ole Krüger <ole.kruger@trili.tech>
Co-authored-by: aathan <aathan_github@memeplex.com>
Co-authored-by: Alberto Fiori <9143617+fifofefe@users.noreply.github.com>
Co-authored-by: mnordine <marknordine@gmail.com>
Co-authored-by: cosine <CosineP@users.noreply.github.com>
Co-authored-by: ariez-xyz <41232910+ariez-xyz@users.noreply.github.com>
Co-authored-by: Surma <surma@surma.dev>
Co-authored-by: Asumu Takikawa <asumu@igalia.com>
Co-authored-by: Ian Henderson <ian@ianhenderson.org>
Co-authored-by: Tom Stuart <hi@tomstu.art>
Co-authored-by: James Browning <thejamesernator@gmail.com>
Co-authored-by: whirlicote <78504913+whirlicote@users.noreply.github.com>
Co-authored-by: Ms2ger <Ms2ger@igalia.com>
Co-authored-by: Adam Lancaster <Adzz@users.noreply.github.com>
Co-authored-by: Ömer Sinan Ağacan <omeragacan@gmail.com>
Co-authored-by: B Szilvasy <beatrice.szilvasy@gmail.com>
Co-authored-by: Thomas Lively <tlively123@gmail.com>
Co-authored-by: Michael Ficarra <github@michael.ficarra.me>
Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com>
Co-authored-by: Thomas Lively <tlively@google.com>
Co-authored-by: candymate <31069474+candymate@users.noreply.github.com>
Co-authored-by: Bongjun Jang <bongjun.jang@kaist.ac.kr>
Co-authored-by: ShinWonho <50018375+ShinWonho@users.noreply.github.com>
Co-authored-by: 서동휘 <hwidongsuh@gmail.com>
Co-authored-by: Jim Blandy <jimb@red-bean.com>
Co-authored-by: Heejin Ahn <aheejin@gmail.com>
Co-authored-by: Daniel Ehrenberg <littledan@chromium.org>
@unicomp21
Copy link

@thibaudmichaud I guess everything should work now? in chrome? are there tests I can run?

@dschuff
Copy link
Member

dschuff commented Jun 5, 2023

My understanding is that it shipped in 112. This is also what https://webassembly.org/roadmap/ says.
If you want to test whether your browser supports a feature, you can also use the "Your browser" column on that page. It runs the tests from https://github.com/GoogleChromeLabs/wasm-feature-detect directly.

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

No branches or pull requests