diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/gc.wast | 5 | ||||
-rw-r--r-- | test/gc.wast.from-wast | 9 | ||||
-rw-r--r-- | test/gc.wast.fromBinary | 9 | ||||
-rw-r--r-- | test/gc.wast.fromBinary.noDebugInfo | 9 | ||||
-rw-r--r-- | test/passes/simplify-globals_all-features_fuzz-exec.txt | 4 | ||||
-rw-r--r-- | test/passes/simplify-locals_all-features.txt | 6 |
6 files changed, 31 insertions, 11 deletions
diff --git a/test/gc.wast b/test/gc.wast index 7ce6e01a9..2fa99a9ac 100644 --- a/test/gc.wast +++ b/test/gc.wast @@ -68,4 +68,9 @@ (local.set $local_i32 (i31.get_s (local.get $local_i31ref))) (local.set $local_i32 (i31.get_u (local.get $local_i31ref))) ) + + (func $test-variants + (local $local_i31refnull (ref null i31)) + (local $local_i31refnonnull (ref i31)) + ) ) diff --git a/test/gc.wast.from-wast b/test/gc.wast.from-wast index aeface521..776500087 100644 --- a/test/gc.wast.from-wast +++ b/test/gc.wast.from-wast @@ -2,7 +2,7 @@ (type $none_=>_none (func)) (global $global_anyref (mut anyref) (ref.null any)) (global $global_eqref (mut eqref) (ref.null eq)) - (global $global_i31ref (mut i31ref) (i31.new + (global $global_i31ref (mut (ref null i31)) (i31.new (i32.const 0) )) (global $global_anyref2 (mut anyref) (ref.null eq)) @@ -16,7 +16,7 @@ (local $local_i32 i32) (local $local_anyref anyref) (local $local_eqref eqref) - (local $local_i31ref i31ref) + (local $local_i31ref (ref null i31)) (local.set $local_anyref (local.get $local_anyref) ) @@ -148,4 +148,9 @@ ) ) ) + (func $test-variants + (local $local_i31refnull (ref null i31)) + (local $local_i31refnonnull (ref null i31)) + (nop) + ) ) diff --git a/test/gc.wast.fromBinary b/test/gc.wast.fromBinary index 4d22c984f..3e5315f2c 100644 --- a/test/gc.wast.fromBinary +++ b/test/gc.wast.fromBinary @@ -2,7 +2,7 @@ (type $none_=>_none (func)) (global $global_anyref (mut anyref) (ref.null any)) (global $global_eqref (mut eqref) (ref.null eq)) - (global $global_i31ref (mut i31ref) (i31.new + (global $global_i31ref (mut (ref null i31)) (i31.new (i32.const 0) )) (global $global_anyref2 (mut anyref) (ref.null eq)) @@ -16,7 +16,7 @@ (local $local_i32 i32) (local $local_anyref anyref) (local $local_eqref eqref) - (local $local_i31ref i31ref) + (local $local_i31ref (ref null i31)) (local.set $local_anyref (local.get $local_anyref) ) @@ -148,5 +148,10 @@ ) ) ) + (func $test-variants + (local $local_i31refnull (ref null i31)) + (local $local_i31refnonnull (ref null i31)) + (nop) + ) ) diff --git a/test/gc.wast.fromBinary.noDebugInfo b/test/gc.wast.fromBinary.noDebugInfo index 9fd83ad04..d423e65ba 100644 --- a/test/gc.wast.fromBinary.noDebugInfo +++ b/test/gc.wast.fromBinary.noDebugInfo @@ -2,7 +2,7 @@ (type $none_=>_none (func)) (global $global$0 (mut anyref) (ref.null any)) (global $global$1 (mut eqref) (ref.null eq)) - (global $global$2 (mut i31ref) (i31.new + (global $global$2 (mut (ref null i31)) (i31.new (i32.const 0) )) (global $global$3 (mut anyref) (ref.null eq)) @@ -16,7 +16,7 @@ (local $0 i32) (local $1 anyref) (local $2 eqref) - (local $3 i31ref) + (local $3 (ref null i31)) (local.set $1 (local.get $1) ) @@ -148,5 +148,10 @@ ) ) ) + (func $1 + (local $0 (ref null i31)) + (local $1 (ref null i31)) + (nop) + ) ) diff --git a/test/passes/simplify-globals_all-features_fuzz-exec.txt b/test/passes/simplify-globals_all-features_fuzz-exec.txt index 03bbff9de..fa236fbc1 100644 --- a/test/passes/simplify-globals_all-features_fuzz-exec.txt +++ b/test/passes/simplify-globals_all-features_fuzz-exec.txt @@ -1,11 +1,11 @@ [fuzz-exec] calling export [fuzz-exec] note result: export => funcref(0) (module - (type $f32_i31ref_i64_f64_funcref_=>_none (func (param f32 i31ref i64 f64 funcref))) + (type $f32_ref?|i31|_i64_f64_funcref_=>_none (func (param f32 (ref null i31) i64 f64 funcref))) (type $none_=>_funcref (func (result funcref))) (global $global$0 (mut funcref) (ref.null func)) (export "export" (func $1)) - (func $0 (param $0 f32) (param $1 i31ref) (param $2 i64) (param $3 f64) (param $4 funcref) + (func $0 (param $0 f32) (param $1 (ref null i31)) (param $2 i64) (param $3 f64) (param $4 funcref) (nop) ) (func $1 (result funcref) diff --git a/test/passes/simplify-locals_all-features.txt b/test/passes/simplify-locals_all-features.txt index 2cc323a57..8587e115c 100644 --- a/test/passes/simplify-locals_all-features.txt +++ b/test/passes/simplify-locals_all-features.txt @@ -2041,11 +2041,11 @@ ) ) (module - (type $eqref_i31ref_=>_i32 (func (param eqref i31ref) (result i32))) + (type $eqref_ref?|i31|_=>_i32 (func (param eqref (ref null i31)) (result i32))) (export "test" (func $0)) - (func $0 (param $0 eqref) (param $1 i31ref) (result i32) + (func $0 (param $0 eqref) (param $1 (ref null i31)) (result i32) (local $2 eqref) - (local $3 i31ref) + (local $3 (ref null i31)) (local.set $2 (local.get $0) ) |