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)))
|
2018-02-04 07:51:40 +01:00
|
|
|
(global $class/Animal.ONE (mut i32) (i32.const 1))
|
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")
|
2017-12-15 02:50:55 +01:00
|
|
|
(export "memory" (memory $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-09-13 23:10:49 +02:00
|
|
|
(func $class/Animal.add (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.add
|
|
|
|
(get_global $class/Animal.ONE)
|
2018-09-13 23:10:49 +02:00
|
|
|
(i32.const 3)
|
2018-02-04 07:51:40 +01:00
|
|
|
)
|
|
|
|
)
|
2018-09-13 23:10:49 +02:00
|
|
|
(func $class/Animal.sub<f32> (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$f) (result f32)
|
2018-02-04 07:51:40 +01:00
|
|
|
(f32.add
|
2018-09-13 23:10:49 +02:00
|
|
|
(f32.const -1)
|
2018-02-04 07:51:40 +01:00
|
|
|
(f32.convert_s/i32
|
|
|
|
(get_global $class/Animal.ONE)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-09-13 23:10:49 +02:00
|
|
|
(func $class/test (; 2 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
|
2018-02-04 07:51:40 +01:00
|
|
|
(drop
|
2018-09-13 23:10:49 +02:00
|
|
|
(call $class/Animal.add)
|
2018-02-04 07:51:40 +01:00
|
|
|
)
|
|
|
|
(drop
|
2018-09-13 23:10:49 +02:00
|
|
|
(call $class/Animal.sub<f32>)
|
2018-02-04 07:51:40 +01:00
|
|
|
)
|
2018-01-03 18:33:27 +01:00
|
|
|
(drop
|
|
|
|
(i32.load
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.load16_s offset=4
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.load8_s offset=6
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(i32.store
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(i32.store16 offset=4
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.store8 offset=6
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 3)
|
|
|
|
)
|
2018-01-02 05:02:05 +01:00
|
|
|
(get_local $0)
|
2017-12-15 02:50:55 +01:00
|
|
|
)
|
2018-09-13 23:10:49 +02:00
|
|
|
(func $start (; 3 ;) (; has Stack IR ;) (type $v)
|
2018-02-04 07:51:40 +01:00
|
|
|
(drop
|
2018-09-13 23:10:49 +02:00
|
|
|
(call $class/Animal.add)
|
2018-02-04 07:51:40 +01:00
|
|
|
)
|
|
|
|
(drop
|
2018-09-13 23:10:49 +02:00
|
|
|
(call $class/Animal.sub<f32>)
|
2018-02-04 07:51:40 +01:00
|
|
|
)
|
2017-12-15 02:50:55 +01:00
|
|
|
)
|
2018-09-17 01:48:35 +02:00
|
|
|
(func $null (; 4 ;) (; has Stack IR ;) (type $v)
|
|
|
|
(nop)
|
|
|
|
)
|
2017-12-15 02:50:55 +01:00
|
|
|
)
|