Skip to content

Commit baa86dc

Browse files
committed
Merge remote-tracking branch 'origin/main' into main-compact-imports
2 parents a800fc6 + cc90d82 commit baa86dc

214 files changed

Lines changed: 38210 additions & 26226 deletions

File tree

Some content is hidden

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

‎.github/workflows/ci-interpreter.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ jobs:
2121
- name: Setup OCaml
2222
uses: ocaml/setup-ocaml@v3
2323
with:
24-
ocaml-compiler: 4.14.x
25-
- name: Setup OCaml tools
26-
run: opam install --yes ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
24+
ocaml-compiler: 5.04.x
2725
- name: Build interpreter
28-
run: cd interpreter && opam exec make
26+
run: cd interpreter && opam exec make jsdeps wasm
2927
# Neither V8 nor SpiderMonkey can currently handle all 3.0 tests, so we disable checking JS translation for now.
3028
#- name: Setup Node.js
3129
# uses: actions/setup-node@v4

‎.github/workflows/ci-spec.yml‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,26 @@ name: CI for specs
22

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

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

1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
1414

1515
jobs:
16+
ensure-wasm-latest:
17+
if: ${{ github.repository == 'WebAssembly/spec' }}
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
- name: Diff wasm-latest
23+
run: cd specification && bash diff-wasm-latest.sh
24+
1625
build-core-spec:
1726
runs-on: ubuntu-latest
1827
steps:
@@ -23,7 +32,7 @@ jobs:
2332
- name: Setup OCaml
2433
uses: ocaml/setup-ocaml@v3
2534
with:
26-
ocaml-compiler: 4.14.x
35+
ocaml-compiler: 5.04.x
2736
- name: Setup Dune
2837
run: opam install --yes dune menhir mdx zarith && opam exec dune --version
2938
- name: Setup Node.js
@@ -145,6 +154,7 @@ jobs:
145154
publish-spec:
146155
runs-on: ubuntu-latest
147156
needs:
157+
- ensure-wasm-latest
148158
- build-core-spec
149159
- build-js-api-spec
150160
- build-web-api-spec

‎.github/workflows/ci-spectec.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup OCaml
2222
uses: ocaml/setup-ocaml@v3
2323
with:
24-
ocaml-compiler: 4.14.x
24+
ocaml-compiler: 5.04.x
2525
- name: Setup Dune
2626
run: opam install --yes dune menhir mdx zarith
2727
- name: Setup Latex

