| 1 |
(module |
| 2 |
(type (;0;) (func)) |
| 3 |
(type (;1;) (func (result i32))) |
| 4 |
(memory (;0;) 0) |
| 5 |
(memory $m (;1;) 1 1) |
| 6 |
(memory $n (;2;) 1) |
| 7 |
(export "inc" (func $inc)) |
| 8 |
(export "get" (func $get)) |
| 9 |
(export "getn" (func $getn)) |
| 10 |
(start $main) |
| 11 |
(func $inc (;0;) (type 0) |
| 12 |
i32.const 0 |
| 13 |
i32.const 0 |
| 14 |
i32.load8_u $m |
| 15 |
i32.const 1 |
| 16 |
i32.add |
| 17 |
i32.store8 $m |
| 18 |
) |
| 19 |
(func $get (;1;) (type 1) (result i32) |
| 20 |
i32.const 0 |
| 21 |
i32.load8_u $m |
| 22 |
return |
| 23 |
) |
| 24 |
(func $getn (;2;) (type 1) (result i32) |
| 25 |
i32.const 0 |
| 26 |
i32.load8_u $n |
| 27 |
return |
| 28 |
) |
| 29 |
(func $main (;3;) (type 0) |
| 30 |
call $inc |
| 31 |
call $inc |
| 32 |
call $inc |
| 33 |
) |
| 34 |
(data (;0;) (memory $m) (i32.const 0) "A") |
| 35 |
) |