blob: ae8abf7081b1ba9b0042de370dd90f8d5f956d8d [file] [log] [blame]
(module
(import "./sum.wasm" "sum" (func $sum (param i32 i32) (result i32)))
(import "./sum.wasm" "answer" (global i32))
(import "./sum.wasm" "answer1" (global f32))
(import "./sum.wasm" "answer2" (global f64))
(import "./sum.wasm" "answer3" (global f32))
(import "./sum.wasm" "answer4" (global f64))
(import "./sum.wasm" "table" (table $table 4 funcref))
(type $t0 (func (param i32) (result i32)))
(func $addOne (export "addOne") (type $t0) (param $p0 i32) (result i32)
i32.const 1
get_local $p0
call $sum)
(type $t1 (func (result i32)))
(func $getAnswer (export "getAnswer") (type $t1) (result i32)
get_global 0)
(type $t2 (func (result f32)))
(func $getAnswer1 (export "getAnswer1") (type $t2) (result f32)
get_global 1)
(type $t3 (func (result f64)))
(func $getAnswer2 (export "getAnswer2") (type $t3) (result f64)
get_global 2)
(func $getAnswer3 (export "getAnswer3") (type $t2) (result f32)
get_global 3)
(func $getAnswer4 (export "getAnswer4") (type $t3) (result f64)
get_global 4)
(export "table" (table $table))
(elem (i32.const 1) $addOne $getAnswer $getAnswer1))