Skip to content

Commit

Permalink
[js-api] Mention opaque data requirement
Browse files Browse the repository at this point in the history
This basically does the "handwaving" we discussed in WebAssembly#218. I think
adding a concept of a backing store through backdoors in the core spec
is not very feasible, so this is what we can do practically at this
point.

Hopefully resolves WebAssembly#242.
  • Loading branch information
aheejin committed Jan 6, 2023
1 parent a8324bf commit 704bc30
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ This slot holds a [=function address=] relative to the [=surrounding agent=]'s [
1. Set |i| to |i| + 1.
1. Let (|store|, |ret|) be the result of [=func_invoke=](|store|, |funcaddr|, |args|).
1. Note: The expectation is that [=func_invoke=] will be updated to return (|store|, <var ignore>val</var>* | [=error=] | (exception |exntag| |payload| |opaqueData|)).
1. Note: The core spec does not have a notion of |opaqueData| in itself, but a backing store that serves as |opaqueData| is necessary to complete this step.
1. Set the [=surrounding agent=]'s [=associated store=] to |store|.
1. If |ret| is [=error=], throw an exception. This exception should be a WebAssembly {{RuntimeError}} exception, unless otherwise indicated by <a href="#errors">the WebAssembly error mapping</a>.
1. If |ret| is exception |exntag| |payload| |opaqueData|, then
Expand Down

0 comments on commit 704bc30

Please sign in to comment.