Skip to content

Commit 9fb3a59

Browse files
[spectec] Fix $fnat show hint (#2138)
Fix show hint for `$fnat` and update tests. Fix `select` example in the section about instructions validation in the spec. Closes #2135.
1 parent e86d1d2 commit 9fb3a59

6 files changed

Lines changed: 5 additions & 5 deletions

File tree

document/core/valid/instructions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ In both cases, the unconstrained types or type sequences can be chosen arbitrari
4343

4444
and
4545

46-
$${instr*: (CONST F64 $fnat(64, 1)) (CONST F64 $fnat(64, 2)) (CONST F64 $fnat(64, 3)) (SELECT)}
46+
$${instr*: (CONST F64 $fnat(64, 1)) (CONST F64 $fnat(64, 2)) (CONST I32 3) (SELECT)}
4747

4848
are valid, with ${:t} in the typing of ${:SELECT} being instantiated to ${:I32} or ${:F64}, respectively.
4949

specification/wasm-3.0/1.1-syntax.values.spectec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ syntax f64 = fN(`64)
6060
def $fzero(N) : fN(N) hint(show $(+0))
6161
def $fzero(N) = POS (SUBNORM 0)
6262

63-
def $fnat(N, nat) : fN(N) hint(show $(+%))
63+
def $fnat(N, nat) : fN(N) hint(show $(+%2))
6464
def $fnat(N, n) = POS (NORM n 0)
6565

6666
def $fone(N) : fN(N) hint(show $(+1))

specification/wasm-latest/1.1-syntax.values.spectec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ syntax f64 = fN(`64)
6060
def $fzero(N) : fN(N) hint(show $(+0))
6161
def $fzero(N) = POS (SUBNORM 0)
6262

63-
def $fnat(N, nat) : fN(N) hint(show $(+%))
63+
def $fnat(N, nat) : fN(N) hint(show $(+%2))
6464
def $fnat(N, n) = POS (NORM n 0)
6565

6666
def $fone(N) : fN(N) hint(show $(+1))
-1.29 KB
Binary file not shown.

spectec/test-latex/TEST.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2533,7 +2533,7 @@ $$
25332533

25342534
$$
25352535
\begin{array}[t]{@{}lcl@{}l@{}}
2536-
{+N} & = & {+((1 + n \cdot {2^{{-M}}}) \cdot {2^{0}})} \\
2536+
{+n} & = & {+((1 + n \cdot {2^{{-M}}}) \cdot {2^{0}})} \\
25372537
\end{array}
25382538
$$
25392539

spectec/test-prose/TEST.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21242,7 +21242,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i
2124221242
1. Return :math:`({+((0 + 0 \cdot {2^{{-M}}}) \cdot {2^{e}})})`.
2124321243

2124421244

21245-
:math:`{+N}`
21245+
:math:`{+n}`
2124621246
............
2124721247

2124821248

0 commit comments

Comments
 (0)