summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/heap-types.wast16
-rw-r--r--test/heap-types.wast.from-wast36
-rw-r--r--test/heap-types.wast.fromBinary18
-rw-r--r--test/heap-types.wast.fromBinary.noDebugInfo16
4 files changed, 69 insertions, 17 deletions
diff --git a/test/heap-types.wast b/test/heap-types.wast
index e932df82f..da22cc7d9 100644
--- a/test/heap-types.wast
+++ b/test/heap-types.wast
@@ -258,12 +258,18 @@
)
)
)
- (func $unreachables
+ (func $unreachables-1
(drop
- (struct.get $struct.A 0 (unreachable))
- )
- (drop
- (struct.set $struct.A 0 (unreachable) (unreachable))
+ (struct.get $struct.C 0 (unreachable))
)
)
+ (func $unreachables-2
+ (struct.set $struct.C 0 (ref.null $struct.C) (unreachable))
+ )
+ (func $unreachables-3
+ (struct.set $struct.C 0 (unreachable) (unreachable))
+ )
+ (func $unreachables-4
+ (struct.set $struct.C 0 (unreachable) (f32.const 1))
+ )
)
diff --git a/test/heap-types.wast.from-wast b/test/heap-types.wast.from-wast
index 4fbf5026c..fbbc47af9 100644
--- a/test/heap-types.wast.from-wast
+++ b/test/heap-types.wast.from-wast
@@ -1,14 +1,14 @@
(module
(type $struct.A (struct (field i32) (field f32) (field $named f64)))
(type $struct.B (struct (field i8) (field (mut i16)) (field (ref $struct.A)) (field (mut (ref $struct.A)))))
+ (type $none_=>_none (func))
(type $grandchild (struct (field i32) (field i64)))
+ (type $struct.C (struct (field $named-mut (mut f32))))
(type $vector (array (mut f64)))
(type $matrix (array (mut (ref null $vector))))
(type $anyref_=>_none (func (param anyref)))
(type $parent (struct ))
(type $child (struct (field i32)))
- (type $struct.C (struct (field $named-mut (mut f32))))
- (type $none_=>_none (func))
(type $nested-child-struct (struct (field (mut (ref $child)))))
(type $rtt_1_$parent_=>_none (func (param (rtt 1 $parent))))
(type $rtt_$parent_=>_none (func (param (rtt $parent))))
@@ -307,17 +307,39 @@
)
)
)
- (func $unreachables
+ (func $unreachables-1
(drop
- (block
- (unreachable)
+ (block
+ (drop
+ (unreachable)
+ )
)
)
- (drop
- (block
+ )
+ (func $unreachables-2
+ (struct.set $struct.C $named-mut
+ (ref.null $struct.C)
+ (unreachable)
+ )
+ )
+ (func $unreachables-3
+ (block
+ (drop
+ (unreachable)
+ )
+ (drop
(unreachable)
+ )
+ )
+ )
+ (func $unreachables-4
+ (block
+ (drop
(unreachable)
)
+ (drop
+ (f32.const 1)
+ )
)
)
)
diff --git a/test/heap-types.wast.fromBinary b/test/heap-types.wast.fromBinary
index 65c04bd32..4ee4be42a 100644
--- a/test/heap-types.wast.fromBinary
+++ b/test/heap-types.wast.fromBinary
@@ -1,14 +1,14 @@
(module
(type $struct.A (struct (field i32) (field f32) (field $named f64)))
(type $struct.B (struct (field i8) (field (mut i16)) (field (ref $struct.A)) (field (mut (ref $struct.A)))))
+ (type $none_=>_none (func))
(type $grandchild (struct (field i32) (field i64)))
(type $vector (array (mut f64)))
(type $matrix (array (mut (ref null $vector))))
+ (type $struct.C (struct (field $named-mut (mut f32))))
(type $anyref_=>_none (func (param anyref)))
(type $parent (struct ))
(type $child (struct (field i32)))
- (type $struct.C (struct (field $named-mut (mut f32))))
- (type $none_=>_none (func))
(type $nested-child-struct (struct (field (mut (ref $child)))))
(type $rtt_1_$parent_=>_none (func (param (rtt 1 $parent))))
(type $rtt_$parent_=>_none (func (param (rtt $parent))))
@@ -306,7 +306,19 @@
)
)
)
- (func $unreachables
+ (func $unreachables-1
+ (unreachable)
+ )
+ (func $unreachables-2
+ (drop
+ (ref.null $struct.C)
+ )
+ (unreachable)
+ )
+ (func $unreachables-3
+ (unreachable)
+ )
+ (func $unreachables-4
(unreachable)
)
)
diff --git a/test/heap-types.wast.fromBinary.noDebugInfo b/test/heap-types.wast.fromBinary.noDebugInfo
index 2a0156000..525e265a4 100644
--- a/test/heap-types.wast.fromBinary.noDebugInfo
+++ b/test/heap-types.wast.fromBinary.noDebugInfo
@@ -1,14 +1,14 @@
(module
(type ${i32_f32_f64} (struct (field i32) (field f32) (field f64)))
(type ${i8_mut:i16_ref|{i32_f32_f64}|_mut:ref|{i32_f32_f64}|} (struct (field i8) (field (mut i16)) (field (ref ${i32_f32_f64})) (field (mut (ref ${i32_f32_f64})))))
+ (type $none_=>_none (func))
(type ${i32_i64} (struct (field i32) (field i64)))
(type $[mut:f64] (array (mut f64)))
(type $[mut:ref?|[mut:f64]|] (array (mut (ref null $[mut:f64]))))
+ (type ${mut:f32} (struct (field (mut f32))))
(type $anyref_=>_none (func (param anyref)))
(type ${} (struct ))
(type ${i32} (struct (field i32)))
- (type ${mut:f32} (struct (field (mut f32))))
- (type $none_=>_none (func))
(type ${mut:ref|{i32}|} (struct (field (mut (ref ${i32})))))
(type $rtt_1_{}_=>_none (func (param (rtt 1 ${}))))
(type $rtt_{}_=>_none (func (param (rtt ${}))))
@@ -309,5 +309,17 @@
(func $8
(unreachable)
)
+ (func $9
+ (drop
+ (ref.null ${mut:f32})
+ )
+ (unreachable)
+ )
+ (func $10
+ (unreachable)
+ )
+ (func $11
+ (unreachable)
+ )
)