diff options
Diffstat (limited to 'test/passes/inlining_all-features.wast')
-rw-r--r-- | test/passes/inlining_all-features.wast | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/test/passes/inlining_all-features.wast b/test/passes/inlining_all-features.wast index 352978eda..47ac3ddb9 100644 --- a/test/passes/inlining_all-features.wast +++ b/test/passes/inlining_all-features.wast @@ -1,10 +1,38 @@ (module - (export "test" (func $test)) + (export "ref_func_test" (func $ref_func_test)) ;; $foo should not be removed after being inlined, because there is 'ref.func' ;; instruction that refers to it (func $foo) - (func $test (result funcref) + (func $ref_func_test (result funcref) (call $foo) (ref.func $foo) ) + + ;; Tests if UniqueNameMapper works correctly for br_on_exn labels. + ;; We have $l in br_on_exns in both $func_inner and $br_on_name_uniquify_test, + ;; which should become unique names respectively after inlining. + (event $e (attr 0) (param i32)) + (func $func_inner + (local $exn exnref) + (drop + (block $l (result i32) + (drop + (br_on_exn $l $e (local.get $exn)) + ) + (i32.const 0) + ) + ) + ) + (func $br_on_exn_name_uniquify_test + (local $exn exnref) + (drop + (block $l (result i32) + (call $func_inner) + (drop + (br_on_exn $l $e (local.get $exn)) + ) + (i32.const 0) + ) + ) + ) ) |