omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / seed / omc / om2 / s5 / scrub-lateglob.om
| 1 | note S5 scrub and a global declared after a function that scrubs: that function is compiled before the |
| 2 | note global exists, so the global must not take a pinned register its scrub would clear and not restore |
| 3 | note (omc 0d7f2f42 pinned it: the in-range read after the call trapped 3, exit 103). Exit 0 is the pass. |
| 4 | om2 |
| 5 | fn clean to ulong |
| 6 | k = scrub 64 |
| 7 | ret ulong k |
| 8 | end |
| 9 | global g ulong 5000 |
| 10 | fn main to int |
| 11 | j = ulong 4999 |
| 12 | put g j 7 |
| 13 | k = clean |
| 14 | y = get g j |
| 15 | if ne y 7 |
| 16 | ret 2 |
| 17 | end |
| 18 | ret int k |
| 19 | end |