summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/heap-types.wast10
-rw-r--r--test/heap-types.wast.from-wast5
-rw-r--r--test/heap-types.wast.fromBinary5
-rw-r--r--test/heap-types.wast.fromBinary.noDebugInfo5
4 files changed, 25 insertions, 0 deletions
diff --git a/test/heap-types.wast b/test/heap-types.wast
index 84490d031..364d1b0a3 100644
--- a/test/heap-types.wast
+++ b/test/heap-types.wast
@@ -6,6 +6,13 @@
(field f32)
(field $named f64)
))
+ ;; identical to $struct.A, so will be canonicalized with it, but field names
+ ;; are different
+ (type $struct.A.prime (struct
+ i32
+ (field f32)
+ (field $othername f64)
+ ))
(type $struct.B (struct
(field i8)
(field (mut i16))
@@ -52,6 +59,9 @@
(struct.get $struct.A $named (local.get $x))
)
(drop
+ (struct.get $struct.A.prime $othername (ref.null $struct.A.prime))
+ )
+ (drop
(struct.get_u $struct.B 0 (local.get $tB))
)
(drop
diff --git a/test/heap-types.wast.from-wast b/test/heap-types.wast.from-wast
index d36e31ccb..5835ba7d9 100644
--- a/test/heap-types.wast.from-wast
+++ b/test/heap-types.wast.from-wast
@@ -52,6 +52,11 @@
)
)
(drop
+ (struct.get $struct.A $named
+ (ref.null $struct.A)
+ )
+ )
+ (drop
(struct.get_u $struct.B 0
(local.get $tB)
)
diff --git a/test/heap-types.wast.fromBinary b/test/heap-types.wast.fromBinary
index 62590b5f7..90e129511 100644
--- a/test/heap-types.wast.fromBinary
+++ b/test/heap-types.wast.fromBinary
@@ -52,6 +52,11 @@
)
)
(drop
+ (struct.get $struct.A $named
+ (ref.null $struct.A)
+ )
+ )
+ (drop
(struct.get_u $struct.B 0
(local.get $tB)
)
diff --git a/test/heap-types.wast.fromBinary.noDebugInfo b/test/heap-types.wast.fromBinary.noDebugInfo
index 074f88ff8..e75ddbe26 100644
--- a/test/heap-types.wast.fromBinary.noDebugInfo
+++ b/test/heap-types.wast.fromBinary.noDebugInfo
@@ -52,6 +52,11 @@
)
)
(drop
+ (struct.get ${i32_f32_f64} 2
+ (ref.null ${i32_f32_f64})
+ )
+ )
+ (drop
(struct.get_u ${i8_mut:i16_ref?|{i32_f32_f64}|_mut:ref?|{i32_f32_f64}|} 0
(local.get $2)
)