diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-11-07 22:30:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-07 22:30:18 -0800 |
commit | 4ad7a2cfd0b3ac14fbe767d50e4994f8297d37f6 (patch) | |
tree | 7ddc2211e1bace767dfce94f9622db9629e46c6d /test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_enable-exception-handling.txt | |
parent | 42f70a7c8608f5fc85b2676fda29b8405459ebdf (diff) | |
download | binaryen-4ad7a2cfd0b3ac14fbe767d50e4994f8297d37f6.tar.gz binaryen-4ad7a2cfd0b3ac14fbe767d50e4994f8297d37f6.tar.bz2 binaryen-4ad7a2cfd0b3ac14fbe767d50e4994f8297d37f6.zip |
Add Stack IR optimization support for EH (#2425)
Diffstat (limited to 'test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_enable-exception-handling.txt')
-rw-r--r-- | test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_enable-exception-handling.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_enable-exception-handling.txt b/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_enable-exception-handling.txt new file mode 100644 index 000000000..2a9cf6be7 --- /dev/null +++ b/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_enable-exception-handling.txt @@ -0,0 +1,47 @@ +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (event $e0 (attr 0) (param i32)) + (func $eh (; 0 ;) (type $FUNCSIG$v) + (local $exn exnref) + try + i32.const 0 + throw $e0 + catch + local.set $exn + block $l0 (result i32) + local.get $exn + br_on_exn $l0 $e0 + rethrow + end + drop + end + ) +) +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (event $e0 (attr 0) (param i32)) + (func $eh (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (local $exn exnref) + (try + (throw $e0 + (i32.const 0) + ) + (catch + (local.set $exn + (exnref.pop) + ) + (drop + (block $l0 (result i32) + (rethrow + (br_on_exn $l0 $e0 + (local.get $exn) + ) + ) + ) + ) + ) + ) + ) +) |