summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lit/wat-kitchen-sink.wast14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/lit/wat-kitchen-sink.wast b/test/lit/wat-kitchen-sink.wast
index a0e3c3bef..1ddaa610d 100644
--- a/test/lit/wat-kitchen-sink.wast
+++ b/test/lit/wat-kitchen-sink.wast
@@ -77,7 +77,7 @@
(global (import "" "g3") (ref 0))
(global (import "mod" "") (ref null $many))
- (global i32 i32.const 0)
+ (global (mut i32) i32.const 0)
;; CHECK: (type $ref|$s0|_ref|$s1|_ref|$s2|_ref|$s3|_ref|$s4|_ref|$s5|_ref|$s6|_ref|$s7|_ref|$s8|_ref|$a0|_ref|$a1|_ref|$a2|_ref|$a3|_ref|$subvoid|_ref|$submany|_=>_none (func_subtype (param (ref $s0) (ref $s1) (ref $s2) (ref $s3) (ref $s4) (ref $s5) (ref $s6) (ref $s7) (ref $s8) (ref $a0) (ref $a1) (ref $a2) (ref $a3) (ref $subvoid) (ref $submany)) func))
;; CHECK: (import "mod" "g1" (global $g1 i32))
@@ -90,7 +90,7 @@
;; CHECK: (import "mod" "f5" (func $fimport$1))
- ;; CHECK: (global $2 i32 (i32.const 0))
+ ;; CHECK: (global $2 (mut i32) (i32.const 0))
;; CHECK: (global $i32 i32 (i32.const 42))
(global $i32 i32 i32.const 42)
@@ -693,6 +693,16 @@
drop
)
+ ;; CHECK: (func $globals (type $void)
+ ;; CHECK-NEXT: (global.set $2
+ ;; CHECK-NEXT: (global.get $i32)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ (func $globals
+ global.get $i32
+ global.set 4
+ )
+
;; CHECK: (func $use-types (type $ref|$s0|_ref|$s1|_ref|$s2|_ref|$s3|_ref|$s4|_ref|$s5|_ref|$s6|_ref|$s7|_ref|$s8|_ref|$a0|_ref|$a1|_ref|$a2|_ref|$a3|_ref|$subvoid|_ref|$submany|_=>_none) (param $0 (ref $s0)) (param $1 (ref $s1)) (param $2 (ref $s2)) (param $3 (ref $s3)) (param $4 (ref $s4)) (param $5 (ref $s5)) (param $6 (ref $s6)) (param $7 (ref $s7)) (param $8 (ref $s8)) (param $9 (ref $a0)) (param $10 (ref $a1)) (param $11 (ref $a2)) (param $12 (ref $a3)) (param $13 (ref $subvoid)) (param $14 (ref $submany))
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )