summaryrefslogtreecommitdiff
path: root/test/gc.wast.fromBinary
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2020-09-29 21:24:02 +0200
committerGitHub <noreply@github.com>2020-09-29 21:24:02 +0200
commita629dc27bcb8022fad559ecdb2d3138e39183c6b (patch)
tree29cc4eba73071759fce48295db2c97df758c17ab /test/gc.wast.fromBinary
parentfa4c884f4ebfde185c9d8a3ee4e54f96c57cebed (diff)
downloadbinaryen-a629dc27bcb8022fad559ecdb2d3138e39183c6b.tar.gz
binaryen-a629dc27bcb8022fad559ecdb2d3138e39183c6b.tar.bz2
binaryen-a629dc27bcb8022fad559ecdb2d3138e39183c6b.zip
GC: Fuzzing support for i31 (#3169)
Integrates `i31ref` types and instructions into the fuzzer, by assuming that `(i31.new (i32.const N))` is constant and hence suitable to be used in global initializers.
Diffstat (limited to 'test/gc.wast.fromBinary')
-rw-r--r--test/gc.wast.fromBinary46
1 files changed, 24 insertions, 22 deletions
diff --git a/test/gc.wast.fromBinary b/test/gc.wast.fromBinary
index d86c08985..4d22c984f 100644
--- a/test/gc.wast.fromBinary
+++ b/test/gc.wast.fromBinary
@@ -1,12 +1,17 @@
(module
(type $none_=>_none (func))
- (import "env" "trivial_i31ref" (global $trivial_i31ref i31ref))
(global $global_anyref (mut anyref) (ref.null any))
(global $global_eqref (mut eqref) (ref.null eq))
- (global $global_i31ref (mut i31ref) (global.get $trivial_i31ref))
+ (global $global_i31ref (mut i31ref) (i31.new
+ (i32.const 0)
+ ))
(global $global_anyref2 (mut anyref) (ref.null eq))
- (global $global_anyref3 (mut anyref) (global.get $trivial_i31ref))
- (global $global_eqref2 (mut eqref) (global.get $trivial_i31ref))
+ (global $global_anyref3 (mut anyref) (i31.new
+ (i32.const 0)
+ ))
+ (global $global_eqref2 (mut eqref) (i31.new
+ (i32.const 0)
+ ))
(func $test
(local $local_i32 i32)
(local $local_anyref anyref)
@@ -37,7 +42,9 @@
(global.get $global_i31ref)
)
(local.set $local_i31ref
- (global.get $trivial_i31ref)
+ (i31.new
+ (i32.const 0)
+ )
)
(local.set $local_anyref
(local.get $local_eqref)
@@ -55,7 +62,9 @@
(global.get $global_i31ref)
)
(local.set $local_anyref
- (global.get $trivial_i31ref)
+ (i31.new
+ (i32.const 0)
+ )
)
(local.set $local_eqref
(local.get $local_i31ref)
@@ -64,7 +73,9 @@
(global.get $global_i31ref)
)
(local.set $local_eqref
- (global.get $trivial_i31ref)
+ (i31.new
+ (i32.const 0)
+ )
)
(global.set $global_anyref
(local.get $local_anyref)
@@ -91,7 +102,9 @@
(global.get $global_i31ref)
)
(global.set $global_i31ref
- (global.get $trivial_i31ref)
+ (i31.new
+ (i32.const 0)
+ )
)
(global.set $global_anyref
(local.get $local_eqref)
@@ -109,7 +122,9 @@
(global.get $global_i31ref)
)
(global.set $global_anyref
- (global.get $trivial_i31ref)
+ (i31.new
+ (i32.const 0)
+ )
)
(global.set $global_eqref
(local.get $local_i31ref)
@@ -118,19 +133,6 @@
(global.get $global_i31ref)
)
(global.set $global_eqref
- (global.get $trivial_i31ref)
- )
- (local.set $local_i31ref
- (i31.new
- (i32.const 0)
- )
- )
- (local.set $local_anyref
- (i31.new
- (i32.const 0)
- )
- )
- (local.set $local_eqref
(i31.new
(i32.const 0)
)