summaryrefslogtreecommitdiff
path: root/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.wast
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-09-13 16:51:50 -0700
committerGitHub <noreply@github.com>2019-09-13 16:51:50 -0700
commit6a9aceaae7480aa9034243614600634beb350316 (patch)
tree4227dc8afdeada8f5cdf7eea8354a26fe73f87a4 /test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.wast
parent19bc69abe34d61771cffd0171a57dc027086f541 (diff)
downloadbinaryen-6a9aceaae7480aa9034243614600634beb350316.tar.gz
binaryen-6a9aceaae7480aa9034243614600634beb350316.tar.bz2
binaryen-6a9aceaae7480aa9034243614600634beb350316.zip
Add asserts in Asyncify (#2338)
With the optional asserts, we throw if we see an unwind begin in code that we thought could never unwind (say, because the user incorrectly blacklisted it). Helps with emscripten-core/emscripten#9389
Diffstat (limited to 'test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.wast')
-rw-r--r--test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.wast25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.wast b/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.wast
new file mode 100644
index 000000000..7d67c89ed
--- /dev/null
+++ b/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.wast
@@ -0,0 +1,25 @@
+(module
+ (memory 1 2)
+ (type $f (func))
+ (import "env" "import" (func $import))
+ (import "env" "import2" (func $import2 (result i32)))
+ (import "env" "import3" (func $import3 (param i32)))
+ (table 1 1)
+ (func $calls-import
+ (call $import)
+ )
+ (func $calls-import2-drop
+ (drop (call $import2))
+ )
+ (func $returns (result i32)
+ (local $x i32)
+ (local.set $x (call $import2))
+ (local.get $x)
+ )
+ (func $calls-indirect (param $x i32)
+ (call_indirect (type $f)
+ (local.get $x)
+ )
+ )
+)
+