Closed pepelsbey closed 3 weeks ago
It looks like this is your first pull request. 🎉 Thank you for your contribution! One of the project maintainers will triage and assign the pull request for review. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct.
@eqrion could you please have a look?
@yurydelendik thank you! However, the code still won’t run if pasted into the playground we have on the call page, for example:
> Error: parseWat failed:
3:6: error: opcode not allowed: return_call
(return_call $fac-aux (local.get $x) (i64.const 1))
^^^^^^^^^^^
10:10: error: opcode not allowed: return_call
(return_call $fac-aux
^^^^^^^^^^^
Do you have an idea if it’s the problem with the playground?
Do you have an idea if it’s the problem with the playground?
I have a little insight into how playground works. The WebAssembly engine does not know about WAT and text representation. The transformation to bytecode is happening somewhere else. That something perhaps needs to be updated with new wasm specifications support.
If not mistaken, parseWat
is API function from wabt JS library. Is https://github.com/mdn/bob/blob/main/editor/js/editable-wat.ts executed on the main page?
There is a reference to "wabt": "^1.0.29"
, which is https://github.com/AssemblyScript/wabt.js . The package is not updated for long time and probably missing new specifications.
The package is not updated for long time and probably missing new specifications.
Thank you for investigating! I’ll reach out to platform engineers about this.
once https://github.com/mdn/interactive-examples/pull/2845 landed we can get this out.
Description
Adds example for
return_call
, tail call version of thecall
. I took it from the explainer.But there’s a catch: the playground shows an error when I try to run the code. There might be two reasons for that:
return_call
, see the error belowMotivation
To support enabled tail calls in Firefox 121.
Additional details
Related issues and pull requests