Skip to content

Commit eb0dbce

Browse files
committed
Sync with WebAssembly/spec branch wasm-3.0
2 parents 5010b4e + 62893c2 commit eb0dbce

File tree

129 files changed

+17752
-1992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+17752
-1992
lines changed

.github/workflows/ci-interpreter.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: CI for interpreter & tests
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, wasm-3.0 ]
66
paths: [ .github/**, interpreter/**, test/** ]
77

88
pull_request:
9-
branches: [ main ]
9+
branches: [ main, wasm-3.0 ]
1010
paths: [ .github/**, interpreter/**, test/** ]
1111

1212
# Allows you to run this workflow manually from the Actions tab
@@ -17,17 +17,17 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout repo
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
- name: Setup OCaml
22-
uses: ocaml/setup-ocaml@v2
22+
uses: ocaml/setup-ocaml@v3
2323
with:
2424
ocaml-compiler: 4.14.x
2525
- name: Setup OCaml tools
2626
run: opam install --yes ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
2727
- name: Setup Node.js
28-
uses: actions/setup-node@v2
28+
uses: actions/setup-node@v4
2929
with:
30-
node-version: 19.x
30+
node-version: 20.x
3131
- name: Build interpreter
3232
run: cd interpreter && opam exec make
3333
- name: Run tests

.github/workflows/ci-spec.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: CI for specs
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, wasm-3.0 ]
66
paths: [ .github/**, document/** ]
77

88
pull_request:
9-
branches: [ main ]
9+
branches: [ main, wasm-3.0 ]
1010
paths: [ .github/**, document/** ]
1111

1212
# Allows you to run this workflow manually from the Actions tab
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout repo
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
with:
2222
submodules: "recursive"
2323
- name: Setup Node.js
24-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2525
with:
2626
node-version: 16
2727
- name: Setup Bikeshed
@@ -44,7 +44,7 @@ jobs:
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Checkout repo
47-
uses: actions/checkout@v2
47+
uses: actions/checkout@v4
4848
- name: Setup Bikeshed
4949
run: pip install bikeshed && bikeshed update
5050
- name: Run Bikeshed
@@ -59,7 +59,7 @@ jobs:
5959
runs-on: ubuntu-latest
6060
steps:
6161
- name: Checkout repo
62-
uses: actions/checkout@v2
62+
uses: actions/checkout@v4
6363
- name: Setup Bikeshed
6464
run: pip install bikeshed && bikeshed update
6565
- name: Run Bikeshed
@@ -128,7 +128,7 @@ jobs:
128128
runs-on: ubuntu-latest
129129
steps:
130130
- name: Checkout repo
131-
uses: actions/checkout@v2
131+
uses: actions/checkout@v4
132132
- name: Upload artifacts
133133
uses: actions/upload-artifact@v4
134134
with:
@@ -147,7 +147,7 @@ jobs:
147147
- build-spec-versions
148148
steps:
149149
- name: Checkout repo
150-
uses: actions/checkout@v2
150+
uses: actions/checkout@v4
151151
- name: Create output directory
152152
run: mkdir _output && cp document/index.html _output/index.html
153153
- name: Download core spec artifact
@@ -187,7 +187,7 @@ jobs:
187187
path: _output/versions
188188
- name: Publish to GitHub Pages
189189
if: github.ref == 'refs/heads/main'
190-
uses: peaceiris/actions-gh-pages@v3
190+
uses: peaceiris/actions-gh-pages@v4
191191
with:
192192
publish_dir: ./_output
193193
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/w3c-publish.yml

+25-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
name: Publish to W3C TR space
1+
name: Validate/Publish to W3C TR space
22

33
on:
44
push:
55
branches: [ main ]
66
paths: [ .github/**, document/** ]
7+
pull_request:
8+
paths: [ .github/**, document/** ]
79

810
# Allows you to run this workflow manually from the Actions tab, gh CLI tool,
911
# or REST API. THe w3c-status options correspond to the valid options for
@@ -23,30 +25,45 @@ on:
2325
- CRD
2426
- CR
2527

28+
env:
29+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
30+
W3C_STATUS: ${{ github.event_name == 'workflow_dispatch' && inputs.w3c-status || 'WD' }}
31+
2632
jobs:
2733
publish-to-w3c-TR:
28-
if: github.repository == 'WebAssembly/spec'
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
spec: [core, js-api, web-api]
2938
runs-on: ubuntu-latest
3039
steps:
3140
- name: Checkout repo
32-
uses: actions/checkout@v2
41+
uses: actions/checkout@v4
3342
with:
3443
submodules: "recursive"
3544
- name: Setup Node.js
36-
uses: actions/setup-node@v3
45+
uses: actions/setup-node@v4
3746
with:
3847
node-version: 16
3948
- name: Setup Bikeshed
4049
run: pip install bikeshed && bikeshed update
4150
- name: Setup TexLive
51+
if: ${{ matrix.spec == 'core' }}
4252
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
4353
- name: Setup Sphinx
54+
if: ${{ matrix.spec == 'core' }}
4455
run: pip install six && pip install sphinx==5.1.0
45-
- name: Publish all specs to their https://www.w3.org/TR/ URLs
46-
run: cd document && make -e WD-echidna-CI
56+
- name: Publish ${{ matrix.spec }} spec to its https://www.w3.org/TR/ URL
57+
if: env.W3C_ECHIDNA_TOKEN_CORE
58+
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna-CI
4759
env:
48-
W3C_STATUS: ${{ github.event_name == 'push' && 'CRD' || inputs.w3c-status }}
4960
W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}
5061
W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }}
5162
W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }}
52-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
63+
ECHIDNA_DRYRUN: ${{ !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }}
64+
- name: Validate ${{ matrix.spec }} spec with Echidna
65+
if: env.W3C_USERNAME
66+
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna
67+
env:
68+
W3C_USERNAME: ${{ secrets.W3C_USERNAME }}
69+
W3C_PASSWORD: ${{ secrets.W3C_PASSWORD }}

document/core/Makefile

+9-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ NAME = WebAssembly
1313
DECISION_URL = https://github.com/WebAssembly/meetings/blob/main/main/2024/WG-06-12.md
1414
TAR = tar
1515
DEADLINE = $(shell date -d "+30 days" +%Y-%m-%d 2>/dev/null || date -v +30d +%Y-%m-%d)
16+
ECHIDNA_DRYRUN = true
1617

1718
# Internal variables.
1819
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -196,9 +197,11 @@ WD-echidna: WD-tar
196197
curl 'https://labs.w3.org/echidna/api/request' \
197198
--user '$(W3C_USERNAME):$(W3C_PASSWORD)' \
198199
-F "tar=@$(BUILDDIR)/WD.tar" \
199-
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
200+
-F "decision=$(DECISION_URL)" \
201+
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
202+
python3 ../util/check-echidna-status.py $(BUILDDIR)
200203
@echo
201-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
204+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
202205

203206
.PHONY: WD-echidna-CI
204207
WD-echidna-CI: WD-tar
@@ -210,9 +213,11 @@ WD-echidna-CI: WD-tar
210213
curl 'https://labs.w3.org/echidna/api/request' \
211214
-F "tar=@$(BUILDDIR)/WD.tar" \
212215
-F "token=$(W3C_ECHIDNA_TOKEN_CORE)" \
213-
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
216+
-F "decision=$(DECISION_URL)" \
217+
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
218+
python3 ../util/check-echidna-status.py $(BUILDDIR)
214219
@echo
215-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
220+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
216221

217222
.PHONY: diff
218223
diff: bikeshed

document/core/appendix/changes.rst

+91-3
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Allowed basic numeric computations in constant expressions. [#proposal-extconst]
308308
- |GLOBALGET| for any previously declared immutable :ref:`global <syntax-global>`
309309

310310
.. note::
311-
The :ref:`garbage collection <extension-gc>` added further constant instructions.
311+
The :ref:`garbage collection <extension-gc>` extension added further constant instructions.
312312

313313

314314
.. index:: instruction, function, call
@@ -389,6 +389,44 @@ Added the ability to use multiple memories per module. [#proposal-multimem]_
389389
* :ref:`Data segments <syntax-elem>` take a :ref:`memory index <syntax-memidx>`
390390

391391

392+
.. index:: address type, number type, table, memory, instruction
393+
394+
64-bit Address Space
395+
....................
396+
397+
Added the ability to declare an :math:`\I64` :ref:`address type <syntax-addrtype>` for :ref:`tables <syntax-tabletype>` and :ref:`memories <syntax-memtype>`. [#proposal-addr64]_
398+
399+
* :ref:`Address types <syntax-addrtype>` denote a subset of the integral :ref:`number types <syntax-numtype>`
400+
401+
* :ref:`Table types <syntax-tabletype>` include an :ref:`address type <syntax-addrtype>`
402+
403+
* :ref:`Memory types <syntax-memtype>` include an :ref:`address type <syntax-addrtype>`
404+
405+
* Operand types of :ref:`table <syntax-instr-table>` and :ref:`memory <syntax-instr-memory>` instructions now depend on the subject's declared address type:
406+
407+
- |TABLEGET|
408+
- |TABLESET|
409+
- |TABLESIZE|
410+
- |TABLEGROW|
411+
- |TABLEFILL|
412+
- |TABLECOPY|
413+
- |TABLEINIT|
414+
- |MEMORYSIZE|
415+
- |MEMORYGROW|
416+
- |MEMORYFILL|
417+
- |MEMORYCOPY|
418+
- |MEMORYINIT|
419+
- :math:`t\K{.load}`
420+
- :math:`t\K{.store}`
421+
- :math:`t\K{.load}\!N\!\K{\_}\sx`
422+
- :math:`t\K{.store}\!N`
423+
- :math:`\K{v128.load}\!N\!\K{x}\!M\!\K{\_}\sx`
424+
- :math:`\K{v128.load}\!N\!\K{\_zero}`
425+
- :math:`\K{v128.load}\!N\!\K{\_splat}`
426+
- :math:`\K{v128.load}\!N\!\K{\_lane}`
427+
- :math:`\K{v128.store}\!N\!\K{\_lane}`
428+
429+
392430
.. index:: reference, reference type, heap type, value type, local, local type, instruction, instruction type, table, function, function type, matching, subtyping
393431

394432
Typeful References
@@ -424,6 +462,8 @@ Added more precise types for references. [#proposal-typedref]_
424462

425463
* Refined typing of :ref:`local instructions <valid-instr-variable>` and :ref:`instruction sequences <valid-instr-seq>` to track the :ref:`initialization status <syntax-init>` of :ref:`locals <syntax-local>` with non-:ref:`defaultable <valid-defaultable>` type
426464

465+
* Refined decoding of :ref:`active <syntax-elemmode>` :ref:`element segments <binary-elem>` with implicit element type and plain function indices (opcode :math:`0`) to produce :ref:`non-nullable <syntax-nullable>` :ref:`reference type <syntax-reftype>`.
466+
427467
* Extended :ref:`table definitions <syntax-table>` with optional initializer expression
428468

429469

@@ -518,6 +558,48 @@ Added managed reference types. [#proposal-gc]_
518558
- |EXTERNCONVERTANY|
519559

520560

561+
.. index:: instruction, vector instruction, SIMD
562+
563+
Relaxed Vector Instructions
564+
...........................
565+
566+
Added new *relaxed* vector instructions,
567+
whose behaviour is non-deterministic and implementation-dependent. [#proposal-relaxed]_
568+
569+
* New binary :ref:`vector instruction <syntax-instr-relaxed>`:
570+
571+
- :math:`\K{f}\!N\!\K{x}\!M\!\K{.relaxed\_min}`
572+
- :math:`\K{f}\!N\!\K{x}\!M\!\K{.relaxed\_max}`
573+
- :math:`\K{i16x8.relaxed\_q15mulr\_s}`
574+
- :math:`\K{i16x8.relaxed\_dot\_i8x16\_i7x16\_s}`
575+
576+
* New ternary :ref:`vector instruction <syntax-instr-relaxed>`:
577+
578+
- :math:`\K{f}\!N\!\K{x}\!M\!\K{.relaxed\_madd}`
579+
- :math:`\K{f}\!N\!\K{x}\!M\!\K{.relaxed\_nmadd}`
580+
- :math:`\K{i}\!N\!\K{x}\!M\!\K{.relaxed\_laneselect}`
581+
- :math:`\K{i32x4.relaxed\_dot\_i8x16\_i7x16\_add\_s}`
582+
583+
* New conversion :ref:`vector instructions <syntax-instr-relaxed>`:
584+
585+
- :math:`\K{i32x4.relaxed\_trunc\_f32x4\_}\sx`
586+
- :math:`\K{i32x4.relaxed\_trunc\_f64x2\_}\sx\K{\_zero}`
587+
588+
* New byte reordering :ref:`vector instruction <syntax-instr-relaxed>`:
589+
590+
- :math:`\K{i8x16.relaxed\_swizzle}`
591+
592+
593+
.. index:: determinism, non-determinism, profiles
594+
595+
Profiles
596+
........
597+
598+
Introduced the concept of :ref:`profile <profiles>` for specifying language subsets.
599+
600+
* A new profile defining a :ref:`deterministic <profile-deterministic>` mode of execution.
601+
602+
521603
.. index:: text format, annotation, custom section, identifier, module, type, function, local, structure field
522604

523605
Custom Annotations
@@ -542,7 +624,7 @@ mirroring the role of custom sections in the binary format. [#proposal-annot]_
542624

543625

544626
.. [#proposal-extconst]
545-
https://github.com/WebAssembly/extended-const/blob/main/proposals/extended-const/
627+
https://github.com/WebAssembly/spec/tree/main/proposals/extended-const/
546628
547629
.. [#proposal-tailcall]
548630
https://github.com/WebAssembly/spec/tree/main/proposals/tail-call/
@@ -551,13 +633,19 @@ mirroring the role of custom sections in the binary format. [#proposal-annot]_
551633
https://github.com/WebAssembly/spec/tree/main/proposals/exception-handling/
552634
553635
.. [#proposal-multimem]
554-
https://github.com/WebAssembly/multi-memory/blob/main/proposals/multi-memory/
636+
https://github.com/WebAssembly/spec/tree/main/proposals/multi-memory/
637+
638+
.. [#proposal-addr64]
639+
https://github.com/WebAssembly/spec/tree/main/proposals/memory64/
555640
556641
.. [#proposal-typedref]
557642
https://github.com/WebAssembly/spec/tree/main/proposals/function-references/
558643
559644
.. [#proposal-gc]
560645
https://github.com/WebAssembly/spec/tree/main/proposals/gc/
561646
647+
.. [#proposal-relaxed]
648+
https://github.com/WebAssembly/spec/tree/main/proposals/relaxed-simd/
649+
562650
.. [#proposal-annot]
563651
https://github.com/WebAssembly/annotations/tree/main/proposals/annotations/

0 commit comments

Comments
 (0)