Skip to content

Commit 6612531

Browse files
authored
Merge pull request WebAssembly#264 from aheejin/merge_spec
Merge from upstream spec
2 parents da3476d + 7cec7e1 commit 6612531

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Node.js
2323
uses: actions/setup-node@v1
2424
with:
25-
node-version: 18.x
25+
node-version: 19.x
2626
- run: cd interpreter && opam exec make JS=node all
2727

2828
ref-interpreter-js-library:

document/core/exec/instructions.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2982,22 +2982,20 @@ Exiting :math:`\instr^\ast` with label :math:`L`
29822982

29832983
When the end of a block is reached without a jump, exception, or trap aborting it, then the following steps are performed.
29842984

2985-
1. Let :math:`n` be the number of values on the top of the stack.
2985+
1. Pop all values :math:`\val^\ast` from the top of the stack.
29862986

2987-
2. Pop the values :math:`\val^n` from the stack.
2987+
2. Assert: due to :ref:`validation <valid-instr-seq>`, the label :math:`L` is now on the top of the stack.
29882988

2989-
3. Assert: due to :ref:`validation <valid-instr-seq>`, the label :math:`L` is now on the top of the stack and has arity :math:`n`.
2989+
3. Pop the label from the stack.
29902990

2991-
4. Pop the label from the stack.
2991+
4. Push :math:`\val^\ast` back to the stack.
29922992

2993-
5. Push :math:`\val^n` back to the stack.
2994-
2995-
6. Jump to the position after the |END| of the :ref:`structured control instruction <syntax-instr-control>` associated with the label :math:`L`.
2993+
5. Jump to the position after the |END| of the :ref:`structured control instruction <syntax-instr-control>` associated with the label :math:`L`.
29962994

29972995
.. math::
29982996
~\\[-1ex]
29992997
\begin{array}{lcl@{\qquad}l}
3000-
\LABEL_n\{\instr^\ast\}~\val^n~\END &\stepto& \val^n
2998+
\LABEL_n\{\instr^\ast\}~\val^\ast~\END &\stepto& \val^\ast
30012999
\end{array}
30023000
30033001
.. note::

document/core/syntax/values.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ An *arithmetic NaN* is a floating-point value :math:`\pm\NAN(n)` with :math:`n
140140
.. note::
141141
In the abstract syntax, subnormals are distinguished by the leading 0 of the significand. The exponent of subnormals has the same value as the smallest possible exponent of a normal number. Only in the :ref:`binary representation <binary-float>` the exponent of a subnormal is encoded differently than the exponent of any normal number.
142142

143+
The notion of canonical NaN defined here is unrelated to the notion of canonical NaN that the |IEEE754|_ standard (Section 3.5.2) defines for decimal interchange formats.
144+
143145
Conventions
144146
...........
145147

document/core/util/macros.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
.. |WasmIssues| replace:: |issuelink|
1010
.. _WasmIssues: |issuelink|
1111

12-
.. |IEEE754| replace:: IEEE 754-2019
12+
.. |IEEE754| replace:: IEEE 754
1313
.. _IEEE754: https://ieeexplore.ieee.org/document/8766229
1414

1515
.. |Unicode| replace:: Unicode

test/core/binary.wast

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
(assert_malformed (module binary "\00asm\00\00\00\01") "unknown binary version")
4646

4747
;; Invalid section id.
48-
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\0e\00") "malformed section id")
49-
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\7f\00") "malformed section id")
50-
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\80\00\01\00") "malformed section id")
51-
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\81\00\01\00") "malformed section id")
52-
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\ff\00\01\00") "malformed section id")
48+
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\0e\01\00") "malformed section id")
49+
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\7f\01\00") "malformed section id")
50+
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\80\01\00\01\01\00") "malformed section id")
51+
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\81\01\00\01\01\00") "malformed section id")
52+
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\ff\01\00\01\01\00") "malformed section id")
5353

5454
;; Unsigned LEB128 can have non-minimal length
5555
(module binary

0 commit comments

Comments
 (0)