diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/inlining.txt | 31 | ||||
-rw-r--r-- | test/passes/inlining.wast | 29 |
2 files changed, 60 insertions, 0 deletions
diff --git a/test/passes/inlining.txt b/test/passes/inlining.txt index 3fd4e025b..67604971d 100644 --- a/test/passes/inlining.txt +++ b/test/passes/inlining.txt @@ -218,3 +218,34 @@ ) ) ) +(module + (type $T (func (param i32))) + (type $1 (func)) + (table 10 anyfunc) + (memory $0 0) + (func $0 (; 0 ;) (type $1) + (block $__inlined_func$1 + (call_indirect $T + (if (result i32) + (i32.const 0) + (unreachable) + (unreachable) + ) + (i32.const 1) + ) + ) + ) +) +(module + (type $0 (func)) + (memory $0 0) + (func $1 (; 0 ;) (type $0) + (block $__inlined_func$0 + (block $label$1 + (br_table $label$1 $label$1 + (i32.const 0) + ) + ) + ) + ) +) diff --git a/test/passes/inlining.wast b/test/passes/inlining.wast index 38370addf..f68fb6703 100644 --- a/test/passes/inlining.wast +++ b/test/passes/inlining.wast @@ -145,4 +145,33 @@ ) ) ) +(module + (type $T (func (param i32))) + (table 10 anyfunc) + (func $0 + (call $1) + ) + (func $1 + (call_indirect $T + (if (result i32) ;; if copy must preserve the forced type + (i32.const 0) + (unreachable) + (unreachable) + ) + (i32.const 1) + ) + ) +) +(module + (func $0 + (block $label$1 ;; copy this name + (br_table $label$1 $label$1 + (i32.const 0) + ) + ) + ) + (func $1 + (call $0) + ) +) |