summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/heap-types.wast6
-rw-r--r--test/heap-types.wast.from-wast3
-rw-r--r--test/heap-types.wast.fromBinary3
-rw-r--r--test/heap-types.wast.fromBinary.noDebugInfo3
4 files changed, 15 insertions, 0 deletions
diff --git a/test/heap-types.wast b/test/heap-types.wast
index 0445c97d5..06ceceb3b 100644
--- a/test/heap-types.wast
+++ b/test/heap-types.wast
@@ -40,6 +40,12 @@
(type $nested-child-struct (struct (field (mut (ref $child)))))
(type $nested-child-array (array (mut (ref $child))))
+ (global $struct.new-in-global (ref $struct.A)
+ (struct.new_default_with_rtt $struct.A
+ (rtt.canon $struct.A)
+ )
+ )
+
(func $structs (param $x (ref $struct.A)) (result (ref $struct.B))
(local $tA (ref null $struct.A))
(local $tB (ref null $struct.B))
diff --git a/test/heap-types.wast.from-wast b/test/heap-types.wast.from-wast
index dfb8b622a..6c4b837e8 100644
--- a/test/heap-types.wast.from-wast
+++ b/test/heap-types.wast.from-wast
@@ -25,6 +25,9 @@
(global $rttgrandchild (rtt 2 $grandchild) (rtt.sub $grandchild
(global.get $rttchild)
))
+ (global $struct.new-in-global (ref $struct.A) (struct.new_default_with_rtt $struct.A
+ (rtt.canon $struct.A)
+ ))
(func $structs (param $x (ref $struct.A)) (result (ref $struct.B))
(local $tA (ref null $struct.A))
(local $tB (ref null $struct.B))
diff --git a/test/heap-types.wast.fromBinary b/test/heap-types.wast.fromBinary
index 314b3c29e..1e3cc9527 100644
--- a/test/heap-types.wast.fromBinary
+++ b/test/heap-types.wast.fromBinary
@@ -25,6 +25,9 @@
(global $rttgrandchild (rtt 2 $grandchild) (rtt.sub $grandchild
(global.get $rttchild)
))
+ (global $struct.new-in-global (ref $struct.A) (struct.new_default_with_rtt $struct.A
+ (rtt.canon $struct.A)
+ ))
(func $structs (param $x (ref $struct.A)) (result (ref $struct.B))
(local $tA (ref null $struct.A))
(local $tB (ref null $struct.B))
diff --git a/test/heap-types.wast.fromBinary.noDebugInfo b/test/heap-types.wast.fromBinary.noDebugInfo
index bb6ff9165..30bfd1064 100644
--- a/test/heap-types.wast.fromBinary.noDebugInfo
+++ b/test/heap-types.wast.fromBinary.noDebugInfo
@@ -25,6 +25,9 @@
(global $global$2 (rtt 2 ${i32_i64}) (rtt.sub ${i32_i64}
(global.get $global$1)
))
+ (global $global$3 (ref ${i32_f32_f64}) (struct.new_default_with_rtt ${i32_f32_f64}
+ (rtt.canon ${i32_f32_f64})
+ ))
(func $0 (param $0 (ref ${i32_f32_f64})) (result (ref ${i8_mut:i16_ref|{i32_f32_f64}|_mut:ref|{i32_f32_f64}|}))
(local $1 (ref null ${i32_f32_f64}))
(local $2 (ref null ${i8_mut:i16_ref|{i32_f32_f64}|_mut:ref|{i32_f32_f64}|}))