Skip to content

Commit 54d6657

Browse files
authored
Merge pull request #55 from dhil/wasmfx-merge
Merge with `WebAssembly/{stack-switching,spec/wasm-3.0,spec/main}`
2 parents 1ccd8e8 + 9b4f938 commit 54d6657

32 files changed

+909
-115
lines changed

.github/workflows/ci-spec.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,24 @@ jobs:
2424
uses: actions/setup-node@v4
2525
with:
2626
node-version: 16
27-
- name: Setup Bikeshed
28-
run: pip install bikeshed && bikeshed update
27+
# - name: Setup Bikeshed
28+
# run: pip install bikeshed && bikeshed update
2929
- name: Setup TexLive
3030
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
3131
- name: Setup Sphinx
3232
run: pip install six && pip install sphinx==5.1.0
3333
- name: Build main spec
3434
run: cd document/core && make main
35-
- name: Run Bikeshed
36-
run: cd document/core && make bikeshed
35+
# - name: Run Bikeshed
36+
# run: cd document/core && make bikeshed
3737
- name: Upload artifact
3838
uses: actions/upload-artifact@v4
3939
with:
4040
name: core-rendered
4141
path: document/core/_build/html
4242

4343
build-js-api-spec:
44+
if: false
4445
runs-on: ubuntu-latest
4546
steps:
4647
- name: Checkout repo
@@ -56,6 +57,7 @@ jobs:
5657
path: document/js-api/index.html
5758

5859
build-web-api-spec:
60+
if: false
5961
runs-on: ubuntu-latest
6062
steps:
6163
- name: Checkout repo
@@ -71,11 +73,12 @@ jobs:
7173
path: document/web-api/index.html
7274

7375
build-code-metadata-spec:
76+
if: false
7477
runs-on: ubuntu-latest
7578
needs: [build-core-spec]
7679
steps:
7780
- name: Checkout repo
78-
uses: actions/checkout@v2
81+
uses: actions/checkout@v4
7982
with:
8083
submodules: "recursive"
8184
- name: Setup TexLive
@@ -91,10 +94,11 @@ jobs:
9194
path: document/metadata/code/_build/html
9295

9396
build-legacy-exceptions-core-spec:
97+
if: false
9498
runs-on: ubuntu-latest
9599
steps:
96100
- name: Checkout repo
97-
uses: actions/checkout@v2
101+
uses: actions/checkout@v4
98102
with:
99103
submodules: "recursive"
100104
- name: Setup TexLive
@@ -110,6 +114,7 @@ jobs:
110114
path: document/legacy/exceptions/core/_build/html
111115

112116
build-legacy-exceptions-js-api-spec:
117+
if: false
113118
runs-on: ubuntu-latest
114119
steps:
115120
- name: Checkout repo
@@ -125,6 +130,7 @@ jobs:
125130
path: document/legacy/exceptions/js-api/index.html
126131

127132
build-spec-versions:
133+
if: false
128134
runs-on: ubuntu-latest
129135
steps:
130136
- name: Checkout repo
@@ -136,6 +142,7 @@ jobs:
136142
path: document/versions/
137143

138144
publish-spec:
145+
if: false
139146
runs-on: ubuntu-latest
140147
needs:
141148
- build-core-spec

.github/workflows/w3c-publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on:
3131

3232
env:
3333
YARN_ENABLE_IMMUTABLE_INSTALLS: false
34-
W3C_STATUS: ${{ github.event_name == 'workflow_dispatch' && inputs.w3c-status || 'WD' }}
34+
W3C_STATUS: ${{ github.event_name == 'workflow_dispatch' && inputs.w3c-status || 'CRD' }}
3535

