From beccdf70258cd99ea25f10af13103e14dc243ffa Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 15 Jan 2021 18:48:00 +0900 Subject: Basic EH instrucion support for the new spec (#3487) This updates `try`-`catch`-`catch_all` and `rethrow` instructions to match the new spec. `delegate` is not included. Now `Try` contains not a single `catchBody` expression but a vector of catch bodies and events. This updates most existing routines, optimizations, and tests modulo the interpreter and the CFG traversal. Because the interpreter has not been updated yet, the EH spec test is temporarily disabled in check.py. Also, because the CFG traversal for EH is not yet updated, several EH tests in `rse_all-features.wast`, which uses CFG traversal, are temporarily commented out. Also added a few more tests in existing EH test functions in test/passes. In the previous spec, `catch` was catching all exceptions so it was assumed that anything `try` body throws is caught by its `catch`, but now we can assume the same only if there is a `catch_all`. Newly added tests test cases when there is a `catch_all` and cases there are only `catch`es separately. --- test/binaryen.js/sideffects.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/binaryen.js/sideffects.js') diff --git a/test/binaryen.js/sideffects.js b/test/binaryen.js/sideffects.js index bfb5404c2..cb0e8ac7f 100644 --- a/test/binaryen.js/sideffects.js +++ b/test/binaryen.js/sideffects.js @@ -108,7 +108,7 @@ assert( assert( binaryen.getSideEffects( - module.drop(module.exnref.pop()), + module.drop(module.i32.pop()), module.getFeatures() ) == -- cgit v1.2.3