Skip to content

Merge js-string-builtins into wasm-3.0 #1943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 74 commits into
base: wasm-3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
a0c525b
Initial commit
dtig Aug 1, 2023
bfc3c0b
Merge remote-tracking branch 'upstream/main'
eqrion Aug 9, 2023
5b29562
Initial setup and overview
eqrion Aug 9, 2023
1dea0a3
Update proposal
eqrion Oct 13, 2023
09444a5
Address review feedback
eqrion Nov 6, 2023
b73eb94
Merge pull request #8 from WebAssembly/refactor
eqrion Nov 6, 2023
969ecee
Rename concatenate to concat
eqrion Dec 7, 2023
6e8afd8
Editorial changes
eqrion Dec 29, 2023
5f10a91
Tighten up definitions of function builtins
eqrion Dec 29, 2023
a0a7773
Rework support for WTF-8
eqrion Dec 29, 2023
42143e4
Review comments
eqrion Jan 9, 2024
206a3a0
Update substring range checking
eqrion Jan 16, 2024
f8138fe
Fix mutability of array i8
eqrion Jan 19, 2024
fee87c1
Add streaming-related functions
eqrion Jan 19, 2024
9363099
Clarify behavior of flags and function names
eqrion Jan 19, 2024
492bbd4
Fix link to type-imports prposal in js-string-builtins/Overview.md
mkustermann Mar 15, 2024
2b24b0d
Clarify feature detection scheme
tlively Mar 18, 2024
cf796dc
Add test for js-string-builtins
eqrion Mar 25, 2024
8951375
Fix type signature of 'concat'
eqrion Mar 29, 2024
2b634f5
Add section on string constants, including Struct.from
eqrion Mar 29, 2024
6a7a39b
Rework to use imported string constants idea
eqrion Apr 10, 2024
f13f076
Fixup typos
eqrion Apr 10, 2024
8c65950
Add missing start parameter to measureStringAsUTF8 overview
osa1 Apr 22, 2024
809dd46
Update Overview.md
osa1 Apr 22, 2024
bb95b01
Many small improvements
tomayac May 6, 2024
47b4744
Update proposals/js-string-builtins/Overview.md
tomayac May 21, 2024
33291d7
Fix nullability for string constants
eqrion Apr 12, 2024
f7a14c3
Expand section on string constants
eqrion Jun 25, 2024
7530d20
Revert unintentional change to builtins field
eqrion Jun 25, 2024
98953e8
Add note about empty imports object
eqrion Jun 26, 2024
cccc16b
Merge remote-tracking branch 'upstream/wasm-3.0'
eqrion Aug 6, 2024
c82a542
Initial outline of builtin support
eqrion Aug 6, 2024
1c865b9
Expand specification of builtins
eqrion Aug 7, 2024
9cc146e
Remove unneeded modification to embedding spec
eqrion Aug 7, 2024
b9c4a82
Initial string constants support
eqrion Aug 7, 2024
6b2a180
Fix module constructor to handle options
eqrion Aug 7, 2024
8f2e8dc
Don't freeze internal instantiation of builtins and string constants
eqrion Aug 8, 2024
60e5e69
Move UTF-8 support to a future proposal
eqrion Aug 8, 2024
5126002
Remove DS_Store
eqrion Aug 9, 2024
bfe909b
Remove DS_Store
eqrion Aug 9, 2024
81a3f21
Mark up options appropriately
ajklein Aug 9, 2024
0aad8b9
Make UnwrapString an abstract-op and use it to implement cast
ajklein Aug 9, 2024
57aa62d
Consistently use "steps" instead of "algorithm" for builtins
ajklein Aug 9, 2024
acb72c9
Add test
ajklein Aug 9, 2024
9c45e27
Add stubs for the rest of the operations
ajklein Aug 9, 2024
a924966
Add fromCharCode
ajklein Aug 9, 2024
4d1520e
Switch to using the Call abstract op, and add fromCodePoint
ajklein Aug 9, 2024
a356284
Add length
ajklein Aug 9, 2024
05b8756
Add charCodeAt and codePointAt
ajklein Aug 9, 2024
1253b7b
Add concat
ajklein Aug 9, 2024
a98b686
Add substring
ajklein Aug 9, 2024
5002332
Use angle quotes appropriately
ajklein Aug 9, 2024
a402a3a
Add basic support for fromCharCodeArray
ajklein Aug 14, 2024
e6462a6
Make fromCharCodeArray slightly less formal
ajklein Aug 15, 2024
86d7160
Add intoCharCodeArray
ajklein Aug 15, 2024
a3c7562
Add equals and compare
ajklein Aug 16, 2024
d7765e6
Review fixes for builtin steps
eqrion Aug 21, 2024
9570169
Tweak wording for trapping in builtins
eqrion Aug 21, 2024
91115df
Fix spec to separate builtin name used for imports and compile options
eqrion Aug 21, 2024
1937e00
Add note about patching the String builtins
eqrion Aug 21, 2024
e1bbe79
Add more tests
eqrion Aug 23, 2024
7851a78
Don't validate that every builtin set option is valid
eqrion Aug 23, 2024
ab1be32
Fix null-handling for `equals` in test and polyfill
ajklein Sep 4, 2024
4553771
Editorial: replace Type AO with new ECMA-262 type test convention
michaelficarra Nov 8, 2024
dd601fb
actually remove Type
michaelficarra Nov 8, 2024
6cbeb82
support per-component polyfill fallbacks
guybedford Feb 11, 2025
df1f6df
spec rework
guybedford Feb 11, 2025
9cdd245
typo
guybedford Feb 11, 2025
7d0b519
Editorial: Align with Web IDL specification
autokagami Aug 22, 2024
753b7a1
[js-api] Fix incorrect return statement in 'validate builtin set names'
eqrion Jun 25, 2025
70a3869
[js-api] Remove copy-pasted if statements
eqrion Jun 25, 2025
81bfc5f
Merge remote-tracking branch 'spec/wasm-3.0'
eqrion Jun 25, 2025
b0816d4
Revert changes to conf and README to prepare for merging
eqrion Jun 25, 2025
48e869a
[tests] Remove tentative from js-string tests
eqrion Jun 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
437 changes: 418 additions & 19 deletions document/js-api/index.bs

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions document/web-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,25 @@ additional APIs that are implemented by Web user agents but are outside the scop
<pre class="idl">
[Exposed=(Window,Worker)]
partial namespace WebAssembly {
Promise&lt;Module> compileStreaming(Promise&lt;Response> source);
Promise&lt;Module> compileStreaming(Promise&lt;Response> source, optional WebAssemblyCompileOptions options);
Promise&lt;WebAssemblyInstantiatedSource> instantiateStreaming(
Promise&lt;Response> source, optional object importObject);
Promise&lt;Response> source, optional object importObject, optional WebAssemblyCompileOptions options);
};
</pre>

