2017-12-15 02:50:55 +01:00
|
|
|
(module
|
2018-03-12 14:06:39 +01:00
|
|
|
(type $ii (func (param i32) (result i32)))
|
2017-12-15 02:50:55 +01:00
|
|
|
(type $v (func))
|
2018-09-13 23:10:49 +02:00
|
|
|
(type $FUNCSIG$i (func (result i32)))
|
|
|
|
(type $FUNCSIG$f (func (result f32)))
|
2017-12-15 02:50:55 +01:00
|
|
|
(memory $0 1)
|
2018-05-14 16:55:55 +02:00
|
|
|
(data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s")
|
2018-11-08 08:04:24 +01:00
|
|
|
(table $0 1 anyfunc)
|
2018-10-11 08:49:08 +02:00
|
|
|
(elem (i32.const 0) $null)
|
|
|
|
(global $class/Animal.ONE (mut i32) (i32.const 1))
|
2017-12-15 02:50:55 +01:00
|
|
|
(export "memory" (memory $0))
|
2018-10-11 08:49:08 +02:00
|
|
|
(export "table" (table $0))
|
2018-07-18 23:49:32 +02:00
|
|
|
(export "test" (func $class/test))
|
2017-12-15 02:50:55 +01:00
|
|
|
(start $start)
|
2018-11-08 08:04:24 +01:00
|
|
|
(func $class/Animal.add (; 0 ;) (type $FUNCSIG$i) (result i32)
|
|
|
|
get_global $class/Animal.ONE
|
|
|
|
i32.const 3
|
|
|
|
i32.add
|
2018-02-04 07:51:40 +01:00
|
|
|
)
|
2018-11-08 08:04:24 +01:00
|
|
|
(func $class/Animal.sub<f32> (; 1 ;) (type $FUNCSIG$f) (result f32)
|
|
|
|
f32.const -1
|
|
|
|
get_global $class/Animal.ONE
|
|
|
|
f32.convert_s/i32
|
|
|
|
f32.add
|
2018-02-04 07:51:40 +01:00
|
|
|
)
|
2018-11-08 08:04:24 +01:00
|
|
|
(func $class/test (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
|
|
|
call $class/Animal.add
|
|
|
|
drop
|
|
|
|
call $class/Animal.sub<f32>
|
|
|
|
drop
|
|
|
|
get_local $0
|
|
|
|
i32.load
|
|
|
|
drop
|
|
|
|
get_local $0
|
|
|
|
i32.load16_s offset=4
|
|
|
|
drop
|
|
|
|
get_local $0
|
|
|
|
i32.load8_s offset=6
|
|
|
|
drop
|
|
|
|
get_local $0
|
|
|
|
i32.const 1
|
|
|
|
i32.store
|
|
|
|
get_local $0
|
|
|
|
i32.const 2
|
|
|
|
i32.store16 offset=4
|
|
|
|
get_local $0
|
|
|
|
i32.const 3
|
|
|
|
i32.store8 offset=6
|
|
|
|
get_local $0
|
2017-12-15 02:50:55 +01:00
|
|
|
)
|
2018-11-08 08:04:24 +01:00
|
|
|
(func $start (; 3 ;) (type $v)
|
|
|
|
call $class/Animal.add
|
|
|
|
drop
|
|
|
|
call $class/Animal.sub<f32>
|
|
|
|
drop
|
2017-12-15 02:50:55 +01:00
|
|
|
)
|
2018-11-08 08:04:24 +01:00
|
|
|
(func $null (; 4 ;) (type $v)
|
|
|
|
nop
|
2018-09-17 01:48:35 +02:00
|
|
|
)
|
2017-12-15 02:50:55 +01:00
|
|
|
)
|