3636
jobs:
3737
publish-to-w3c-TR:
@@ -64,9 +64,10 @@ jobs:
6464
W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}
6565
W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }}
6666
W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }}
67+
# Publish the draft on manual dispatches without dry-run set, or on pushes to the main branch.
6768
ECHIDNA_DRYRUN: |-
68-
${{ (github.event_name == 'workflow_dispatch' && inputs.dry-run) ||
69-
!(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }}
69+
${{ !((github.event_name == 'workflow_dispatch' && !inputs.dry-run) ||
70+
(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main')) }}
7071
- name: Validate ${{ matrix.spec }} spec with Echidna
7172
if: env.W3C_USERNAME
7273
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna

document/core/appendix/changes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,8 @@ Added more precise types for references. [#proposal-typedref]_
462462

463463
* 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
464464

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+
465467
* Extended :ref:`table definitions <syntax-table>` with optional initializer expression
466468

467469

document/core/appendix/index-instructions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat
334334
Instruction(r'\STRUCTGETS~x~y', r'\hex{FB}~\hex{03}', r'[(\REF~\NULL~x)] \to [\I32]', r'valid-struct.get', r'exec-struct.get'),
335335
Instruction(r'\STRUCTGETU~x~y', r'\hex{FB}~\hex{04}', r'[(\REF~\NULL~x)] \to [\I32]', r'valid-struct.get', r'exec-struct.get'),
336336
Instruction(r'\STRUCTSET~x~y', r'\hex{FB}~\hex{05}', r'[(\REF~\NULL~x)~t] \to []', r'valid-struct.set', r'exec-struct.set'),
337-
Instruction(r'\ARRAYNEW~x', r'\hex{FB}~\hex{06}', r'[t] \to [(\REF~x)]', r'valid-array.new', r'exec-array.new'),
337+
Instruction(r'\ARRAYNEW~x', r'\hex{FB}~\hex{06}', r'[t~\I32] \to [(\REF~x)]', r'valid-array.new', r'exec-array.new'),
338338
Instruction(r'\ARRAYNEWDEFAULT~x', r'\hex{FB}~\hex{07}', r'[\I32] \to [(\REF~x)]', r'valid-array.new', r'exec-array.new'),
339339
Instruction(r'\ARRAYNEWFIXED~x~n', r'\hex{FB}~\hex{08}', r'[t^n] \to [(\REF~x)]', r'valid-array.new_fixed', r'exec-array.new_fixed'),
340340
Instruction(r'\ARRAYNEWDATA~x~y', r'\hex{FB}~\hex{09}', r'[\I32~\I32] \to [(\REF~x)]', r'valid-array.new_data', r'exec-array.new_data'),

document/core/binary/modules.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,5 +611,5 @@ where for each :math:`t_i^\ast, e_i` in :math:`\X{code}^n`,
611611
The version of the WebAssembly binary format may increase in the future
612612
if backward-incompatible changes have to be made to the format.
613613
However, such changes are expected to occur very infrequently, if ever.
614-
The binary format is intended to be forward-compatible,
615-
such that future extensions can be made without incrementing its version.
614+
The binary format is intended to be extensible,
615+
such that future features can be added without incrementing its version.

document/core/exec/instructions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4753,7 +4753,7 @@ Control Instructions
47534753
\begin{array}[t]{@{}r@{~}l@{}}
47544754
(\iff & S.\STABLES[F.\AMODULE.\MITABLES[x]].\TIELEM[i] = \REFFUNCADDR~a \\
47554755
\wedge & S.\SFUNCS[a] = f \\
4756-
\wedge & S \vdashdeftypematch F.\AMODULE.\MITYPES[y] \matchesdeftype f.\FITYPE)
4756+
\wedge & S \vdashdeftypematch f.\FITYPE \matchesdeftype F.\AMODULE.\MITYPES[y])
47574757
\end{array}
47584758
\\[1ex]
47594759
\begin{array}{lcl@{\qquad}l}

document/core/exec/modules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ and list of :ref:`reference <syntax-ref>` vectors for the module's :ref:`element
364364

365365
8. For each :ref:`element segment <syntax-elem>` :math:`\elem_i` in :math:`\module.\MELEMS`, do:
366366

367-
a. Let :math:`\reftype_i` be the element :ref:`reference type <syntax-reftype>` obtained by `instantiating <type-inst>` :math:`\elem_i.\ETYPE` in :math:`\moduleinst` defined below.
367+
a. Let :math:`\reftype_i` be the element :ref:`reference type <syntax-reftype>` obtained by :ref:`instantiating <type-inst>` :math:`\elem_i.\ETYPE` in :math:`\moduleinst` defined below.
368368

369369
b. Let :math:`\elemaddr_i` be the :ref:`element address <syntax-elemaddr>` resulting from :ref:`allocating <alloc-elem>` a :ref:`element instance <syntax-eleminst>` of :ref:`reference type <syntax-reftype>` :math:`\reftype_i` with contents :math:`(\reff_{\F{e}}^\ast)^\ast[i]`.
370370

document/core/exec/numerics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1717,7 +1717,7 @@ It computes :math:`(z_1 \cdot z_2) + z_3` as if with unbounded range and precisi
17171717

17181718
* Else if both :math:`z_1` and :math:`z_2` are zeroes, then return :math:`1`.
17191719

1720-
* Else if :math:`z_1` is smaller than or equal to :math:`z_2`, then return :math:`1`.
1720+
* Else if :math:`z_1` is larger than or equal to :math:`z_2`, then return :math:`1`.
17211721

17221722
* Else return :math:`0`.
17231723

document/core/syntax/types.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,11 @@ Global Types
483483
Tag Types
484484
~~~~~~~~~
485485

486-
*Tag types* classify the signature of :ref:`tags <syntax-tag>` with a function type.
486+
*Tag types* classify the signature of :ref:`tags <syntax-tag>` with a defined type |deftype|, which expands to a function type |functype|.
487487

488488
.. math::
489489
\begin{array}{llll}
490-
\production{tag type} &\tagtype &::=& \functype \\
490+
\production{tag type} &\tagtype &::=& \deftype \\
491491
\end{array}
492492
493493
Currently tags are only used for categorizing exceptions.

document/core/util/bikeshed_fixup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def Main():
6565
# get carried over into the resulting bikeshed output and then end up causing
6666
# the W3C pubrules checker to refuse to autopublish that bikeshed output.
6767
data = re.sub(r'.+?(<div class="toctree-wrapper compound">.+)',
68-
r'<!doctype HTML>\n<meta charset="utf-8">\n<body>\1',
68+
r'<!doctype HTML>\n<meta charset="utf-8">\n<body><section id="webassembly-specification">\1',
6969
data, flags=re.DOTALL)
7070

7171
# Drop spurious navigation from footer.

0 commit comments

Comments
 (0)