Skip to content

Commit 48bfb6d

Browse files
authored
Fix minor typos and consistency issues in the validation algorithm. (WebAssembly#61)
1 parent d4e68e0 commit 48bfb6d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

document/core/appendix/algorithm.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ Types are representable as a set of enumerations.
3434
func is_num(t : val_type) : bool =
3535
return t = I32 || t = I64 || t = F32 || t = F64 || t = Bot
3636
37-
func is_vec(t : val_type | Unknown) : bool =
38-
return t = V128 || t = Unknown
37+
func is_vec(t : val_type) : bool =
38+
return t = V128 || t = Bot
3939
40-
func is_ref(t : val_type | Unknown) : bool =
41-
return t = not (is_num t || is_vec t) || t = Bot
40+
func is_ref(t : val_type) : bool =
41+
return not (is_num t || is_vec t) || t = Bot
4242
4343
Equivalence and subtyping checks can be defined on these types.
4444

@@ -66,8 +66,8 @@ Equivalence and subtyping checks can be defined on these types.
6666
6767
func matches(t1 : val_type, t2 : val_type) : bool =
6868
return
69-
(is_num t1 && is_num t2 & t1 = t2) ||
70-
(is_ref t1 && is_ref t2 & matches_ref(t1, t2)) ||
69+
(is_num t1 && is_num t2 && t1 = t2) ||
70+
(is_ref t1 && is_ref t2 && matches_ref(t1, t2)) ||
7171
t1 = Bot
7272
7373
The algorithm uses two separate stacks: the *value stack* and the *control stack*.

0 commit comments

Comments
 (0)