summaryrefslogtreecommitdiff
path: root/test/reference-types.wast.from-wast
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2023-12-13 10:53:50 -0800
committerGitHub <noreply@github.com>2023-12-13 10:53:50 -0800
commit0024c8bdd28f701d57e49e65d38b28aad0594299 (patch)
tree19b9eb323836843d147dedf40495042edcf9404f /test/reference-types.wast.from-wast
parent9e636855b582d1499a87fb73f55d85102ce95a58 (diff)
downloadbinaryen-0024c8bdd28f701d57e49e65d38b28aad0594299.tar.gz
binaryen-0024c8bdd28f701d57e49e65d38b28aad0594299.tar.bz2
binaryen-0024c8bdd28f701d57e49e65d38b28aad0594299.zip
[test] Port tests in test/ to test/lit/basic/ (#6160)
This ports all tests from `test/` to `test/lit/basic/`. The set of commands and `CHECK` lines used are the same as the ones in #6159. Now we use `lit` to test these, this also deletes all `.wast`, `.wast.from-wast`, `.wast.fromBinary`, and `.wast.fromBinary.noDebugInfo` files from `test/` and all related test routines from the python scripts. All `CHECK` lines are generated by `update_lit_checks.py --all-items`. This also deletes these three multi-memory tests in `test/lit/`, because they seem to contain the same code with the ones in `test/`, which have been ported to `test/lit/basic/` along with other tests. - `test/lit/multi-memories-atomics64.wast` - `test/lit/multi-memories-basics.wast` - `test/lit/multi-memories-simd.wast` This also adds newlines between `(func`s in case there are none to make `CHECK` lines easy to view, and removes some extra existing newlines here and there.
Diffstat (limited to 'test/reference-types.wast.from-wast')
-rw-r--r--test/reference-types.wast.from-wast650
1 files changed, 0 insertions, 650 deletions
diff --git a/test/reference-types.wast.from-wast b/test/reference-types.wast.from-wast
deleted file mode 100644
index 6a05ce40c..000000000
--- a/test/reference-types.wast.from-wast
+++ /dev/null
@@ -1,650 +0,0 @@
-(module
- (type $0 (func (result anyref)))
- (type $sig_anyref (func (param anyref)))
- (type $sig_funcref (func (param funcref)))
- (type $3 (func (result funcref)))
- (type $sig_eqref (func (param eqref)))
- (type $5 (func))
- (type $6 (func (result eqref)))
- (type $7 (func (param i32)))
- (type $8 (func (param eqref) (result funcref)))
- (import "env" "import_global" (global $import_global eqref))
- (import "env" "import_func" (func $import_func (type $8) (param eqref) (result funcref)))
- (global $global_eqref (mut eqref) (ref.null none))
- (global $global_funcref (mut funcref) (ref.null nofunc))
- (global $global_funcref_func (mut funcref) (ref.func $foo))
- (global $global_anyref (mut anyref) (ref.null none))
- (global $global_anyref2 (mut anyref) (ref.null none))
- (table $0 3 3 funcref)
- (elem $0 (i32.const 0) $take_eqref $take_funcref $take_anyref)
- (elem declare func $foo $ref-taken-but-not-in-table)
- (tag $e-i32 (param i32))
- (export "export_func" (func $import_func))
- (export "export_global" (global $import_global))
- (func $take_eqref (type $sig_eqref) (param $0 eqref)
- (nop)
- )
- (func $take_funcref (type $sig_funcref) (param $0 funcref)
- (nop)
- )
- (func $take_anyref (type $sig_anyref) (param $0 anyref)
- (nop)
- )
- (func $foo (type $5)
- (nop)
- )
- (func $test (type $5)
- (local $local_eqref eqref)
- (local $local_funcref funcref)
- (local $local_anyref anyref)
- (local.set $local_eqref
- (local.get $local_eqref)
- )
- (local.set $local_eqref
- (global.get $global_eqref)
- )
- (local.set $local_eqref
- (ref.null none)
- )
- (local.set $local_funcref
- (local.get $local_funcref)
- )
- (local.set $local_funcref
- (global.get $global_funcref)
- )
- (local.set $local_funcref
- (ref.null nofunc)
- )
- (local.set $local_funcref
- (ref.func $foo)
- )
- (local.set $local_anyref
- (local.get $local_anyref)
- )
- (local.set $local_anyref
- (global.get $global_anyref)
- )
- (local.set $local_anyref
- (ref.null none)
- )
- (local.set $local_anyref
- (local.get $local_eqref)
- )
- (local.set $local_anyref
- (global.get $global_eqref)
- )
- (local.set $local_anyref
- (ref.null none)
- )
- (global.set $global_eqref
- (global.get $global_eqref)
- )
- (global.set $global_eqref
- (local.get $local_eqref)
- )
- (global.set $global_eqref
- (ref.null none)
- )
- (global.set $global_funcref
- (global.get $global_funcref)
- )
- (global.set $global_funcref
- (local.get $local_funcref)
- )
- (global.set $global_funcref
- (ref.null nofunc)
- )
- (global.set $global_funcref
- (ref.func $foo)
- )
- (global.set $global_anyref
- (global.get $global_anyref)
- )
- (global.set $global_anyref
- (local.get $local_anyref)
- )
- (global.set $global_anyref
- (ref.null none)
- )
- (global.set $global_anyref
- (global.get $global_eqref)
- )
- (global.set $global_anyref
- (local.get $local_eqref)
- )
- (global.set $global_anyref
- (ref.null none)
- )
- (call $take_eqref
- (local.get $local_eqref)
- )
- (call $take_eqref
- (global.get $global_eqref)
- )
- (call $take_eqref
- (ref.null none)
- )
- (call $take_funcref
- (local.get $local_funcref)
- )
- (call $take_funcref
- (global.get $global_funcref)
- )
- (call $take_funcref
- (ref.null nofunc)
- )
- (call $take_funcref
- (ref.func $foo)
- )
- (call $take_anyref
- (local.get $local_anyref)
- )
- (call $take_anyref
- (global.get $global_anyref)
- )
- (call $take_anyref
- (ref.null none)
- )
- (call $take_anyref
- (local.get $local_eqref)
- )
- (call $take_anyref
- (global.get $global_eqref)
- )
- (call $take_anyref
- (ref.null none)
- )
- (call_indirect $0 (type $sig_eqref)
- (local.get $local_eqref)
- (i32.const 0)
- )
- (call_indirect $0 (type $sig_eqref)
- (global.get $global_eqref)
- (i32.const 0)
- )
- (call_indirect $0 (type $sig_eqref)
- (ref.null none)
- (i32.const 0)
- )
- (call_indirect $0 (type $sig_funcref)
- (local.get $local_funcref)
- (i32.const 1)
- )
- (call_indirect $0 (type $sig_funcref)
- (global.get $global_funcref)
- (i32.const 1)
- )
- (call_indirect $0 (type $sig_funcref)
- (ref.null nofunc)
- (i32.const 1)
- )
- (call_indirect $0 (type $sig_funcref)
- (ref.func $foo)
- (i32.const 1)
- )
- (call_indirect $0 (type $sig_anyref)
- (local.get $local_anyref)
- (i32.const 3)
- )
- (call_indirect $0 (type $sig_anyref)
- (global.get $global_anyref)
- (i32.const 3)
- )
- (call_indirect $0 (type $sig_anyref)
- (ref.null none)
- (i32.const 3)
- )
- (call_indirect $0 (type $sig_anyref)
- (local.get $local_eqref)
- (i32.const 3)
- )
- (call_indirect $0 (type $sig_anyref)
- (global.get $global_eqref)
- (i32.const 3)
- )
- (call_indirect $0 (type $sig_anyref)
- (ref.null none)
- (i32.const 3)
- )
- (drop
- (block $block (result eqref)
- (br_if $block
- (local.get $local_eqref)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block0 (result eqref)
- (br_if $block0
- (global.get $global_eqref)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block1 (result eqref)
- (br_if $block1
- (ref.null none)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block2 (result funcref)
- (br_if $block2
- (local.get $local_funcref)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block3 (result funcref)
- (br_if $block3
- (global.get $global_funcref)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block4 (result funcref)
- (br_if $block4
- (ref.null nofunc)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block5 (result funcref)
- (br_if $block5
- (ref.func $foo)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block6 (result anyref)
- (br_if $block6
- (local.get $local_anyref)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block7 (result anyref)
- (br_if $block7
- (global.get $global_anyref)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block8 (result anyref)
- (br_if $block8
- (ref.null none)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block9 (result anyref)
- (br_if $block9
- (local.get $local_eqref)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $block10 (result anyref)
- (br_if $block10
- (ref.null none)
- (i32.const 1)
- )
- )
- )
- (drop
- (loop $loop-in (result eqref)
- (local.get $local_eqref)
- )
- )
- (drop
- (loop $loop-in11 (result eqref)
- (global.get $global_eqref)
- )
- )
- (drop
- (loop $loop-in12 (result eqref)
- (ref.null none)
- )
- )
- (drop
- (loop $loop-in13 (result funcref)
- (local.get $local_funcref)
- )
- )
- (drop
- (loop $loop-in14 (result funcref)
- (global.get $global_funcref)
- )
- )
- (drop
- (loop $loop-in15 (result funcref)
- (ref.null nofunc)
- )
- )
- (drop
- (loop $loop-in16 (result funcref)
- (ref.func $foo)
- )
- )
- (drop
- (loop $loop-in17 (result anyref)
- (local.get $local_anyref)
- )
- )
- (drop
- (loop $loop-in18 (result anyref)
- (global.get $global_anyref)
- )
- )
- (drop
- (loop $loop-in19 (result anyref)
- (ref.null none)
- )
- )
- (drop
- (loop $loop-in20 (result anyref)
- (local.get $local_eqref)
- )
- )
- (drop
- (loop $loop-in21 (result anyref)
- (global.get $global_eqref)
- )
- )
- (drop
- (loop $loop-in22 (result anyref)
- (ref.null none)
- )
- )
- (drop
- (if (result eqref)
- (i32.const 1)
- (local.get $local_eqref)
- (ref.null none)
- )
- )
- (drop
- (if (result funcref)
- (i32.const 1)
- (local.get $local_funcref)
- (ref.null nofunc)
- )
- )
- (drop
- (if (result anyref)
- (i32.const 1)
- (local.get $local_anyref)
- (ref.null none)
- )
- )
- (drop
- (if (result anyref)
- (i32.const 1)
- (local.get $local_eqref)
- (local.get $local_eqref)
- )
- )
- (drop
- (if (result anyref)
- (i32.const 1)
- (ref.null none)
- (ref.null none)
- )
- )
- (drop
- (if (result anyref)
- (i32.const 1)
- (ref.i31
- (i32.const 0)
- )
- (ref.null none)
- )
- )
- (drop
- (try $try (result eqref)
- (do
- (local.get $local_eqref)
- )
- (catch $e-i32
- (drop
- (pop i32)
- )
- (ref.null none)
- )
- )
- )
- (drop
- (try $try28 (result funcref)
- (do
- (ref.func $foo)
- )
- (catch $e-i32
- (drop
- (pop i32)
- )
- (ref.null nofunc)
- )
- )
- )
- (drop
- (try $try29 (result anyref)
- (do
- (local.get $local_eqref)
- )
- (catch $e-i32
- (drop
- (pop i32)
- )
- (ref.null none)
- )
- )
- )
- (drop
- (try $try30 (result anyref)
- (do
- (ref.null none)
- )
- (catch $e-i32
- (drop
- (pop i32)
- )
- (local.get $local_eqref)
- )
- )
- )
- (drop
- (select (result eqref)
- (local.get $local_eqref)
- (ref.null none)
- (i32.const 1)
- )
- )
- (drop
- (select (result funcref)
- (local.get $local_funcref)
- (ref.null nofunc)
- (i32.const 1)
- )
- )
- (drop
- (select
- (i32.const 0)
- (i32.const 2)
- (i32.const 1)
- )
- )
- (drop
- (select (result anyref)
- (local.get $local_eqref)
- (ref.i31
- (i32.const 0)
- )
- (i32.const 1)
- )
- )
- (drop
- (ref.is_null
- (local.get $local_eqref)
- )
- )
- (drop
- (ref.is_null
- (global.get $global_eqref)
- )
- )
- (drop
- (ref.is_null
- (ref.null none)
- )
- )
- (drop
- (ref.is_null
- (local.get $local_funcref)
- )
- )
- (drop
- (ref.is_null
- (global.get $global_funcref)
- )
- )
- (drop
- (ref.is_null
- (ref.null nofunc)
- )
- )
- (drop
- (ref.is_null
- (ref.func $foo)
- )
- )
- (drop
- (ref.is_null
- (local.get $local_anyref)
- )
- )
- (drop
- (ref.is_null
- (global.get $global_anyref)
- )
- )
- (drop
- (ref.is_null
- (ref.null none)
- )
- )
- )
- (func $return_eqref_local (type $6) (result eqref)
- (local $local_eqref eqref)
- (local.get $local_eqref)
- )
- (func $return_eqref_global (type $6) (result eqref)
- (global.get $global_eqref)
- )
- (func $return_eqref_null (type $6) (result eqref)
- (ref.null none)
- )
- (func $return_funcref_local (type $3) (result funcref)
- (local $local_funcref funcref)
- (local.get $local_funcref)
- )
- (func $return_funcref_global (type $3) (result funcref)
- (global.get $global_funcref)
- )
- (func $return_funcref_null (type $3) (result funcref)
- (ref.null nofunc)
- )
- (func $return_funcref_func (type $3) (result funcref)
- (ref.func $foo)
- )
- (func $return_anyref_local (type $0) (result anyref)
- (local $local_anyref anyref)
- (local.get $local_anyref)
- )
- (func $return_anyref_global (type $0) (result anyref)
- (global.get $global_anyref)
- )
- (func $return_anyref_null (type $0) (result anyref)
- (ref.null none)
- )
- (func $return_anyref2 (type $0) (result anyref)
- (local $local_eqref eqref)
- (local.get $local_eqref)
- )
- (func $return_anyref3 (type $0) (result anyref)
- (global.get $global_eqref)
- )
- (func $return_anyref4 (type $0) (result anyref)
- (ref.null none)
- )
- (func $returns_eqref (type $6) (result eqref)
- (local $local_eqref eqref)
- (return
- (local.get $local_eqref)
- )
- (return
- (global.get $global_eqref)
- )
- (return
- (ref.null none)
- )
- )
- (func $returns_funcref (type $3) (result funcref)
- (local $local_funcref funcref)
- (return
- (local.get $local_funcref)
- )
- (return
- (global.get $global_funcref)
- )
- (return
- (ref.func $foo)
- )
- (return
- (ref.null nofunc)
- )
- )
- (func $returns_anyref (type $0) (result anyref)
- (local $local_anyref anyref)
- (return
- (local.get $local_anyref)
- )
- (return
- (global.get $global_anyref)
- )
- (return
- (ref.null none)
- )
- )
- (func $returns_anyref2 (type $0) (result anyref)
- (local $local_eqref eqref)
- (local $local_funcref funcref)
- (return
- (local.get $local_eqref)
- )
- (return
- (global.get $global_eqref)
- )
- (return
- (ref.null none)
- )
- )
- (func $ref-user (type $5)
- (drop
- (ref.func $ref-taken-but-not-in-table)
- )
- )
- (func $ref-taken-but-not-in-table (type $5)
- (nop)
- )
-)