| ;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited. |
| |
| ;; RUN: foreach %s %t wasm-opt -all --fuzz-exec-before -q -o /dev/null 2>&1 | filecheck %s |
| |
| (module |
| (import "fuzzing-support" "log-i32" (func $log-i32 (param i32))) |
| (import "fuzzing-support" "log-f64" (func $log-f64 (param f64))) |
| |
| (rec |
| (type $F1 (func (param i32 f64))) |
| (type $F2 (func (param f64))) |
| (type $F3 (func)) |
| |
| (type $C1 (cont $F1)) |
| (type $C2 (cont $F2)) |
| (type $C3 (cont $F3)) |
| ) |
| |
| (func $f1 (type $F1) (param $x i32) (param $y f64) |
| (call $log-i32 |
| (local.get $x) |
| ) |
| (call $log-f64 |
| (local.get $y) |
| ) |
| ) |
| |
| ;; CHECK: [fuzz-exec] calling bindings |
| ;; CHECK-NEXT: [LoggingExternalInterface logging 42] |
| ;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159] |
| (func $bindings (export "bindings") |
| ;; Start with an $F1 with two params, then bind each param in successive |
| ;; operations. |
| (resume $C3 |
| (cont.bind $C2 $C3 |
| (f64.const 3.14159) |
| (cont.bind $C1 $C2 |
| (i32.const 42) |
| (cont.new $C1 |
| (ref.func $f1) |
| ) |
| ) |
| ) |
| ) |
| ) |
| ) |
| |