mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
17 lines
478 B
Plaintext
17 lines
478 B
Plaintext
|
(module
|
||
|
(func $main (export "main") (result i32)
|
||
|
(local $count i32)
|
||
|
(local $sum i32)
|
||
|
(loop (result i32)
|
||
|
(set_local $count (i32.add (get_local $count) (i32.const 1)))
|
||
|
(set_local $sum (i32.add (get_local $sum) (get_local $count)))
|
||
|
(i32.sub (i32.const 1) (i32.eq
|
||
|
(get_local $count)
|
||
|
(i32.const 100000)
|
||
|
))
|
||
|
(br_if 0)
|
||
|
(get_local $sum)
|
||
|
)
|
||
|
)
|
||
|
)
|