diff options
author | Heejin Ahn <aheejin@gmail.com> | 2021-01-21 21:10:43 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-21 21:10:43 +0900 |
commit | b77d0af3fc369dd78f51d61d0499571a74366762 (patch) | |
tree | 7f1c47b0d41a6c3190ba6aee0ec398f3c1370b86 /scripts/fuzz_opt.py | |
parent | 85cfc36f0fccdf700045caa15218cef6cbc3e267 (diff) | |
download | binaryen-b77d0af3fc369dd78f51d61d0499571a74366762.tar.gz binaryen-b77d0af3fc369dd78f51d61d0499571a74366762.tar.bz2 binaryen-b77d0af3fc369dd78f51d61d0499571a74366762.zip |
CFG traversal for the new EH spec (#3494)
This updates CFG traversal to match the new spec. Previously there was
only a single `catch` block that caught all exceptions, so all throwing
instructions needed to have a link to its innermost catch BB. But now we
can have multiple catches per try, requiring all throwing instrutions to
have an edge to all of those innermost catch BBs. Furthermore, if there
are only `catch`es and not a `catch_all` in a try, throwing instructions
can further unwind to outer catches until they find a `catch_all`.
`unwindCatchStack` and `unwindExprStack` are necessary to track and make
correct links between throwing instructions and their unwind destination
BBs.
`processCatchStack` is used to remember the catch BBs currently being
processed, so that after processing all of them, we can make a link from
each of those catch's last block to the continuation block after the
try-catch.
RSE test cases are updated because they use the CFG traversal. The tests
there mainly test that if all possible CFG edge to a `local.set` sets
the same value to a local, the `local.set` is redundant and thus can be
removed.
Diffstat (limited to 'scripts/fuzz_opt.py')
0 files changed, 0 insertions, 0 deletions