summaryrefslogtreecommitdiff
path: root/test/lit/ctor-eval
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/ctor-eval')
-rw-r--r--test/lit/ctor-eval/ctor_after_serialization.wat28
-rw-r--r--test/lit/ctor-eval/extern.wast45
-rw-r--r--test/lit/ctor-eval/table.wat11
-rw-r--r--test/lit/ctor-eval/v128.wast3
4 files changed, 48 insertions, 39 deletions
diff --git a/test/lit/ctor-eval/ctor_after_serialization.wat b/test/lit/ctor-eval/ctor_after_serialization.wat
index 45e811804..df37f7e8b 100644
--- a/test/lit/ctor-eval/ctor_after_serialization.wat
+++ b/test/lit/ctor-eval/ctor_after_serialization.wat
@@ -10,15 +10,7 @@
;; CHECK: (type $A (struct ))
(type $A (struct))
- ;; CHECK: (type $1 (func (result (ref any))))
-
- ;; CHECK: (type $2 (func))
-
- ;; CHECK: (global $ctor-eval$global (ref $A) (struct.new_default $A))
-
- ;; CHECK: (export "new" (func $new_2))
(export "new" (func $new))
- ;; CHECK: (export "nop" (func $nop_3))
(export "nop" (func $nop))
(func $new (result (ref any))
@@ -30,6 +22,16 @@
)
)
+;; CHECK: (type $1 (func (result (ref any))))
+
+;; CHECK: (type $2 (func))
+
+;; CHECK: (global $ctor-eval$global (ref $A) (struct.new_default $A))
+
+;; CHECK: (export "new" (func $new_2))
+
+;; CHECK: (export "nop" (func $nop_3))
+
;; CHECK: (func $new_2 (type $1) (result (ref any))
;; CHECK-NEXT: (global.get $ctor-eval$global)
;; CHECK-NEXT: )
@@ -53,11 +55,7 @@
(struct.new_default $A)
)
- ;; CHECK: (global $ctor-eval$global_1 (ref $A) (struct.new_default $A))
-
- ;; CHECK: (export "new" (func $new_2))
(export "new" (func $new))
- ;; CHECK: (export "nop" (func $nop_3))
(export "nop" (func $nop))
(func $new (result (ref any))
@@ -69,6 +67,12 @@
(global.get $ctor-eval$global)
)
)
+;; CHECK: (global $ctor-eval$global_1 (ref $A) (struct.new_default $A))
+
+;; CHECK: (export "new" (func $new_2))
+
+;; CHECK: (export "nop" (func $nop_3))
+
;; CHECK: (func $new_2 (type $1) (result (ref any))
;; CHECK-NEXT: (global.get $ctor-eval$global_1)
;; CHECK-NEXT: )
diff --git a/test/lit/ctor-eval/extern.wast b/test/lit/ctor-eval/extern.wast
index 5bb5c8cbc..9a8779abf 100644
--- a/test/lit/ctor-eval/extern.wast
+++ b/test/lit/ctor-eval/extern.wast
@@ -8,29 +8,8 @@
;; CHECK: (type $struct (struct (field externref)))
(type $struct (struct (field externref)))
- ;; CHECK: (type $2 (func (result externref)))
-
- ;; CHECK: (type $3 (func (result anyref)))
-
- ;; CHECK: (global $ctor-eval$global (ref $array) (array.new_fixed $array 3
- ;; CHECK-NEXT: (i32.const 1)
- ;; CHECK-NEXT: (i32.const 2)
- ;; CHECK-NEXT: (i32.const 3)
- ;; CHECK-NEXT: ))
-
- ;; CHECK: (global $ctor-eval$global_1 (ref $struct) (struct.new $struct
- ;; CHECK-NEXT: (extern.externalize
- ;; CHECK-NEXT: (ref.i31
- ;; CHECK-NEXT: (i32.const 1)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: ))
-
- ;; CHECK: (export "test1" (func $test1_3))
(export "test1" (func $test1))
- ;; CHECK: (export "test2" (func $test2_4))
(export "test2" (func $test2))
- ;; CHECK: (export "test3" (func $test3_5))
(export "test3" (func $test3))
(func $test1 (result externref)
@@ -70,6 +49,30 @@
)
)
+;; CHECK: (type $2 (func (result externref)))
+
+;; CHECK: (type $3 (func (result anyref)))
+
+;; CHECK: (global $ctor-eval$global (ref $array) (array.new_fixed $array 3
+;; CHECK-NEXT: (i32.const 1)
+;; CHECK-NEXT: (i32.const 2)
+;; CHECK-NEXT: (i32.const 3)
+;; CHECK-NEXT: ))
+
+;; CHECK: (global $ctor-eval$global_1 (ref $struct) (struct.new $struct
+;; CHECK-NEXT: (extern.externalize
+;; CHECK-NEXT: (ref.i31
+;; CHECK-NEXT: (i32.const 1)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: ))
+
+;; CHECK: (export "test1" (func $test1_3))
+
+;; CHECK: (export "test2" (func $test2_4))
+
+;; CHECK: (export "test3" (func $test3_5))
+
;; CHECK: (func $test1_3 (type $2) (result externref)
;; CHECK-NEXT: (extern.externalize
;; CHECK-NEXT: (ref.i31
diff --git a/test/lit/ctor-eval/table.wat b/test/lit/ctor-eval/table.wat
index 73534f59b..0954faeea 100644
--- a/test/lit/ctor-eval/table.wat
+++ b/test/lit/ctor-eval/table.wat
@@ -10,11 +10,6 @@
(elem (i32.const 0) $nop)
- ;; CHECK: (elem $0 (i32.const 0) $nop)
-
- ;; CHECK: (elem declare func $trap)
-
- ;; CHECK: (export "run" (func $run_3))
(export "run" (func $run))
(func $run (type $none_=>_none)
@@ -35,6 +30,12 @@
)
)
+ ;; CHECK: (elem $0 (i32.const 0) $nop)
+
+ ;; CHECK: (elem declare func $trap)
+
+ ;; CHECK: (export "run" (func $run_3))
+
;; CHECK: (func $nop (type $none_=>_none)
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
diff --git a/test/lit/ctor-eval/v128.wast b/test/lit/ctor-eval/v128.wast
index 03a7bb9d8..009ef57f2 100644
--- a/test/lit/ctor-eval/v128.wast
+++ b/test/lit/ctor-eval/v128.wast
@@ -9,10 +9,11 @@
;; CHECK: (memory $0 (shared 16 17))
(memory $0 (shared 16 17))
+ (export "v128" (func $v128))
;; CHECK: (data $0 (i32.const 23) "\e0\ff\c0N\8e\00\00\fe\01\00\12\81\85\fd\ff\90")
;; CHECK: (export "v128" (func $v128_2))
- (export "v128" (func $v128))
+
;; CHECK: (export "keepalive" (func $keepalive))
(export "keepalive" (func $keepalive))