2018-01-18 23:34:12 +01:00
|
|
|
(module
|
2018-02-14 19:21:31 +01:00
|
|
|
(type $iv (func (param i32)))
|
2018-01-18 23:34:12 +01:00
|
|
|
(type $v (func))
|
2018-06-28 01:44:32 +02:00
|
|
|
(memory $0 0)
|
2018-01-18 23:34:12 +01:00
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
2018-08-02 18:23:02 +02:00
|
|
|
(func $scoped/fn (; 0 ;) (; has Stack IR ;) (type $iv) (param $0 i32)
|
2018-02-14 19:21:31 +01:00
|
|
|
(nop)
|
|
|
|
)
|
2018-08-02 18:23:02 +02:00
|
|
|
(func $start (; 1 ;) (; has Stack IR ;) (type $v)
|
2018-01-18 23:34:12 +01:00
|
|
|
(local $0 i32)
|
2018-05-23 11:32:12 +02:00
|
|
|
(block $break|0
|
2018-05-25 15:59:17 +02:00
|
|
|
(loop $repeat|0
|
2018-05-23 11:32:12 +02:00
|
|
|
(br_if $break|0
|
|
|
|
(i32.ge_s
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
)
|
2018-05-23 11:32:12 +02:00
|
|
|
(set_local $0
|
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
2018-01-18 23:34:12 +01:00
|
|
|
)
|
|
|
|
)
|
2018-05-25 15:59:17 +02:00
|
|
|
(br $repeat|0)
|
2018-01-18 23:34:12 +01:00
|
|
|
)
|
|
|
|
)
|
2018-05-23 11:32:12 +02:00
|
|
|
(block $break|1
|
|
|
|
(set_local $0
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-05-25 15:59:17 +02:00
|
|
|
(loop $repeat|1
|
2018-05-23 11:32:12 +02:00
|
|
|
(br_if $break|1
|
|
|
|
(i32.ge_s
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
)
|
2018-05-23 11:32:12 +02:00
|
|
|
(set_local $0
|
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
2018-01-18 23:34:12 +01:00
|
|
|
)
|
|
|
|
)
|
2018-05-25 15:59:17 +02:00
|
|
|
(br $repeat|1)
|
2018-01-18 23:34:12 +01:00
|
|
|
)
|
|
|
|
)
|
2018-02-14 19:21:31 +01:00
|
|
|
(call $scoped/fn
|
|
|
|
(i32.const 42)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
)
|
|
|
|
)
|