diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 42e50e6f1..7b79be99c 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -1874,7 +1874,7 @@ All builtin functions are grouped into sets. Every builtin set has a JS Exception Builtins + +The JS exception builtin set exposes the [=JavaScript exception tag=] as a builtin import. The [=builtin-set/name=] for this set is `js/exn`, and the [=builtin-set/qualified name=] is `wasm:js/exn`. + +

"js-tag"

+ +The |externType| of this builtin is `tag exception (rec (type (func (param externref)))).0`. + +
+ +The execution steps of this builtin are as follows: + +1. Let |tagAddress| be the result of [=get the JavaScript exception tag|getting the JavaScript exception tag=]. +1. Return the result of [=create a Tag object|creating a Tag object=] from |tagAddress|. + +
+

Error Condition Mappings to JavaScript

Running WebAssembly programs encounter certain events which halt execution of the WebAssembly code. @@ -2310,7 +2328,7 @@ To parse a WebAssembly module given a byte sequence |by 1. Let |stableBytes| be a [=get a copy of the buffer source|copy of the bytes held by the buffer=] |bytes|. 1. [=Compile a WebAssembly module|Compile the WebAssembly module=] |stableBytes| and store the result as |module|. 1. If |module| is [=error=], throw a {{CompileError}} exception. -1. Let |builtinSetNames| be « "js-string" ». +1. Let |builtinSetNames| be « "js-string", "js/exn" ». 1. Let |importedStringModule| be "wasm:js/string-constants". 1. [=Construct a WebAssembly module object=] from |module|, |bytes|, |builtinSetNames| and |importedStringModule|, and let |module| be the result. 1. Let |requestedModules| be a set.