| ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. |
| |
| ;; RUN: wasm-split -all -g --multi-split %s --manifest %s.manifest --out-prefix=%t -o %t.wasm |
| ;; RUN: wasm-dis %t.wasm | filecheck %s --check-prefix=PRIMARY |
| ;; RUN: wasm-dis %t1.wasm | filecheck %s --check-prefix=MOD1 |
| ;; RUN: wasm-dis %t2.wasm | filecheck %s --check-prefix=MOD2 |
| ;; RUN: wasm-dis %t3.wasm | filecheck %s --check-prefix=MOD3 |
| |
| (module |
| ;; PRIMARY: (type $ret-i64 (func (result i64))) |
| |
| ;; PRIMARY: (type $ret-f32 (func (result f32))) |
| |
| ;; PRIMARY: (type $ret-i32 (func (result i32))) |
| (type $ret-i32 (func (result i32))) |
| (type $ret-i64 (func (result i64))) |
| (type $ret-f32 (func (result f32))) |
| |
| ;; MOD1: (type $0 (func (result f32))) |
| |
| ;; MOD1: (type $1 (func (result i64))) |
| |
| ;; MOD1: (type $2 (func (result i32))) |
| |
| ;; MOD1: (import "primary" "table" (table $timport$0 3 funcref)) |
| |
| ;; MOD1: (import "primary" "trampoline_std::operator<<\\28std::__2::basic_ostream<char\\2c\\20std::__2::char_traits<char>>&\\2c\\20wasm::Module&\\29" (func $trampoline_std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29 (exact (result f32)))) |
| |
| ;; MOD1: (import "primary" "trampoline_wasm::Literal::Literal\\28std::__2::array<wasm::Literal\\2c\\204ul>\\20const&\\29" (func $trampoline_wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29 (exact (result i64)))) |
| |
| ;; MOD1: (elem $0 (i32.const 2) $wasm::Type::getFeatures\28\29\20const) |
| |
| ;; MOD1: (func $wasm::Type::getFeatures\28\29\20const (result i32) |
| ;; MOD1-NEXT: (drop |
| ;; MOD1-NEXT: (call_ref $2 |
| ;; MOD1-NEXT: (ref.func $wasm::Type::getFeatures\28\29\20const) |
| ;; MOD1-NEXT: ) |
| ;; MOD1-NEXT: ) |
| ;; MOD1-NEXT: (drop |
| ;; MOD1-NEXT: (call_ref $1 |
| ;; MOD1-NEXT: (ref.func $trampoline_wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29) |
| ;; MOD1-NEXT: ) |
| ;; MOD1-NEXT: ) |
| ;; MOD1-NEXT: (drop |
| ;; MOD1-NEXT: (call_ref $0 |
| ;; MOD1-NEXT: (ref.func $trampoline_std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29) |
| ;; MOD1-NEXT: ) |
| ;; MOD1-NEXT: ) |
| ;; MOD1-NEXT: (i32.const 0) |
| ;; MOD1-NEXT: ) |
| (func $wasm::Type::getFeatures\28\29\20const (type $ret-i32) (result i32) |
| (drop |
| (call_ref $ret-i32 |
| (ref.func $wasm::Type::getFeatures\28\29\20const) |
| ) |
| ) |
| (drop |
| (call_ref $ret-i64 |
| (ref.func $wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29) |
| ) |
| ) |
| (drop |
| (call_ref $ret-f32 |
| (ref.func $std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29) |
| ) |
| ) |
| (i32.const 0) |
| ) |
| |
| ;; MOD2: (type $0 (func (result f32))) |
| |
| ;; MOD2: (type $1 (func (result i32))) |
| |
| ;; MOD2: (type $2 (func (result i64))) |
| |
| ;; MOD2: (import "primary" "table" (table $timport$0 3 funcref)) |
| |
| ;; MOD2: (import "primary" "trampoline_std::operator<<\\28std::__2::basic_ostream<char\\2c\\20std::__2::char_traits<char>>&\\2c\\20wasm::Module&\\29" (func $trampoline_std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29 (exact (result f32)))) |
| |
| ;; MOD2: (import "primary" "trampoline_wasm::Type::getFeatures\\28\\29\\20const" (func $trampoline_wasm::Type::getFeatures\28\29\20const (exact (result i32)))) |
| |
| ;; MOD2: (elem $0 (i32.const 0) $wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29) |
| |
| ;; MOD2: (func $wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29 (result i64) |
| ;; MOD2-NEXT: (drop |
| ;; MOD2-NEXT: (call_ref $1 |
| ;; MOD2-NEXT: (ref.func $trampoline_wasm::Type::getFeatures\28\29\20const) |
| ;; MOD2-NEXT: ) |
| ;; MOD2-NEXT: ) |
| ;; MOD2-NEXT: (drop |
| ;; MOD2-NEXT: (call_ref $2 |
| ;; MOD2-NEXT: (ref.func $wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29) |
| ;; MOD2-NEXT: ) |
| ;; MOD2-NEXT: ) |
| ;; MOD2-NEXT: (drop |
| ;; MOD2-NEXT: (call_ref $0 |
| ;; MOD2-NEXT: (ref.func $trampoline_std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29) |
| ;; MOD2-NEXT: ) |
| ;; MOD2-NEXT: ) |
| ;; MOD2-NEXT: (i64.const 0) |
| ;; MOD2-NEXT: ) |
| (func $wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29 (type $ret-i64) (result i64) |
| (drop |
| (call_ref $ret-i32 |
| (ref.func $wasm::Type::getFeatures\28\29\20const) |
| ) |
| ) |
| (drop |
| (call_ref $ret-i64 |
| (ref.func $wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29) |
| ) |
| ) |
| (drop |
| (call_ref $ret-f32 |
| (ref.func $std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29) |
| ) |
| ) |
| (i64.const 0) |
| ) |
| |
| ;; MOD3: (type $0 (func (result i64))) |
| |
| ;; MOD3: (type $1 (func (result i32))) |
| |
| ;; MOD3: (type $2 (func (result f32))) |
| |
| ;; MOD3: (import "primary" "table" (table $timport$0 3 funcref)) |
| |
| ;; MOD3: (import "primary" "trampoline_wasm::Literal::Literal\\28std::__2::array<wasm::Literal\\2c\\204ul>\\20const&\\29" (func $trampoline_wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29 (exact (result i64)))) |
| |
| ;; MOD3: (import "primary" "trampoline_wasm::Type::getFeatures\\28\\29\\20const" (func $trampoline_wasm::Type::getFeatures\28\29\20const (exact (result i32)))) |
| |
| ;; MOD3: (elem $0 (i32.const 1) $std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29) |
| |
| ;; MOD3: (func $std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29 (result f32) |
| ;; MOD3-NEXT: (drop |
| ;; MOD3-NEXT: (call_ref $1 |
| ;; MOD3-NEXT: (ref.func $trampoline_wasm::Type::getFeatures\28\29\20const) |
| ;; MOD3-NEXT: ) |
| ;; MOD3-NEXT: ) |
| ;; MOD3-NEXT: (drop |
| ;; MOD3-NEXT: (call_ref $0 |
| ;; MOD3-NEXT: (ref.func $trampoline_wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29) |
| ;; MOD3-NEXT: ) |
| ;; MOD3-NEXT: ) |
| ;; MOD3-NEXT: (drop |
| ;; MOD3-NEXT: (call_ref $2 |
| ;; MOD3-NEXT: (ref.func $std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29) |
| ;; MOD3-NEXT: ) |
| ;; MOD3-NEXT: ) |
| ;; MOD3-NEXT: (f32.const 0) |
| ;; MOD3-NEXT: ) |
| (func $std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29 (type $ret-f32) (result f32) |
| (drop |
| (call_ref $ret-i32 |
| (ref.func $wasm::Type::getFeatures\28\29\20const) |
| ) |
| ) |
| (drop |
| (call_ref $ret-i64 |
| (ref.func $wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29) |
| ) |
| ) |
| (drop |
| (call_ref $ret-f32 |
| (ref.func $std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29) |
| ) |
| ) |
| (f32.const 0) |
| ) |
| ) |
| ;; PRIMARY: (import "placeholder.2" "0" (func $placeholder_0 (result i64))) |
| |
| ;; PRIMARY: (import "placeholder.3" "1" (func $placeholder_1 (result f32))) |
| |
| ;; PRIMARY: (import "placeholder.1" "2" (func $placeholder_2 (result i32))) |
| |
| ;; PRIMARY: (table $0 3 funcref) |
| |
| ;; PRIMARY: (elem $0 (i32.const 0) $placeholder_0 $placeholder_1 $placeholder_2) |
| |
| ;; PRIMARY: (export "trampoline_std::operator<<\\28std::__2::basic_ostream<char\\2c\\20std::__2::char_traits<char>>&\\2c\\20wasm::Module&\\29" (func $trampoline_std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29)) |
| |
| ;; PRIMARY: (export "trampoline_wasm::Literal::Literal\\28std::__2::array<wasm::Literal\\2c\\204ul>\\20const&\\29" (func $trampoline_wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29)) |
| |
| ;; PRIMARY: (export "trampoline_wasm::Type::getFeatures\\28\\29\\20const" (func $trampoline_wasm::Type::getFeatures\28\29\20const)) |
| |
| ;; PRIMARY: (export "table" (table $0)) |
| |
| ;; PRIMARY: (func $trampoline_wasm::Literal::Literal\28std::__2::array<wasm::Literal\2c\204ul>\20const&\29 (result i64) |
| ;; PRIMARY-NEXT: (call_indirect (type $ret-i64) |
| ;; PRIMARY-NEXT: (i32.const 0) |
| ;; PRIMARY-NEXT: ) |
| ;; PRIMARY-NEXT: ) |
| |
| ;; PRIMARY: (func $trampoline_std::operator<<\28std::__2::basic_ostream<char\2c\20std::__2::char_traits<char>>&\2c\20wasm::Module&\29 (result f32) |
| ;; PRIMARY-NEXT: (call_indirect (type $ret-f32) |
| ;; PRIMARY-NEXT: (i32.const 1) |
| ;; PRIMARY-NEXT: ) |
| ;; PRIMARY-NEXT: ) |
| |
| ;; PRIMARY: (func $trampoline_wasm::Type::getFeatures\28\29\20const (result i32) |
| ;; PRIMARY-NEXT: (call_indirect (type $ret-i32) |
| ;; PRIMARY-NEXT: (i32.const 2) |
| ;; PRIMARY-NEXT: ) |
| ;; PRIMARY-NEXT: ) |