‎.github/workflows/w3c-publish.yml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ on:
44
push:
55
# Disable on forks!
66
branches: [ main ]
7-
paths: [ .github/**, document/** ]
8-
pull_request:
9-
paths: [ .github/**, document/** ]
7+
paths: [ .github/**, document/**, specification/** ]
108

119
# Allows you to run this workflow manually from the Actions tab, gh CLI tool,
1210
# or REST API. THe w3c-status options correspond to the valid options for
@@ -36,6 +34,7 @@ env:
3634

3735
jobs:
3836
publish-to-w3c-TR:
37+
if: ${{ github.repository == 'WebAssembly/spec' }}
3938
strategy:
4039
fail-fast: false
4140
matrix:
@@ -49,7 +48,7 @@ jobs:
4948
- name: Setup OCaml
5049
uses: ocaml/setup-ocaml@v3
5150
with:
52-
ocaml-compiler: 4.14.x
51+
ocaml-compiler: 5.04.x
5352
- name: Setup Dune
5453
if: ${{ matrix.spec == 'core' }}
5554
run: opam install --yes dune menhir mdx zarith && opam exec dune --version

‎LICENSE‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Please see the LICENSE file in each top-level directory for the terms applicable
33
The relevant directories and licenses are:
44

55
document/ - W3C Software and Document Notice and License
6+
spectec/ - Apache License 2.0
67
interpreter/ - Apache License 2.0
78
test/ - Apache License 2.0
8-
papers/ - Creative Commons Attribution 4.0 International License
9+
proposals/ - Creative Commons Universal 1.0 International License (CC0)
10+
papers/ - Creative Commons Attribution 4.0 International License (CC BY 4.0)

‎document/core/Makefile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SPHINXBUILD = sphinx-build
88
PAPER = a4
99
ROOTDIR = $(shell dirname `ls -d ../core 2>/dev/null || ls -d ../../core`)/..
1010
SPECTECDIR = $(ROOTDIR)/spectec
11-
SPECTECSPEC = $(ROOTDIR)/specification/wasm-3.0
11+
SPECTECSPEC = $(ROOTDIR)/specification/wasm-latest
1212
SPECTECEXT = spectec
1313
SPECTEC = $(SPECTECDIR)/spectec
1414
SPLICEDIR = _spectec
@@ -134,6 +134,7 @@ clean:
134134
rm -rf $(SPLICEDIR)
135135
rm -rf $(BUILDDIR)
136136
rm -rf $(STATICDIR)
137+
rm -rf $(SPLICEDIR)
137138
rm -f $(GENERATED)
138139

139140
.PHONY: html html-nested

‎document/core/appendix/index-instructions.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def Instruction(version, name, opcode, type=None, validation=None, execution=Non
378378
Instruction(2.0, r'\TABLEGROW~x', r'\hex{FC}~\hex{0F}', r'[t~\X{at}] \to [\X{at}]', r'valid-table.grow', r'exec-table.grow'),
379379
Instruction(2.0, r'\TABLESIZE~x', r'\hex{FC}~\hex{10}', r'[] \to [\X{at}]', r'valid-table.size', r'exec-table.size'),
380380
Instruction(2.0, r'\TABLEFILL~x', r'\hex{FC}~\hex{11}', r'[\X{at}~t~\X{at}] \to []', r'valid-table.fill', r'exec-table.fill'),
381-
Instruction(0.0, None, r'\hex{FC}~\hex{1E} \dots'),
381+
Instruction(0.0, None, r'\hex{FC}~\hex{12} \dots'),
382382
Instruction(2.0, r'\V128.\VLOAD~x~\memarg', r'\hex{FD}~~\hex{00}', r'[\X{at}] \to [\V128]', r'valid-vload-val', r'exec-vload-val'),
383383
Instruction(2.0, r'\V128.\VLOAD\K{8x8\_s}~x~\memarg', r'\hex{FD}~~\hex{01}', r'[\X{at}] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'),
384384
Instruction(2.0, r'\V128.\VLOAD\K{8x8\_u}~x~\memarg', r'\hex{FD}~~\hex{02}', r'[\X{at}] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'),

‎document/core/binary/types.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ $${grammar: Bresulttype}
100100
pair: binary format; field type
101101
pair: binary format; storage type
102102
pair: binary format; packed type
103+
.. _binary-mut:
103104
.. _binary-comptype:
104105
.. _binary-aggrtype:
105106
.. _binary-functype:
@@ -163,7 +164,6 @@ $${grammar: Btagtype}
163164
.. index:: global type, mutability, value type
164165
pair: binary format; global type
165166
pair: binary format; mutability
166-
.. _binary-mut:
167167
.. _binary-globaltype:
168168

169169
Global Types

‎document/core/exec/instructions.rst‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -687,19 +687,9 @@ Reference Instructions
687687
:math:`\REFNULL~x`
688688
.......................
689689

690-
1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.
691-
692-
2. Assert: due to :ref:`validation <valid-ref.null>`, the :ref:`defined type <syntax-deftype>` :math:`F.\AMODULE.\MITYPES[x]` exists.
693-
694-
3. Let :math:`\deftype` be the :ref:`defined type <syntax-deftype>` :math:`F.\AMODULE.\MITYPES[x]`.
690+
$${rule-prose: Step_read/ref.null}
695691

696-
4. Push the value :math:`\REFNULL~\deftype` to the stack.
697-
698-
$${rule: {Step_read/ref.null-*}}
699-
700-
.. note::
701-
No formal reduction rule is required for the case |REFNULL| |ABSHEAPTYPE|,
702-
since the instruction form is already a :ref:`value <syntax-val>`.
692+
$${rule: {Step_read/ref.null}}
703693

704694

705695
.. _exec-ref.func:

‎document/core/exec/modules.rst‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ $${definition: instantiate}
182182

183183
where:
184184

185+
.. _eval-exprs:
186+
187+
$${definition-prose: evalexprs}
188+
189+
$${definition: evalexprs}
190+
191+
and:
192+
185193
.. _eval-globals:
186194

187195
$${definition-prose: evalglobals}

0 commit comments

Comments
 (0)