diff options
Diffstat (limited to 'test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-onlylist@waka.txt')
-rw-r--r-- | test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-onlylist@waka.txt | 205 |
1 files changed, 205 insertions, 0 deletions
diff --git a/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-onlylist@waka.txt b/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-onlylist@waka.txt new file mode 100644 index 000000000..08eda7a63 --- /dev/null +++ b/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-onlylist@waka.txt @@ -0,0 +1,205 @@ +(module + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (import "env" "import" (func $import)) + (import "env" "import2" (func $import2 (result i32))) + (import "env" "import3" (func $import3 (param i32))) + (memory $0 1 2) + (table $0 2 2 funcref) + (elem (i32.const 0) $calls-import2-drop $calls-import2-drop) + (global $__asyncify_state (mut i32) (i32.const 0)) + (global $__asyncify_data (mut i32) (i32.const 0)) + (export "asyncify_start_unwind" (func $asyncify_start_unwind)) + (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) + (export "asyncify_start_rewind" (func $asyncify_start_rewind)) + (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) + (export "asyncify_get_state" (func $asyncify_get_state)) + (func $calls-import + (local $0 i32) + (local.set $0 + (global.get $__asyncify_state) + ) + (block + (call $import) + (if + (i32.ne + (global.get $__asyncify_state) + (local.get $0) + ) + (unreachable) + ) + ) + ) + (func $calls-import2-drop + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local.set $1 + (global.get $__asyncify_state) + ) + (block + (local.set $0 + (block (result i32) + (local.set $2 + (call $import2) + ) + (if + (i32.ne + (global.get $__asyncify_state) + (local.get $1) + ) + (unreachable) + ) + (local.get $2) + ) + ) + (drop + (local.get $0) + ) + ) + ) + (func $returns (result i32) + (local $x i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $5 + (global.get $__asyncify_state) + ) + (block + (block + (local.set $1 + (block (result i32) + (local.set $6 + (call $import2) + ) + (if + (i32.ne + (global.get $__asyncify_state) + (local.get $5) + ) + (unreachable) + ) + (local.get $6) + ) + ) + (local.set $x + (local.get $1) + ) + (local.set $2 + (local.get $x) + ) + (local.set $3 + (local.get $2) + ) + ) + (local.set $4 + (local.get $3) + ) + (return + (local.get $4) + ) + ) + ) + (func $calls-indirect (param $x i32) + (local $1 i32) + (local $2 i32) + (local.set $2 + (global.get $__asyncify_state) + ) + (block + (local.set $1 + (local.get $x) + ) + (block + (call_indirect (type $none_=>_none) + (local.get $1) + ) + (if + (i32.ne + (global.get $__asyncify_state) + (local.get $2) + ) + (unreachable) + ) + ) + ) + ) + (func $asyncify_start_unwind (param $0 i32) + (global.set $__asyncify_state + (i32.const 1) + ) + (global.set $__asyncify_data + (local.get $0) + ) + (if + (i32.gt_u + (i32.load + (global.get $__asyncify_data) + ) + (i32.load offset=4 + (global.get $__asyncify_data) + ) + ) + (unreachable) + ) + ) + (func $asyncify_stop_unwind + (global.set $__asyncify_state + (i32.const 0) + ) + (if + (i32.gt_u + (i32.load + (global.get $__asyncify_data) + ) + (i32.load offset=4 + (global.get $__asyncify_data) + ) + ) + (unreachable) + ) + ) + (func $asyncify_start_rewind (param $0 i32) + (global.set $__asyncify_state + (i32.const 2) + ) + (global.set $__asyncify_data + (local.get $0) + ) + (if + (i32.gt_u + (i32.load + (global.get $__asyncify_data) + ) + (i32.load offset=4 + (global.get $__asyncify_data) + ) + ) + (unreachable) + ) + ) + (func $asyncify_stop_rewind + (global.set $__asyncify_state + (i32.const 0) + ) + (if + (i32.gt_u + (i32.load + (global.get $__asyncify_data) + ) + (i32.load offset=4 + (global.get $__asyncify_data) + ) + ) + (unreachable) + ) + ) + (func $asyncify_get_state (result i32) + (global.get $__asyncify_state) + ) +) |