From 6a9aceaae7480aa9034243614600634beb350316 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 13 Sep 2019 16:51:50 -0700 Subject: 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 --- ...y-asserts_pass-arg=asyncify-whitelist@waka.wast | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.wast (limited to 'test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.wast') 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) + ) + ) +) + -- cgit v1.2.3