2017-12-02 01:14:15 +01:00
|
|
|
(module
|
|
|
|
(type $iii (func (param i32 i32) (result i32)))
|
|
|
|
(type $v (func))
|
2017-12-06 17:47:48 +01:00
|
|
|
(global $export/a i32 (i32.const 1))
|
|
|
|
(global $export/b i32 (i32.const 2))
|
2017-12-08 04:03:44 +01:00
|
|
|
(global $HEAP_START i32 (i32.const 4))
|
2017-12-02 01:14:15 +01:00
|
|
|
(memory $0 1)
|
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
|
|
|
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
|
|
|
(return
|
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
|
|
|
(return
|
|
|
|
(i32.sub
|
|
|
|
(get_local $0)
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-13 23:24:13 +01:00
|
|
|
(func $export/ns.two (; 2 ;) (type $v)
|
|
|
|
)
|
|
|
|
(func $start (; 3 ;) (type $v)
|
2017-12-02 01:14:15 +01:00
|
|
|
(drop
|
|
|
|
(i32.add
|
|
|
|
(call $export/add
|
2017-12-06 23:38:17 +01:00
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 2)
|
2017-12-02 01:14:15 +01:00
|
|
|
)
|
|
|
|
(call $export/sub
|
2017-12-06 23:38:17 +01:00
|
|
|
(i32.const 2)
|
|
|
|
(i32.const 1)
|
2017-12-02 01:14:15 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-13 23:24:13 +01:00
|
|
|
(call $export/ns.two)
|
2017-12-02 01:14:15 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(;
|
|
|
|
[program.elements]
|
2017-12-15 17:23:04 +01:00
|
|
|
isNaN
|
|
|
|
isFinite
|
2017-12-02 01:14:15 +01:00
|
|
|
clz
|
|
|
|
ctz
|
|
|
|
popcnt
|
|
|
|
rotl
|
|
|
|
rotr
|
|
|
|
abs
|
|
|
|
max
|
|
|
|
min
|
2017-12-15 17:23:04 +01:00
|
|
|
ceil
|
|
|
|
floor
|
|
|
|
copysign
|
2017-12-02 01:14:15 +01:00
|
|
|
nearest
|
2017-12-15 17:23:04 +01:00
|
|
|
reinterpret
|
2017-12-02 01:14:15 +01:00
|
|
|
sqrt
|
|
|
|
trunc
|
2017-12-04 22:47:08 +01:00
|
|
|
load
|
|
|
|
store
|
|
|
|
sizeof
|
2017-12-15 17:23:04 +01:00
|
|
|
select
|
|
|
|
unreachable
|
|
|
|
current_memory
|
|
|
|
grow_memory
|
2017-12-12 01:35:48 +01:00
|
|
|
parseInt
|
|
|
|
parseFloat
|
2017-12-15 17:23:04 +01:00
|
|
|
changetype
|
|
|
|
assert
|
2017-12-15 15:00:19 +01:00
|
|
|
i8
|
|
|
|
i16
|
|
|
|
i32
|
|
|
|
i64
|
|
|
|
u8
|
|
|
|
u16
|
|
|
|
u32
|
|
|
|
u64
|
|
|
|
bool
|
|
|
|
f32
|
|
|
|
f64
|
|
|
|
isize
|
|
|
|
usize
|
2017-12-02 01:14:15 +01:00
|
|
|
export/add
|
|
|
|
export/sub
|
|
|
|
export/a
|
|
|
|
export/b
|
2017-12-13 23:24:13 +01:00
|
|
|
export/ns
|
|
|
|
export/ns.one
|
|
|
|
export/ns.two
|
2017-12-02 01:14:15 +01:00
|
|
|
import/add
|
|
|
|
import/sub
|
|
|
|
import/a
|
|
|
|
import/b
|
2017-12-13 23:24:13 +01:00
|
|
|
import/renamed_ns
|
2017-12-02 01:14:15 +01:00
|
|
|
[program.exports]
|
|
|
|
export/add
|
|
|
|
export/renamed_sub
|
|
|
|
export/a
|
|
|
|
export/renamed_b
|
2017-12-13 23:24:13 +01:00
|
|
|
export/ns
|
2017-12-02 01:14:15 +01:00
|
|
|
;)
|