summaryrefslogtreecommitdiff
path: root/test/heap-types.wast.fromBinary
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-01-26 23:36:56 +0000
committerGitHub <noreply@github.com>2021-01-26 15:36:56 -0800
commitf82e94363a231bf570fbe3d7dc49259c8668206f (patch)
tree1c4dd05735dfe61e8cc5d87a1c98479b788b89bd /test/heap-types.wast.fromBinary
parent5e57a13614c56f959faab675d6bcabbd629ec562 (diff)
downloadbinaryen-f82e94363a231bf570fbe3d7dc49259c8668206f.tar.gz
binaryen-f82e94363a231bf570fbe3d7dc49259c8668206f.tar.bz2
binaryen-f82e94363a231bf570fbe3d7dc49259c8668206f.zip
[GC] ref.is_func/data/i31 (#3519)
Diffstat (limited to 'test/heap-types.wast.fromBinary')
-rw-r--r--test/heap-types.wast.fromBinary21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/heap-types.wast.fromBinary b/test/heap-types.wast.fromBinary
index 2e1f25235..5b6dca2f6 100644
--- a/test/heap-types.wast.fromBinary
+++ b/test/heap-types.wast.fromBinary
@@ -4,6 +4,7 @@
(type ${} (struct ))
(type ${mut:f32} (struct (field (mut f32))))
(type $none_=>_none (func))
+ (type $anyref_=>_none (func (param anyref)))
(type ${i32} (struct (field i32)))
(type ${i32_i64} (struct (field i32) (field i64)))
(type $[mut:i32] (array (mut i32)))
@@ -195,5 +196,25 @@
)
)
)
+ (func $ref.is_X (param $x anyref)
+ (if
+ (ref.is_func
+ (local.get $x)
+ )
+ (unreachable)
+ )
+ (if
+ (ref.is_data
+ (local.get $x)
+ )
+ (unreachable)
+ )
+ (if
+ (ref.is_i31
+ (local.get $x)
+ )
+ (unreachable)
+ )
+ )
)