assemblyscript/tests/compiler/while.optimized.wast

54 lines
922 B
Plaintext
Raw Normal View History

2017-12-04 16:26:34 +01:00
(module
(type $iv (func (param i32)))
(memory $0 1)
(export "loopWhile" (func $while/loopWhile))
(export "loopWhileInWhile" (func $while/loopWhileInWhile))
(export "memory" (memory $0))
(func $while/loopWhile (; 0 ;) (type $iv) (param $0 i32)
2017-12-08 16:11:58 +01:00
(loop $continue|0
2017-12-04 16:26:34 +01:00
(if
(get_local $0)
2017-12-04 16:26:34 +01:00
(block
(set_local $0
(i32.sub
(get_local $0)
(i32.const 1)
2017-12-04 16:26:34 +01:00
)
)
2017-12-08 16:11:58 +01:00
(br $continue|0)
2017-12-04 16:26:34 +01:00
)
)
)
)
(func $while/loopWhileInWhile (; 1 ;) (type $iv) (param $0 i32)
2017-12-08 16:11:58 +01:00
(loop $continue|0
2017-12-04 16:26:34 +01:00
(if
(get_local $0)
2017-12-04 16:26:34 +01:00
(block
(set_local $0
(i32.sub
(get_local $0)
(i32.const 1)
2017-12-04 16:26:34 +01:00
)
)
2017-12-08 16:11:58 +01:00
(loop $continue|1
2017-12-04 16:26:34 +01:00
(if
(get_local $0)
2017-12-04 16:26:34 +01:00
(block
(set_local $0
(i32.sub
(get_local $0)
(i32.const 1)
2017-12-04 16:26:34 +01:00
)
)
2017-12-08 16:11:58 +01:00
(br $continue|1)
2017-12-04 16:26:34 +01:00
)
)
)
2017-12-08 16:11:58 +01:00
(br $continue|0)
2017-12-04 16:26:34 +01:00
)
)
)
)
)