Skip to content

Commit 0f7baaa

Browse files
committed
Runtime: systematically use array.get_u rather array.get for strings
This does not make any difference with binaryen which conflated both, but the spec mandates the former.
1 parent a759bbb commit 0f7baaa

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

runtime/wasm/bigstring.wat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
(call $ta_get_ui8 (local.get $d1)
159159
(i32.add (local.get $pos1) (local.get $i))))
160160
(local.set $c2
161-
(array.get $string (local.get $s2)
161+
(array.get_u $string (local.get $s2)
162162
(i32.add (local.get $pos2) (local.get $i))))
163163
(local.set $i (i32.add (local.get $i) (i32.const 1)))
164164
(br_if $loop (i32.eq (local.get $c1) (local.get $c2)))

runtime/wasm/float.wat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@
509509
(if (i32.lt_u (local.get $i) (local.get $len))
510510
(then
511511
(if (i32.eq (i32.const 32) ;; ' '
512-
(array.get $string (local.get $s) (local.get $i)))
512+
(array.get_u $string (local.get $s) (local.get $i)))
513513
(then
514514
(local.set $i (i32.add (local.get $i) (i32.const 1)))
515515
(br $skip_spaces))))))

runtime/wasm/parsing.wat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
(local $i i32)
9393
(local.set $i (local.get $p))
9494
(loop $loop
95-
(if (i32.ne (array.get $string (local.get $s) (local.get $i))
95+
(if (i32.ne (array.get_u $string (local.get $s) (local.get $i))
9696
(i32.const 0))
9797
(then
9898
(local.set $i (i32.add (local.get $i) (i32.const 1)))
@@ -106,7 +106,7 @@
106106
(local $name (ref $string))
107107
(local.set $names (ref.cast (ref $string) (local.get $vnames)))
108108
(loop $loop
109-
(if (i32.eqz (array.get $string (local.get $names) (local.get $i)))
109+
(if (i32.eqz (array.get_u $string (local.get $names) (local.get $i)))
110110
(then
111111
(return
112112
(array.new_data $string $unknown_token

0 commit comments

Comments
 (0)