mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 22:05:33 +00:00
27 lines
715 B
Plaintext
27 lines
715 B
Plaintext
(module
|
|
(global $g1 (mut i32) (i32.const 0))
|
|
(global $g2 (mut i32) (i32.const 99))
|
|
(func $main (export "main")
|
|
(if (i32.eq (get_global $g1) (i32.const 0))
|
|
(then)
|
|
(else unreachable)
|
|
)
|
|
(if (i32.eq (get_global $g2) (i32.const 99))
|
|
(then)
|
|
(else unreachable)
|
|
)
|
|
|
|
(set_global $g1 (i32.add (get_global $g1) (i32.const 1)))
|
|
(set_global $g2 (i32.sub (get_global $g2) (i32.const 1)))
|
|
|
|
(if (i32.eq (get_global $g1) (i32.const 1))
|
|
(then)
|
|
(else unreachable)
|
|
)
|
|
(if (i32.eq (get_global $g2) (i32.const 98))
|
|
(then)
|
|
(else unreachable)
|
|
)
|
|
)
|
|
)
|