<div algorithm>
The <dfn method for="WebAssembly">compileStreaming(|source|)</dfn> method, when invoked, returns the result of [=compile a potential WebAssembly response|compiling a potential WebAssembly response=] with |source|.
The <dfn method for="WebAssembly">compileStreaming(|source|, |options|)</dfn> method, when invoked, returns the result of [=compile a potential WebAssembly response|compiling a potential WebAssembly response=] with |source| using |options|.
</div>

<div algorithm>
The <dfn method for="WebAssembly">instantiateStreaming(|source|, |importObject|)</dfn> method, when invoked, performs the following steps:
The <dfn method for="WebAssembly">instantiateStreaming(|source|, |importObject|, |options|)</dfn> method, when invoked, performs the following steps:

1. Let |promiseOfModule| be the result of [=compile a potential WebAssembly response|compiling a potential WebAssembly response=] with |source|.
1. Let |promiseOfModule| be the result of [=compile a potential WebAssembly response|compiling a potential WebAssembly response=] with |source| using |options|.
1. Return the result of [=instantiate a promise of a module|instantiating the promise of a module=] |promiseOfModule| with imports |importObject|.
</div>

<div algorithm>
To <dfn>compile a potential WebAssembly response</dfn> with a promise of a {{Response}} |source|, perform the following steps:
To <dfn>compile a potential WebAssembly response</dfn> with a promise of a {{Response}} |source| and {{WebAssemblyCompileOptions}} |options|, perform the following steps:

Note: This algorithm accepts a {{Response}} object, or a
promise for one, and compiles and instantiates the resulting bytes of the response. This compilation
Expand Down Expand Up @@ -135,7 +135,7 @@ Note: This algorithm accepts a {{Response}} object, or a

1. [=Upon fulfillment=] of |bodyPromise| with value |bodyArrayBuffer|:
1. Let |stableBytes| be a [=get a copy of the buffer source|copy of the bytes held by the buffer=] |bodyArrayBuffer|.
1. [=Asynchronously compile a WebAssembly module|Asynchronously compile the WebAssembly module=] |stableBytes| using the [=networking task source=] and [=resolve=] |returnValue| with the result.
1. [=Asynchronously compile a WebAssembly module|Asynchronously compile the WebAssembly module=] |stableBytes| using the [=networking task source=] and |options| and [=resolve=] |returnValue| with the result.
1. [=Upon rejection=] of |bodyPromise| with reason |reason|:
1. [=Reject=] |returnValue| with |reason|.
1. [=Upon rejection=] of |source| with reason |reason|:
Expand Down
801 changes: 801 additions & 0 deletions proposals/js-string-builtins/Overview.md

Large diffs are not rendered by default.

Loading