summaryrefslogtreecommitdiff
path: root/test/passes
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes')
-rw-r--r--test/passes/bysyncify.txt138
-rw-r--r--test/passes/bysyncify_optimize-level=1.txt46
-rw-r--r--test/passes/bysyncify_pass-arg=bysyncify-ignore-imports.txt46
-rw-r--r--test/passes/bysyncify_pass-arg=bysyncify-ignore-indirect.txt46
-rw-r--r--test/passes/bysyncify_pass-arg=bysyncify-imports@env.import,env.import2.txt92
5 files changed, 272 insertions, 96 deletions
diff --git a/test/passes/bysyncify.txt b/test/passes/bysyncify.txt
index fbbc09d45..a9a780972 100644
--- a/test/passes/bysyncify.txt
+++ b/test/passes/bysyncify.txt
@@ -297,52 +297,74 @@
(nop)
)
(func $bysyncify_start_unwind (; 6 ;) (param $0 i32)
+ (global.set $__bysyncify_state
+ (i32.const 1)
+ )
+ (global.set $__bysyncify_data
+ (local.get $0)
+ )
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
- (global.set $__bysyncify_state
- (i32.const 1)
- )
- (global.set $__bysyncify_data
- (local.get $0)
- )
)
(func $bysyncify_stop_unwind (; 7 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
- )
- (func $bysyncify_start_rewind (; 8 ;) (param $0 i32)
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
+ )
+ (func $bysyncify_start_rewind (; 8 ;) (param $0 i32)
(global.set $__bysyncify_state
(i32.const 2)
)
(global.set $__bysyncify_data
(local.get $0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
(func $bysyncify_stop_rewind (; 9 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
)
(module
@@ -2808,52 +2830,74 @@
(nop)
)
(func $bysyncify_start_unwind (; 19 ;) (param $0 i32)
+ (global.set $__bysyncify_state
+ (i32.const 1)
+ )
+ (global.set $__bysyncify_data
+ (local.get $0)
+ )
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
- (global.set $__bysyncify_state
- (i32.const 1)
- )
- (global.set $__bysyncify_data
- (local.get $0)
- )
)
(func $bysyncify_stop_unwind (; 20 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
- )
- (func $bysyncify_start_rewind (; 21 ;) (param $0 i32)
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
+ )
+ (func $bysyncify_start_rewind (; 21 ;) (param $0 i32)
(global.set $__bysyncify_state
(i32.const 2)
)
(global.set $__bysyncify_data
(local.get $0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
(func $bysyncify_stop_rewind (; 22 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
)
(module
@@ -2865,51 +2909,73 @@
(export "bysyncify_start_rewind" (func $bysyncify_start_rewind))
(export "bysyncify_stop_rewind" (func $bysyncify_stop_rewind))
(func $bysyncify_start_unwind (; 0 ;) (param $0 i32)
+ (global.set $__bysyncify_state
+ (i32.const 1)
+ )
+ (global.set $__bysyncify_data
+ (local.get $0)
+ )
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
- (global.set $__bysyncify_state
- (i32.const 1)
- )
- (global.set $__bysyncify_data
- (local.get $0)
- )
)
(func $bysyncify_stop_unwind (; 1 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
- )
- (func $bysyncify_start_rewind (; 2 ;) (param $0 i32)
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
+ )
+ (func $bysyncify_start_rewind (; 2 ;) (param $0 i32)
(global.set $__bysyncify_state
(i32.const 2)
)
(global.set $__bysyncify_data
(local.get $0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
(func $bysyncify_stop_rewind (; 3 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
)
diff --git a/test/passes/bysyncify_optimize-level=1.txt b/test/passes/bysyncify_optimize-level=1.txt
index b09368ec4..7b1093964 100644
--- a/test/passes/bysyncify_optimize-level=1.txt
+++ b/test/passes/bysyncify_optimize-level=1.txt
@@ -1564,51 +1564,73 @@
)
)
(func $bysyncify_start_unwind (; 19 ;) (param $0 i32)
+ (global.set $__bysyncify_state
+ (i32.const 1)
+ )
+ (global.set $__bysyncify_data
+ (local.get $0)
+ )
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
- (global.set $__bysyncify_state
- (i32.const 1)
- )
- (global.set $__bysyncify_data
- (local.get $0)
- )
)
(func $bysyncify_stop_unwind (; 20 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
- )
- (func $bysyncify_start_rewind (; 21 ;) (param $0 i32)
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
+ )
+ (func $bysyncify_start_rewind (; 21 ;) (param $0 i32)
(global.set $__bysyncify_state
(i32.const 2)
)
(global.set $__bysyncify_data
(local.get $0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
(func $bysyncify_stop_rewind (; 22 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
)
diff --git a/test/passes/bysyncify_pass-arg=bysyncify-ignore-imports.txt b/test/passes/bysyncify_pass-arg=bysyncify-ignore-imports.txt
index 515fa365a..96133d648 100644
--- a/test/passes/bysyncify_pass-arg=bysyncify-ignore-imports.txt
+++ b/test/passes/bysyncify_pass-arg=bysyncify-ignore-imports.txt
@@ -211,51 +211,73 @@
)
)
(func $bysyncify_start_unwind (; 7 ;) (param $0 i32)
+ (global.set $__bysyncify_state
+ (i32.const 1)
+ )
+ (global.set $__bysyncify_data
+ (local.get $0)
+ )
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
- (global.set $__bysyncify_state
- (i32.const 1)
- )
- (global.set $__bysyncify_data
- (local.get $0)
- )
)
(func $bysyncify_stop_unwind (; 8 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
- )
- (func $bysyncify_start_rewind (; 9 ;) (param $0 i32)
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
+ )
+ (func $bysyncify_start_rewind (; 9 ;) (param $0 i32)
(global.set $__bysyncify_state
(i32.const 2)
)
(global.set $__bysyncify_data
(local.get $0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
(func $bysyncify_stop_rewind (; 10 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
)
diff --git a/test/passes/bysyncify_pass-arg=bysyncify-ignore-indirect.txt b/test/passes/bysyncify_pass-arg=bysyncify-ignore-indirect.txt
index 64e516cf8..846e05035 100644
--- a/test/passes/bysyncify_pass-arg=bysyncify-ignore-indirect.txt
+++ b/test/passes/bysyncify_pass-arg=bysyncify-ignore-indirect.txt
@@ -517,51 +517,73 @@
(nop)
)
(func $bysyncify_start_unwind (; 7 ;) (param $0 i32)
+ (global.set $__bysyncify_state
+ (i32.const 1)
+ )
+ (global.set $__bysyncify_data
+ (local.get $0)
+ )
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
- (global.set $__bysyncify_state
- (i32.const 1)
- )
- (global.set $__bysyncify_data
- (local.get $0)
- )
)
(func $bysyncify_stop_unwind (; 8 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
- )
- (func $bysyncify_start_rewind (; 9 ;) (param $0 i32)
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
+ )
+ (func $bysyncify_start_rewind (; 9 ;) (param $0 i32)
(global.set $__bysyncify_state
(i32.const 2)
)
(global.set $__bysyncify_data
(local.get $0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
(func $bysyncify_stop_rewind (; 10 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
)
diff --git a/test/passes/bysyncify_pass-arg=bysyncify-imports@env.import,env.import2.txt b/test/passes/bysyncify_pass-arg=bysyncify-imports@env.import,env.import2.txt
index b22e7d82a..02d353a7a 100644
--- a/test/passes/bysyncify_pass-arg=bysyncify-imports@env.import,env.import2.txt
+++ b/test/passes/bysyncify_pass-arg=bysyncify-imports@env.import,env.import2.txt
@@ -295,52 +295,74 @@
(nop)
)
(func $bysyncify_start_unwind (; 6 ;) (param $0 i32)
+ (global.set $__bysyncify_state
+ (i32.const 1)
+ )
+ (global.set $__bysyncify_data
+ (local.get $0)
+ )
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
- (global.set $__bysyncify_state
- (i32.const 1)
- )
- (global.set $__bysyncify_data
- (local.get $0)
- )
)
(func $bysyncify_stop_unwind (; 7 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
- )
- (func $bysyncify_start_rewind (; 8 ;) (param $0 i32)
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
+ )
+ (func $bysyncify_start_rewind (; 8 ;) (param $0 i32)
(global.set $__bysyncify_state
(i32.const 2)
)
(global.set $__bysyncify_data
(local.get $0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
(func $bysyncify_stop_rewind (; 9 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
)
(module
@@ -1961,51 +1983,73 @@
(nop)
)
(func $bysyncify_start_unwind (; 19 ;) (param $0 i32)
+ (global.set $__bysyncify_state
+ (i32.const 1)
+ )
+ (global.set $__bysyncify_data
+ (local.get $0)
+ )
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
- (global.set $__bysyncify_state
- (i32.const 1)
- )
- (global.set $__bysyncify_data
- (local.get $0)
- )
)
(func $bysyncify_stop_unwind (; 20 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
- )
- (func $bysyncify_start_rewind (; 21 ;) (param $0 i32)
(if
(i32.gt_u
(i32.load
- (local.get $0)
+ (global.get $__bysyncify_data)
)
(i32.load offset=4
- (local.get $0)
+ (global.get $__bysyncify_data)
)
)
(unreachable)
)
+ )
+ (func $bysyncify_start_rewind (; 21 ;) (param $0 i32)
(global.set $__bysyncify_state
(i32.const 2)
)
(global.set $__bysyncify_data
(local.get $0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
(func $bysyncify_stop_rewind (; 22 ;)
(global.set $__bysyncify_state
(i32.const 0)
)
+ (if
+ (i32.gt_u
+ (i32.load
+ (global.get $__bysyncify_data)
+ )
+ (i32.load offset=4
+ (global.get $__bysyncify_data)
+ )
+ )
+ (unreachable)
+ )
)
)