| ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. |
| ;; RUN: wasm-opt %s --jspi --pass-arg=jspi-split-module -all -S -o - | filecheck %s |
| |
| ;; The following should be generated besides the usual JSPI wasm: |
| ;; - function import |
| ;; - JSPI'ed version of the import |
| ;; - export of the above |
| (module) |
| ;; CHECK: (type $0 (func)) |
| |
| ;; CHECK: (type $1 (func (param externref))) |
| |
| ;; CHECK: (import "env" "__load_secondary_module" (func $import$__load_secondary_module (type $1) (param externref))) |
| |
| ;; CHECK: (global $suspender (mut externref) (ref.null noextern)) |
| |
| ;; CHECK: (export "__load_secondary_module" (func $__load_secondary_module)) |
| |
| ;; CHECK: (func $__load_secondary_module (type $0) |
| ;; CHECK-NEXT: (local $0 externref) |
| ;; CHECK-NEXT: (local.set $0 |
| ;; CHECK-NEXT: (global.get $suspender) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: (call $import$__load_secondary_module |
| ;; CHECK-NEXT: (global.get $suspender) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: (global.set $suspender |
| ;; CHECK-NEXT: (local.get $0) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: ) |