From 07094499fe8a012750db226b2eca1ebe93d064d8 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Fri, 3 Oct 2025 18:34:05 -0700 Subject: [PATCH 1/2] pass builtinSetNames, and string constant --- document/js-api/index.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 3fb066dd7..631f7ca4a 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -2310,8 +2310,9 @@ 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. Note: When integrating with the JS String Builtins proposal, |builtinSetNames| should be passed in the following step as « "js-string" » and |importedStringModule| as null. -1. [=Construct a WebAssembly module object=] from |module| and |bytes|, and let |module| be the result. +1. Let |builtinSetNames| be « "js-string" ». +1. Let |importedStringModule| be "wasm-js:strings". +1. [=Construct a WebAssembly module object=] from |module|, |bytes|, |builtinSetNames| and |importedStringModule|, and let |module| be the result. 1. Let |requestedModules| be a set. 1. For each (|moduleName|, |name|, |type|) in [=module_imports=](|module|.\[[Module]]), 1. If |moduleName| starts with the prefix "wasm-js:", @@ -2409,7 +2410,6 @@ WebAssembly Module Records have the following methods: 1. Let |module| be |record|.\[[ModuleSource]].\[[Module]]. 1. Let |imports| be « ». 1. [=list/iterate|For each=] (|importedModuleName|, |name|, |importtype|) in [=module_imports=](|module|), - 1. Note: The following step only applies when integrating with the JS String Builtins proposal. 1. If [=Find a builtin=] with (|importedModuleName|, |name|) and builtins |module|.\[[BuiltinSets]] is not null, then [=iteration/continue=]. 1. Let |importedModule| be [$GetImportedModule$](|record|, |importedModuleName|). 1. Let |resolution| be |importedModule|.ResolveExport(|name|). From fdad318bef1f48308a071cb8347cd6df38f9f85f Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Mon, 10 Nov 2025 12:38:18 -0800 Subject: [PATCH 2/2] use wasm:js/string-constants --- document/js-api/index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 631f7ca4a..42e50e6f1 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -2311,7 +2311,7 @@ To parse a WebAssembly module given a byte sequence |by 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 |importedStringModule| be "wasm-js:strings". +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. 1. For each (|moduleName|, |name|, |type|) in [=module_imports=](|module|.\[[Module]]),