interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / tools / omega_ref / stress.om

61 lines · 1497 bytes Raw Blame History
1note Emit a source that exceeds the old interpreter's source, function, name and block tables.
2note This generator is a test, not a production compiler or an expected compiler artifact.
3text comment "note padding to cross the former eight mebibyte source ceiling independently\n"
4text globalstart "global glob"
5text globalend " ulong 1\n"
6text functionstart "fn checkfun"
7text functionmiddle " to ulong\nret "
8text functionend "\nend\n"
9text mainstart "fn main to int\n"
10text namestart "value"
11text nameend " = ulong 0\n"
12text blockstart "if true\n"
13text blockend "end\n"
14text mainend "ret int sub checkfun1024 1024\nend\n"
15global digits uchar 32
16fn number n ulong to void
17x = n
18k = ulong 32
19while true
20k = sub k 1
21put digits k uchar add rem x 10 48
22x = div x 10
23if eq x 0
24break
25end
26end
27r = write 1 digits k sub 32 k
28end
29fn main to int
30for i ulong 120000
31r = write 1 comment 0 len comment
32end
33for i ulong 65
34r = write 1 globalstart 0 len globalstart
35number i
36r = write 1 globalend 0 len globalend
37end
38for i ulong 1025
39r = write 1 functionstart 0 len functionstart
40number i
41r = write 1 functionmiddle 0 len functionmiddle
42number i
43r = write 1 functionend 0 len functionend
44end
45r = write 1 mainstart 0 len mainstart
46if eq argcnt 2
47for i ulong 1100
48r = write 1 namestart 0 len namestart
49number i
50r = write 1 nameend 0 len nameend
51end
52end
53for i ulong 1100
54r = write 1 blockstart 0 len blockstart
55end
56for i ulong 1100
57r = write 1 blockend 0 len blockend
58end
59r = write 1 mainend 0 len mainend
60ret 0
61end