From 704bc302f3d4a1ce751bac26c88a7e7d4715f05a Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 6 Jan 2023 15:29:40 -0800 Subject: [PATCH] [js-api] Mention opaque data requirement This basically does the "handwaving" we discussed in #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 #242. --- document/js-api/index.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 3da64d69..288cec49 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -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|, val* | [=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 the WebAssembly error mapping. 1. If |ret| is exception |exntag| |payload| |opaqueData|, then