Compare commits
2810 Commits
v0.8.1
...
xgopilot/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3344f9de51 | ||
|
|
f8d7f1d931 | ||
|
|
c47d60d05c | ||
|
|
2d4d516687 | ||
|
|
05da9ec252 | ||
|
|
ebd041082b | ||
|
|
75e77caf29 | ||
|
|
0256ce2232 | ||
|
|
e46d22976a | ||
|
|
6507e3410c | ||
|
|
b2411a1750 | ||
|
|
902ac3b35a | ||
|
|
b62dafbc3a | ||
|
|
89e483b8ec | ||
|
|
18de107520 | ||
|
|
dee7b873a6 | ||
|
|
b3d123e235 | ||
|
|
670f880c78 | ||
|
|
0ee2530c2e | ||
|
|
85fd37e375 | ||
|
|
2b763b631f | ||
|
|
d864e3b685 | ||
|
|
5358d16eb7 | ||
|
|
dcf0898f3b | ||
|
|
05b382fe64 | ||
|
|
816854c9cc | ||
|
|
dba9bcc4e4 | ||
|
|
d2a22252c2 | ||
|
|
58352e3ee4 | ||
|
|
325e9a93b5 | ||
|
|
00dd09c7f4 | ||
|
|
1ed418e77e | ||
|
|
2110db7263 | ||
|
|
27efaa2eda | ||
|
|
355ff1009d | ||
|
|
e03f4dacfb | ||
|
|
75fa863da2 | ||
|
|
18ef7200bc | ||
|
|
bf05779f2f | ||
|
|
2b92b527e1 | ||
|
|
ed3176a6cc | ||
|
|
e5ebc32583 | ||
|
|
3ce198f103 | ||
|
|
e05c91530e | ||
|
|
8aadfde64a | ||
|
|
441b4b15a8 | ||
|
|
cf6cc937ef | ||
|
|
391e09a407 | ||
|
|
d6f45c67fb | ||
|
|
62198a59ba | ||
|
|
00d5aad528 | ||
|
|
72602d606d | ||
|
|
a99f3d9409 | ||
|
|
1edd4b863e | ||
|
|
c7e3408782 | ||
|
|
f65072d997 | ||
|
|
cadafde540 | ||
|
|
7e1abf1486 | ||
|
|
cf55925ff5 | ||
|
|
dba7bd498f | ||
|
|
8ce0574b9e | ||
|
|
dd4cf69e25 | ||
|
|
1ee4da9851 | ||
|
|
9e1b321ce6 | ||
|
|
b52caefebd | ||
|
|
0c63138ccd | ||
|
|
f40da557af | ||
|
|
0e28ac7ce4 | ||
|
|
4a6331c668 | ||
|
|
036bb858e2 | ||
|
|
5e86d1aee2 | ||
|
|
c4223df087 | ||
|
|
4cff9bb0a7 | ||
|
|
ccaf59ec62 | ||
|
|
087696e31b | ||
|
|
5592a8fc26 | ||
|
|
dc587f684d | ||
|
|
5e6501642d | ||
|
|
5f3c1e2de3 | ||
|
|
215bba2472 | ||
|
|
bcadacdf21 | ||
|
|
c24506b7e9 | ||
|
|
1811ca1220 | ||
|
|
f34ccc1b0c | ||
|
|
7180f20366 | ||
|
|
bb8e81fb9b | ||
|
|
21e7d62c7d | ||
|
|
35e9ffe31e | ||
|
|
62d0ee39de | ||
|
|
79f404ac88 | ||
|
|
8959c83397 | ||
|
|
67a3cb2e7e | ||
|
|
1195ce9b03 | ||
|
|
7323187f90 | ||
|
|
bbcbddfcad | ||
|
|
8fa3819714 | ||
|
|
c562f05b51 | ||
|
|
cc5c1144a7 | ||
|
|
db28648d29 | ||
|
|
03e617d902 | ||
|
|
e84f859d6c | ||
|
|
4b2e1e777c | ||
|
|
18e036568d | ||
|
|
e4f77f00a6 | ||
|
|
8bfe133bee | ||
|
|
897f944760 | ||
|
|
a202b484a9 | ||
|
|
17dfdd38c2 | ||
|
|
30a3e73d4f | ||
|
|
6170c1dcb9 | ||
|
|
cc65ee18b5 | ||
|
|
50d1d2e19a | ||
|
|
c3b674d804 | ||
|
|
3605eeeef7 | ||
|
|
729e5772a0 | ||
|
|
a2742a9de4 | ||
|
|
68947bfc1f | ||
|
|
e05c8b9f46 | ||
|
|
dc59333657 | ||
|
|
c50395b2b9 | ||
|
|
a1d7417684 | ||
|
|
0bbdb6c204 | ||
|
|
0ed3a54244 | ||
|
|
d5ad4d997d | ||
|
|
3cc8fd1c91 | ||
|
|
d0962d8adc | ||
|
|
d7b9968d9a | ||
|
|
b72311cd6d | ||
|
|
073e79d03b | ||
|
|
dd50d4dff0 | ||
|
|
b6d43ae88a | ||
|
|
89e93f9e7a | ||
|
|
0b6a558667 | ||
|
|
937f8339c7 | ||
|
|
a17f1f0bb0 | ||
|
|
8ce6c3b9ab | ||
|
|
d4474be921 | ||
|
|
6aa63121ff | ||
|
|
b239494a9f | ||
|
|
f573ebe40b | ||
|
|
95bd495d7b | ||
|
|
b1d95bb73c | ||
|
|
5dbf1a7561 | ||
|
|
0dbc686960 | ||
|
|
4e7526d68e | ||
|
|
fd17a43ade | ||
|
|
89af430329 | ||
|
|
64df39b3c5 | ||
|
|
e63ebb8151 | ||
|
|
7907e69719 | ||
|
|
849b23079b | ||
|
|
3be12dce44 | ||
|
|
f66bbb7fc3 | ||
|
|
9f48753203 | ||
|
|
e05f890b94 | ||
|
|
d0cf57fa95 | ||
|
|
92beb562bf | ||
|
|
6ce28e4d4e | ||
|
|
0340ef2a75 | ||
|
|
68623f0b27 | ||
|
|
13b5f39125 | ||
|
|
2a022be510 | ||
|
|
848432ea68 | ||
|
|
a19011897c | ||
|
|
9cea3226db | ||
|
|
bb89ef5c5d | ||
|
|
b39f0aa4bf | ||
|
|
1556b29e0a | ||
|
|
d46a3f2f49 | ||
|
|
7de4137d46 | ||
|
|
16b3473f52 | ||
|
|
1f7883654a | ||
|
|
fb94329c87 | ||
|
|
2f3c322076 | ||
|
|
922d174402 | ||
|
|
d9a20e8000 | ||
|
|
d2a021ceae | ||
|
|
66bf801fd6 | ||
|
|
20ce823b68 | ||
|
|
3ecf9b35f3 | ||
|
|
dba719a8d7 | ||
|
|
806b16c2c8 | ||
|
|
9eeb14ae31 | ||
|
|
df07513a37 | ||
|
|
16c8402065 | ||
|
|
c0afe199c2 | ||
|
|
1c2aea10f0 | ||
|
|
4e590d42be | ||
|
|
228d7cee31 | ||
|
|
c6676917b3 | ||
|
|
88e0844ada | ||
|
|
a2c9c7f10a | ||
|
|
9a5b231c88 | ||
|
|
519faabfe1 | ||
|
|
1a3bca40bc | ||
|
|
549beeb101 | ||
|
|
7cad146013 | ||
|
|
054591c279 | ||
|
|
da9865104f | ||
|
|
1033452e8f | ||
|
|
82ed8468e7 | ||
|
|
5e5d5c2a83 | ||
|
|
df8f67db5a | ||
|
|
e9170e4cef | ||
|
|
f41badde20 | ||
|
|
ac753070fa | ||
|
|
e6768584d7 | ||
|
|
7ca8abc788 | ||
|
|
e444c4b6ac | ||
|
|
0d02a7273e | ||
|
|
0c418073b3 | ||
|
|
2d1120bf69 | ||
|
|
22c26c1aaa | ||
|
|
c97d541936 | ||
|
|
f6bb1d9922 | ||
|
|
7ae6686f6b | ||
|
|
5a602830a6 | ||
|
|
00dbc91745 | ||
|
|
1684512308 | ||
|
|
40b142f947 | ||
|
|
e5c86fe936 | ||
|
|
9d7664373e | ||
|
|
825f0bd83f | ||
|
|
bedb454427 | ||
|
|
a9f74b7e55 | ||
|
|
002a68009e | ||
|
|
23b5e77dcc | ||
|
|
b8b0ae00d0 | ||
|
|
b58cce09ab | ||
|
|
a1f9afc88f | ||
|
|
6ba182afc7 | ||
|
|
da319e2a7c | ||
|
|
5e32a15146 | ||
|
|
07d69295b9 | ||
|
|
740a260708 | ||
|
|
96cd52dccc | ||
|
|
8650952145 | ||
|
|
58e5f5e4a1 | ||
|
|
7c792e8ca6 | ||
|
|
d3ded9f861 | ||
|
|
7f05aa54c2 | ||
|
|
77a7d9e549 | ||
|
|
0ff2d5d931 | ||
|
|
62fc21e22b | ||
|
|
6588f36123 | ||
|
|
977806affc | ||
|
|
dd3c1f923d | ||
|
|
1bd9ceb444 | ||
|
|
5a4c83ef85 | ||
|
|
82bb6e84d0 | ||
|
|
b99c073cca | ||
|
|
4b383b179a | ||
|
|
a8bc617e18 | ||
|
|
656a2a43b5 | ||
|
|
7e01f69d7e | ||
|
|
f875347ad9 | ||
|
|
1d3ecb287a | ||
|
|
0cac1c8a9d | ||
|
|
cb2fa5dd2d | ||
|
|
5997a296c2 | ||
|
|
96c5ce90e4 | ||
|
|
8ecbfe9ade | ||
|
|
012a5d7d69 | ||
|
|
997ea2849b | ||
|
|
1b3889ebc9 | ||
|
|
53e22488c8 | ||
|
|
19ddee0241 | ||
|
|
61143a6ff0 | ||
|
|
3f2fe83718 | ||
|
|
4639ee13e7 | ||
|
|
5810b29372 | ||
|
|
f3ecce86ee | ||
|
|
2160710884 | ||
|
|
71353baf59 | ||
|
|
6144987f06 | ||
|
|
b68686e542 | ||
|
|
0935d10edf | ||
|
|
fdc7d53904 | ||
|
|
69fe6d6377 | ||
|
|
cf2d1ef9ca | ||
|
|
ab57a13eb1 | ||
|
|
5587fd2885 | ||
|
|
f361d195f0 | ||
|
|
11e1348a2c | ||
|
|
ca30338066 | ||
|
|
e4218f90d7 | ||
|
|
3bfedb2588 | ||
|
|
d87deebbef | ||
|
|
76e4f4ab92 | ||
|
|
ddc61adc63 | ||
|
|
96001ce9b1 | ||
|
|
4a02b1f23b | ||
|
|
e40bdc196b | ||
|
|
508b23a584 | ||
|
|
b7181592a9 | ||
|
|
59e1df5478 | ||
|
|
ecaf7c8ac6 | ||
|
|
cd69092a60 | ||
|
|
f3de14da4b | ||
|
|
49b9b92790 | ||
|
|
1f193c8533 | ||
|
|
3ce63965bf | ||
|
|
50d8dbee05 | ||
|
|
c8eb871252 | ||
|
|
ad8aa6ac1a | ||
|
|
d3d39876d3 | ||
|
|
44cb4f2649 | ||
|
|
d0f89e456c | ||
|
|
90a16e8c90 | ||
|
|
ea6266c79f | ||
|
|
077f114373 | ||
|
|
2508674227 | ||
|
|
c9c703dfe6 | ||
|
|
d9dc4d5943 | ||
|
|
04f613dd15 | ||
|
|
0faef117ca | ||
|
|
f6bc5ac538 | ||
|
|
26fb156d6b | ||
|
|
d548671b91 | ||
|
|
ef1f2bce49 | ||
|
|
b428a8af08 | ||
|
|
9dfc6d1d52 | ||
|
|
6beb50b367 | ||
|
|
9e0c50dafe | ||
|
|
f5d4f93ed7 | ||
|
|
ae36ef4a0e | ||
|
|
485dbe4021 | ||
|
|
2f8f85a404 | ||
|
|
87c50cf22a | ||
|
|
6e20a435af | ||
|
|
2eb7d542d2 | ||
|
|
c414add29f | ||
|
|
372a09d2ca | ||
|
|
06568da140 | ||
|
|
96c7afcf3a | ||
|
|
5cfd996659 | ||
|
|
21189f378e | ||
|
|
9a90eaed76 | ||
|
|
d8122d14aa | ||
|
|
7bf0146e2f | ||
|
|
93ca632f7a | ||
|
|
49e5963b0a | ||
|
|
7e8df050a1 | ||
|
|
50a2650e67 | ||
|
|
1137749980 | ||
|
|
6de3bdcdd9 | ||
|
|
7c4fb8d6f1 | ||
|
|
a11a71eb93 | ||
|
|
b8d0a26bdc | ||
|
|
a8432252e1 | ||
|
|
56733e1dbd | ||
|
|
246278ff80 | ||
|
|
1b8b500fd7 | ||
|
|
e8bae52f66 | ||
|
|
3431354cb2 | ||
|
|
b2b407c2c2 | ||
|
|
1d76f515e0 | ||
|
|
fd0b2ff72d | ||
|
|
cbac24cf97 | ||
|
|
ff40a80569 | ||
|
|
c0a0e889e7 | ||
|
|
c5b4452a1b | ||
|
|
afee2beebe | ||
|
|
630b63744a | ||
|
|
1399c40243 | ||
|
|
a148964878 | ||
|
|
b831952e2e | ||
|
|
21174e44bb | ||
|
|
b650a546cd | ||
|
|
e580ecc55c | ||
|
|
04bb3eb5a9 | ||
|
|
28962a1c6c | ||
|
|
2fca50b7e5 | ||
|
|
3617c82e8b | ||
|
|
bf0f81afd7 | ||
|
|
ef07188534 | ||
|
|
5fe7ee9b6a | ||
|
|
a069e1d438 | ||
|
|
827f8b0e88 | ||
|
|
b9fdc2a25c | ||
|
|
d2d999d369 | ||
|
|
7b36cca86b | ||
|
|
843dd03553 | ||
|
|
6460724feb | ||
|
|
8e87bb6e86 | ||
|
|
3ac2929789 | ||
|
|
2a88d5777a | ||
|
|
b2c6534c92 | ||
|
|
303b620062 | ||
|
|
6940a5846b | ||
|
|
aa165829c6 | ||
|
|
56f90dbcf9 | ||
|
|
1e09f54e56 | ||
|
|
39f0877ba0 | ||
|
|
54dfd3c701 | ||
|
|
f43e2c0dee | ||
|
|
b03b8146df | ||
|
|
1f94cfbe57 | ||
|
|
6648e43bba | ||
|
|
87f4f618aa | ||
|
|
dab8379392 | ||
|
|
2fde31d782 | ||
|
|
7c4c8b8726 | ||
|
|
deea8754ae | ||
|
|
69c1787e22 | ||
|
|
3ac881b191 | ||
|
|
aa49fe665f | ||
|
|
b773de0815 | ||
|
|
49a5d3a350 | ||
|
|
6f829d0d43 | ||
|
|
daf0d7e56e | ||
|
|
0136344282 | ||
|
|
f571dde538 | ||
|
|
5424b53b62 | ||
|
|
86519b471e | ||
|
|
36fa18b28c | ||
|
|
d8da4364fd | ||
|
|
2538be9318 | ||
|
|
a9193e36ff | ||
|
|
0a6588c348 | ||
|
|
0c11c93b3a | ||
|
|
b80a54eb0f | ||
|
|
5eb833a984 | ||
|
|
66fd3a552d | ||
|
|
7f4b0d6215 | ||
|
|
5e6dd7644b | ||
|
|
a430e325ed | ||
|
|
e77c3a040d | ||
|
|
734b3a075e | ||
|
|
6b5f299ccd | ||
|
|
281b3ecf64 | ||
|
|
d7f2f4efdd | ||
|
|
08077f03f1 | ||
|
|
3d41514abd | ||
|
|
f2c16beab6 | ||
|
|
8983b146f2 | ||
|
|
8b0c6eae02 | ||
|
|
013f2ef00d | ||
|
|
e972be8dab | ||
|
|
e60c3bd943 | ||
|
|
417a5692e3 | ||
|
|
f0728c4fe0 | ||
|
|
249f85a25e | ||
|
|
9c59ac297d | ||
|
|
6e8f3d1d19 | ||
|
|
3df783de13 | ||
|
|
b469fc990f | ||
|
|
6df688e62e | ||
|
|
4f6f1c4453 | ||
|
|
891e47ef60 | ||
|
|
84f0c0fd9f | ||
|
|
25d64f2812 | ||
|
|
915cdf2c23 | ||
|
|
b7b6e3bc93 | ||
|
|
3d53b12dea | ||
|
|
132e240e87 | ||
|
|
0b233ea155 | ||
|
|
e9c96390e6 | ||
|
|
50bd078620 | ||
|
|
65f1c2589c | ||
|
|
695329b9dd | ||
|
|
4726e824a0 | ||
|
|
e68355d94f | ||
|
|
f5c08a2681 | ||
|
|
b14520954c | ||
|
|
04ac5de29d | ||
|
|
2118849d27 | ||
|
|
5e928b5ae1 | ||
|
|
3576ed36e2 | ||
|
|
fc88c89f7c | ||
|
|
f48b37a218 | ||
|
|
48bd1d46af | ||
|
|
20a7d0f120 | ||
|
|
84729e21b8 | ||
|
|
26aaa65c1d | ||
|
|
c863daf873 | ||
|
|
93197e7621 | ||
|
|
9001cdb8f2 | ||
|
|
e7e9530eb8 | ||
|
|
bdff346a20 | ||
|
|
4f5c95045d | ||
|
|
efabdf27c8 | ||
|
|
f36098d704 | ||
|
|
a5fd7f2eba | ||
|
|
0cb29ab388 | ||
|
|
9c66cb9b00 | ||
|
|
c2a50fa98d | ||
|
|
ac352179da | ||
|
|
f2f93c7f5f | ||
|
|
ce984d44a0 | ||
|
|
900ae67369 | ||
|
|
ffaac95c11 | ||
|
|
6fbc5c6fd0 | ||
|
|
f3c6d7e90f | ||
|
|
47c119a2d7 | ||
|
|
29904f8f22 | ||
|
|
fc86634e29 | ||
|
|
c89c845b98 | ||
|
|
452d840512 | ||
|
|
701568e011 | ||
|
|
dade77d719 | ||
|
|
ae8b7bb1f5 | ||
|
|
87c7b65223 | ||
|
|
71815a4963 | ||
|
|
69b2bfdeb2 | ||
|
|
57d74dfdbf | ||
|
|
450a3637e4 | ||
|
|
780c927ea6 | ||
|
|
254db35ef1 | ||
|
|
0463230533 | ||
|
|
44e1435c65 | ||
|
|
73270f0e87 | ||
|
|
c1550cf608 | ||
|
|
cd2e8aa40a | ||
|
|
bb70b6eeab | ||
|
|
9b28d2ac70 | ||
|
|
fd1def7885 | ||
|
|
9a79078441 | ||
|
|
bb43622fe7 | ||
|
|
9203c366e7 | ||
|
|
11a8af1db2 | ||
|
|
c8fb7eafa0 | ||
|
|
ffc1f712a3 | ||
|
|
cfc8687851 | ||
|
|
953699b2fd | ||
|
|
9a16fff27e | ||
|
|
ac0d104231 | ||
|
|
881efea006 | ||
|
|
f6a380d293 | ||
|
|
a971b93994 | ||
|
|
c4f0dd124d | ||
|
|
93b9b7d44c | ||
|
|
7552bfe39b | ||
|
|
2601faaff2 | ||
|
|
cb2e28d086 | ||
|
|
337877313a | ||
|
|
1693942cee | ||
|
|
867a1ce2f4 | ||
|
|
26b997537f | ||
|
|
19056b8a19 | ||
|
|
10d603b377 | ||
|
|
3f41c313ad | ||
|
|
d440949c1d | ||
|
|
64314dc6cf | ||
|
|
decb9d7f11 | ||
|
|
975b0b74ee | ||
|
|
9aa7807b02 | ||
|
|
337c6cfa25 | ||
|
|
f09a423ee7 | ||
|
|
3bf28f52c4 | ||
|
|
f794592f42 | ||
|
|
98bd05b47b | ||
|
|
3edbde0839 | ||
|
|
a2d92eac0b | ||
|
|
eb47c545ec | ||
|
|
c858f79449 | ||
|
|
27f6efbdec | ||
|
|
bba7494ffd | ||
|
|
0f79cad5a7 | ||
|
|
9e7bacbe23 | ||
|
|
2301a4834d | ||
|
|
40e0f58079 | ||
|
|
c23fb144cf | ||
|
|
caac681ac3 | ||
|
|
9ba3b3ef8f | ||
|
|
d7e523948b | ||
|
|
10a75138d1 | ||
|
|
d48b19c866 | ||
|
|
1fdcb55eba | ||
|
|
16cec9f045 | ||
|
|
438b0bd1b0 | ||
|
|
e8a91696d6 | ||
|
|
8882c31eb4 | ||
|
|
8455ee8226 | ||
|
|
3f74aded8a | ||
|
|
2e19c2013c | ||
|
|
1edaa2d09b | ||
|
|
beee018287 | ||
|
|
34266ea59d | ||
|
|
f26127ce98 | ||
|
|
ccf321d178 | ||
|
|
355721c47a | ||
|
|
d400663e5d | ||
|
|
2203be945a | ||
|
|
b9a2bf4b42 | ||
|
|
cc08195cf2 | ||
|
|
50c40a7828 | ||
|
|
158be3f949 | ||
|
|
0f87c322ca | ||
|
|
d5dd19b64c | ||
|
|
3ac9055493 | ||
|
|
3032d730b7 | ||
|
|
e93e7126b6 | ||
|
|
9bcf41d28f | ||
|
|
604ce47d5e | ||
|
|
e1ebe150d4 | ||
|
|
ae992737e8 | ||
|
|
c59d609eb8 | ||
|
|
9f26d12a3e | ||
|
|
9102577eba | ||
|
|
f0fcfde22b | ||
|
|
d9d813db56 | ||
|
|
a8808855ae | ||
|
|
5583f9418a | ||
|
|
7369ffd2aa | ||
|
|
ab15f30b13 | ||
|
|
8bff07d66b | ||
|
|
e2e2cb38be | ||
|
|
10d84a6a6b | ||
|
|
a4b4c1574b | ||
|
|
94bc39bdb2 | ||
|
|
7c93b37125 | ||
|
|
4371cc10bd | ||
|
|
eaa2628934 | ||
|
|
30e247186c | ||
|
|
2714da8d98 | ||
|
|
0ef3a7ec25 | ||
|
|
489a0069aa | ||
|
|
a257b7bdfa | ||
|
|
739cc66d0d | ||
|
|
28d944c6af | ||
|
|
19b98393a6 | ||
|
|
5a13e7400e | ||
|
|
a56129d675 | ||
|
|
0d75bbace0 | ||
|
|
29ec4a7a0e | ||
|
|
8b26c48d9b | ||
|
|
ddd0535d30 | ||
|
|
adcd370c27 | ||
|
|
dbead0d725 | ||
|
|
207aea813b | ||
|
|
7a771154a7 | ||
|
|
18c6b9b404 | ||
|
|
3110382d88 | ||
|
|
9ee55896e3 | ||
|
|
ad6f41f312 | ||
|
|
8512395985 | ||
|
|
7284042823 | ||
|
|
0ef683bba9 | ||
|
|
d4bf66936a | ||
|
|
be4737461a | ||
|
|
0d22b3be05 | ||
|
|
7c81d9293b | ||
|
|
d1dce65313 | ||
|
|
641f9bbf7c | ||
|
|
be0e42cf82 | ||
|
|
3a883b8821 | ||
|
|
4bbc58d62d | ||
|
|
5f4b09bede | ||
|
|
f0ade21155 | ||
|
|
f35063ee6e | ||
|
|
e6c7627ee8 | ||
|
|
a85d937482 | ||
|
|
b17632a352 | ||
|
|
b11eb742cb | ||
|
|
b63a7f64fd | ||
|
|
cafc438972 | ||
|
|
33ef7f737b | ||
|
|
3e26685a44 | ||
|
|
6a306be480 | ||
|
|
9defb6289b | ||
|
|
a47ad2886f | ||
|
|
c8d791f206 | ||
|
|
8c5f915569 | ||
|
|
ed366568b4 | ||
|
|
0a8a4eb6a6 | ||
|
|
fdc6cf4838 | ||
|
|
e52af0077b | ||
|
|
847f544839 | ||
|
|
685d3202d0 | ||
|
|
33a2580cc3 | ||
|
|
a8da654597 | ||
|
|
ae01a023ad | ||
|
|
ec20af3c4d | ||
|
|
a6f1ad1c2c | ||
|
|
c3532f17de | ||
|
|
86eac2f04d | ||
|
|
3b9b71643c | ||
|
|
19417cdd52 | ||
|
|
a7c23e25d8 | ||
|
|
f96ab87536 | ||
|
|
d65d49f504 | ||
|
|
8cd5924bf2 | ||
|
|
9f38338c58 | ||
|
|
8c76436d81 | ||
|
|
0e71576265 | ||
|
|
71b34003ca | ||
|
|
2c417d75a2 | ||
|
|
74ededd8c8 | ||
|
|
a732fa237c | ||
|
|
fd4c22308d | ||
|
|
d6f18894e6 | ||
|
|
992d54693f | ||
|
|
9be1bd0775 | ||
|
|
29cc689abd | ||
|
|
39d28e507d | ||
|
|
eacb5bc6f8 | ||
|
|
19658454bd | ||
|
|
02e3a6ae8b | ||
|
|
77376087db | ||
|
|
52a77f9efb | ||
|
|
d483b13107 | ||
|
|
dea4d9df63 | ||
|
|
b7601a7f08 | ||
|
|
2e148d6d0e | ||
|
|
8835a1a232 | ||
|
|
00e3b6b5a0 | ||
|
|
3bb51c5d51 | ||
|
|
433df05858 | ||
|
|
22524b03c8 | ||
|
|
508fa62a48 | ||
|
|
e7f7f98c02 | ||
|
|
9edaa8eb93 | ||
|
|
32587c1a40 | ||
|
|
019c482d18 | ||
|
|
ca906d9c71 | ||
|
|
35ba8476b0 | ||
|
|
a473901cfd | ||
|
|
b163d71aed | ||
|
|
d561f1399a | ||
|
|
00406e08fb | ||
|
|
0e4ca910d6 | ||
|
|
b00f52472b | ||
|
|
95a6e356ee | ||
|
|
f4da8e8876 | ||
|
|
1a08a59b49 | ||
|
|
758ceb791b | ||
|
|
6a1e0084f4 | ||
|
|
e318cab252 | ||
|
|
6b12547303 | ||
|
|
96d6c00815 | ||
|
|
7be79d81f9 | ||
|
|
2be558d554 | ||
|
|
60fac0a010 | ||
|
|
df0f239929 | ||
|
|
4e1aea4597 | ||
|
|
60224dd77d | ||
|
|
ded408f145 | ||
|
|
69deeca321 | ||
|
|
5e1e7bdad0 | ||
|
|
22f4924d8e | ||
|
|
8591275eb2 | ||
|
|
d91bb33178 | ||
|
|
d8e782f3f1 | ||
|
|
51755b8da3 | ||
|
|
e5c0aed75e | ||
|
|
6d7e984238 | ||
|
|
4dcc944f53 | ||
|
|
fbb978e8a5 | ||
|
|
46a3a4f7e3 | ||
|
|
e74d2b45c0 | ||
|
|
d40298ac58 | ||
|
|
87d7a4862e | ||
|
|
8be9a560e9 | ||
|
|
0d218bb4b9 | ||
|
|
1b3464b610 | ||
|
|
c4e66a104b | ||
|
|
d4eaef6ac8 | ||
|
|
9a634b22a7 | ||
|
|
54f5f38637 | ||
|
|
21a5180b2f | ||
|
|
8116d34a60 | ||
|
|
c6462cbcc7 | ||
|
|
4e34ce7470 | ||
|
|
c2299818cd | ||
|
|
2d06dc5cfe | ||
|
|
5329f28580 | ||
|
|
66909b3000 | ||
|
|
ae92904e7d | ||
|
|
70fb5ec7e1 | ||
|
|
058f74c12c | ||
|
|
3a2d24d7cc | ||
|
|
49f2f0dbfd | ||
|
|
5b216153e9 | ||
|
|
43175bb642 | ||
|
|
c1da220a99 | ||
|
|
164c3e0e7b | ||
|
|
491a23b21e | ||
|
|
727ec8a5cf | ||
|
|
28b3ec322c | ||
|
|
38cb89a946 | ||
|
|
b07116f302 | ||
|
|
623b5a511a | ||
|
|
d5d2d6826f | ||
|
|
227f6a4ed7 | ||
|
|
e23d7082fe | ||
|
|
569a29454e | ||
|
|
a07f711e22 | ||
|
|
946f304bb2 | ||
|
|
6b11c100ba | ||
|
|
6048693423 | ||
|
|
a7287754be | ||
|
|
d9037a7fce | ||
|
|
f06d292382 | ||
|
|
85d01d6f28 | ||
|
|
5cfeddef73 | ||
|
|
b975e77a63 | ||
|
|
ba46181365 | ||
|
|
370604f8eb | ||
|
|
368c7d6cda | ||
|
|
0a9dfdc5c0 | ||
|
|
72d0d4e274 | ||
|
|
d0067ccf68 | ||
|
|
409793cb21 | ||
|
|
a9eb65926f | ||
|
|
18d8677fe6 | ||
|
|
09c8567e39 | ||
|
|
6bbd4b214a | ||
|
|
a345746cbd | ||
|
|
0a0bb128d6 | ||
|
|
29ec3014e7 | ||
|
|
9ddd4d4161 | ||
|
|
3caae31374 | ||
|
|
b69abd1058 | ||
|
|
114c6bd6fc | ||
|
|
d81c5e750d | ||
|
|
281d29a100 | ||
|
|
46492009a1 | ||
|
|
ec549a6a25 | ||
|
|
71766d9c55 | ||
|
|
d2d8bd550a | ||
|
|
0c2f6c46f6 | ||
|
|
c90b93c1b7 | ||
|
|
faef4fffab | ||
|
|
8e8b97f623 | ||
|
|
e23d18dab8 | ||
|
|
3a0d1466cc | ||
|
|
83dd77f4c4 | ||
|
|
c601c992c1 | ||
|
|
5727761551 | ||
|
|
08365721de | ||
|
|
692c3542d9 | ||
|
|
60dc1f7d75 | ||
|
|
e5ff33fcc6 | ||
|
|
c60979fff7 | ||
|
|
961ad6ebca | ||
|
|
f18237a005 | ||
|
|
cba93e61b4 | ||
|
|
e0a6e5d2f9 | ||
|
|
a9ee323760 | ||
|
|
977db86700 | ||
|
|
93d36d40d8 | ||
|
|
cabc7ffca8 | ||
|
|
521b70c715 | ||
|
|
b6c5503c5b | ||
|
|
e7e2ba4790 | ||
|
|
8749923f1a | ||
|
|
25a3e19384 | ||
|
|
b6b686665a | ||
|
|
4f5468469b | ||
|
|
7bc7f23125 | ||
|
|
25ed652fc0 | ||
|
|
cc2913352a | ||
|
|
ad796ebbec | ||
|
|
edd561f8ba | ||
|
|
0b1c4fb54f | ||
|
|
9f4eb4f7db | ||
|
|
f6e3a3917e | ||
|
|
1b536bf5f8 | ||
|
|
e3afdb6c02 | ||
|
|
918b36e28f | ||
|
|
ce26637410 | ||
|
|
2053c72008 | ||
|
|
275bde6461 | ||
|
|
f85382edd4 | ||
|
|
e016e92c41 | ||
|
|
2594b8e3f9 | ||
|
|
1e1ef594c8 | ||
|
|
01c660faba | ||
|
|
9f76237705 | ||
|
|
59d3e3f3da | ||
|
|
e5dd237f12 | ||
|
|
e9729bea7e | ||
|
|
d46b17d8a0 | ||
|
|
383d25226e | ||
|
|
745eff0783 | ||
|
|
ac301045b9 | ||
|
|
e1f3ca8172 | ||
|
|
4ff4ceeb22 | ||
|
|
4126992a8f | ||
|
|
fd99f63bd6 | ||
|
|
46dc7c3a77 | ||
|
|
a8cb551465 | ||
|
|
5a5674809c | ||
|
|
761e8a2ac6 | ||
|
|
dfa7effa14 | ||
|
|
09c022e209 | ||
|
|
8666a75161 | ||
|
|
68018d8d04 | ||
|
|
3d2c014801 | ||
|
|
4f9c341103 | ||
|
|
563f03554f | ||
|
|
219376044a | ||
|
|
591dac8b41 | ||
|
|
2bc96ade33 | ||
|
|
95c4456ccc | ||
|
|
6e6b8b404f | ||
|
|
27052c21be | ||
|
|
ec744f7385 | ||
|
|
d8c5105c91 | ||
|
|
acd5fb19f5 | ||
|
|
52ac486814 | ||
|
|
a64b32bf9c | ||
|
|
b299800e64 | ||
|
|
60c430abad | ||
|
|
255cce4f9a | ||
|
|
1ed99c2574 | ||
|
|
64b54d4380 | ||
|
|
6170973b48 | ||
|
|
1172e5bdce | ||
|
|
b0123567cd | ||
|
|
81598621e8 | ||
|
|
239ac496b2 | ||
|
|
76fb91619a | ||
|
|
e3a2d43ffa | ||
|
|
b3f4716616 | ||
|
|
c602038597 | ||
|
|
03b469212e | ||
|
|
db3f6e077e | ||
|
|
06816c51a5 | ||
|
|
9e9e8e82b2 | ||
|
|
031d4ebedc | ||
|
|
3446715af8 | ||
|
|
c7e68dab62 | ||
|
|
7093ced2d8 | ||
|
|
179f4dfe22 | ||
|
|
03517ce22e | ||
|
|
290f99b4d1 | ||
|
|
7f10bc2a1b | ||
|
|
9cb48003b0 | ||
|
|
6df961292d | ||
|
|
65f855b251 | ||
|
|
5131881bf2 | ||
|
|
8fbad90e9d | ||
|
|
d0aceebaad | ||
|
|
01b6680000 | ||
|
|
638883f352 | ||
|
|
467c2fb28d | ||
|
|
0fd129a0d8 | ||
|
|
282125a84b | ||
|
|
97a2824473 | ||
|
|
eff1333269 | ||
|
|
3741a28d94 | ||
|
|
6dd4ec160d | ||
|
|
a6a3c09c05 | ||
|
|
620cfeabe0 | ||
|
|
070d64f365 | ||
|
|
1d3c98372a | ||
|
|
c1588d70cd | ||
|
|
ef28abe896 | ||
|
|
d251232f8a | ||
|
|
05334de855 | ||
|
|
539b55f826 | ||
|
|
0699832240 | ||
|
|
ce169163b9 | ||
|
|
b4af70ada9 | ||
|
|
424670d854 | ||
|
|
6ce4644120 | ||
|
|
eaf7e56083 | ||
|
|
e55a5d7486 | ||
|
|
e1d14b1324 | ||
|
|
04d09eb891 | ||
|
|
09b4f5dffd | ||
|
|
29ad96862f | ||
|
|
839d68d62c | ||
|
|
a4d3bf3cb2 | ||
|
|
a05bda9fc3 | ||
|
|
5936b57bac | ||
|
|
af2bcd389e | ||
|
|
4bec9b038b | ||
|
|
0b3ce5f65a | ||
|
|
cb8e820f5d | ||
|
|
0a4ce9d65e | ||
|
|
f20d74c1f3 | ||
|
|
3505be422e | ||
|
|
7e9542e79a | ||
|
|
a1c1a4889b | ||
|
|
7eeb8084bf | ||
|
|
7a5bd6ae6a | ||
|
|
d20e60afb3 | ||
|
|
7340263e6a | ||
|
|
6e8cecd13e | ||
|
|
f106a0854f | ||
|
|
68b09e87b3 | ||
|
|
11f2ecd675 | ||
|
|
7b6b8b0eeb | ||
|
|
67f9580c5d | ||
|
|
6a3fce97cf | ||
|
|
2bd266a7fc | ||
|
|
f6946b88d2 | ||
|
|
5e5df6becd | ||
|
|
6c4cb92249 | ||
|
|
c3407eac5e | ||
|
|
e46b3e24d6 | ||
|
|
90763de93c | ||
|
|
5380ffa471 | ||
|
|
c9f436cc47 | ||
|
|
39dc68fa4e | ||
|
|
d6c527f662 | ||
|
|
38a7f4f7d5 | ||
|
|
1605959a04 | ||
|
|
b837e0005a | ||
|
|
58937a5366 | ||
|
|
8562c03f80 | ||
|
|
1cd61b9169 | ||
|
|
c69e289afe | ||
|
|
91b46b05ad | ||
|
|
2412760f1c | ||
|
|
d83c5493c7 | ||
|
|
d041703dc6 | ||
|
|
ecba13c38e | ||
|
|
cd3a4bb8c8 | ||
|
|
97f72b93e1 | ||
|
|
e93d57983e | ||
|
|
43c4a3bfdc | ||
|
|
954cc0e8bc | ||
|
|
ad48325dff | ||
|
|
fa1ad20d5d | ||
|
|
0547dede21 | ||
|
|
284ae23db2 | ||
|
|
9105f28c13 | ||
|
|
06cc43b11f | ||
|
|
d879d0d924 | ||
|
|
25bc84817a | ||
|
|
8fb0dfad94 | ||
|
|
c2138037d2 | ||
|
|
fadd64c1e9 | ||
|
|
4552691aed | ||
|
|
bab5c0589f | ||
|
|
2a2c614eb4 | ||
|
|
12529ec81e | ||
|
|
0179609a49 | ||
|
|
860c551aa6 | ||
|
|
1ba3474a5a | ||
|
|
f26c283541 | ||
|
|
56e9dab2ce | ||
|
|
b1fcae5cec | ||
|
|
93245ac37a | ||
|
|
3f795e44c7 | ||
|
|
e732e5158e | ||
|
|
2f5c033f09 | ||
|
|
6099369019 | ||
|
|
8d2b65386c | ||
|
|
ed835225cf | ||
|
|
43c1bc8d5f | ||
|
|
17832fe18c | ||
|
|
252f3f0bd6 | ||
|
|
e042aad819 | ||
|
|
9966daf0cf | ||
|
|
daf5e9cccf | ||
|
|
bf63d731d3 | ||
|
|
12abfc0fcf | ||
|
|
dea1b520f7 | ||
|
|
a5c268491e | ||
|
|
bf34f553bb | ||
|
|
97c61404ca | ||
|
|
c40d9f54a2 | ||
|
|
5e08593358 | ||
|
|
1f06b12f86 | ||
|
|
c7351f724e | ||
|
|
1851bce497 | ||
|
|
5fb8503fd2 | ||
|
|
792716eefc | ||
|
|
15a6c779b8 | ||
|
|
93d24e7106 | ||
|
|
b8a185c112 | ||
|
|
e242e65569 | ||
|
|
62ab33a434 | ||
|
|
f403916ef8 | ||
|
|
38f1585ac6 | ||
|
|
1f757270d9 | ||
|
|
e6de8401bf | ||
|
|
df2e34ac51 | ||
|
|
7bbd3a7e36 | ||
|
|
85a736d49b | ||
|
|
f9eb313f7c | ||
|
|
9cec486a1b | ||
|
|
7734c654a7 | ||
|
|
8e5fff6c5f | ||
|
|
faa9a740db | ||
|
|
70e39e9902 | ||
|
|
9f0b3963cb | ||
|
|
7ec2ce851c | ||
|
|
94ee4223d2 | ||
|
|
a64f4219e9 | ||
|
|
78e96cc312 | ||
|
|
89b111edca | ||
|
|
ec38943c53 | ||
|
|
ea654ef235 | ||
|
|
288b705450 | ||
|
|
73ca579056 | ||
|
|
8b5d7dc181 | ||
|
|
f05f6294cd | ||
|
|
b2c466cf3f | ||
|
|
da1b9a0e91 | ||
|
|
6cbb5a9215 | ||
|
|
cfdbb86bfa | ||
|
|
d61783b2c0 | ||
|
|
65c1e1b9e5 | ||
|
|
17d509a45a | ||
|
|
c7649766fd | ||
|
|
c0ec5e53ba | ||
|
|
a0a18017e8 | ||
|
|
411b84fcc2 | ||
|
|
e499eeb8cc | ||
|
|
803d1de5db | ||
|
|
fc8117c8e7 | ||
|
|
8bef0ede1b | ||
|
|
88128cde48 | ||
|
|
d0217e62f0 | ||
|
|
bba680b636 | ||
|
|
feb914b5c4 | ||
|
|
0a65ea34f3 | ||
|
|
bf299edfc7 | ||
|
|
6b0122547e | ||
|
|
88c0e149b5 | ||
|
|
38091b2021 | ||
|
|
ce87f293aa | ||
|
|
dca028a84f | ||
|
|
be3c4ab24a | ||
|
|
67c9a14902 | ||
|
|
014bdb795f | ||
|
|
df7e8b2e64 | ||
|
|
2b5fdd3548 | ||
|
|
e92a0eb901 | ||
|
|
e72a67f5de | ||
|
|
65dc291ff5 | ||
|
|
0bfc190a86 | ||
|
|
f8303f2e7a | ||
|
|
8ad72b167c | ||
|
|
7747082ae8 | ||
|
|
a7727adca2 | ||
|
|
028b53816d | ||
|
|
5a77117a9b | ||
|
|
05777019c8 | ||
|
|
7ebaad5099 | ||
|
|
09885c8f41 | ||
|
|
4f5ebb279d | ||
|
|
91ebf88c97 | ||
|
|
a608c51e36 | ||
|
|
3877dcf83a | ||
|
|
72d176b77a | ||
|
|
8840968e07 | ||
|
|
b6b889bff6 | ||
|
|
a30bdcbb50 | ||
|
|
82275d49a6 | ||
|
|
ee335de222 | ||
|
|
01bf7c8c38 | ||
|
|
5529a1b0b3 | ||
|
|
363be18599 | ||
|
|
ae8ad3b68b | ||
|
|
348b850e36 | ||
|
|
92c267758e | ||
|
|
b7d1ab6105 | ||
|
|
f7f1b4f594 | ||
|
|
6492bea846 | ||
|
|
b1cb89b0c2 | ||
|
|
7ecd98b0a0 | ||
|
|
7d7d4db329 | ||
|
|
e6bfe1fc88 | ||
|
|
151d3a9610 | ||
|
|
905ed36afd | ||
|
|
7fe9c9366e | ||
|
|
d5237d1a07 | ||
|
|
7bd3b29a11 | ||
|
|
60aa74257f | ||
|
|
ca0492d997 | ||
|
|
944133de6e | ||
|
|
174fdd40da | ||
|
|
ffa823f748 | ||
|
|
a83f7a822e | ||
|
|
29d527bee1 | ||
|
|
75e282c2ac | ||
|
|
8419d9114b | ||
|
|
1c414af7b9 | ||
|
|
834e8c64c5 | ||
|
|
1b3bb86546 | ||
|
|
aa560f42e7 | ||
|
|
4e69cd28cd | ||
|
|
5f0e30e17a | ||
|
|
d682771c35 | ||
|
|
ace3c3e421 | ||
|
|
94005b0c22 | ||
|
|
e9177c8932 | ||
|
|
d62c2d913e | ||
|
|
9ea88fe247 | ||
|
|
e0867a5d11 | ||
|
|
ae91101ea1 | ||
|
|
515057c41a | ||
|
|
d946ba426e | ||
|
|
07874cf77f | ||
|
|
1d9f9e838b | ||
|
|
101691e970 | ||
|
|
e2498c31ea | ||
|
|
9d8c6122cc | ||
|
|
227dda38a2 | ||
|
|
e2091413ea | ||
|
|
4976e82f0f | ||
|
|
5e949d2c6f | ||
|
|
fec7688241 | ||
|
|
2732f6036e | ||
|
|
387c44031a | ||
|
|
6cbd1c5fb1 | ||
|
|
447b9e1ea7 | ||
|
|
be08bcaafc | ||
|
|
1b5e8e0181 | ||
|
|
d2ffbd0395 | ||
|
|
88cb607975 | ||
|
|
e392956e2a | ||
|
|
3028081fa2 | ||
|
|
4003c59471 | ||
|
|
2e042f0c59 | ||
|
|
9a4238d4e2 | ||
|
|
c184dc8d2f | ||
|
|
32f41a04ac | ||
|
|
4b8174f75a | ||
|
|
313e14bc54 | ||
|
|
7aca31992b | ||
|
|
56f53e508f | ||
|
|
6c18dc63aa | ||
|
|
7b498065b5 | ||
|
|
81bd225ff7 | ||
|
|
074090a0aa | ||
|
|
3fcbcca8e4 | ||
|
|
dbaf12b043 | ||
|
|
9eb9b48534 | ||
|
|
e085fd1d57 | ||
|
|
9cc71b320b | ||
|
|
7b74cf1ab9 | ||
|
|
fb0c0e07f7 | ||
|
|
c6bb4a23ae | ||
|
|
70e271959b | ||
|
|
379abeb262 | ||
|
|
9e884847b1 | ||
|
|
5dadf9a087 | ||
|
|
c0630b782a | ||
|
|
62beb73aa2 | ||
|
|
7b6fe0159f | ||
|
|
dad22b1686 | ||
|
|
a715a51865 | ||
|
|
d4ec2319f9 | ||
|
|
88b980ac17 | ||
|
|
867c01d5e8 | ||
|
|
c8a064af3e | ||
|
|
12439f2b99 | ||
|
|
fb47ea301f | ||
|
|
6adecbd7aa | ||
|
|
f71e34fd9f | ||
|
|
dfe89588f0 | ||
|
|
d89b68a279 | ||
|
|
2a4a01cb7b | ||
|
|
c81b7f6bb4 | ||
|
|
0c11afad7a | ||
|
|
d6b26c9975 | ||
|
|
98c628f3eb | ||
|
|
36b2026075 | ||
|
|
7c535ff1a3 | ||
|
|
c6436ea6d1 | ||
|
|
5a8dee3cbe | ||
|
|
d9450d6e12 | ||
|
|
80377b3705 | ||
|
|
847a76b3a2 | ||
|
|
2c3d46bb80 | ||
|
|
e0cb6d4531 | ||
|
|
78f0177ac4 | ||
|
|
4688434c08 | ||
|
|
8913eeb1c1 | ||
|
|
75574e97cc | ||
|
|
f4089bc164 | ||
|
|
b0f04d91bf | ||
|
|
3b514d194c | ||
|
|
3ba405383e | ||
|
|
87f6c8087f | ||
|
|
90a83c8f11 | ||
|
|
27f892a14b | ||
|
|
bf4525d82d | ||
|
|
6bfb1a7fff | ||
|
|
a53ab7438c | ||
|
|
d85a080f9b | ||
|
|
4dbfc9483e | ||
|
|
53097ab183 | ||
|
|
9978a370f1 | ||
|
|
24995f46cb | ||
|
|
7ddc8c6aeb | ||
|
|
4a447f5c12 | ||
|
|
e56647f24d | ||
|
|
25238b53c9 | ||
|
|
1ed798342a | ||
|
|
1d6eb07c62 | ||
|
|
8e3d76b7ea | ||
|
|
d8838503b2 | ||
|
|
78b7742354 | ||
|
|
3d9dca47b8 | ||
|
|
c06c96bc1f | ||
|
|
db128dbc40 | ||
|
|
d6f87a8254 | ||
|
|
4c5f37db0f | ||
|
|
3e5338c902 | ||
|
|
848b7c7a34 | ||
|
|
4bf5dd15e9 | ||
|
|
d4273d8e3f | ||
|
|
780347776b | ||
|
|
5dd6986ad4 | ||
|
|
51bf41009e | ||
|
|
4defe734e2 | ||
|
|
e3cb4ebfdc | ||
|
|
c6345279cc | ||
|
|
e5a9af9a31 | ||
|
|
c0e1e31572 | ||
|
|
1e58c365ed | ||
|
|
bf87b76adb | ||
|
|
c8e06b5837 | ||
|
|
ee5cd06077 | ||
|
|
140352b637 | ||
|
|
b369321e2f | ||
|
|
b9aaba7b16 | ||
|
|
07519732a1 | ||
|
|
ae71f3c186 | ||
|
|
e1236f9deb | ||
|
|
3c9bfb5b4d | ||
|
|
86b50b0a93 | ||
|
|
da6706cb93 | ||
|
|
2842a109da | ||
|
|
021ddefb10 | ||
|
|
7d0b47c5cb | ||
|
|
9351a1f900 | ||
|
|
0ac48369fe | ||
|
|
e57ee17532 | ||
|
|
a897683272 | ||
|
|
38eb981d2c | ||
|
|
b524472b9e | ||
|
|
fc04083cb2 | ||
|
|
b1225951f2 | ||
|
|
24fd2e1849 | ||
|
|
5e5c975a9c | ||
|
|
c6336e920f | ||
|
|
cd19625522 | ||
|
|
3ac95a9213 | ||
|
|
e57ea9b501 | ||
|
|
14b335a51e | ||
|
|
319e746a55 | ||
|
|
eb4d721175 | ||
|
|
a4f850c0c6 | ||
|
|
0a8e25b405 | ||
|
|
1557a76225 | ||
|
|
d4fa379f11 | ||
|
|
e09c5fcb3c | ||
|
|
815fe25f2c | ||
|
|
5e5c84ba27 | ||
|
|
2974b23f26 | ||
|
|
697c21b120 | ||
|
|
1f72a52015 | ||
|
|
43bcf1051d | ||
|
|
bf8aa502f9 | ||
|
|
f0e92343cb | ||
|
|
48efd6689e | ||
|
|
090e689689 | ||
|
|
9d16df5f25 | ||
|
|
02651c93a7 | ||
|
|
2b1d4b6672 | ||
|
|
9087dac6fe | ||
|
|
762ed994c1 | ||
|
|
2c8a9d1160 | ||
|
|
f613316046 | ||
|
|
6b1bc15f37 | ||
|
|
9a77a0c201 | ||
|
|
755cdbb238 | ||
|
|
1996db4b95 | ||
|
|
6297f69e70 | ||
|
|
a796f9f8a8 | ||
|
|
0de9c57ade | ||
|
|
95dc01cdcb | ||
|
|
364d3996f4 | ||
|
|
33af9e878b | ||
|
|
9f8b9ea806 | ||
|
|
d53876ee1b | ||
|
|
4f654e81c8 | ||
|
|
aa33ddcf19 | ||
|
|
c8a57676b4 | ||
|
|
d0d2bc1996 | ||
|
|
2b8d2b0026 | ||
|
|
735953a262 | ||
|
|
1c686f10a1 | ||
|
|
b7088510c5 | ||
|
|
3bdb921ee5 | ||
|
|
74b48ff56b | ||
|
|
9410370cc5 | ||
|
|
743ddf83c1 | ||
|
|
caa707325a | ||
|
|
3c588e67b8 | ||
|
|
6c26dad048 | ||
|
|
393e2c125e | ||
|
|
e56dc2ed6a | ||
|
|
4a449ed85e | ||
|
|
88dbe90075 | ||
|
|
a6f6451434 | ||
|
|
8a4370c1f6 | ||
|
|
7a068450b3 | ||
|
|
ae3222e4c2 | ||
|
|
27b4bfa3fa | ||
|
|
8af229947f | ||
|
|
f235a2f539 | ||
|
|
b0ebb479f6 | ||
|
|
df92e21520 | ||
|
|
a1a25cc57f | ||
|
|
e9aaf8e0af | ||
|
|
7a80e407af | ||
|
|
57f8d535fb | ||
|
|
170a6096b9 | ||
|
|
fcc444a100 | ||
|
|
8ccb3c21e1 | ||
|
|
0484d4bb77 | ||
|
|
3ce9567f62 | ||
|
|
765e812b77 | ||
|
|
1a63c9296b | ||
|
|
9510b5aea5 | ||
|
|
490e859fbf | ||
|
|
85c4a2fdc2 | ||
|
|
3b9c9f6a97 | ||
|
|
d1f64d3059 | ||
|
|
f62bcdc803 | ||
|
|
2434fd778f | ||
|
|
1a38726fb7 | ||
|
|
24cffb2a69 | ||
|
|
527918545e | ||
|
|
4d268f67ae | ||
|
|
a65c2f4312 | ||
|
|
c490f2b849 | ||
|
|
282f7fc2e3 | ||
|
|
52348af8ec | ||
|
|
39d15ead6f | ||
|
|
d232109fce | ||
|
|
8e9c43610d | ||
|
|
53a8c20cb9 | ||
|
|
333f60a2a6 | ||
|
|
0bacc20a58 | ||
|
|
3e932c9bdf | ||
|
|
cf8a170133 | ||
|
|
67a89d4b6b | ||
|
|
85c2cda7b6 | ||
|
|
61757a6518 | ||
|
|
e245d08e54 | ||
|
|
29f797dc24 | ||
|
|
54ce1d8d2f | ||
|
|
8e47f70066 | ||
|
|
01548089ee | ||
|
|
de8d598f46 | ||
|
|
63aad4b9bf | ||
|
|
33cdb7a541 | ||
|
|
7c2f769a9a | ||
|
|
e084550390 | ||
|
|
3c282e8cf9 | ||
|
|
3c4fbdb50e | ||
|
|
18cdc28963 | ||
|
|
5f004e7167 | ||
|
|
96489607ab | ||
|
|
7436e44416 | ||
|
|
8d30e51603 | ||
|
|
64b582e397 | ||
|
|
8b86d07bfc | ||
|
|
e3fefdebe1 | ||
|
|
46aec4a593 | ||
|
|
2feb3e1d7a | ||
|
|
2609f45799 | ||
|
|
9053cbb90f | ||
|
|
3794d7ab65 | ||
|
|
7eeca21a05 | ||
|
|
70464154c7 | ||
|
|
1b29078fad | ||
|
|
864b078610 | ||
|
|
1a8b319ce2 | ||
|
|
a353514fc8 | ||
|
|
06e294fb3e | ||
|
|
961d4c4a3a | ||
|
|
876aea39e5 | ||
|
|
67be2ba95b | ||
|
|
53d2d080f4 | ||
|
|
998fbeb381 | ||
|
|
1c6e4b7750 | ||
|
|
8fbe21c79c | ||
|
|
d6d0faac6e | ||
|
|
2d4f01e6cb | ||
|
|
b42ad3170e | ||
|
|
a8dddc81f1 | ||
|
|
2e1e6f784b | ||
|
|
2af9b95c7a | ||
|
|
90be010c2b | ||
|
|
3b6b16cf77 | ||
|
|
c0c5c87c29 | ||
|
|
f5bbf4b515 | ||
|
|
c7465608a7 | ||
|
|
03f0a4289b | ||
|
|
bb2a6b73fe | ||
|
|
8e66091dd2 | ||
|
|
a5c114a848 | ||
|
|
254b2c27ac | ||
|
|
29fcb4504c | ||
|
|
ec7402b80a | ||
|
|
4501519c4f | ||
|
|
58ad7dab1b | ||
|
|
4da26a2f8d | ||
|
|
9e6aed0760 | ||
|
|
7033f11d56 | ||
|
|
8fcac42f34 | ||
|
|
4a6a97ee75 | ||
|
|
2174d8fe8c | ||
|
|
eb6f487e2a | ||
|
|
6bbe68dfcb | ||
|
|
bbeceae42e | ||
|
|
cfe785762d | ||
|
|
fdbb329fb6 | ||
|
|
9f1100b967 | ||
|
|
94706d6139 | ||
|
|
b63609e2fa | ||
|
|
84c420139d | ||
|
|
027d21035e | ||
|
|
cc9de01c99 | ||
|
|
61c6f240e9 | ||
|
|
997d673b83 | ||
|
|
6c72846d63 | ||
|
|
8bd6e1d119 | ||
|
|
6484a8e6a4 | ||
|
|
0e8e108680 | ||
|
|
3435b6c4a4 | ||
|
|
d4af6af594 | ||
|
|
b834abd293 | ||
|
|
01a6dd79c4 | ||
|
|
948b6cf7e7 | ||
|
|
b1718f329e | ||
|
|
7237f549a6 | ||
|
|
30b1660005 | ||
|
|
200fe07473 | ||
|
|
86cb22d8c9 | ||
|
|
321766fd46 | ||
|
|
3eedad96ed | ||
|
|
4b26dac08a | ||
|
|
04ef069a20 | ||
|
|
b925ed60e3 | ||
|
|
dfd85a7c53 | ||
|
|
6ca63d4c68 | ||
|
|
2325b547fd | ||
|
|
34e454c054 | ||
|
|
302386d22c | ||
|
|
210c483635 | ||
|
|
8ca4212650 | ||
|
|
c91dba5ed6 | ||
|
|
c8de05f101 | ||
|
|
0ac7cde498 | ||
|
|
108829ad9c | ||
|
|
c5b96f4e9c | ||
|
|
4c2099d33e | ||
|
|
fe5de95008 | ||
|
|
4b0cfc0751 | ||
|
|
c2bf05942e | ||
|
|
df37f80c8e | ||
|
|
2c19d7218d | ||
|
|
34899e8d36 | ||
|
|
bf8c10ed25 | ||
|
|
93c33e08c2 | ||
|
|
3992dd1dd0 | ||
|
|
cab29c2be7 | ||
|
|
f582657ffd | ||
|
|
2823ac1aee | ||
|
|
289caa7cc2 | ||
|
|
0a8bad46b5 | ||
|
|
aa4f518262 | ||
|
|
f76fa879fc | ||
|
|
8d70aba1f5 | ||
|
|
a44bb35aec | ||
|
|
4fda2b656f | ||
|
|
e626d00fdf | ||
|
|
bf09e3c3ae | ||
|
|
753dcd3301 | ||
|
|
8b5dee510e | ||
|
|
9cb73fbf78 | ||
|
|
e6b4deb5c4 | ||
|
|
8848222728 | ||
|
|
3cd62994c7 | ||
|
|
dd93a97790 | ||
|
|
e40e2d2d14 | ||
|
|
26f8ce7b5a | ||
|
|
9a61e374b5 | ||
|
|
9b12e9819c | ||
|
|
5d0a91239c | ||
|
|
c848278690 | ||
|
|
2ebb929e2c | ||
|
|
b34334ba93 | ||
|
|
05a01cd803 | ||
|
|
9ac0c06f26 | ||
|
|
52af22b0e8 | ||
|
|
81cfc73b48 | ||
|
|
f892bfccdf | ||
|
|
dbed8fefac | ||
|
|
ca14637909 | ||
|
|
7db618fba5 | ||
|
|
29c74c09ce | ||
|
|
a2b5b9f97e | ||
|
|
6a05aa4e53 | ||
|
|
43fd5d233a | ||
|
|
0bd39ed035 | ||
|
|
1db8aad039 | ||
|
|
fb2d4267f5 | ||
|
|
d7b203ae08 | ||
|
|
3e07f2e3bc | ||
|
|
94cf6f6640 | ||
|
|
6da5fe4317 | ||
|
|
3a68dee850 | ||
|
|
2ccfa6a2e8 | ||
|
|
f7bf671050 | ||
|
|
4bff9cc3df | ||
|
|
13c68a0184 | ||
|
|
6d92949715 | ||
|
|
5cf31bd3f3 | ||
|
|
929d4c8d61 | ||
|
|
482f796bad | ||
|
|
d85f532ab1 | ||
|
|
b1654f7807 | ||
|
|
4f8526e527 | ||
|
|
4b568fc469 | ||
|
|
d06146ed97 | ||
|
|
8e0e809733 | ||
|
|
d1f33a6c4c | ||
|
|
b3e1b6fdbf | ||
|
|
0bd259403c | ||
|
|
c186846463 | ||
|
|
5f92c3b3fc | ||
|
|
0665091cef | ||
|
|
688d153427 | ||
|
|
bec5ba7a73 | ||
|
|
acedf4d6a3 | ||
|
|
5dd5494f93 | ||
|
|
f253e4fabe | ||
|
|
acd09d24d5 | ||
|
|
ceac95c81a | ||
|
|
47a05d0ea2 | ||
|
|
d2975479f2 | ||
|
|
3c238ffae7 | ||
|
|
69f8d1b717 | ||
|
|
45cd9e65d3 | ||
|
|
2e4b1d8c2b | ||
|
|
4e3b65188d | ||
|
|
0ab32e066b | ||
|
|
79d8b00b27 | ||
|
|
eb02c5a451 | ||
|
|
85509c777d | ||
|
|
27677f86e4 | ||
|
|
16174ca874 | ||
|
|
a4e9233231 | ||
|
|
4fdfafa17f | ||
|
|
c9a7dab419 | ||
|
|
8882d75132 | ||
|
|
f67b15b926 | ||
|
|
2d7958f726 | ||
|
|
36072584d0 | ||
|
|
2119e52f55 | ||
|
|
ca1aa6b663 | ||
|
|
10af671b76 | ||
|
|
a4ec6cce96 | ||
|
|
5082ba7102 | ||
|
|
7405e7001b | ||
|
|
4c70651b81 | ||
|
|
21b5b60278 | ||
|
|
0abc5ec452 | ||
|
|
b1d2d620fa | ||
|
|
af6e4abe84 | ||
|
|
45b4315842 | ||
|
|
d2cb96a9e5 | ||
|
|
a3ff845a14 | ||
|
|
621f05c687 | ||
|
|
daf97eabab | ||
|
|
ee3d11cb53 | ||
|
|
1bc7e5e0a5 | ||
|
|
9280d23b1a | ||
|
|
cacd52f81d | ||
|
|
95f64761ca | ||
|
|
6e24792b9b | ||
|
|
9afe26f1d6 | ||
|
|
e7d959da90 | ||
|
|
c3f0867d2c | ||
|
|
1eaf124d4e | ||
|
|
03076bdc76 | ||
|
|
cd32d6debe | ||
|
|
3212f059ff | ||
|
|
9ae4b93083 | ||
|
|
aae7af2194 | ||
|
|
63f4c73ef0 | ||
|
|
f93d3381e0 | ||
|
|
099c80e04b | ||
|
|
14face336e | ||
|
|
67b10d8d38 | ||
|
|
1219230168 | ||
|
|
8d840e694d | ||
|
|
87382aad4d | ||
|
|
aca3a05222 | ||
|
|
84ca145663 | ||
|
|
01d0338851 | ||
|
|
f427c0532d | ||
|
|
c8532a548c | ||
|
|
1e3aef5b94 | ||
|
|
0d3180271b | ||
|
|
f0d17b13f2 | ||
|
|
9a46301d46 | ||
|
|
3bd609ee41 | ||
|
|
2c7f0e8583 | ||
|
|
ce36a25ba3 | ||
|
|
c53484f92e | ||
|
|
f391ccb8e8 | ||
|
|
a96d6a8148 | ||
|
|
bdca09007d | ||
|
|
c0e84043c9 | ||
|
|
0a884df74f | ||
|
|
519b14d506 | ||
|
|
f008a65d91 | ||
|
|
61bb70cd30 | ||
|
|
68fa3dadb0 | ||
|
|
eb38d03976 | ||
|
|
d480bb3ecd | ||
|
|
dfdb6fa1a6 | ||
|
|
42352d9f57 | ||
|
|
eae1c5db70 | ||
|
|
cc37097164 | ||
|
|
6597cc9ce8 | ||
|
|
b3f752d46c | ||
|
|
679e2d0f6b | ||
|
|
4607079ca9 | ||
|
|
ad1a42d6a5 | ||
|
|
afdf31a66c | ||
|
|
37956e2f05 | ||
|
|
dc6aa66f9a | ||
|
|
f16f16c15e | ||
|
|
3b95cbd960 | ||
|
|
3b5e8edd37 | ||
|
|
5f4571e895 | ||
|
|
2d5e991eaf | ||
|
|
7ba8bb4405 | ||
|
|
82aa181540 | ||
|
|
1a3e17bae8 | ||
|
|
e0e3664fdb | ||
|
|
23bfaf1ba2 | ||
|
|
e7d72b6f53 | ||
|
|
eab26deab9 | ||
|
|
49540dbe5e | ||
|
|
cbd891785e | ||
|
|
b1cc732cb2 | ||
|
|
b3b4f55c68 | ||
|
|
8b6b039c13 | ||
|
|
9dca62ff8b | ||
|
|
e0892fcebb | ||
|
|
adf1443105 | ||
|
|
53c2558d26 | ||
|
|
a5ea240793 | ||
|
|
4cd1629118 | ||
|
|
ce32a73e86 | ||
|
|
8a13fc7cd9 | ||
|
|
708de50887 | ||
|
|
4df478316c | ||
|
|
a5dff9fb15 | ||
|
|
b51f4d53b6 | ||
|
|
7d045842dd | ||
|
|
a9ece9e49d | ||
|
|
e6da067cf8 | ||
|
|
bae40c82b9 | ||
|
|
651edf5bc0 | ||
|
|
3a8642b1e0 | ||
|
|
09b6b9259c | ||
|
|
907f326788 | ||
|
|
4a350d8ad9 | ||
|
|
3881db0b4e | ||
|
|
9edae3e877 | ||
|
|
236208e393 | ||
|
|
4ff98de707 | ||
|
|
54964629fe | ||
|
|
072f606784 | ||
|
|
21d2338ec1 | ||
|
|
0d468e0df4 | ||
|
|
5007d49c83 | ||
|
|
35ba69a175 | ||
|
|
fa0ce2a14c | ||
|
|
389750d7d8 | ||
|
|
6c7db7ad23 | ||
|
|
2986426251 | ||
|
|
56444ebcaf | ||
|
|
c63a1978cb | ||
|
|
9d9e998d49 | ||
|
|
f7c991fa9a | ||
|
|
4d14fbb1e7 | ||
|
|
5428730e7a | ||
|
|
bf773df099 | ||
|
|
6dea5100b1 | ||
|
|
aa55f4dceb | ||
|
|
516e92926a | ||
|
|
2cd9994321 | ||
|
|
e69306a2ba | ||
|
|
93ecd031bd | ||
|
|
4eaf69dfa7 | ||
|
|
bc93bda1b7 | ||
|
|
6923f0df2a | ||
|
|
bc584aa56e | ||
|
|
ec95d06f6c | ||
|
|
c5d18d9046 | ||
|
|
af06983c60 | ||
|
|
e027872f50 | ||
|
|
e98e4fde8d | ||
|
|
2daf9de890 | ||
|
|
ae50511135 | ||
|
|
2227f83b1d | ||
|
|
e764a2298d | ||
|
|
ed4a8c2a36 | ||
|
|
8cc3e571e3 | ||
|
|
66a89a7d54 | ||
|
|
666be94a71 | ||
|
|
49fabf23a8 | ||
|
|
a3b23e348a | ||
|
|
384e887fdb | ||
|
|
d3e84cbc4c | ||
|
|
1b06948fb0 | ||
|
|
98d075728f | ||
|
|
1a7ecda67c | ||
|
|
067078db86 | ||
|
|
37650fae75 | ||
|
|
13be3e3216 | ||
|
|
87a7809104 | ||
|
|
e82c33716a | ||
|
|
9ebdddad1f | ||
|
|
90f85bb9c3 | ||
|
|
002d04a3a1 | ||
|
|
88a0b12e73 | ||
|
|
5828e7f576 | ||
|
|
a11da90d10 | ||
|
|
d8026833dc | ||
|
|
8029bb6142 | ||
|
|
baaddd395c | ||
|
|
8bcbe7b3c6 | ||
|
|
4297320886 | ||
|
|
614994d8c7 | ||
|
|
65e1f261c0 | ||
|
|
aa4caa6938 | ||
|
|
9741574516 | ||
|
|
c27c654180 | ||
|
|
c63580ee38 | ||
|
|
e9d4328fad | ||
|
|
545f9f2cca | ||
|
|
db6930d9e4 | ||
|
|
9379a41b37 | ||
|
|
c0eeedc71a | ||
|
|
400197def8 | ||
|
|
0f8b202531 | ||
|
|
1eb9775f34 | ||
|
|
89bdb315d5 | ||
|
|
ab1afd68b7 | ||
|
|
e1109e9e51 | ||
|
|
7230e19166 | ||
|
|
eb7a94bb55 | ||
|
|
18de4e57eb | ||
|
|
74cc12133e | ||
|
|
7583354f44 | ||
|
|
14c49dd681 | ||
|
|
e060208417 | ||
|
|
635eea7acb | ||
|
|
2c47f4a23d | ||
|
|
2223577302 | ||
|
|
f42d235dec | ||
|
|
06a3e278ff | ||
|
|
17c30b5fdc | ||
|
|
024b30d0b7 | ||
|
|
a108610a67 | ||
|
|
12b6abe6a3 | ||
|
|
6f82b36962 | ||
|
|
ea6b397526 | ||
|
|
118bb3f3ba | ||
|
|
bd68075f4d | ||
|
|
5fa68f8cdd | ||
|
|
199aaf2d05 | ||
|
|
892efcc166 | ||
|
|
bc90c6b82f | ||
|
|
82d3d1f0f3 | ||
|
|
576b3198f1 | ||
|
|
f55cad8f1c | ||
|
|
d98654b50d | ||
|
|
675d9d8c09 | ||
|
|
bab0bb349f | ||
|
|
65d3ed8ce8 | ||
|
|
8fc4000b63 | ||
|
|
5b35f781cb | ||
|
|
2cd11b7da7 | ||
|
|
cf30d2923c | ||
|
|
8fc97794e8 | ||
|
|
df2ba37687 | ||
|
|
85b16b2a54 | ||
|
|
eeabc6b61a | ||
|
|
2b3dafed61 | ||
|
|
7232fc36ab | ||
|
|
a8e1fd1054 | ||
|
|
c248a50338 | ||
|
|
fa0ca23798 | ||
|
|
ed224cf912 | ||
|
|
b51df25371 | ||
|
|
db8cc8eb7b | ||
|
|
a027e9fe14 | ||
|
|
b882ca809a | ||
|
|
daf0a9dc9a | ||
|
|
f2dafa7544 | ||
|
|
7fe22875a6 | ||
|
|
3da3c8ecd8 | ||
|
|
254acbbbe2 | ||
|
|
519c850f17 | ||
|
|
1cf57508b0 | ||
|
|
f8bacfcc67 | ||
|
|
9daa77c1a4 | ||
|
|
c4775dd313 | ||
|
|
ae87cb031e | ||
|
|
3c049f25ee | ||
|
|
85a90b62b7 | ||
|
|
10b0124951 | ||
|
|
c0d7ff9543 | ||
|
|
74012d4869 | ||
|
|
830c40440f | ||
|
|
21a2f71ad9 | ||
|
|
cf75e3e664 | ||
|
|
ffc307323a | ||
|
|
ff0aec28c5 | ||
|
|
31394b03ae | ||
|
|
2ab93cb385 | ||
|
|
172b396dc9 | ||
|
|
9b82d08087 | ||
|
|
410617f73b | ||
|
|
ade0d38a7c | ||
|
|
3ce55a2ac4 | ||
|
|
cc6e4dbec0 | ||
|
|
2935ae7bf1 | ||
|
|
96e418e63b | ||
|
|
e4a84dcfe9 | ||
|
|
9ea91cfce3 | ||
|
|
8c7f0cf988 | ||
|
|
afa9a00259 | ||
|
|
a0ee11c300 | ||
|
|
6e02dace18 | ||
|
|
93bac6f26f | ||
|
|
8657fbd810 | ||
|
|
68203be004 | ||
|
|
b2323ef2e7 | ||
|
|
70b017fb72 | ||
|
|
607e3bbc11 | ||
|
|
315c9285de | ||
|
|
c22427b8fd | ||
|
|
2fcfac9e84 | ||
|
|
7cc857233f | ||
|
|
f85aa09784 | ||
|
|
0b0cecc2a9 | ||
|
|
3b5b9c9587 | ||
|
|
cbe190fa70 | ||
|
|
9156466351 | ||
|
|
f79caf095d | ||
|
|
d31dcd13fc | ||
|
|
552224bbfe | ||
|
|
5ba01674fb | ||
|
|
7390afc5e1 | ||
|
|
85ec23d552 | ||
|
|
007064c0ac | ||
|
|
fd53756170 | ||
|
|
9e6dd9f23d | ||
|
|
ef8be6c7c2 | ||
|
|
de4b5b70da | ||
|
|
9edeee4b3f | ||
|
|
767a0cc1fd | ||
|
|
ae09247e34 | ||
|
|
a3ea4798bc | ||
|
|
af54a22d16 | ||
|
|
b026bfc71b | ||
|
|
80d80ad8aa | ||
|
|
dbecf33924 | ||
|
|
2b08e3604d | ||
|
|
7d3a672c2b | ||
|
|
022e46ae38 | ||
|
|
3f930d228e | ||
|
|
5eba370f7b | ||
|
|
e138951e9e | ||
|
|
5cd18d7275 | ||
|
|
d7ff5a53a7 | ||
|
|
aa14bb6fdf | ||
|
|
c275f682a9 | ||
|
|
08894025bc | ||
|
|
b063a48520 | ||
|
|
858d38d314 | ||
|
|
f5875d09e9 | ||
|
|
34db181686 | ||
|
|
be55ea2b0b | ||
|
|
aa0dd4d10d | ||
|
|
39533e4209 | ||
|
|
4bba3bf1d2 | ||
|
|
2d29d1549a | ||
|
|
c7a078f17f | ||
|
|
2cf92037e9 | ||
|
|
452ee7a103 | ||
|
|
68f70af2f3 | ||
|
|
11682e487e | ||
|
|
4d006230f9 | ||
|
|
a32f4bb05c | ||
|
|
6d4e260127 | ||
|
|
45404b5bcf | ||
|
|
861551b2ba | ||
|
|
aac820a8d5 | ||
|
|
a5ff25b0fe | ||
|
|
b81638794f | ||
|
|
88cfeb2791 | ||
|
|
d0b57535ed | ||
|
|
528add4702 | ||
|
|
dd47971877 | ||
|
|
d51a99c8e2 | ||
|
|
e192f01dc3 | ||
|
|
aedaf57249 | ||
|
|
222e58e76e | ||
|
|
c8fc80f4a0 | ||
|
|
1ed180887d | ||
|
|
d6a38a567f | ||
|
|
ae9c3276bc | ||
|
|
35d34cd4e8 | ||
|
|
4f45824632 | ||
|
|
532da174dd | ||
|
|
dbe13feba2 | ||
|
|
1c93061a7f | ||
|
|
0e371930e6 | ||
|
|
06bd748bd6 | ||
|
|
b64775772b | ||
|
|
5f76314085 | ||
|
|
57588ea936 | ||
|
|
3f344b55bb | ||
|
|
e4ae0980b4 | ||
|
|
e41da0d697 | ||
|
|
ce3955d393 | ||
|
|
22a2cc564f | ||
|
|
2b19513a05 | ||
|
|
60f8fe6f41 | ||
|
|
a2fd010521 | ||
|
|
a36d5b6302 | ||
|
|
2c14dc16dd | ||
|
|
4c7f3f7972 | ||
|
|
794df59265 | ||
|
|
3dd71713c2 | ||
|
|
c0777d1a0a | ||
|
|
55392cb047 | ||
|
|
070eedda18 | ||
|
|
ae6ec78dc3 | ||
|
|
9fe1b2a565 | ||
|
|
f374419be3 | ||
|
|
0ff25cb116 | ||
|
|
d7e50f352a | ||
|
|
aa9254eeb0 | ||
|
|
c1eba336a8 | ||
|
|
a5d7fc484a | ||
|
|
7a294e6d4e | ||
|
|
2f79417d0d | ||
|
|
73b42f924d | ||
|
|
ccf915e798 | ||
|
|
62ffa14f10 | ||
|
|
5d7840a34c | ||
|
|
fd14f6ff73 | ||
|
|
88962f9358 | ||
|
|
5bec1729f1 | ||
|
|
f3662fc152 | ||
|
|
c5047186dd | ||
|
|
1e39bd8336 | ||
|
|
e58de234ac | ||
|
|
903cc181c4 | ||
|
|
2183a098c3 | ||
|
|
1d4cba9180 | ||
|
|
ed724c5280 | ||
|
|
fbd13ac42c | ||
|
|
ea6eab557b | ||
|
|
a1cb2a0589 | ||
|
|
5de5a8ca94 | ||
|
|
274026d338 | ||
|
|
3875bc34bd | ||
|
|
8db3ccce2e | ||
|
|
34bb6fd851 | ||
|
|
ffa74db136 | ||
|
|
66f2cbb91f | ||
|
|
a57d49b057 | ||
|
|
7b41a0ff16 | ||
|
|
4ca50f8973 | ||
|
|
abe2c6870b | ||
|
|
c0ae681d69 | ||
|
|
b4745c0134 | ||
|
|
d369a6429e | ||
|
|
af3e326178 | ||
|
|
8e256a2d5d | ||
|
|
bdcbd9008d | ||
|
|
453faa6a76 | ||
|
|
b0941faf88 | ||
|
|
91ba215568 | ||
|
|
be32f4072e | ||
|
|
bcb217c1da | ||
|
|
490a16a8df | ||
|
|
28d8c56534 | ||
|
|
46423ed166 | ||
|
|
4286a510b4 | ||
|
|
8d193ab39f | ||
|
|
439e377111 | ||
|
|
28ebce6b65 | ||
|
|
2ccd1625e7 | ||
|
|
e05e61a59b | ||
|
|
4660eae8c7 | ||
|
|
e55e90db1a | ||
|
|
23da63767c | ||
|
|
13b19c35c6 | ||
|
|
7e25ec1ac3 | ||
|
|
ab1d05642e | ||
|
|
079b28fddf | ||
|
|
d52d62badb | ||
|
|
fa53135c8a | ||
|
|
d6a3f9fd8f | ||
|
|
75ca4af74e | ||
|
|
dc5fc6bdc2 | ||
|
|
67f8ee61a4 | ||
|
|
2153cf39b5 | ||
|
|
0ead82ae21 | ||
|
|
98d4cf7585 | ||
|
|
3259536411 | ||
|
|
f3a79cc779 | ||
|
|
c45c6dbe67 | ||
|
|
a1518c33af | ||
|
|
a9f7cdb630 | ||
|
|
6f678294a0 | ||
|
|
de07abee98 | ||
|
|
437edefa0c | ||
|
|
f5b36ecbac | ||
|
|
8772c85964 | ||
|
|
a31454327a | ||
|
|
9e55cb114c | ||
|
|
04416a67d3 | ||
|
|
dd2cdaf49a | ||
|
|
8c45eb7524 | ||
|
|
c20bea50e3 | ||
|
|
fe18c35dab | ||
|
|
f6ef6abdf1 | ||
|
|
43a6837e81 | ||
|
|
dc4b933000 | ||
|
|
c90703dc13 | ||
|
|
2165941026 | ||
|
|
4a28893171 | ||
|
|
369581976a | ||
|
|
7fef683980 | ||
|
|
8358f68086 | ||
|
|
0aa6b03c2a | ||
|
|
44f8c98660 | ||
|
|
188ec6ea1d | ||
|
|
8169d8509f | ||
|
|
e217d39882 | ||
|
|
887ee0fd41 | ||
|
|
137e93319e | ||
|
|
48a1384197 | ||
|
|
8aed4d634b | ||
|
|
fd0cb4c458 | ||
|
|
82735f0fab | ||
|
|
1d3710afd8 | ||
|
|
e8ae92f4d4 | ||
|
|
b2e54a0590 | ||
|
|
d64d220b49 | ||
|
|
2523a95a9a | ||
|
|
207c41581c | ||
|
|
6fc4a3ed04 | ||
|
|
2fabb6951e | ||
|
|
8c2f5f91d5 | ||
|
|
7443d41444 | ||
|
|
4421734da1 | ||
|
|
4385ca0966 | ||
|
|
57fa592a13 | ||
|
|
1298118b59 | ||
|
|
3f2cb40cc1 | ||
|
|
5448abb304 | ||
|
|
892fab5455 | ||
|
|
ef3619350d | ||
|
|
846fb3e7f3 | ||
|
|
e00e9ba5aa | ||
|
|
f41511047e | ||
|
|
16352df5b1 | ||
|
|
5238c2457d | ||
|
|
4d57f414f5 | ||
|
|
6305088cb0 | ||
|
|
e2db1cd425 | ||
|
|
16561a8e84 | ||
|
|
cae1b3ebd4 | ||
|
|
e68737dcfb | ||
|
|
00448d23c0 | ||
|
|
272ae547ef | ||
|
|
3fd688191c | ||
|
|
5c0b6f2225 | ||
|
|
cc530e3446 | ||
|
|
fdc1d46b89 | ||
|
|
5dce677091 | ||
|
|
d0fb5a4b04 | ||
|
|
e27daed0ec | ||
|
|
d2183a8b32 | ||
|
|
0b2d6407dd | ||
|
|
ec1b1ffe16 | ||
|
|
32a66be555 | ||
|
|
c090c34491 | ||
|
|
4f7d3ad76c | ||
|
|
ce81872686 | ||
|
|
2314c41103 | ||
|
|
df39b66e11 | ||
|
|
adeb5de19f | ||
|
|
26312e0c0e | ||
|
|
cd6d4021b1 | ||
|
|
24d345a970 | ||
|
|
b4fd4a0c38 | ||
|
|
451e695006 | ||
|
|
26b771f9f9 | ||
|
|
0679aedb7e | ||
|
|
bfa4e08a4e | ||
|
|
c1185a34aa | ||
|
|
be0ce57375 | ||
|
|
b204b90ffc | ||
|
|
364b6938a5 | ||
|
|
e188925d2b | ||
|
|
10a47cdbbb | ||
|
|
67014ae4f8 | ||
|
|
b93fc3f028 | ||
|
|
b6e5980510 | ||
|
|
79e8921f76 | ||
|
|
34fe3ca4fc | ||
|
|
f26311c60e | ||
|
|
43f9907af7 | ||
|
|
0e6f5d154e | ||
|
|
7042dd8447 | ||
|
|
05031e0979 | ||
|
|
28b3f6780c | ||
|
|
f8335c6df9 | ||
|
|
9dcdc1f8f3 | ||
|
|
9ae7d4f2bf | ||
|
|
c158169bdf | ||
|
|
e4c1285eaf | ||
|
|
02a5375503 | ||
|
|
32883b4e18 | ||
|
|
6d585e88a4 | ||
|
|
73570b5628 | ||
|
|
e7fcb068d9 | ||
|
|
a137a70278 | ||
|
|
72113991a8 | ||
|
|
a04fb8e7de | ||
|
|
ca2f30cd61 | ||
|
|
ebfad05e3f | ||
|
|
f54ea9d978 | ||
|
|
d4c84cee19 | ||
|
|
4da59cdc97 | ||
|
|
d4e7eb5888 | ||
|
|
f8b0a7105b | ||
|
|
aecde91d33 | ||
|
|
870dde232a | ||
|
|
f7d7f81c49 | ||
|
|
1f04c61482 | ||
|
|
5d957a6b7c | ||
|
|
94f61b0a0c | ||
|
|
de6535b722 | ||
|
|
6dd18e4328 | ||
|
|
c46e4453c7 | ||
|
|
2e6312ec03 | ||
|
|
1566a834e1 | ||
|
|
607deaa3c4 | ||
|
|
686186d5ba | ||
|
|
0c1ef72285 | ||
|
|
d6bd12cfcd | ||
|
|
4a1712f4cd | ||
|
|
b4e298230d | ||
|
|
6cb42a4251 | ||
|
|
3ead4b4d4b | ||
|
|
3c0e321538 | ||
|
|
1f67434c8c | ||
|
|
6058b9851c | ||
|
|
c586319978 | ||
|
|
0591fe0e8b | ||
|
|
dabe3b17e6 | ||
|
|
fbf50d45cb | ||
|
|
d59075e897 | ||
|
|
2b491179f7 | ||
|
|
a62d17b1b1 | ||
|
|
2431758218 | ||
|
|
b94586fdf4 | ||
|
|
a6b83d77bd | ||
|
|
43c55b36c8 | ||
|
|
24c7928c4b | ||
|
|
8c876c302a | ||
|
|
778a4373ae | ||
|
|
7a15cf1157 | ||
|
|
54e3210d7e | ||
|
|
a3197c12a8 | ||
|
|
e7de841939 | ||
|
|
29ba00f370 | ||
|
|
e35d70f338 | ||
|
|
0271c65ca2 | ||
|
|
e604524301 | ||
|
|
298831d987 | ||
|
|
3b2e97a729 | ||
|
|
edaba44c87 | ||
|
|
dc2dc910e8 | ||
|
|
96bf260ce9 | ||
|
|
115ea4ccbb | ||
|
|
3fb400beb4 | ||
|
|
6442279a44 | ||
|
|
592500cb0c | ||
|
|
98f3e45c0a | ||
|
|
e365196ee3 | ||
|
|
f656499c23 | ||
|
|
180c019d2e | ||
|
|
7db50921bc | ||
|
|
257b3f3ee6 | ||
|
|
f7c69b6baf | ||
|
|
89a3b84ea1 | ||
|
|
bec29f99e6 | ||
|
|
72274bda82 | ||
|
|
04b62a62cb | ||
|
|
ab7329d3eb | ||
|
|
a819796ce2 | ||
|
|
8c6cdcc97e | ||
|
|
bf0148e047 | ||
|
|
bcf44b8ab2 | ||
|
|
ebc9711309 | ||
|
|
4097f90938 | ||
|
|
d73f77affc | ||
|
|
b4794dc541 | ||
|
|
5ee156057e | ||
|
|
68a63bb280 | ||
|
|
815677863f | ||
|
|
df2f13c9b6 | ||
|
|
3984037c98 | ||
|
|
9c8570b37d | ||
|
|
f7cddb81df | ||
|
|
dc1fbbf796 | ||
|
|
7b7b4e5f22 | ||
|
|
8c9b0285e4 | ||
|
|
3ff5caef94 | ||
|
|
4a3446a0a5 | ||
|
|
6f6d9b39ba | ||
|
|
7d2f68c5e4 | ||
|
|
5416e92dbf | ||
|
|
340b5bd165 | ||
|
|
fbd15a81b4 | ||
|
|
039d0abce2 | ||
|
|
aefb65b1b8 | ||
|
|
f7c322c311 | ||
|
|
b5507f79e4 | ||
|
|
a2703ce51b | ||
|
|
d48b12aa09 | ||
|
|
452c1fbfd4 | ||
|
|
f77fd2a944 | ||
|
|
2b1da5b231 | ||
|
|
1b48b98e22 | ||
|
|
4af872ddd5 | ||
|
|
6614107192 | ||
|
|
09e1f9addf | ||
|
|
baf282ecb2 | ||
|
|
6022b32227 | ||
|
|
9e9b08a5a3 | ||
|
|
8147b974aa | ||
|
|
0a5a0ef319 | ||
|
|
00c73b8388 | ||
|
|
dcb8eb7d6d | ||
|
|
7f11651311 | ||
|
|
71518b025d | ||
|
|
287722b1d2 | ||
|
|
3a6f5dd4ee | ||
|
|
4aa3d321fa | ||
|
|
abb04b177c | ||
|
|
764e0f0e7f | ||
|
|
b668175c62 | ||
|
|
5011c394d7 | ||
|
|
994502077a | ||
|
|
7d8bed16b0 | ||
|
|
a45be62b68 | ||
|
|
e0a25b5098 | ||
|
|
fa712aa3a0 | ||
|
|
1599ba0294 | ||
|
|
94d567bf8f | ||
|
|
17f17bcc9e | ||
|
|
12c262621e | ||
|
|
dd35f2c14d | ||
|
|
66a9fd928a | ||
|
|
da82e5dd04 | ||
|
|
98498c9180 | ||
|
|
7b0ed42d3b | ||
|
|
3e4fbde0b4 | ||
|
|
7b0d23f91f | ||
|
|
08d00fa234 | ||
|
|
2e32d9806f | ||
|
|
6e73fbf65e | ||
|
|
b9f74d349c | ||
|
|
5e45e38481 | ||
|
|
78b8455bba | ||
|
|
6f71885aa2 | ||
|
|
e107567997 | ||
|
|
8d42acec16 | ||
|
|
33d73eaecd | ||
|
|
47b20b01d0 | ||
|
|
b94cf700b4 | ||
|
|
a26d30be3c | ||
|
|
ec1cca7ca4 | ||
|
|
0c321c8c98 | ||
|
|
7a54967bee | ||
|
|
f3b6d25aaa | ||
|
|
419133d3e1 | ||
|
|
1402ff371e | ||
|
|
ee2d67c151 | ||
|
|
a8f1db0db1 | ||
|
|
4abcbb9b51 | ||
|
|
e33dd8acc3 | ||
|
|
64e96cc101 | ||
|
|
1aaa737dd6 | ||
|
|
31e3fc9060 | ||
|
|
b70b868552 | ||
|
|
7235357ef5 | ||
|
|
18eecbe9f4 | ||
|
|
505525134f | ||
|
|
7dd740f51a | ||
|
|
3d590f8eb6 | ||
|
|
42a5c6a19f | ||
|
|
2c4f6063a6 | ||
|
|
845767b1d7 | ||
|
|
3e144af127 | ||
|
|
45f470e3a7 | ||
|
|
42a5c60af6 | ||
|
|
29cebd1e1f | ||
|
|
4450f5a084 | ||
|
|
b8230e144a | ||
|
|
d500902eff | ||
|
|
b787de0163 | ||
|
|
2f0d525c2e | ||
|
|
3f0c65ebb2 | ||
|
|
f33796797d | ||
|
|
68a09b9804 | ||
|
|
5e5d149ca5 | ||
|
|
bdf1c275c4 | ||
|
|
439a69f413 | ||
|
|
a14974fbf2 | ||
|
|
1ecd9af2e1 | ||
|
|
c8cc2dac04 | ||
|
|
60dd33b48f | ||
|
|
8b7d8b7786 | ||
|
|
fb7ea7810e | ||
|
|
508e16aa80 | ||
|
|
a057db8756 | ||
|
|
a1c588bde8 | ||
|
|
9b17fdeae2 | ||
|
|
29c0c737ed | ||
|
|
be6986a7f6 | ||
|
|
63c03bb28c | ||
|
|
758f5b27c3 | ||
|
|
32bfb3d57e | ||
|
|
6bd8822a90 | ||
|
|
abf461a049 | ||
|
|
4e98055b9c | ||
|
|
e6ab5bd86d | ||
|
|
02e0651eab | ||
|
|
93be634673 | ||
|
|
a1978f661b | ||
|
|
9bda864fed | ||
|
|
b6903c6b99 | ||
|
|
1e7394135d | ||
|
|
61ccaab55b | ||
|
|
f17c3c52c4 | ||
|
|
f16e721d01 | ||
|
|
6dfdca2d19 | ||
|
|
ee848e66ac | ||
|
|
91e1fa6aff | ||
|
|
6049cf9047 | ||
|
|
e91366c328 | ||
|
|
d6a5aaf4ad | ||
|
|
fcf3f2abc7 | ||
|
|
ae77622026 | ||
|
|
878b395e20 | ||
|
|
92aee9b69c | ||
|
|
fe10ddc720 | ||
|
|
46899f042f | ||
|
|
d4249da131 | ||
|
|
6cae018066 | ||
|
|
95c1886df5 | ||
|
|
fbd8cb07ea | ||
|
|
4868903844 | ||
|
|
62e721b1c8 | ||
|
|
1ceaf1df22 | ||
|
|
21c9f7b7fb | ||
|
|
f5526f73c7 | ||
|
|
15fad2e841 | ||
|
|
3ecb43072d | ||
|
|
2fce2318ed | ||
|
|
226fd29af8 | ||
|
|
c48b39baab | ||
|
|
ed19a6960e | ||
|
|
11b4de63ee | ||
|
|
b9d1d52ab3 | ||
|
|
fe548e580d | ||
|
|
fd7d2765c8 | ||
|
|
a226a70383 | ||
|
|
519e69a7f8 | ||
|
|
3d599f8044 | ||
|
|
bbf0393008 | ||
|
|
f1a4af013a | ||
|
|
05af9f9810 | ||
|
|
f68aada9f8 | ||
|
|
52d60d9623 | ||
|
|
2ddf8a44bc | ||
|
|
281fbc2bee | ||
|
|
c174568081 | ||
|
|
f4a519c824 | ||
|
|
62e4e2f716 | ||
|
|
193e6dfc93 | ||
|
|
7596658e6c | ||
|
|
73d6bd8400 | ||
|
|
922fabd935 | ||
|
|
2f3d267439 | ||
|
|
bdaf7ff30b | ||
|
|
cfca98512a | ||
|
|
23d9e86c46 | ||
|
|
6ac6fb0192 | ||
|
|
aaa36b9d3b | ||
|
|
2c799a8ccf | ||
|
|
56a5a7d72e | ||
|
|
410f9dd759 | ||
|
|
ba45217756 | ||
|
|
5a5929048d | ||
|
|
bfc3c7fbf9 | ||
|
|
e151bd4cd1 | ||
|
|
bfe68520f4 | ||
|
|
45734c0b5c | ||
|
|
d689062fc3 | ||
|
|
881574ed39 | ||
|
|
0bd5aa873b | ||
|
|
51f3ac2376 | ||
|
|
e5802853c0 | ||
|
|
edb5e36916 | ||
|
|
33ba94e784 | ||
|
|
9c969e0026 | ||
|
|
858622a98d | ||
|
|
c673489461 | ||
|
|
53a39b6947 | ||
|
|
8f82d86a5d | ||
|
|
f607cd8bad | ||
|
|
5b0965dc53 | ||
|
|
0db78100cd | ||
|
|
2196f2259f | ||
|
|
55814cbda4 | ||
|
|
6fb48023f2 | ||
|
|
76c1800a53 | ||
|
|
3b2f01e974 | ||
|
|
db141e1f3f | ||
|
|
8ca8824165 | ||
|
|
2e49161415 | ||
|
|
e5f38a6fc1 | ||
|
|
8c105d87c1 | ||
|
|
8c2946a41b | ||
|
|
4f21915f35 | ||
|
|
585bdb549f | ||
|
|
8091c9e737 | ||
|
|
fc504e18d2 | ||
|
|
90c76bb992 | ||
|
|
3da1aa3ec6 | ||
|
|
0a0d72e016 | ||
|
|
550889808a | ||
|
|
1c1da6433a | ||
|
|
963d7958ea | ||
|
|
7031247614 | ||
|
|
07738e13ef | ||
|
|
3ab96aa1ee | ||
|
|
bdd3f6ed44 | ||
|
|
3328847e27 | ||
|
|
4a6f072361 | ||
|
|
5bbcdd121a | ||
|
|
8e89dc8aa9 | ||
|
|
c458b726b4 | ||
|
|
c0a156f347 | ||
|
|
8e12cd6b02 | ||
|
|
a6f92b8ff9 | ||
|
|
cdb1cf1b63 | ||
|
|
877b397e04 | ||
|
|
df13e3ab82 | ||
|
|
8536fe4987 | ||
|
|
eba08334d1 | ||
|
|
165a99fd83 | ||
|
|
6754a9f3da | ||
|
|
12b0d81dda | ||
|
|
95da7c1c87 | ||
|
|
c903785864 | ||
|
|
eae94c5f23 | ||
|
|
ddabfdca3d | ||
|
|
5cf6a30027 | ||
|
|
91c9b4e168 | ||
|
|
914a0c60b0 | ||
|
|
773fb7c75b | ||
|
|
afe20ffe92 | ||
|
|
0b72c0b25c | ||
|
|
f06899303c | ||
|
|
b121d1730b | ||
|
|
5d570b5140 | ||
|
|
980a537930 | ||
|
|
d700c78f6c | ||
|
|
c7abc03fee | ||
|
|
9f243563b9 | ||
|
|
5eac8d860a | ||
|
|
1c8f860b6e | ||
|
|
1226308f3d | ||
|
|
40dd25c122 | ||
|
|
fa71885cf9 | ||
|
|
2a7be0eabb | ||
|
|
ab7c828cfa | ||
|
|
e6f8cfb16c | ||
|
|
0283a42273 | ||
|
|
d1a6d29fdd | ||
|
|
ee15aa888f | ||
|
|
3cc975813d | ||
|
|
f226177bca | ||
|
|
995478adac | ||
|
|
62915d5af5 | ||
|
|
825e2eec51 | ||
|
|
b7f2bae2ef | ||
|
|
9b4701fed7 | ||
|
|
937e55eb46 | ||
|
|
7c003e9e7a | ||
|
|
f0f973eb00 | ||
|
|
f399dd3498 | ||
|
|
d2e5bb99ef | ||
|
|
77eeea95c7 | ||
|
|
056ad51c24 | ||
|
|
97e38255c6 | ||
|
|
88004cac76 | ||
|
|
1162a5f916 | ||
|
|
418c37dd52 | ||
|
|
b66827998d | ||
|
|
b195656900 | ||
|
|
2628ee98f3 | ||
|
|
176c0b2d36 | ||
|
|
4986592dd7 | ||
|
|
a4c4324ba3 | ||
|
|
6442ab2f20 | ||
|
|
c19786bdfb | ||
|
|
1b498128ef | ||
|
|
556939139b | ||
|
|
d5dfd37385 | ||
|
|
508b4d648d | ||
|
|
163813145d | ||
|
|
5baa1aaa2a | ||
|
|
59b7d5a9f4 | ||
|
|
bbd1187a9c | ||
|
|
3f65ae39af | ||
|
|
8bac9853fa | ||
|
|
301a6736ac | ||
|
|
55ee21421e | ||
|
|
1a4ca389cd | ||
|
|
27cfeefef1 | ||
|
|
cc357b2b7d | ||
|
|
6335ac6a47 | ||
|
|
e61ebb4eb9 | ||
|
|
a6b8edde62 | ||
|
|
a4450db277 | ||
|
|
b7e38e95f0 | ||
|
|
cda572fd59 | ||
|
|
af4a0ffa21 | ||
|
|
f786c86f77 | ||
|
|
55365b1d17 | ||
|
|
d605c850b7 | ||
|
|
5bb33ce420 | ||
|
|
39268c681f | ||
|
|
a2b82c18d7 | ||
|
|
83a9ab44bd | ||
|
|
3bf3a276de | ||
|
|
9a7fbaee00 | ||
|
|
6ed01f24be | ||
|
|
04428c5aed | ||
|
|
ba8e48be38 | ||
|
|
bc2613c42b | ||
|
|
ac71a45b3b | ||
|
|
30425a194e | ||
|
|
63e678928b | ||
|
|
e32896137e | ||
|
|
0787909045 | ||
|
|
1acfb53c4c | ||
|
|
46c7e53ca1 | ||
|
|
7228709616 | ||
|
|
2ca5d39f7d | ||
|
|
08583463be | ||
|
|
84d3f6ac9c | ||
|
|
0f8fc7bdee | ||
|
|
cc0ae5e229 | ||
|
|
5750447826 | ||
|
|
908f0047f8 | ||
|
|
e533903cee | ||
|
|
1be8052caa | ||
|
|
668ce4bd2d | ||
|
|
e7fd038493 | ||
|
|
03edb3bbbe | ||
|
|
307a1a295a | ||
|
|
446df58e92 | ||
|
|
1ad5caba93 | ||
|
|
9eddc0e4f0 | ||
|
|
087ba0d81d | ||
|
|
3c5cd8f38f | ||
|
|
367743530f | ||
|
|
7370ce2793 | ||
|
|
ba61b42ef5 | ||
|
|
f7e362dd90 | ||
|
|
66da072fd7 | ||
|
|
d763534208 | ||
|
|
ad05898543 | ||
|
|
f930f7878d | ||
|
|
d6a75c411b | ||
|
|
568a71e0dc | ||
|
|
c92e9aac2c | ||
|
|
3012c4a3ff | ||
|
|
ebe338ac9a | ||
|
|
a45523a48c | ||
|
|
5bfeea67d7 | ||
|
|
f35f15d36c | ||
|
|
057af792df | ||
|
|
41a850e7b2 | ||
|
|
6be70390a6 | ||
|
|
1cfe3ee9f8 | ||
|
|
c1927c985a | ||
|
|
309f42994b | ||
|
|
feb28ecace | ||
|
|
00f74b7f0a | ||
|
|
fcc0e1776b | ||
|
|
a5ec755c28 | ||
|
|
98945926ca | ||
|
|
d3e3767df4 | ||
|
|
de1281bb66 | ||
|
|
07e55c3d89 | ||
|
|
6e4ebeddf4 | ||
|
|
2b9fb88bf0 | ||
|
|
022965b9c7 | ||
|
|
6278718a24 | ||
|
|
1675daafcd | ||
|
|
ed5b6edf52 | ||
|
|
638caa355c | ||
|
|
78b2f9b455 | ||
|
|
2a35ffcc27 | ||
|
|
5eae8f9af6 | ||
|
|
25381e20d2 | ||
|
|
fc35ff5cd1 | ||
|
|
b10d00b426 | ||
|
|
c634dc25b4 | ||
|
|
2fb4561bf8 | ||
|
|
f167c6dcca | ||
|
|
555ace9e2e | ||
|
|
d07ffb36ad | ||
|
|
9e2b8b77c9 | ||
|
|
29e4af4fb2 | ||
|
|
91513a12b4 | ||
|
|
ee3f55dd41 | ||
|
|
c2e5a78076 | ||
|
|
da3ac3e93d | ||
|
|
278ebbc9bd | ||
|
|
546f93147e | ||
|
|
3e7bfbb45c | ||
|
|
c2cf0443ef | ||
|
|
59d68c6438 | ||
|
|
e0ee199bf1 | ||
|
|
c1bf895674 | ||
|
|
ea4d92e671 | ||
|
|
e3f56105d4 | ||
|
|
c447a87605 | ||
|
|
584e5b1f01 | ||
|
|
207dc4c112 | ||
|
|
6a3581f7a3 | ||
|
|
11e74975b3 | ||
|
|
75ef9ec524 | ||
|
|
9b742e777b | ||
|
|
5d93565e16 | ||
|
|
cebfe5c95b | ||
|
|
7881f3a53b | ||
|
|
56269bd52b | ||
|
|
68c43a2cc9 | ||
|
|
120b507c75 | ||
|
|
44fe7e8dc4 | ||
|
|
75d679f141 | ||
|
|
e9570f2400 | ||
|
|
5b8567310c | ||
|
|
f882221db3 | ||
|
|
8c4d7bd641 | ||
|
|
6a78695fde | ||
|
|
73ad16dedd | ||
|
|
dd98112c5a | ||
|
|
47521d3579 | ||
|
|
0c31300578 | ||
|
|
6340ff7da0 | ||
|
|
b66cb49d80 | ||
|
|
c884184220 | ||
|
|
091fee61e0 | ||
|
|
172a268e77 | ||
|
|
924715fe34 | ||
|
|
35a73b4cde | ||
|
|
238f9593f9 | ||
|
|
9e8b5703dc | ||
|
|
d8bd8be57e | ||
|
|
a4d4e8b3a9 | ||
|
|
703dd17e33 | ||
|
|
bc654a462e | ||
|
|
11535825c0 | ||
|
|
196df40c99 | ||
|
|
7aee6c3a15 | ||
|
|
372b566d23 | ||
|
|
9550354442 | ||
|
|
95c3ddfc39 | ||
|
|
bf4f2b6fa0 | ||
|
|
d3f75a92ad | ||
|
|
369495c8d3 | ||
|
|
dd52f71069 | ||
|
|
af8e2bc19d | ||
|
|
947e5591ea | ||
|
|
521376e8e8 | ||
|
|
55c0adb23d | ||
|
|
b20ad7047f | ||
|
|
fa3149c660 |
72
.github/actions/setup-deps/action.yml
vendored
Normal file
72
.github/actions/setup-deps/action.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
name: "Setup LLGO Dependencies"
|
||||
description: "Install all required dependencies for LLGO"
|
||||
inputs:
|
||||
llvm-version:
|
||||
description: "LLVM version to install"
|
||||
required: true
|
||||
default: "19"
|
||||
install-llvm:
|
||||
description: "Whether to install LLVM"
|
||||
required: false
|
||||
default: "true"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install macOS dependencies
|
||||
if: runner.os == 'macOS'
|
||||
shell: bash
|
||||
run: |
|
||||
brew update
|
||||
|
||||
# Install LLVM if requested
|
||||
if [[ "${{ inputs.install-llvm }}" == "true" ]]; then
|
||||
brew install llvm@${{inputs.llvm-version}} lld@${{inputs.llvm-version}}
|
||||
brew link --overwrite llvm@${{inputs.llvm-version}} lld@${{inputs.llvm-version}}
|
||||
echo "$(brew --prefix llvm@${{inputs.llvm-version}})/bin" >> $GITHUB_PATH
|
||||
fi
|
||||
|
||||
# Install common dependencies
|
||||
brew install bdw-gc openssl libffi libuv
|
||||
brew link --overwrite libffi
|
||||
|
||||
# Install optional deps for demos.
|
||||
#
|
||||
# NOTE: Keep this list updated as new deps are introduced.
|
||||
opt_deps=(
|
||||
cjson # for github.com/goplus/lib/c/cjson
|
||||
sqlite # for github.com/goplus/lib/c/sqlite
|
||||
)
|
||||
brew install "${opt_deps[@]}"
|
||||
|
||||
brew install python@3.12 || true # for github.com/goplus/lib/py
|
||||
brew link --overwrite python@3.12
|
||||
|
||||
- name: Install Ubuntu dependencies
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
# Install LLVM if requested
|
||||
if [[ "${{ inputs.install-llvm }}" == "true" ]]; then
|
||||
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${{inputs.llvm-version}} main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y llvm-${{inputs.llvm-version}}-dev clang-${{inputs.llvm-version}} libclang-${{inputs.llvm-version}}-dev lld-${{inputs.llvm-version}} libunwind-${{inputs.llvm-version}}-dev libc++-${{inputs.llvm-version}}-dev
|
||||
echo "PATH=/usr/lib/llvm-${{inputs.llvm-version}}/bin:$PATH" >> $GITHUB_ENV
|
||||
else
|
||||
sudo apt-get update
|
||||
fi
|
||||
|
||||
# Install common dependencies
|
||||
sudo apt-get install -y pkg-config libgc-dev libssl-dev zlib1g-dev libffi-dev libcjson-dev libuv1-dev
|
||||
|
||||
# Install optional deps for demos.
|
||||
#
|
||||
# NOTE: Keep this list updated as new deps are introduced.
|
||||
opt_deps=(
|
||||
libcjson-dev # for github.com/goplus/lib/c/cjson
|
||||
libsqlite3-dev # for github.com/goplus/lib/c/sqlite
|
||||
python3.12-dev # for github.com/goplus/lib/py
|
||||
)
|
||||
sudo apt-get install -y "${opt_deps[@]}"
|
||||
|
||||
51
.github/actions/setup-go/action.yml
vendored
Normal file
51
.github/actions/setup-go/action.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: "Setup Go"
|
||||
description: "Setup Go environment by downloading and extracting from go.dev"
|
||||
inputs:
|
||||
go-version:
|
||||
description: "The Go version to download and use"
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download and setup Go
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
GO_VERSION="${{ inputs.go-version }}"
|
||||
GO_VERSION="${GO_VERSION#go}" # Remove 'go' prefix if present
|
||||
|
||||
# Determine OS and architecture
|
||||
if [[ "$RUNNER_OS" == "macOS" ]]; then
|
||||
OS="darwin"
|
||||
ARCH="arm64"
|
||||
else
|
||||
OS="linux"
|
||||
ARCH="amd64"
|
||||
fi
|
||||
|
||||
DOWNLOAD_URL="https://go.dev/dl/go${GO_VERSION}.${OS}-${ARCH}.tar.gz"
|
||||
echo "Downloading Go from: ${DOWNLOAD_URL}"
|
||||
|
||||
# Create temporary directory for download
|
||||
TMP_DIR=$(mktemp -d)
|
||||
curl -L "${DOWNLOAD_URL}" -o "${TMP_DIR}/go.tar.gz"
|
||||
|
||||
# Remove existing Go installation if any
|
||||
sudo rm -rf /usr/local/go
|
||||
|
||||
# Extract to /usr/local
|
||||
sudo tar -C /usr/local -xzf "${TMP_DIR}/go.tar.gz"
|
||||
|
||||
# Clean up
|
||||
rm -rf "${TMP_DIR}"
|
||||
|
||||
# Add to PATH
|
||||
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
echo "$HOME/go/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Verify Go installation
|
||||
shell: bash
|
||||
run: |
|
||||
# Verify installation
|
||||
echo "Verifying Go installation..."
|
||||
go version
|
||||
28
.github/actions/setup-goreleaser/action.yml
vendored
Normal file
28
.github/actions/setup-goreleaser/action.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: "Setup GoReleaser"
|
||||
description: "Setup GoReleaser environment"
|
||||
inputs:
|
||||
linux-cache-key:
|
||||
description: "Linux sysroot cache key"
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.x
|
||||
- name: Restore Linux sysroot cache
|
||||
id: cache-linux-sysroot
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: .sysroot/linux.tar.gz
|
||||
key: ${{ inputs.linux-cache-key }}
|
||||
- name: Populate Linux sysroot
|
||||
run: tar -xzvf .sysroot/linux.tar.gz -C .sysroot
|
||||
shell: bash
|
||||
- name: Check file
|
||||
run: tree .sysroot
|
||||
shell: bash
|
||||
- name: Get Esp clang
|
||||
run: bash .github/workflows/download_esp_clang.sh
|
||||
shell: bash
|
||||
63
.github/actions/test-helloworld/action.yml
vendored
Normal file
63
.github/actions/test-helloworld/action.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: "Test Hello World"
|
||||
description: "Test Hello World with specific Go and module versions"
|
||||
inputs:
|
||||
go-version:
|
||||
description: "Go version being tested"
|
||||
required: true
|
||||
mod-version:
|
||||
description: "Go module version to use"
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Test Hello World
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Testing with Go ${{ inputs.go-version }} and go.mod ${{ inputs.mod-version }}"
|
||||
mkdir -p _test/helloworld && cd _test/helloworld
|
||||
cat > go.mod << 'EOL'
|
||||
module hello
|
||||
go ${{ inputs.mod-version }}
|
||||
EOL
|
||||
cat > main.go << 'EOL'
|
||||
package main
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/goplus/lib/c"
|
||||
"github.com/goplus/lib/cpp/std"
|
||||
)
|
||||
func main() {
|
||||
fmt.Println("Hello, LLGo!")
|
||||
println("Hello, LLGo!")
|
||||
c.Printf(c.Str("Hello, LLGo!\n"))
|
||||
c.Printf(std.Str("Hello LLGo by cpp/std.Str\n").CStr())
|
||||
}
|
||||
EOL
|
||||
go mod tidy
|
||||
EXPECTED="Hello, LLGo!
|
||||
Hello, LLGo!
|
||||
Hello, LLGo!
|
||||
Hello LLGo by cpp/std.Str"
|
||||
OUTPUT=$(llgo run . 2>&1 | tee /dev/stderr)
|
||||
if echo "$OUTPUT" | grep -qF "$EXPECTED"; then
|
||||
echo "Basic test passed"
|
||||
else
|
||||
echo "Basic test failed"
|
||||
echo "Expected to contain:"
|
||||
echo "$EXPECTED"
|
||||
echo "Got:"
|
||||
echo "$OUTPUT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../..
|
||||
mkdir -p _test/emb && cd _test/emb
|
||||
cat > main.go << 'EOL'
|
||||
package main
|
||||
|
||||
func main() {
|
||||
}
|
||||
EOL
|
||||
llgo build -v -target esp32-coreboard-v2 -o demo.out .
|
||||
test -f demo.out.elf && echo "ESP32 cross-compilation test passed: demo.out.elf generated"
|
||||
exit $?
|
||||
15
.github/codecov.yml
vendored
Normal file
15
.github/codecov.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
coverage:
|
||||
ignore:
|
||||
- "chore"
|
||||
- "cmd"
|
||||
- "cl/cltest"
|
||||
- "internal/build"
|
||||
- "internal/llgen"
|
||||
- "internal/mockable"
|
||||
- "internal/packages"
|
||||
- "internal/typepatch"
|
||||
- "internal/github"
|
||||
- "internal/firmware"
|
||||
- "internal/flash"
|
||||
- "internal/monitor"
|
||||
- "xtool"
|
||||
180
.github/workflows/doc.yml
vendored
Normal file
180
.github/workflows/doc.yml
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
name: Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
- "!dependabot/**"
|
||||
- "!xgopilot/**"
|
||||
pull_request:
|
||||
branches: ["**"]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
doc_verify:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install embedme
|
||||
run: npm install -g embedme
|
||||
|
||||
- name: Verify README.md embedded code
|
||||
run: embedme --verify README.md
|
||||
|
||||
- name: Link Checker
|
||||
id: lychee
|
||||
uses: lycheeverse/lychee-action@v2
|
||||
with:
|
||||
args: --max-concurrency 3 --retry-wait-time 15 README.md
|
||||
|
||||
remote_install:
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Go
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: "1.24.2"
|
||||
|
||||
- name: Install dependencies on macOS
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
source doc/_readme/scripts/install_macos.sh
|
||||
|
||||
- name: Install dependencies on Ubuntu
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
source doc/_readme/scripts/install_ubuntu.sh
|
||||
|
||||
- name: Test doc code blocks
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
source doc/_readme/scripts/run.sh
|
||||
|
||||
local_install:
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: "1.23"
|
||||
|
||||
- name: Install dependencies on macOS
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
source doc/_readme/scripts/install_macos.sh
|
||||
|
||||
- name: Install dependencies on Ubuntu
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
source doc/_readme/scripts/install_ubuntu.sh
|
||||
|
||||
- name: Install llgo with tools
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
git() {
|
||||
if [ "$1" = "clone" ]; then
|
||||
# do nothing because we already have the branch
|
||||
cd ..
|
||||
else
|
||||
command git "$@"
|
||||
fi
|
||||
}
|
||||
source doc/_readme/scripts/install_llgo.sh
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Test doc code blocks
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
source doc/_readme/scripts/run.sh
|
||||
|
||||
local_install_full:
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: "1.23"
|
||||
|
||||
- name: Install dependencies on macOS
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
source doc/_readme/scripts/install_macos.sh
|
||||
|
||||
- name: Install dependencies on Ubuntu
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
source doc/_readme/scripts/install_ubuntu.sh
|
||||
echo "PATH=/usr/lib/llvm-19/bin:$PATH" >> $GITHUB_ENV
|
||||
|
||||
- name: Install llgo with tools
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
git() {
|
||||
if [ "$1" = "clone" ]; then
|
||||
# do nothing because we already have the branch
|
||||
cd ..
|
||||
else
|
||||
command git "$@"
|
||||
fi
|
||||
}
|
||||
source doc/_readme/scripts/install_full.sh
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Test doc code blocks
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
source doc/_readme/scripts/run.sh
|
||||
67
.github/workflows/download_esp_clang.sh
vendored
Executable file
67
.github/workflows/download_esp_clang.sh
vendored
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
ESP_CLANG_VERSION="19.1.2_20250905-3"
|
||||
BASE_URL="https://github.com/goplus/espressif-llvm-project-prebuilt/releases/download/${ESP_CLANG_VERSION}"
|
||||
|
||||
get_esp_clang_platform() {
|
||||
local platform="$1"
|
||||
local os="${platform%-*}"
|
||||
local arch="${platform##*-}"
|
||||
|
||||
case "${os}" in
|
||||
"darwin")
|
||||
case "${arch}" in
|
||||
"amd64") echo "x86_64-apple-darwin" ;;
|
||||
"arm64") echo "aarch64-apple-darwin" ;;
|
||||
*) echo "Error: Unsupported darwin architecture: ${arch}" >&2; exit 1 ;;
|
||||
esac
|
||||
;;
|
||||
"linux")
|
||||
case "${arch}" in
|
||||
"amd64") echo "x86_64-linux-gnu" ;;
|
||||
"arm64") echo "aarch64-linux-gnu" ;;
|
||||
*) echo "Error: Unsupported linux architecture: ${arch}" >&2; exit 1 ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unsupported OS: ${os}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_filename() {
|
||||
local platform="$1"
|
||||
local platform_suffix=$(get_esp_clang_platform "${platform}")
|
||||
echo "clang-esp-${ESP_CLANG_VERSION}-${platform_suffix}.tar.xz"
|
||||
}
|
||||
|
||||
download_and_extract() {
|
||||
local platform="$1"
|
||||
local os="${platform%-*}"
|
||||
local arch="${platform##*-}"
|
||||
local filename=$(get_filename "${platform}")
|
||||
local download_url="${BASE_URL}/${filename}"
|
||||
|
||||
echo "Downloading ESP Clang for ${platform}..."
|
||||
echo " URL: ${download_url}"
|
||||
|
||||
mkdir -p ".sysroot/${os}/${arch}/crosscompile/clang"
|
||||
curl -fsSL "${download_url}" | tar -xJ -C ".sysroot/${os}/${arch}/crosscompile/clang" --strip-components=1
|
||||
|
||||
if [[ ! -f ".sysroot/${os}/${arch}/crosscompile/clang/bin/clang++" ]]; then
|
||||
echo "Error: clang++ not found in ${platform} toolchain"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${platform} ESP Clang ready in .sysroot/${os}/${arch}/crosscompile/clang"
|
||||
}
|
||||
|
||||
echo "Downloading ESP Clang toolchain version ${ESP_CLANG_VERSION}..."
|
||||
|
||||
for platform in "darwin-amd64" "darwin-arm64" "linux-amd64" "linux-arm64"; do
|
||||
download_and_extract "${platform}"
|
||||
done
|
||||
|
||||
echo "ESP Clang toolchain completed successfully!"
|
||||
38
.github/workflows/fmt.yml
vendored
Normal file
38
.github/workflows/fmt.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Format Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
- "!dependabot/**"
|
||||
- "!xgopilot/**"
|
||||
pull_request:
|
||||
branches: ["**"]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Go
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: "1.24.2"
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
for dir in . runtime; do
|
||||
pushd $dir
|
||||
if [ -n "$(go fmt ./... | grep -v xgo_autogen.go)" ]; then
|
||||
echo "Some files are not properly formatted. Please run 'go fmt ./...'"
|
||||
exit 1
|
||||
fi
|
||||
popd
|
||||
done
|
||||
echo "All files are properly formatted."
|
||||
89
.github/workflows/go.yml
vendored
89
.github/workflows/go.yml
vendored
@@ -5,65 +5,58 @@ name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches:
|
||||
- "**"
|
||||
- "!dependabot/**"
|
||||
- "!xgopilot/**"
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: ["**"]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
test-macos:
|
||||
runs-on: macos-latest
|
||||
test:
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
llvm: [17]
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
llvm: [19]
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Update Homebrew
|
||||
if: matrix.llvm == 17 # needed as long as LLVM 17 is still fresh
|
||||
run: brew update
|
||||
- name: Install LLVM ${{ matrix.llvm }}
|
||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@${{ matrix.llvm }}
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
go-version: '1.20'
|
||||
llvm-version: ${{matrix.llvm}}
|
||||
|
||||
- name: Clang information
|
||||
run: |
|
||||
echo $PATH
|
||||
which clang
|
||||
clang --version
|
||||
|
||||
- name: Set up Go
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: "1.24.2"
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
if: ${{!startsWith(matrix.os, 'macos')}}
|
||||
run: go test ./...
|
||||
|
||||
test-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
llvm: [17]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Test with coverage
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
run: go test -coverprofile="coverage.txt" -covermode=atomic ./...
|
||||
|
||||
- name: Install LLVM ${{ matrix.llvm }}
|
||||
run: |
|
||||
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.llvm }} main' | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo apt-get update
|
||||
sudo apt-get install --no-install-recommends llvm-${{ matrix.llvm }}-dev
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.20'
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
slug: goplus/llgo
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
|
||||
300
.github/workflows/llgo.yml
vendored
Normal file
300
.github/workflows/llgo.yml
vendored
Normal file
@@ -0,0 +1,300 @@
|
||||
# This workflow will build a golang project
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
|
||||
|
||||
name: LLGo
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
- "!dependabot/**"
|
||||
- "!xgopilot/**"
|
||||
pull_request:
|
||||
branches: ["**"]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
download-model:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Download model file
|
||||
run: |
|
||||
mkdir -p ./_demo/c/llama2-c
|
||||
wget -P ./_demo/c/llama2-c https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin
|
||||
|
||||
- name: Upload model as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: llama2-model
|
||||
path: ./_demo/c/llama2-c/stories15M.bin
|
||||
retention-days: 1
|
||||
|
||||
llgo:
|
||||
needs: download-model
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
llvm: [19]
|
||||
go: ["1.21.13", "1.22.12", "1.23.6", "1.24.2"]
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
llvm-version: ${{matrix.llvm}}
|
||||
- name: Download model artifact
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: llama2-model
|
||||
path: ./_demo/c/llama2-c/
|
||||
- name: Download platform-specific demo libs
|
||||
run: |
|
||||
if ${{ startsWith(matrix.os, 'macos') }}; then
|
||||
DEMO_PKG="cargs_darwin_arm64.zip"
|
||||
else
|
||||
DEMO_PKG="cargs_linux_amd64.zip"
|
||||
fi
|
||||
|
||||
mkdir -p ./_demo/c/cargs/libs
|
||||
cd ./_demo/c/cargs/libs
|
||||
wget https://github.com/goplus/llpkg/releases/download/cargs/v1.0.0/${DEMO_PKG}
|
||||
unzip ${DEMO_PKG}
|
||||
|
||||
# Process pc template files - replace {{.Prefix}} with actual path
|
||||
ACTUAL_PREFIX="$(pwd)"
|
||||
for tmpl in lib/pkgconfig/*.pc.tmpl; do
|
||||
pc_file="${tmpl%.tmpl}"
|
||||
sed "s|{{.Prefix}}|${ACTUAL_PREFIX}|g" "$tmpl" > "$pc_file"
|
||||
done
|
||||
|
||||
echo "PKG_CONFIG_PATH=${ACTUAL_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}" >> $GITHUB_ENV
|
||||
- name: Install further optional dependencies for demos
|
||||
run: |
|
||||
py_deps=(
|
||||
numpy # for github.com/goplus/lib/py/numpy
|
||||
torch # for github.com/goplus/lib/py/torch
|
||||
)
|
||||
pip3.12 install --break-system-packages "${py_deps[@]}"
|
||||
|
||||
- name: Set up Go for build
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: "1.24.2"
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
go install ./...
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Go for testing
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
|
||||
- name: Test demo without RPATH (expect failure)
|
||||
run: |
|
||||
echo "Testing demo without RPATH (should fail)..."
|
||||
export LLGO_FULL_RPATH=false
|
||||
pkg-config --libs cargs
|
||||
if (cd ./_demo/c/cargs && llgo run .); then
|
||||
echo "ERROR: cargs demo should have failed without RPATH!"
|
||||
exit 1
|
||||
else
|
||||
echo "✓ cargs demo correctly failed without RPATH"
|
||||
fi
|
||||
|
||||
- name: Test demos
|
||||
run: |
|
||||
# TODO(lijie): force python3-embed to be linked with python-3.12-embed
|
||||
# Currently, python3-embed is python-3.13-embed, doesn't work with pytorch
|
||||
# Will remove this after pytorch is fixed.
|
||||
pcdir=$HOME/pc
|
||||
mkdir -p $pcdir
|
||||
libdir=$(pkg-config --variable=libdir python-3.12-embed)
|
||||
echo "libdir: $libdir"
|
||||
ln -s $libdir/pkgconfig/python-3.12-embed.pc $pcdir/python3-embed.pc
|
||||
export PKG_CONFIG_PATH=$pcdir:${PKG_CONFIG_PATH}
|
||||
export LLGO_FULL_RPATH=true
|
||||
bash .github/workflows/test_demo.sh
|
||||
|
||||
- name: Test C header generation
|
||||
run: |
|
||||
echo "Testing C header generation in different build modes..."
|
||||
cd _demo/go/export
|
||||
chmod +x test.sh
|
||||
./test.sh
|
||||
|
||||
- name: _xtool build tests
|
||||
run: |
|
||||
cd _xtool
|
||||
llgo build -v ./...
|
||||
|
||||
- name: Show test result
|
||||
run: cat result.md
|
||||
|
||||
- name: LLDB tests
|
||||
if: ${{startsWith(matrix.os, 'macos')}}
|
||||
run: |
|
||||
echo "Test lldb with llgo plugin on ${{matrix.os}} with LLVM ${{matrix.llvm}}"
|
||||
bash _lldb/runtest.sh -v
|
||||
|
||||
test:
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
llvm: [19]
|
||||
go: ["1.24.2"]
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
llvm-version: ${{matrix.llvm}}
|
||||
- name: Install further optional dependencies for demos
|
||||
run: |
|
||||
py_deps=(
|
||||
numpy # for github.com/goplus/lib/py/numpy
|
||||
torch # for github.com/goplus/lib/py/torch
|
||||
)
|
||||
pip3.12 install --break-system-packages "${py_deps[@]}"
|
||||
|
||||
- name: Set up Go for build
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: "1.24.2"
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
go install ./...
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Go for testing
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
|
||||
- name: run llgo test
|
||||
run: |
|
||||
llgo test ./...
|
||||
|
||||
hello:
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
llvm: [19]
|
||||
go: ["1.21.13", "1.22.12", "1.23.6", "1.24.2"]
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
llvm-version: ${{matrix.llvm}}
|
||||
|
||||
- name: Set up Go 1.23 for building llgo
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: "1.24.2"
|
||||
|
||||
- name: Install llgo
|
||||
run: |
|
||||
go install ./...
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Go for testing
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
|
||||
- name: Test Hello World with go.mod 1.21
|
||||
if: startsWith(matrix.go, '1.21') || startsWith(matrix.go, '1.22') || startsWith(matrix.go, '1.23') || startsWith(matrix.go, '1.24')
|
||||
uses: ./.github/actions/test-helloworld
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
mod-version: "1.21"
|
||||
|
||||
- name: Test Hello World with go.mod 1.22
|
||||
if: startsWith(matrix.go, '1.22') || startsWith(matrix.go, '1.23') || startsWith(matrix.go, '1.24')
|
||||
uses: ./.github/actions/test-helloworld
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
mod-version: "1.22"
|
||||
|
||||
- name: Test Hello World with go.mod 1.23
|
||||
if: startsWith(matrix.go, '1.23') || startsWith(matrix.go, '1.24')
|
||||
uses: ./.github/actions/test-helloworld
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
mod-version: "1.23"
|
||||
|
||||
- name: Test Hello World with go.mod 1.24
|
||||
if: startsWith(matrix.go, '1.24')
|
||||
uses: ./.github/actions/test-helloworld
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
mod-version: "1.24"
|
||||
|
||||
cross-compile:
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest]
|
||||
llvm: [19]
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
llvm-version: ${{matrix.llvm}}
|
||||
|
||||
- name: Set up Go for building llgo
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: "1.24.2"
|
||||
|
||||
- name: Install wamr
|
||||
run: |
|
||||
git clone https://github.com/bytecodealliance/wasm-micro-runtime.git
|
||||
mkdir wasm-micro-runtime/product-mini/platforms/darwin/build
|
||||
cd wasm-micro-runtime/product-mini/platforms/darwin/build
|
||||
cmake -D WAMR_BUILD_EXCE_HANDLING=1 -D WAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_SHARED_MEMORY=1 -DWAMR_BUILD_LIB_WASI_THREADS=1 -DWAMR_BUILD_LIB_PTHREAD=1 -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_DEBUG_INTERP=1 ..
|
||||
make -j8
|
||||
echo "$PWD" >> $GITHUB_PATH
|
||||
|
||||
- name: Install llgo
|
||||
run: |
|
||||
go install ./...
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Test Cross Compilation (wasm)
|
||||
shell: bash
|
||||
working-directory: _demo/c
|
||||
run: |
|
||||
echo "Testing cross-compilation wasm with Go 1.24.2"
|
||||
|
||||
# Compile for wasm architecture
|
||||
GOOS=wasip1 GOARCH=wasm llgo build -o hello -tags=nogc -v ./helloc
|
||||
|
||||
# Check file type
|
||||
file hello.wasm
|
||||
|
||||
# Run the wasm binary using llgo_wasm
|
||||
iwasm --stack-size=819200000 --heap-size=800000000 hello.wasm
|
||||
143
.github/workflows/populate_linux_sysroot.sh
vendored
Executable file
143
.github/workflows/populate_linux_sysroot.sh
vendored
Executable file
@@ -0,0 +1,143 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
TMPDIR="$(mktemp -d)"
|
||||
export TMPDIR
|
||||
trap 'rm -rf "${TMPDIR}"' EXIT
|
||||
|
||||
LINUX_AMD64_PREFIX=.sysroot/linux/amd64
|
||||
LINUX_ARM64_PREFIX=.sysroot/linux/arm64
|
||||
mkdir -p "${LINUX_AMD64_PREFIX}" "${LINUX_ARM64_PREFIX}"
|
||||
|
||||
POPULATE_LINUX_SYSROOT_SCRIPT="$(mktemp)"
|
||||
cat > "${POPULATE_LINUX_SYSROOT_SCRIPT}" << EOF
|
||||
#!/bin/bash
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get update
|
||||
apt-get install -y build-essential zlib1g-dev rsync
|
||||
|
||||
error() {
|
||||
echo -e "\$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
exclude_list=()
|
||||
include_list=()
|
||||
|
||||
exclude_list+=(--exclude "/bin")
|
||||
exclude_list+=(--exclude "/boot")
|
||||
exclude_list+=(--exclude "/boot*")
|
||||
exclude_list+=(--exclude "/dev")
|
||||
exclude_list+=(--exclude "/etc")
|
||||
exclude_list+=(--exclude "/home")
|
||||
exclude_list+=(--exclude "/lib/dhcpd")
|
||||
exclude_list+=(--exclude "/lib/firmware")
|
||||
exclude_list+=(--exclude "/lib/hdparm")
|
||||
exclude_list+=(--exclude "/lib/ifupdown")
|
||||
exclude_list+=(--exclude "/lib/modules")
|
||||
exclude_list+=(--exclude "/lib/modprobe.d")
|
||||
exclude_list+=(--exclude "/lib/modules-load.d")
|
||||
exclude_list+=(--exclude "/lib/resolvconf")
|
||||
exclude_list+=(--exclude "/lib/startpar")
|
||||
exclude_list+=(--exclude "/lib/systemd")
|
||||
exclude_list+=(--exclude "/lib/terminfo")
|
||||
exclude_list+=(--exclude "/lib/udev")
|
||||
exclude_list+=(--exclude "/lib/xtables")
|
||||
exclude_list+=(--exclude "/lib/ssl/private")
|
||||
exclude_list+=(--exclude "/lost+found")
|
||||
exclude_list+=(--exclude "/media")
|
||||
exclude_list+=(--exclude "/mnt")
|
||||
exclude_list+=(--exclude "/proc")
|
||||
exclude_list+=(--exclude "/root")
|
||||
exclude_list+=(--exclude "/run")
|
||||
exclude_list+=(--exclude "/sbin")
|
||||
exclude_list+=(--exclude "/srv")
|
||||
exclude_list+=(--exclude "/sys")
|
||||
exclude_list+=(--exclude "/tmp")
|
||||
exclude_list+=(--exclude "/usr/bin")
|
||||
exclude_list+=(--exclude "/usr/games")
|
||||
exclude_list+=(--exclude "/usr/sbin")
|
||||
exclude_list+=(--exclude "/usr/share")
|
||||
exclude_list+=(--exclude "/usr/src")
|
||||
exclude_list+=(--exclude "/usr/local/bin")
|
||||
exclude_list+=(--exclude "/usr/local/etc")
|
||||
exclude_list+=(--exclude "/usr/local/games")
|
||||
exclude_list+=(--exclude "/usr/local/man")
|
||||
exclude_list+=(--exclude "/usr/local/sbin")
|
||||
exclude_list+=(--exclude "/usr/local/share")
|
||||
exclude_list+=(--exclude "/usr/local/src")
|
||||
exclude_list+=(--exclude "/usr/lib/ssl/private")
|
||||
exclude_list+=(--exclude "/var")
|
||||
exclude_list+=(--exclude "/snap")
|
||||
exclude_list+=(--exclude "*python*")
|
||||
|
||||
include_list+=(--include "*.a")
|
||||
include_list+=(--include "*.so")
|
||||
include_list+=(--include "*.so.*")
|
||||
include_list+=(--include "*.h")
|
||||
include_list+=(--include "*.hh")
|
||||
include_list+=(--include "*.hpp")
|
||||
include_list+=(--include "*.hxx")
|
||||
include_list+=(--include "*.pc")
|
||||
include_list+=(--include "*.def")
|
||||
include_list+=(--include "*.inc")
|
||||
include_list+=(--include "/lib")
|
||||
include_list+=(--include "/lib32")
|
||||
include_list+=(--include "/lib64")
|
||||
include_list+=(--include "/libx32")
|
||||
include_list+=(--include "*/")
|
||||
|
||||
do-sync() {
|
||||
from=\$1
|
||||
to=\$2
|
||||
|
||||
args=()
|
||||
args+=(-a)
|
||||
args+=(-z)
|
||||
args+=(-m)
|
||||
args+=(-d)
|
||||
args+=(-h)
|
||||
args+=(--keep-dirlinks)
|
||||
args+=(--delete)
|
||||
args+=(--prune-empty-dirs)
|
||||
args+=(--sparse)
|
||||
args+=(--links)
|
||||
args+=(--copy-unsafe-links)
|
||||
args+=("\${exclude_list[@]}")
|
||||
args+=("\${include_list[@]}")
|
||||
args+=(--exclude "*")
|
||||
args+=("\${from}")
|
||||
args+=("\${to}")
|
||||
|
||||
echo "\${args[@]}"
|
||||
rsync "\${args[@]}"
|
||||
|
||||
exit \$?
|
||||
}
|
||||
|
||||
do-sync / /sysroot/
|
||||
EOF
|
||||
chmod +x "${POPULATE_LINUX_SYSROOT_SCRIPT}"
|
||||
|
||||
populate_linux_sysroot() {
|
||||
local ARCH="$1"
|
||||
local PREFIX="$2"
|
||||
docker run \
|
||||
--rm \
|
||||
--platform "linux/${ARCH}" \
|
||||
-v "$(pwd)/${PREFIX}":/sysroot \
|
||||
-v "${POPULATE_LINUX_SYSROOT_SCRIPT}":/populate_linux_sysroot.sh \
|
||||
debian:bullseye \
|
||||
/populate_linux_sysroot.sh
|
||||
}
|
||||
populate_linux_sysroot amd64 "${LINUX_AMD64_PREFIX}" &
|
||||
PID1=$!
|
||||
populate_linux_sysroot arm64 "${LINUX_ARM64_PREFIX}" &
|
||||
PID2=$!
|
||||
|
||||
# Wait for both background processes to complete
|
||||
wait $PID1 || exit $?
|
||||
wait $PID2 || exit $?
|
||||
207
.github/workflows/release-build.yml
vendored
Normal file
207
.github/workflows/release-build.yml
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
name: Release Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
- "!dependabot/**"
|
||||
- "!xgopilot/**"
|
||||
tags: ["*"]
|
||||
pull_request:
|
||||
branches: ["**"]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
linux-cache-key: ${{ steps.cache-keys.outputs.linux-key }}
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v5
|
||||
- name: Calculate cache keys
|
||||
id: cache-keys
|
||||
run: |
|
||||
LINUX_KEY="linux-sysroot-${{ hashFiles('.github/workflows/populate_linux_sysroot.sh', '.github/workflows/release-build.yml') }}-v1.0.0"
|
||||
echo "linux-key=$LINUX_KEY" >> $GITHUB_OUTPUT
|
||||
populate-linux-sysroot:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v5
|
||||
- name: Check Linux sysroot cache
|
||||
id: cache-linux-sysroot
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: .sysroot/linux.tar.gz
|
||||
key: ${{ needs.setup.outputs.linux-cache-key }}
|
||||
lookup-only: true
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
if: steps.cache-linux-sysroot.outputs.cache-hit != 'true'
|
||||
with:
|
||||
image: tonistiigi/binfmt:qemu-v7.0.0-28
|
||||
- name: Populate Linux sysroot
|
||||
if: steps.cache-linux-sysroot.outputs.cache-hit != 'true'
|
||||
run: bash .github/workflows/populate_linux_sysroot.sh
|
||||
- name: Create Linux sysroot tarball
|
||||
if: steps.cache-linux-sysroot.outputs.cache-hit != 'true'
|
||||
run: tar -czvf .sysroot/linux.tar.gz -C .sysroot linux
|
||||
- name: Save Linux sysroot cache
|
||||
if: steps.cache-linux-sysroot.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: .sysroot/linux.tar.gz
|
||||
key: ${{ needs.setup.outputs.linux-cache-key }}
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [setup, populate-linux-sysroot]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v5
|
||||
- name: Set up Release
|
||||
uses: ./.github/actions/setup-goreleaser
|
||||
with:
|
||||
linux-cache-key: ${{ needs.setup.outputs.linux-cache-key }}
|
||||
- name: Run GoReleaser (Build & Test)
|
||||
env:
|
||||
GITHUB_TOKEN: ${{github.token}}
|
||||
run: |
|
||||
docker run \
|
||||
--rm \
|
||||
-e GITHUB_TOKEN=${GITHUB_TOKEN} \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v $(pwd):/go/src/llgo \
|
||||
-w /go/src/llgo \
|
||||
ghcr.io/goreleaser/goreleaser-cross:v1.22 \
|
||||
release --verbose --skip=publish,nfpm,snapcraft --snapshot --clean
|
||||
|
||||
- name: Upload Darwin AMD64 Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: llgo-darwin-amd64
|
||||
path: .dist/*darwin-amd64.tar.gz
|
||||
retention-days: 3
|
||||
include-hidden-files: true
|
||||
|
||||
- name: Upload Darwin ARM64 Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: llgo-darwin-arm64
|
||||
path: .dist/*darwin-arm64.tar.gz
|
||||
retention-days: 3
|
||||
include-hidden-files: true
|
||||
|
||||
- name: Upload Linux AMD64 Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: llgo-linux-amd64
|
||||
path: .dist/*linux-amd64.tar.gz
|
||||
retention-days: 3
|
||||
include-hidden-files: true
|
||||
|
||||
- name: Upload Linux ARM64 Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: llgo-linux-arm64
|
||||
path: .dist/*linux-arm64.tar.gz
|
||||
retention-days: 3
|
||||
include-hidden-files: true
|
||||
|
||||
- name: Upload Checksums
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: llgo-checksums
|
||||
path: .dist/*checksums.txt
|
||||
retention-days: 3
|
||||
include-hidden-files: true
|
||||
|
||||
test-artifacts:
|
||||
needs: build
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-15-intel
|
||||
goos: darwin
|
||||
goarch: amd64
|
||||
go-version: "1.24.2"
|
||||
go-mod-version: "1.24"
|
||||
- os: macos-latest
|
||||
goos: darwin
|
||||
goarch: arm64
|
||||
go-version: "1.24.2"
|
||||
go-mod-version: "1.24"
|
||||
- os: ubuntu-latest
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
go-version: "1.24.2"
|
||||
go-mod-version: "1.24"
|
||||
- os: ubuntu-24.04-arm
|
||||
goos: linux
|
||||
goarch: arm64
|
||||
go-version: "1.24.2"
|
||||
go-mod-version: "1.24"
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
install-llvm: false
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Download Platform Artifact
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: llgo-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||
path: .
|
||||
|
||||
- name: Extract LLGO Archive
|
||||
run: |
|
||||
echo "Looking for ${{ matrix.goos }}_${{ matrix.goarch }} archive..."
|
||||
ARCHIVE=$(ls *.tar.gz | head -n1)
|
||||
mkdir -p release-llgo
|
||||
tar -xzf "$ARCHIVE" -C release-llgo
|
||||
ls -la release-llgo/
|
||||
echo "${{ github.workspace }}/release-llgo/bin/" >> $GITHUB_PATH
|
||||
|
||||
- name: Test Hello World
|
||||
uses: ./.github/actions/test-helloworld
|
||||
with:
|
||||
go-version: ${{matrix.go-version}}
|
||||
mod-version: ${{ matrix.go-mod-version }}
|
||||
|
||||
release:
|
||||
needs: [setup, test-artifacts, populate-linux-sysroot]
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Release
|
||||
uses: ./.github/actions/setup-goreleaser
|
||||
with:
|
||||
linux-cache-key: ${{ needs.setup.outputs.linux-cache-key }}
|
||||
- name: Run GoReleaser (Release)
|
||||
env:
|
||||
GITHUB_TOKEN: ${{github.token}}
|
||||
run: |
|
||||
echo "Publishing release for tag: ${{ github.ref }}"
|
||||
echo "All artifact tests passed, proceeding with release..."
|
||||
docker run \
|
||||
--rm \
|
||||
-e GITHUB_TOKEN=${GITHUB_TOKEN} \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v $(pwd):/go/src/llgo \
|
||||
-w /go/src/llgo \
|
||||
ghcr.io/goreleaser/goreleaser-cross:v1.22 \
|
||||
release --clean --verbose --skip nfpm,snapcraft
|
||||
48
.github/workflows/targets.yml
vendored
Normal file
48
.github/workflows/targets.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
name: Targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
- "!dependabot/**"
|
||||
- "!xgopilot/**"
|
||||
pull_request:
|
||||
branches: ["**"]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
llgo:
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
llvm: [19]
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
llvm-version: ${{matrix.llvm}}
|
||||
|
||||
- name: Set up Go for build
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: "1.24.2"
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
go install ./...
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Build targets
|
||||
run: |
|
||||
cd _demo/embed/targetsbuild
|
||||
bash build.sh
|
||||
30
.github/workflows/test_demo.sh
vendored
Normal file
30
.github/workflows/test_demo.sh
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# llgo run subdirectories under _demo that contain *.go files
|
||||
total=0
|
||||
failed=0
|
||||
failed_cases=""
|
||||
for d in ./_demo/go/* ./_demo/py/* ./_demo/c/*; do
|
||||
if [ -d "$d" ] && [ -n "$(ls "$d"/*.go 2>/dev/null)" ]; then
|
||||
total=$((total+1))
|
||||
echo "Testing $d"
|
||||
if ! (cd "$d" && llgo run .); then
|
||||
echo "FAIL"
|
||||
failed=$((failed+1))
|
||||
failed_cases="$failed_cases\n* :x: $d"
|
||||
else
|
||||
echo "PASS"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo "=== Done"
|
||||
echo "$((total-failed))/$total tests passed"
|
||||
|
||||
if [ "$failed" -ne 0 ]; then
|
||||
echo ":bangbang: Failed demo cases:" | tee -a result.md
|
||||
echo -e "$failed_cases" | tee -a result.md
|
||||
exit 1
|
||||
else
|
||||
echo ":white_check_mark: All demo tests passed" | tee -a result.md
|
||||
fi
|
||||
23
.gitignore
vendored
23
.gitignore
vendored
@@ -7,22 +7,31 @@
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
*.a
|
||||
|
||||
test.db
|
||||
llgo_autogen.ll
|
||||
demo.ll
|
||||
llgo_autogen*.ll
|
||||
stories*.bin
|
||||
.DS_Store
|
||||
err.log
|
||||
numpy.txt
|
||||
result.txt
|
||||
|
||||
_go/
|
||||
_runtime/
|
||||
_tinygo/
|
||||
_output/
|
||||
build.dir/
|
||||
.vscode/
|
||||
.venv/
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
# Debug symbols
|
||||
*.dSYM
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
*.swp
|
||||
@@ -32,3 +41,15 @@ build.dir/
|
||||
|
||||
# Go workspace file
|
||||
go.work*
|
||||
|
||||
# GoReleaser
|
||||
.dist/
|
||||
.sysroot/
|
||||
|
||||
# Embedded firmware files
|
||||
*.bin
|
||||
*.hex
|
||||
*.elf
|
||||
*.uf2
|
||||
*.img
|
||||
*.zip
|
||||
|
||||
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,6 +0,0 @@
|
||||
[submodule "x/llama2/llama2.c"]
|
||||
path = x/llama2/llama2.c
|
||||
url = https://github.com/karpathy/llama2.c.git
|
||||
[submodule "x/sqlite/sqlite"]
|
||||
path = x/sqlite/sqlite
|
||||
url = https://github.com/sqlite/sqlite.git
|
||||
|
||||
154
.goreleaser.yaml
Normal file
154
.goreleaser.yaml
Normal file
@@ -0,0 +1,154 @@
|
||||
version: 2
|
||||
|
||||
dist: .dist
|
||||
|
||||
env:
|
||||
- SYSROOT_DARWIN_AMD64={{.Env.PWD}}/.sysroot/darwin/amd64
|
||||
- SYSROOT_DARWIN_ARM64={{.Env.PWD}}/.sysroot/darwin/arm64
|
||||
- SYSROOT_LINUX_AMD64={{.Env.PWD}}/.sysroot/linux/amd64
|
||||
- SYSROOT_LINUX_ARM64={{.Env.PWD}}/.sysroot/linux/arm64
|
||||
- CGO_ENABLED=1
|
||||
- CGO_CXXFLAGS=-std=c++17
|
||||
|
||||
before:
|
||||
hooks:
|
||||
- go mod download
|
||||
|
||||
builds:
|
||||
- id: llgo-darwin-amd64
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=darwin,amd64,byollvm
|
||||
ldflags:
|
||||
- -X github.com/goplus/llgo/internal/env.buildVersion=v{{.Version}}
|
||||
- -X github.com/goplus/llgo/internal/env.buildTime={{.Date}}
|
||||
env:
|
||||
- CC=o64-clang
|
||||
- CXX=o64-clang++
|
||||
- CGO_CPPFLAGS=-I{{.Env.SYSROOT_DARWIN_AMD64}}/crosscompile/clang/include -mmacosx-version-min=10.13 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
|
||||
- CGO_LDFLAGS=-L{{.Env.SYSROOT_DARWIN_AMD64}}/crosscompile/clang/lib -mmacosx-version-min=10.13 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM-19 -lz -lm -Wl,-rpath,@executable_path/../crosscompile/clang/lib
|
||||
targets:
|
||||
- darwin_amd64
|
||||
mod_timestamp: "{{.CommitTimestamp}}"
|
||||
- id: llgo-darwin-arm64
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=darwin,arm64,byollvm
|
||||
ldflags:
|
||||
- -X github.com/goplus/llgo/internal/env.buildVersion=v{{.Version}}
|
||||
- -X github.com/goplus/llgo/internal/env.buildTime={{.Date}}
|
||||
env:
|
||||
- CC=oa64-clang
|
||||
- CXX=oa64-clang++
|
||||
- CGO_CPPFLAGS=-I{{.Env.SYSROOT_DARWIN_ARM64}}/crosscompile/clang/include -mmacosx-version-min=10.13 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
|
||||
- CGO_LDFLAGS=-L{{.Env.SYSROOT_DARWIN_ARM64}}/crosscompile/clang/lib -mmacosx-version-min=10.13 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM-19 -lz -lm -Wl,-rpath,@executable_path/../crosscompile/clang/lib
|
||||
targets:
|
||||
- darwin_arm64
|
||||
mod_timestamp: "{{.CommitTimestamp}}"
|
||||
- id: llgo-linux-amd64
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=linux,amd64,byollvm
|
||||
ldflags:
|
||||
- -X github.com/goplus/llgo/internal/env.buildVersion=v{{.Version}}
|
||||
- -X github.com/goplus/llgo/internal/env.buildTime={{.Date}}
|
||||
- "-extldflags=-Wl,-rpath,$ORIGIN/../crosscompile/clang/lib"
|
||||
env:
|
||||
- CC=x86_64-linux-gnu-gcc
|
||||
- CXX=x86_64-linux-gnu-g++
|
||||
- CGO_CPPFLAGS=--sysroot={{.Env.SYSROOT_LINUX_AMD64}} -I{{.Env.SYSROOT_LINUX_AMD64}}/crosscompile/clang/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
|
||||
- CGO_LDFLAGS=--sysroot={{.Env.SYSROOT_LINUX_AMD64}} -L{{.Env.SYSROOT_LINUX_AMD64}}/crosscompile/clang/lib -L{{.Env.SYSROOT_LINUX_AMD64}}/lib/x86_64-linux-gnu -lLLVM-19 -lz
|
||||
- CGO_LDFLAGS_ALLOW=--sysroot.*
|
||||
targets:
|
||||
- linux_amd64
|
||||
mod_timestamp: "{{.CommitTimestamp}}"
|
||||
- id: llgo-linux-arm64
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=linux,arm64,byollvm
|
||||
ldflags:
|
||||
- -X github.com/goplus/llgo/internal/env.buildVersion=v{{.Version}}
|
||||
- -X github.com/goplus/llgo/internal/env.buildTime={{.Date}}
|
||||
- "-extldflags=-Wl,-rpath,$ORIGIN/../crosscompile/clang/lib"
|
||||
env:
|
||||
- CC=aarch64-linux-gnu-gcc
|
||||
- CXX=aarch64-linux-gnu-g++
|
||||
- CGO_CPPFLAGS=--sysroot={{.Env.SYSROOT_LINUX_ARM64}} -I{{.Env.SYSROOT_LINUX_ARM64}}/crosscompile/clang/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
|
||||
- CGO_LDFLAGS=--sysroot={{.Env.SYSROOT_LINUX_ARM64}} -L{{.Env.SYSROOT_LINUX_ARM64}}/crosscompile/clang/lib -L{{.Env.SYSROOT_LINUX_ARM64}}/lib/aarch64-linux-gnu -lLLVM-19 -lz
|
||||
- CGO_LDFLAGS_ALLOW=--sysroot.*
|
||||
targets:
|
||||
- linux_arm64
|
||||
mod_timestamp: "{{.CommitTimestamp}}"
|
||||
|
||||
archives:
|
||||
- format: tar.gz
|
||||
name_template: >-
|
||||
{{.ProjectName}}{{.Version}}.{{.Os}}-{{.Arch}}
|
||||
{{- if .Arm}}v{{.Arm}}{{end}}
|
||||
files:
|
||||
- LICENSE
|
||||
- README.md
|
||||
- runtime
|
||||
- targets
|
||||
- src: ".sysroot/{{.Os}}/{{.Arch}}/crosscompile/clang"
|
||||
dst: crosscompile/clang
|
||||
info:
|
||||
mode: 0755
|
||||
checksum:
|
||||
name_template: "{{.ProjectName}}{{.Version}}.checksums.txt"
|
||||
|
||||
nfpms:
|
||||
- package_name: llgo
|
||||
vendor: goplus
|
||||
homepage: https://github.com/goplus/llgo
|
||||
maintainer: Aofei Sheng <aofei@aofeisheng.com>
|
||||
description: |
|
||||
LLGo is a Go compiler based on LLVM in order to better integrate Go with the C ecosystem including Python. It's a
|
||||
subproject of the XGo project.
|
||||
|
||||
LLGo aims to expand the boundaries of Go/XGo, providing limitless possibilities such as:
|
||||
|
||||
- Game development
|
||||
- AI and data science
|
||||
- WebAssembly
|
||||
- Embedded development
|
||||
- ...
|
||||
license: Apache-2.0
|
||||
formats:
|
||||
- deb
|
||||
- rpm
|
||||
file_name_template: >-
|
||||
{{.ProjectName}}{{.Version}}.{{.Os}}-{{.Arch}}
|
||||
{{- if .Arm}}v{{.Arm}}{{end}}
|
||||
bindir: /usr/local/bin
|
||||
|
||||
snapcrafts:
|
||||
- name: llgo
|
||||
title: A Go compiler based on LLVM
|
||||
summary: A Go compiler based on LLVM
|
||||
description: |
|
||||
LLGo is a Go compiler based on LLVM in order to better integrate Go with the C ecosystem including Python. It's a
|
||||
subproject of the XGo project.
|
||||
|
||||
LLGo aims to expand the boundaries of Go/XGo, providing limitless possibilities such as:
|
||||
|
||||
- Game development
|
||||
- AI and data science
|
||||
- WebAssembly
|
||||
- Embedded development
|
||||
- ...
|
||||
license: Apache-2.0
|
||||
confinement: classic
|
||||
name_template: >-
|
||||
{{.ProjectName}}{{.Version}}.{{.Os}}-{{.Arch}}
|
||||
{{- if .Arm}}v{{.Arm}}{{end}}
|
||||
|
||||
snapshot:
|
||||
name_template: '{{trimprefix .Summary "v"}}'
|
||||
|
||||
release:
|
||||
prerelease: auto
|
||||
132
CLAUDE.md
Normal file
132
CLAUDE.md
Normal file
@@ -0,0 +1,132 @@
|
||||
# LLGo Project AI Assistant Guide
|
||||
|
||||
This document provides essential information for AI assistants to help fix bugs and implement features in the LLGo project.
|
||||
|
||||
## About LLGo
|
||||
|
||||
LLGo is a Go compiler based on LLVM designed to better integrate Go with the C ecosystem, including Python and JavaScript. It's a subproject of the XGo project that aims to expand the boundaries of Go/XGo for game development, AI and data science, WebAssembly, and embedded development.
|
||||
|
||||
## Project Structure
|
||||
|
||||
- `cmd/llgo` - Main llgo compiler command (usage similar to `go` command)
|
||||
- `cl/` - Core compiler logic that converts Go packages to LLVM IR
|
||||
- `ssa/` - LLVM IR file generation using Go SSA semantics
|
||||
- `internal/build/` - Build process orchestration
|
||||
- `runtime/` - LLGo runtime library
|
||||
- `chore/` - Development tools (llgen, llpyg, ssadump, etc.)
|
||||
- `_demo/` - Example programs demonstrating C/C++ interop (`c/hello`, `c/qsort`) and Python integration (`py/callpy`, `py/numpy`)
|
||||
- `_cmptest/` - Comparison tests to verify the same program gets the same output with Go and LLGo
|
||||
|
||||
## Development Environment
|
||||
|
||||
For detailed dependency requirements and installation instructions, see the [Dependencies](README.md#dependencies) and [How to install](README.md#how-to-install) sections in the README.
|
||||
|
||||
## Testing & Validation
|
||||
|
||||
The following commands and workflows are essential when fixing bugs or implementing features in the LLGo project:
|
||||
|
||||
### Run all tests
|
||||
```bash
|
||||
go test ./...
|
||||
```
|
||||
|
||||
**Note:** Some tests may fail if optional dependencies (like Python) are not properly configured. The test suite includes comprehensive tests for:
|
||||
- Compiler functionality
|
||||
- SSA generation
|
||||
- C interop
|
||||
- Python integration (requires Python development headers)
|
||||
|
||||
### Write and run tests for your changes
|
||||
|
||||
When adding new functionality or fixing bugs, create appropriate test cases:
|
||||
|
||||
```bash
|
||||
# Add your test to the relevant package's *_test.go file
|
||||
# Then run tests for that package
|
||||
go test ./path/to/package
|
||||
|
||||
# Or run all tests
|
||||
go test ./...
|
||||
```
|
||||
|
||||
**Important:** The `LLGO_ROOT` environment variable must be set to the repository root when running llgo commands during development.
|
||||
|
||||
## Code Quality
|
||||
|
||||
Before submitting any code updates, you must run the following formatting and validation commands:
|
||||
|
||||
### Format code
|
||||
```bash
|
||||
go fmt ./...
|
||||
```
|
||||
|
||||
**Important:** Always run `go fmt ./...` before committing code changes. This ensures consistent code formatting across the project.
|
||||
|
||||
### Run static analysis
|
||||
```bash
|
||||
go vet ./...
|
||||
```
|
||||
|
||||
**Note:** Currently reports some issues related to lock passing by value in `ssa/type_cvt.go` and a possible unsafe.Pointer misuse in `cl/builtin_test.go`. These are known issues.
|
||||
|
||||
|
||||
## Common Development Tasks
|
||||
|
||||
### Build the entire project
|
||||
```bash
|
||||
go build -v ./...
|
||||
```
|
||||
|
||||
### Build llgo command specifically
|
||||
```bash
|
||||
go build -o llgo ./cmd/llgo
|
||||
```
|
||||
|
||||
### Check llgo version
|
||||
```bash
|
||||
llgo version
|
||||
```
|
||||
|
||||
### Install llgo for system-wide use
|
||||
```bash
|
||||
./install.sh
|
||||
```
|
||||
|
||||
### Build development tools
|
||||
```bash
|
||||
go install -v ./cmd/...
|
||||
go install -v ./chore/...
|
||||
```
|
||||
|
||||
## Key Modules for Understanding
|
||||
|
||||
- `ssa` - Generates LLVM IR using Go SSA semantics
|
||||
- `cl` - Core compiler converting Go to LLVM IR
|
||||
- `internal/build` - Orchestrates the compilation process
|
||||
|
||||
## Debugging
|
||||
|
||||
### Disable Garbage Collection
|
||||
For testing purposes, you can disable GC:
|
||||
```bash
|
||||
LLGO_ROOT=/path/to/llgo llgo run -tags nogc .
|
||||
```
|
||||
|
||||
## LLGO_ROOT Environment Variable
|
||||
|
||||
**CRITICAL:** Always set `LLGO_ROOT` to the repository root when running llgo during development:
|
||||
|
||||
```bash
|
||||
export LLGO_ROOT=/path/to/llgo
|
||||
# or
|
||||
LLGO_ROOT=/path/to/llgo llgo run .
|
||||
```
|
||||
|
||||
## Important Notes
|
||||
|
||||
1. **Testing Requirement:** All bug fixes and features MUST include tests
|
||||
2. **Demo Directory:** Examples in `_demo` are prefixed with `_` to prevent standard `go` command from trying to compile them
|
||||
3. **Defer in Loops:** LLGo intentionally does not support `defer` in loops (considered bad practice)
|
||||
4. **C Ecosystem Integration:** LLGo uses `go:linkname` directive to link external symbols through ABI
|
||||
5. **Python Integration:** Third-party Python libraries require separate installation of library files
|
||||
|
||||
432
README.md
432
README.md
@@ -6,53 +6,350 @@ llgo - A Go compiler based on LLVM
|
||||
[](https://github.com/goplus/llgo/releases)
|
||||
[](https://codecov.io/gh/goplus/llgo)
|
||||
[](https://pkg.go.dev/github.com/goplus/llgo)
|
||||
[](https://github.com/goplus/gop)
|
||||
[](https://github.com/goplus/gop)
|
||||
|
||||
This is a Go compiler based on LLVM in order to better integrate Go with the C ecosystem including Python. It's a subproject of [the Go+ project](https://github.com/goplus/gop).
|
||||
LLGo is a Go compiler based on LLVM in order to better integrate Go with the C ecosystem including Python and JavaScript. It's a subproject of [the XGo project](https://github.com/goplus/gop).
|
||||
|
||||
## C standard libary support
|
||||
LLGo aims to expand the boundaries of Go/XGo, providing limitless possibilities such as:
|
||||
|
||||
* Game development
|
||||
* AI and data science
|
||||
* WebAssembly
|
||||
* Embedded development
|
||||
* ...
|
||||
|
||||
How can these be achieved?
|
||||
|
||||
```
|
||||
LLGo := Go * C ecosystem
|
||||
```
|
||||
|
||||
LLGo is compatible with C ecosystem through the language's **Application Binary Interface (ABI)**, while LLGo is compatible with Go through its **syntax (source code)**. C ecosystem includes all languages that are ABI compatible with C (eg. C/C++, Python, JavaScript, Objective-C, Swift, etc).
|
||||
|
||||
|
||||
## C/C++ standard libary support
|
||||
|
||||
You can import a C/C++ standard library in LLGo!
|
||||
|
||||
* [c](https://pkg.go.dev/github.com/goplus/lib/c)
|
||||
* [c/syscall](https://pkg.go.dev/github.com/goplus/lib/c/syscall)
|
||||
* [c/sys](https://pkg.go.dev/github.com/goplus/lib/c/sys)
|
||||
* [c/os](https://pkg.go.dev/github.com/goplus/lib/c/os)
|
||||
* [c/math](https://pkg.go.dev/github.com/goplus/lib/c/math)
|
||||
* [c/math/cmplx](https://pkg.go.dev/github.com/goplus/lib/c/math/cmplx)
|
||||
* [c/math/rand](https://pkg.go.dev/github.com/goplus/lib/c/math/rand)
|
||||
* [c/pthread](https://pkg.go.dev/github.com/goplus/lib/c/pthread)
|
||||
* [c/pthread/sync](https://pkg.go.dev/github.com/goplus/lib/c/pthread/sync)
|
||||
* [c/sync/atomic](https://pkg.go.dev/github.com/goplus/lib/c/sync/atomic)
|
||||
* [c/time](https://pkg.go.dev/github.com/goplus/lib/c/time)
|
||||
* [c/net](https://pkg.go.dev/github.com/goplus/lib/c/net)
|
||||
* [cpp/std](https://pkg.go.dev/github.com/goplus/lib/cpp/std)
|
||||
|
||||
Here is a simple example:
|
||||
|
||||
<!-- embedme doc/_readme/llgo_simple/simple.go -->
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import "github.com/goplus/llgo/c"
|
||||
import "github.com/goplus/lib/c"
|
||||
|
||||
func main() {
|
||||
c.Printf(c.Str("Hello world\n"))
|
||||
}
|
||||
```
|
||||
|
||||
This is a simple example of calling the C `printf` function to print `Hello world`. Here, `c.Str` is not a function for converting a Go string to a C string, but a built-in instruction supported by llgo for generating a C string constant.
|
||||
This is a simple example of calling the C `printf` function to print `Hello world`. Here, `c.Str` is not a function for converting a Go string to a C string, but a built-in instruction supported by `llgo` for generating a C string constant.
|
||||
|
||||
See [github.com/goplus/llgo/c](https://pkg.go.dev/github.com/goplus/llgo/c) for more detials.
|
||||
The `_demo` directory contains some C standard libary related demos (it start with `_` to prevent the `go` command from compiling it):
|
||||
|
||||
* [hello](_demo/c/hello/hello.go): call C `printf` to print `Hello world`
|
||||
* [concat](_demo/c/concat/concat.go): call C `fprintf` with `stderr`
|
||||
* [qsort](_demo/c/qsort/qsort.go): call C function with a callback (eg. `qsort`)
|
||||
|
||||
To run these demos (If you haven't installed `llgo` yet, please refer to [How to install](#how-to-install)):
|
||||
|
||||
```sh
|
||||
cd <demo-directory> # eg. cd _demo/c/hello
|
||||
llgo run .
|
||||
```
|
||||
|
||||
|
||||
## How to support C/C++ and Python
|
||||
|
||||
LLGo use `go:linkname` to link an extern symbol througth its ABI:
|
||||
|
||||
<!-- embedme doc/_readme/llgo_call_c/call_c.go#L3-L6 -->
|
||||
|
||||
```go
|
||||
import _ "unsafe" // for go:linkname
|
||||
|
||||
//go:linkname Sqrt C.sqrt
|
||||
func Sqrt(x float64) float64
|
||||
```
|
||||
|
||||
You can directly integrate it into [your own code](_demo/c/linkname/linkname.go):
|
||||
|
||||
<!-- embedme doc/_readme/llgo_call_c/call_c.go -->
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import _ "unsafe" // for go:linkname
|
||||
|
||||
//go:linkname Sqrt C.sqrt
|
||||
func Sqrt(x float64) float64
|
||||
|
||||
func main() {
|
||||
println("sqrt(2) =", Sqrt(2))
|
||||
}
|
||||
```
|
||||
|
||||
Or put it into a package (see [c/math](https://github.com/goplus/lib/tree/main/c/math/math.go)):
|
||||
|
||||
<!-- embedme doc/_readme/llgo_call_cmath/call_cmath.go -->
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import "github.com/goplus/lib/c/math"
|
||||
|
||||
func main() {
|
||||
println("sqrt(2) =", math.Sqrt(2))
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Python support
|
||||
|
||||
You can import a Python library in llgo! For example:
|
||||
You can import a Python library in LLGo!
|
||||
|
||||
And you can import any Python library into `llgo` through a program called `llpyg` (see [Development tools](#development-tools)). The following libraries have been included in `llgo`:
|
||||
|
||||
* [py](https://pkg.go.dev/github.com/goplus/lib/py) (abi)
|
||||
* [py/std](https://pkg.go.dev/github.com/goplus/lib/py/std) (builtins)
|
||||
* [py/sys](https://pkg.go.dev/github.com/goplus/lib/py/sys)
|
||||
* [py/os](https://pkg.go.dev/github.com/goplus/lib/py/os)
|
||||
* [py/math](https://pkg.go.dev/github.com/goplus/lib/py/math)
|
||||
* [py/json](https://pkg.go.dev/github.com/goplus/lib/py/json)
|
||||
* [py/inspect](https://pkg.go.dev/github.com/goplus/lib/py/inspect)
|
||||
* [py/statistics](https://pkg.go.dev/github.com/goplus/lib/py/statistics)
|
||||
* [py/numpy](https://pkg.go.dev/github.com/goplus/lib/py/numpy)
|
||||
* [py/pandas](https://pkg.go.dev/github.com/goplus/lib/py/pandas)
|
||||
* [py/torch](https://pkg.go.dev/github.com/goplus/lib/py/torch)
|
||||
* [py/matplotlib](https://pkg.go.dev/github.com/goplus/lib/py/matplotlib)
|
||||
|
||||
Note: For third-party libraries (such as pandas and pytorch), you still need to install the library files.
|
||||
|
||||
Here is an example:
|
||||
|
||||
<!-- embedme doc/_readme/llgo_call_py/call_py.go -->
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/py"
|
||||
"github.com/goplus/llgo/py/math"
|
||||
"github.com/goplus/lib/py"
|
||||
"github.com/goplus/lib/py/math"
|
||||
"github.com/goplus/lib/py/std"
|
||||
)
|
||||
|
||||
func main() {
|
||||
x := math.Sqrt(py.Float(2))
|
||||
c.Printf(c.Str("sqrt(2) = %f\n"), x.Float64())
|
||||
x := math.Sqrt(py.Float(2)) // x = sqrt(2)
|
||||
std.Print(py.Str("sqrt(2) ="), x) // print("sqrt(2) =", x)
|
||||
}
|
||||
```
|
||||
|
||||
Here, We call `py.Float(2)` to create a Python floating point number 2, and pass it to Python’s `math.sqrt` to get `x`. Then use `x.Float64()` to convert the Python object to Go's `float64` type, and finally we print the value through C `printf`.
|
||||
It is equivalent to the following Python code:
|
||||
|
||||
<!-- embedme doc/_readme/llgo_call_py/call_math.py -->
|
||||
|
||||
```py
|
||||
import math
|
||||
|
||||
x = math.sqrt(2)
|
||||
print("sqrt =", x)
|
||||
```
|
||||
|
||||
Here, We call `py.Float(2)` to create a Python number 2, and pass it to Python’s `math.sqrt` to get `x`. Then we call `std.Print` to print the result.
|
||||
|
||||
Let's look at a slightly more complex example. For example, we use `numpy` to calculate:
|
||||
|
||||
<!-- embedme doc/_readme/llgo_py_list/py_list.go -->
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/lib/py"
|
||||
"github.com/goplus/lib/py/numpy"
|
||||
"github.com/goplus/lib/py/std"
|
||||
)
|
||||
|
||||
func main() {
|
||||
a := py.List(
|
||||
py.List(1.0, 2.0, 3.0),
|
||||
py.List(4.0, 5.0, 6.0),
|
||||
py.List(7.0, 8.0, 9.0),
|
||||
)
|
||||
b := py.List(
|
||||
py.List(9.0, 8.0, 7.0),
|
||||
py.List(6.0, 5.0, 4.0),
|
||||
py.List(3.0, 2.0, 1.0),
|
||||
)
|
||||
x := numpy.Add(a, b)
|
||||
std.Print(py.Str("a+b ="), x)
|
||||
}
|
||||
```
|
||||
|
||||
Here we define two 3x3 matrices a and b, add them to get x, and then print the result.
|
||||
|
||||
The `_demo/py/` directory contains some python related demos:
|
||||
|
||||
* [callpy](_demo/py/callpy/callpy.go): call Python standard library function `math.sqrt`
|
||||
* [pi](_demo/py/pi/pi.go): print python constants `math.pi`
|
||||
* [statistics](_demo/py/statistics/statistics.go): define a python list and call `statistics.mean` to get the mean
|
||||
* [matrix](_demo/py/matrix/matrix.go): a basic `numpy` demo
|
||||
|
||||
To run these demos (If you haven't installed `llgo` yet, please refer to [How to install](#how-to-install)):
|
||||
|
||||
```sh
|
||||
cd <demo-directory> # eg. cd _demo/py/callpy
|
||||
llgo run .
|
||||
```
|
||||
|
||||
|
||||
## Other frequently used libraries
|
||||
|
||||
TODO
|
||||
LLGo can easily import any libraries from the C ecosystem. Currently, this import process is still manual, but in the future, it will be automated similar to Python library imports.
|
||||
|
||||
The currently supported libraries include:
|
||||
|
||||
* [c/bdwgc](https://pkg.go.dev/github.com/goplus/lib/c/bdwgc)
|
||||
* [c/cjson](https://pkg.go.dev/github.com/goplus/lib/c/cjson)
|
||||
* [c/clang](https://pkg.go.dev/github.com/goplus/lib/c/clang)
|
||||
* [c/ffi](https://pkg.go.dev/github.com/goplus/lib/c/ffi)
|
||||
* [c/libuv](https://pkg.go.dev/github.com/goplus/lib/c/libuv)
|
||||
* [c/llama2](https://pkg.go.dev/github.com/goplus/lib/c/llama2)
|
||||
* [c/lua](https://pkg.go.dev/github.com/goplus/lib/c/lua)
|
||||
* [c/neco](https://pkg.go.dev/github.com/goplus/lib/c/neco)
|
||||
* [c/openssl](https://pkg.go.dev/github.com/goplus/lib/c/openssl)
|
||||
* [c/raylib](https://pkg.go.dev/github.com/goplus/lib/c/raylib)
|
||||
* [c/sqlite](https://pkg.go.dev/github.com/goplus/lib/c/sqlite)
|
||||
* [c/zlib](https://pkg.go.dev/github.com/goplus/lib/c/zlib)
|
||||
* [cpp/inih](https://pkg.go.dev/github.com/goplus/lib/cpp/inih)
|
||||
* [cpp/llvm](https://pkg.go.dev/github.com/goplus/lib/cpp/llvm)
|
||||
|
||||
Here are some examples related to them:
|
||||
|
||||
* [llama2-c](_demo/c/llama2-c): inference Llama 2 (It's the first llgo AI example)
|
||||
* [mkjson](https://github.com/goplus/lib/tree/main/c/cjson/_demo/mkjson/mkjson.go): create a json object and print it
|
||||
* [sqlitedemo](https://github.com/goplus/lib/tree/main/c/sqlite/_demo/sqlitedemo/demo.go): a basic sqlite demo
|
||||
* [tetris](https://github.com/goplus/lib/tree/main/c/raylib/_demo/tetris/tetris.go): a tetris game based on raylib
|
||||
|
||||
|
||||
## Go syntax support
|
||||
|
||||
All Go syntax (including `cgo`) is already supported. Here are some examples:
|
||||
|
||||
* [concat](_demo/c/concat/concat.go): define a variadic function
|
||||
* [genints](_demo/c/genints/genints.go): various forms of closure usage (including C function, recv.method and anonymous function)
|
||||
* [errors](_cmptest/errors/errors.go): demo to implement error interface
|
||||
* [defer](_cmptest/defer/defer.go): defer demo
|
||||
* [goroutine](_demo/go/goroutine/goroutine.go): goroutine demo
|
||||
|
||||
|
||||
### Defer
|
||||
|
||||
LLGo `defer` does not support usage in loops. This is not a bug but a feature, because we think that using `defer` in a loop is a very unrecommended practice.
|
||||
|
||||
|
||||
### Garbage Collection (GC)
|
||||
|
||||
By default, LLGo implements `gc` based on [bdwgc](https://www.hboehm.info/gc/) (also known as [libgc](https://www.hboehm.info/gc/)).
|
||||
|
||||
However, you can disable gc by specifying the `nogc` tag. For example:
|
||||
|
||||
```sh
|
||||
llgo run -tags nogc .
|
||||
```
|
||||
|
||||
|
||||
## Go packages support
|
||||
|
||||
Here are the Go packages that can be imported correctly:
|
||||
|
||||
* [unsafe](https://pkg.go.dev/unsafe)
|
||||
* [unicode](https://pkg.go.dev/unicode)
|
||||
* [unicode/utf8](https://pkg.go.dev/unicode/utf8)
|
||||
* [unicode/utf16](https://pkg.go.dev/unicode/utf16)
|
||||
* [math](https://pkg.go.dev/math)
|
||||
* [math/big](https://pkg.go.dev/math/big) (partially)
|
||||
* [math/bits](https://pkg.go.dev/math/bits)
|
||||
* [math/cmplx](https://pkg.go.dev/math/cmplx)
|
||||
* [math/rand](https://pkg.go.dev/math/rand)
|
||||
* [net/url](https://pkg.go.dev/net/url)
|
||||
* [errors](https://pkg.go.dev/errors)
|
||||
* [context](https://pkg.go.dev/context)
|
||||
* [io](https://pkg.go.dev/io)
|
||||
* [io/fs](https://pkg.go.dev/io/fs)
|
||||
* [io/ioutil](https://pkg.go.dev/io/ioutil)
|
||||
* [log](https://pkg.go.dev/log)
|
||||
* [flag](https://pkg.go.dev/flag)
|
||||
* [sort](https://pkg.go.dev/sort)
|
||||
* [bytes](https://pkg.go.dev/bytes)
|
||||
* [bufio](https://pkg.go.dev/bufio)
|
||||
* [strings](https://pkg.go.dev/strings)
|
||||
* [strconv](https://pkg.go.dev/strconv)
|
||||
* [path](https://pkg.go.dev/path)
|
||||
* [path/filepath](https://pkg.go.dev/path/filepath)
|
||||
* [sync/atomic](https://pkg.go.dev/sync/atomic)
|
||||
* [sync](https://pkg.go.dev/sync) (partially)
|
||||
* [syscall](https://pkg.go.dev/syscall) (partially)
|
||||
* [runtime](https://pkg.go.dev/runtime) (partially)
|
||||
* [os](https://pkg.go.dev/os) (partially)
|
||||
* [os/exec](https://pkg.go.dev/os/exec) (partially)
|
||||
* [fmt](https://pkg.go.dev/fmt) (partially)
|
||||
* [reflect](https://pkg.go.dev/reflect) (partially)
|
||||
* [time](https://pkg.go.dev/time) (partially)
|
||||
* [encoding](https://pkg.go.dev/encoding)
|
||||
* [encoding/binary](https://pkg.go.dev/encoding/binary)
|
||||
* [encoding/hex](https://pkg.go.dev/encoding/hex)
|
||||
* [encoding/base32](https://pkg.go.dev/encoding/base32)
|
||||
* [encoding/base64](https://pkg.go.dev/encoding/base64)
|
||||
* [encoding/csv](https://pkg.go.dev/encoding/csv)
|
||||
* [net/textproto](https://pkg.go.dev/net/textproto)
|
||||
* [hash](https://pkg.go.dev/hash)
|
||||
* [hash/adler32](https://pkg.go.dev/hash/adler32)
|
||||
* [hash/crc32](https://pkg.go.dev/hash/crc32) (partially)
|
||||
* [hash/crc64](https://pkg.go.dev/hash/crc64)
|
||||
* [hash/maphash](https://pkg.go.dev/hash/maphash) (partially)
|
||||
* [crypto](https://pkg.go.dev/crypto)
|
||||
* [crypto/md5](https://pkg.go.dev/crypto/md5)
|
||||
* [crypto/sha1](https://pkg.go.dev/crypto/sha1)
|
||||
* [crypto/sha256](https://pkg.go.dev/crypto/sha256)
|
||||
* [crypto/sha512](https://pkg.go.dev/crypto/sha512) (partially)
|
||||
* [crypto/hmac](https://pkg.go.dev/crypto/hmac) (partially)
|
||||
* [crypto/rand](https://pkg.go.dev/crypto/rand) (partially)
|
||||
* [crypto/subtle](https://pkg.go.dev/crypto/subtle) (partially)
|
||||
* [regexp](https://pkg.go.dev/regexp)
|
||||
* [regexp/syntax](https://pkg.go.dev/regexp/syntax)
|
||||
* [go/token](https://pkg.go.dev/go/token)
|
||||
* [go/scanner](https://pkg.go.dev/go/scanner)
|
||||
* [go/parser](https://pkg.go.dev/go/parser)
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
- [Go 1.21+](https://go.dev)
|
||||
- [LLVM 18](https://llvm.org)
|
||||
- [Clang 18](https://clang.llvm.org)
|
||||
- [LLD 18](https://lld.llvm.org)
|
||||
- [pkg-config 0.29+](https://www.freedesktop.org/wiki/Software/pkg-config/)
|
||||
- [bdwgc/libgc 8.0+](https://www.hboehm.info/gc/)
|
||||
- [OpenSSL 3.0+](https://www.openssl.org/)
|
||||
- [zlib 1.2+](https://www.zlib.net)
|
||||
- [Python 3.12+](https://www.python.org) (optional, for [github.com/goplus/lib/py](https://pkg.go.dev/github.com/goplus/lib/py))
|
||||
|
||||
## How to install
|
||||
|
||||
@@ -60,66 +357,95 @@ Follow these steps to generate the `llgo` command (its usage is the same as the
|
||||
|
||||
### on macOS
|
||||
|
||||
<!-- embedme doc/_readme/scripts/install_macos.sh#L2-L1000 -->
|
||||
|
||||
```sh
|
||||
brew update # execute if needed
|
||||
brew install llvm@17
|
||||
go install -v ./...
|
||||
brew update
|
||||
brew install llvm@19 lld@19 bdw-gc openssl cjson libffi libuv pkg-config
|
||||
brew install python@3.12 # optional
|
||||
brew link --overwrite llvm@19 lld@19 libffi
|
||||
# curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash
|
||||
./install.sh
|
||||
```
|
||||
|
||||
### on Linux
|
||||
|
||||
#### Debian/Ubuntu
|
||||
|
||||
<!-- embedme doc/_readme/scripts/install_ubuntu.sh#L2-L1000 -->
|
||||
|
||||
```sh
|
||||
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-17 main' | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-19 main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo apt-get update # execute if needed
|
||||
sudo apt-get install --no-install-recommends llvm-17-dev
|
||||
go install -v ./...
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y llvm-19-dev clang-19 libclang-19-dev lld-19 libunwind-19-dev libc++-19-dev pkg-config libgc-dev libssl-dev zlib1g-dev libcjson-dev libsqlite3-dev libuv1-dev
|
||||
sudo apt-get install -y python3.12-dev # optional
|
||||
#curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash
|
||||
./install.sh
|
||||
```
|
||||
|
||||
#### Alpine Linux
|
||||
|
||||
```sh
|
||||
apk add go llvm19-dev clang19-dev lld19 pkgconf gc-dev libunwind-dev openssl-dev zlib-dev
|
||||
apk add python3-dev # optional
|
||||
apk add g++ # build only
|
||||
export LLVM_CONFIG=/usr/lib/llvm19/bin/llvm-config
|
||||
export CGO_CPPFLAGS="$($LLVM_CONFIG --cppflags)"
|
||||
export CGO_CXXFLAGS=-std=c++17
|
||||
export CGO_LDFLAGS="$($LLVM_CONFIG --ldflags) $($LLVM_CONFIG --libs all)"
|
||||
curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash
|
||||
```
|
||||
|
||||
docker alpine 386 llgo environment
|
||||
```
|
||||
export GCC_ROOT_DIR=$(gcc -print-search-dirs | grep 'install:' | awk -F': ' '{print $2}')
|
||||
export LDFLAGS="-L$GCC_ROOT_DIR -B$GCC_ROOT_DIR -Wl,-dynamic-linker,/lib/ld-musl-i386.so.1"
|
||||
llgo run .
|
||||
```
|
||||
|
||||
### on Windows
|
||||
|
||||
TODO
|
||||
|
||||
### Install from source
|
||||
|
||||
## Demo
|
||||
|
||||
The `_demo` directory contains our demos (it start with `_` to prevent the `go` command from compiling it):
|
||||
|
||||
* [hello](_demo/hello/hello.go): call C printf to print `Hello world`
|
||||
* [concat](_demo/concat/concat.go): call C fprintf with stderr, and Go variadic function
|
||||
* [qsort](_demo/qsort/qsort.go): call C function with a callback (eg. qsort)
|
||||
* [genints](_demo/genints/genints.go): various forms of closure usage (including C function, recv.method and anonymous function)
|
||||
* [llama2-c](_demo/llama2-c): inference Llama 2 (It's the first llgo AI example)
|
||||
|
||||
And the `_pydemo` directory contains python related demos:
|
||||
|
||||
* [callpy](_pydemo/callpy/callpy.go): call Python standard library function `math.sqrt`
|
||||
|
||||
|
||||
### How to run demos
|
||||
|
||||
To run the demos in directory `_demo`:
|
||||
<!-- embedme doc/_readme/scripts/install_llgo.sh#L2-L1000 -->
|
||||
|
||||
```sh
|
||||
cd <demo-directory> # eg. cd _demo/genints
|
||||
llgo run .
|
||||
git clone https://github.com/goplus/llgo.git
|
||||
cd llgo
|
||||
./install.sh
|
||||
```
|
||||
|
||||
To run the demos in directory `_pydemo`, you need to set the `LLGO_LIB_PYTHON` environment variable first. Assuming you use Python 3.12, and the `libpython3.12.so` (or `libpython3.12.dylib` or `python3.12.lib`) file is in the /foo/bar directory, then you need to set `LLGO_LIB_PYTHON` to:
|
||||
## Development tools
|
||||
|
||||
* [pydump](_xtool/pydump): It's the first program compiled by `llgo` (NOT `go`) in a production environment. It outputs symbol information (functions, variables, and constants) from a Python library in JSON format, preparing for the generation of corresponding packages in `llgo`.
|
||||
* [pysigfetch](https://github.com/goplus/hdq/tree/main/chore/pysigfetch): It generates symbol information by extracting information from Python's documentation site. This tool is not part of the `llgo` project, but we depend on it.
|
||||
* [llpyg](chore/llpyg): It is used to automatically convert Python libraries into Go packages that `llgo` can import. It depends on `pydump` and `pysigfetch` to accomplish the task.
|
||||
* [llgen](chore/llgen): It is used to compile Go packages into LLVM IR files (*.ll).
|
||||
* [ssadump](chore/ssadump): It is a Go SSA builder and interpreter.
|
||||
|
||||
How do I generate these tools?
|
||||
|
||||
<!-- embedme doc/_readme/scripts/install_full.sh#L2-L1000 -->
|
||||
|
||||
```sh
|
||||
export LLGO_LIB_PYTHON=/foo/bar/python3.12
|
||||
git clone https://github.com/goplus/llgo.git
|
||||
cd llgo
|
||||
go install -v ./cmd/...
|
||||
go install -v ./chore/... # compile all tools except pydump
|
||||
export LLGO_ROOT=$PWD
|
||||
cd _xtool
|
||||
llgo install ./... # compile pydump
|
||||
go install github.com/goplus/hdq/chore/pysigfetch@v0.8.1 # compile pysigfetch
|
||||
|
||||
```
|
||||
|
||||
For example, `/opt/homebrew/Frameworks/Python.framework/Versions/3.12/libpython3.12.dylib` is a typical python lib location under macOS. So we should set it like this:
|
||||
## Key modules
|
||||
|
||||
```sh
|
||||
export LLGO_LIB_PYTHON=/opt/homebrew/Frameworks/Python.framework/Versions/3.12/python3.12
|
||||
```
|
||||
Below are the key modules for understanding the implementation principles of `llgo`:
|
||||
|
||||
Then you can run the demos in directory `_pydemo`:
|
||||
|
||||
```sh
|
||||
cd <demo-directory> # eg. cd _pydemo/callpy
|
||||
llgo run .
|
||||
```
|
||||
* [ssa](https://pkg.go.dev/github.com/goplus/llgo/ssa): It generates LLVM IR files (LLVM SSA) using the semantics (interfaces) of Go SSA. Although `LLVM SSA` and `Go SSA` are both IR languages, they work at completely different levels. `LLVM SSA` is closer to machine code, which abstracts different instruction sets. While `Go SSA` is closer to a high-level language. We can think of it as the instruction set of the `Go computer`. `llgo/ssa` is not just limited to the `llgo` compiler. If we view it as the high-level expressive power of `LLVM`, you'll find it very useful. Prior to `llgo/ssa`, you had to operate `LLVM` using machine code semantics. But now, with the advanced SSA form (in the semantics of Go SSA), you can conveniently utilize `LLVM`.
|
||||
* [cl](https://pkg.go.dev/github.com/goplus/llgo/cl): It is the core of the llgo compiler. It converts a Go package into LLVM IR files. It depends on `llgo/ssa`.
|
||||
* [internal/build](https://pkg.go.dev/github.com/goplus/llgo/internal/build): It strings together the entire compilation process of `llgo`. It depends on `llgo/ssa` and `llgo/cl`.
|
||||
|
||||
47
_cmptest/_bigsqrt2/sqrt2.go
Normal file
47
_cmptest/_bigsqrt2/sqrt2.go
Normal file
@@ -0,0 +1,47 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"math/big"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// We'll do computations with 200 bits of precision in the mantissa.
|
||||
const prec = 200
|
||||
|
||||
// Compute the square root of 2 using Newton's Method. We start with
|
||||
// an initial estimate for sqrt(2), and then iterate:
|
||||
// x_{n+1} = 1/2 * ( x_n + (2.0 / x_n) )
|
||||
|
||||
// Since Newton's Method doubles the number of correct digits at each
|
||||
// iteration, we need at least log_2(prec) steps.
|
||||
steps := int(math.Log2(prec))
|
||||
|
||||
// Initialize values we need for the computation.
|
||||
two := new(big.Float).SetPrec(prec).SetInt64(2)
|
||||
half := new(big.Float).SetPrec(prec).SetFloat64(0.5)
|
||||
|
||||
// Use 1 as the initial estimate.
|
||||
x := new(big.Float).SetPrec(prec).SetInt64(1)
|
||||
|
||||
// We use t as a temporary variable. There's no need to set its precision
|
||||
// since big.Float values with unset (== 0) precision automatically assume
|
||||
// the largest precision of the arguments when used as the result (receiver)
|
||||
// of a big.Float operation.
|
||||
t := new(big.Float)
|
||||
|
||||
// Iterate.
|
||||
for i := 0; i <= steps; i++ {
|
||||
t.Quo(two, x) // t = 2.0 / x_n
|
||||
t.Add(x, t) // t = x_n + (2.0 / x_n)
|
||||
x.Mul(half, t) // x_{n+1} = 0.5 * t
|
||||
}
|
||||
|
||||
// We can use the usual fmt.Printf verbs since big.Float implements fmt.Formatter
|
||||
fmt.Printf("sqrt(2) = %.50f\n", x)
|
||||
|
||||
// Print the error between 2 and x*x.
|
||||
t.Mul(x, x) // t = x*x
|
||||
fmt.Printf("error = %e\n", t.Sub(two, t))
|
||||
}
|
||||
21
_cmptest/_chandemo/chan.go
Normal file
21
_cmptest/_chandemo/chan.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
c1 := make(chan string)
|
||||
c2 := make(chan string, 1)
|
||||
go func() {
|
||||
c1 <- "ch1"
|
||||
}()
|
||||
go func() {
|
||||
c2 <- "ch2"
|
||||
}()
|
||||
|
||||
for i := 0; i < 2; i++ {
|
||||
select {
|
||||
case msg1 := <-c1:
|
||||
println(msg1)
|
||||
case msg2 := <-c2:
|
||||
println(msg2)
|
||||
}
|
||||
}
|
||||
}
|
||||
33
_cmptest/_goconstdemo/goconst.go
Normal file
33
_cmptest/_goconstdemo/goconst.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go/constant"
|
||||
"go/token"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Create the complex number 2.3 + 5i.
|
||||
ar := constant.MakeFloat64(2.3)
|
||||
ai := constant.MakeImag(constant.MakeInt64(5))
|
||||
a := constant.BinaryOp(ar, token.ADD, ai)
|
||||
|
||||
// Compute (2.3 + 5i) * 11.
|
||||
b := constant.MakeUint64(11)
|
||||
c := constant.BinaryOp(a, token.MUL, b)
|
||||
|
||||
// Convert c into a complex128.
|
||||
Ar, exact := constant.Float64Val(constant.Real(c))
|
||||
if !exact {
|
||||
fmt.Printf("Could not represent real part %s exactly as float64\n", constant.Real(c))
|
||||
}
|
||||
Ai, exact := constant.Float64Val(constant.Imag(c))
|
||||
if !exact {
|
||||
fmt.Printf("Could not represent imaginary part %s as exactly as float64\n", constant.Imag(c))
|
||||
}
|
||||
C := complex(Ar, Ai)
|
||||
|
||||
fmt.Println("literal", 25.3+55i)
|
||||
fmt.Println("go/constant", c)
|
||||
fmt.Println("complex128", C)
|
||||
}
|
||||
16
_cmptest/_jsondemo/json.go
Normal file
16
_cmptest/_jsondemo/json.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := `{"name":"math","items":[{"name":"sqrt","sig":"(x, /)"},{"name":"pi"}]}`
|
||||
data := unsafe.Slice(unsafe.StringData(s), len(s))
|
||||
var v any
|
||||
json.Unmarshal(data, &v)
|
||||
b, _ := json.MarshalIndent(v, "", " ")
|
||||
fmt.Println(string(b))
|
||||
}
|
||||
19
_cmptest/_timeout/timer.go
Normal file
19
_cmptest/_timeout/timer.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
var c chan int
|
||||
|
||||
func handle(int) {}
|
||||
|
||||
func main() {
|
||||
select {
|
||||
case m := <-c:
|
||||
handle(m)
|
||||
case <-time.After(time.Second / 10):
|
||||
fmt.Println("timed out")
|
||||
}
|
||||
}
|
||||
48
_cmptest/base64demo/base64.go
Normal file
48
_cmptest/base64demo/base64.go
Normal file
@@ -0,0 +1,48 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/base32"
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"log"
|
||||
)
|
||||
|
||||
func base64Demo() {
|
||||
msg := "Hello, 世界"
|
||||
encoded := base64.StdEncoding.EncodeToString([]byte(msg))
|
||||
fmt.Println(encoded)
|
||||
decoded, err := base64.StdEncoding.DecodeString(encoded)
|
||||
if err != nil {
|
||||
fmt.Println("decode error:", err)
|
||||
return
|
||||
}
|
||||
fmt.Println(string(decoded))
|
||||
}
|
||||
|
||||
func base32Demo() {
|
||||
str := "JBSWY3DPFQQHO33SNRSCC==="
|
||||
dst := make([]byte, base32.StdEncoding.DecodedLen(len(str)))
|
||||
n, err := base32.StdEncoding.Decode(dst, []byte(str))
|
||||
if err != nil {
|
||||
fmt.Println("decode error:", err)
|
||||
return
|
||||
}
|
||||
dst = dst[:n]
|
||||
fmt.Printf("%q\n", dst)
|
||||
}
|
||||
|
||||
func hexDemo() {
|
||||
const s = "48656c6c6f20476f7068657221"
|
||||
decoded, err := hex.DecodeString(s)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Printf("%s\n", decoded)
|
||||
|
||||
}
|
||||
func main() {
|
||||
base64Demo()
|
||||
base32Demo()
|
||||
hexDemo()
|
||||
}
|
||||
63
_cmptest/bigintdemo/fib.go
Normal file
63
_cmptest/bigintdemo/fib.go
Normal file
@@ -0,0 +1,63 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
)
|
||||
|
||||
func fib() {
|
||||
// Initialize two big ints with the first two numbers in the sequence.
|
||||
a := big.NewInt(0)
|
||||
b := big.NewInt(1)
|
||||
|
||||
// Initialize limit as 10^99, the smallest integer with 100 digits.
|
||||
var limit big.Int
|
||||
limit.Exp(big.NewInt(10), big.NewInt(99), nil)
|
||||
|
||||
// Loop while a is smaller than 1e100.
|
||||
for a.Cmp(&limit) < 0 {
|
||||
// Compute the next Fibonacci number, storing it in a.
|
||||
a.Add(a, b)
|
||||
// Swap a and b so that b is the next number in the sequence.
|
||||
a, b = b, a
|
||||
}
|
||||
fmt.Println(a) // 100-digit Fibonacci number
|
||||
}
|
||||
|
||||
func abs() {
|
||||
a := big.NewInt(64)
|
||||
b := big.NewInt(-52)
|
||||
a.Set(b)
|
||||
a.Abs(a)
|
||||
a.Set(big.NewInt(-164))
|
||||
a.Abs(a)
|
||||
fmt.Println("value: ", a.String())
|
||||
}
|
||||
|
||||
func neg() {
|
||||
fmt.Println("value: ", big.NewInt(-64).Neg(big.NewInt(-64)))
|
||||
fmt.Println("value: ", big.NewInt(64).Neg(big.NewInt(64)))
|
||||
fmt.Println("value: ", big.NewInt(0).Neg(big.NewInt(0)))
|
||||
}
|
||||
|
||||
func calc() {
|
||||
a := big.NewInt(64)
|
||||
b := big.NewInt(-52)
|
||||
c := big.NewInt(54)
|
||||
fmt.Println("value:", a.Add(a, b))
|
||||
fmt.Println("value:", a.Sub(b, c))
|
||||
d := big.NewInt(10)
|
||||
e := big.NewInt(4)
|
||||
fmt.Println("value:", d.Mul(d, e))
|
||||
}
|
||||
|
||||
func bitop() {
|
||||
a := big.NewInt(4)
|
||||
fmt.Println("value:", a.Lsh(a, 1))
|
||||
b := big.NewInt(16)
|
||||
fmt.Println("value:", b.Rsh(b, 2))
|
||||
}
|
||||
|
||||
func main() {
|
||||
bitop()
|
||||
}
|
||||
11
_cmptest/chan/chan.go
Normal file
11
_cmptest/chan/chan.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
ch := make(chan int, 10)
|
||||
println(len(ch), cap(ch))
|
||||
go func() {
|
||||
ch <- 100
|
||||
}()
|
||||
n, ok := <-ch
|
||||
println(n, ok)
|
||||
}
|
||||
26
_cmptest/chansel/chansel.go
Normal file
26
_cmptest/chansel/chansel.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
func fibonacci(c, quit chan int) {
|
||||
x, y := 0, 1
|
||||
for {
|
||||
select {
|
||||
case c <- x:
|
||||
x, y = y, x+y
|
||||
case <-quit:
|
||||
println("quit")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
c := make(chan int)
|
||||
quit := make(chan int)
|
||||
go func() {
|
||||
for i := 0; i < 10; i++ {
|
||||
println(<-c)
|
||||
}
|
||||
close(quit)
|
||||
}()
|
||||
fibonacci(c, quit)
|
||||
}
|
||||
28
_cmptest/crcdemo/crc.go
Normal file
28
_cmptest/crcdemo/crc.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"hash/adler32"
|
||||
"hash/crc32"
|
||||
"hash/crc64"
|
||||
)
|
||||
|
||||
func crc64Demo() {
|
||||
crc := crc64.MakeTable(crc64.ECMA)
|
||||
fmt.Printf("%016x\n", crc64.Checksum([]byte("Hello world"), crc))
|
||||
}
|
||||
|
||||
func crc32Demo() {
|
||||
crc32q := crc32.MakeTable(crc32.IEEE)
|
||||
fmt.Printf("%08x\n", crc32.Checksum([]byte("Hello world"), crc32q))
|
||||
}
|
||||
|
||||
func adler32Demo() {
|
||||
fmt.Printf("%08x\n", adler32.Checksum([]byte("Hello world")))
|
||||
}
|
||||
|
||||
func main() {
|
||||
adler32Demo()
|
||||
crc32Demo()
|
||||
crc64Demo()
|
||||
}
|
||||
30
_cmptest/csvdemo/csv.go
Normal file
30
_cmptest/csvdemo/csv.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/csv"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
in := `first_name,last_name,username
|
||||
"Rob","Pike",rob
|
||||
Ken,Thompson,ken
|
||||
"Robert","Griesemer","gri"
|
||||
`
|
||||
r := csv.NewReader(strings.NewReader(in))
|
||||
|
||||
for {
|
||||
record, err := r.Read()
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
fmt.Println(record)
|
||||
}
|
||||
}
|
||||
39
_cmptest/ctxcancel/ctx.go
Normal file
39
_cmptest/ctxcancel/ctx.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// gen generates integers in a separate goroutine and
|
||||
// sends them to the returned channel.
|
||||
// The callers of gen need to cancel the context once
|
||||
// they are done consuming generated integers not to leak
|
||||
// the internal goroutine started by gen.
|
||||
gen := func(ctx context.Context) <-chan int {
|
||||
dst := make(chan int)
|
||||
n := 1
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return // returning not to leak the goroutine
|
||||
case dst <- n:
|
||||
n++
|
||||
}
|
||||
}
|
||||
}()
|
||||
return dst
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel() // cancel when we are finished consuming integers
|
||||
|
||||
for n := range gen(ctx) {
|
||||
fmt.Println(n)
|
||||
if n == 5 {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
17
_cmptest/defer/defer.go
Normal file
17
_cmptest/defer/defer.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
func f(s string) bool {
|
||||
return len(s) > 2
|
||||
}
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
println("hi")
|
||||
}()
|
||||
if s := "hello"; f(s) {
|
||||
defer println(s)
|
||||
} else {
|
||||
defer println("world")
|
||||
}
|
||||
defer println("bye")
|
||||
}
|
||||
20
_cmptest/envexpand/expand.go
Normal file
20
_cmptest/envexpand/expand.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
mapper := func(placeholderName string) string {
|
||||
switch placeholderName {
|
||||
case "DAY_PART":
|
||||
return "morning"
|
||||
case "NAME":
|
||||
return "Gopher"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
fmt.Println(os.Expand("Good ${DAY_PART}, $NAME!", mapper))
|
||||
}
|
||||
21
_cmptest/errors/errors.go
Normal file
21
_cmptest/errors/errors.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
// New returns an error that formats as the given text.
|
||||
// Each call to New returns a distinct error value even if the text is identical.
|
||||
func New(text string) error {
|
||||
return &errorString{text}
|
||||
}
|
||||
|
||||
// errorString is a trivial implementation of error.
|
||||
type errorString struct {
|
||||
s string
|
||||
}
|
||||
|
||||
func (e *errorString) Error() string {
|
||||
return e.s
|
||||
}
|
||||
|
||||
func main() {
|
||||
err := New("an error")
|
||||
println(err.Error())
|
||||
}
|
||||
21
_cmptest/flagdemo/flagdemo.go
Normal file
21
_cmptest/flagdemo/flagdemo.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("args:", os.Args[1:])
|
||||
if len(os.Args) == 1 {
|
||||
os.Args = []string{"flagdemo", "-cpu", "100"}
|
||||
}
|
||||
|
||||
verbose := flag.Bool("v", false, "verbose")
|
||||
cpu := flag.Int("cpu", 1, "cpu number")
|
||||
host := flag.String("host", ":8888", "host")
|
||||
flag.Parse()
|
||||
|
||||
fmt.Println("host:", *host, "cpu:", *cpu, "verbose:", *verbose)
|
||||
}
|
||||
12
_cmptest/fmtdemo/fmt.go
Normal file
12
_cmptest/fmtdemo/fmt.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hello, world")
|
||||
fmt.Printf("%f\n", 3.14)
|
||||
fmt.Printf("%v\n", errors.New("error message"))
|
||||
}
|
||||
34
_cmptest/goparsedemo/parse.go
Normal file
34
_cmptest/goparsedemo/parse.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fset := token.NewFileSet() // positions are relative to fset
|
||||
|
||||
src := `package foo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
func bar() {
|
||||
fmt.Println(time.Now())
|
||||
}`
|
||||
|
||||
// Parse src but stop after processing the imports.
|
||||
f, err := parser.ParseFile(fset, "", src, parser.ImportsOnly)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
|
||||
// Print the imports from the file's AST.
|
||||
for _, s := range f.Imports {
|
||||
fmt.Println(s.Path.Value)
|
||||
}
|
||||
}
|
||||
27
_cmptest/goscandemo/scan.go
Normal file
27
_cmptest/goscandemo/scan.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go/scanner"
|
||||
"go/token"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// src is the input that we want to tokenize.
|
||||
src := []byte("cos(x) + 1i*sin(x) // Euler")
|
||||
|
||||
// Initialize the scanner.
|
||||
var s scanner.Scanner
|
||||
fset := token.NewFileSet() // positions are relative to fset
|
||||
file := fset.AddFile("", fset.Base(), len(src)) // register input "file"
|
||||
s.Init(file, src, nil /* no error handler */, scanner.ScanComments)
|
||||
|
||||
// Repeated calls to Scan yield the token sequence found in the input.
|
||||
for {
|
||||
pos, tok, lit := s.Scan()
|
||||
if tok == token.EOF {
|
||||
break
|
||||
}
|
||||
fmt.Printf("%s\t%s\t%q\n", fset.Position(pos), tok, lit)
|
||||
}
|
||||
}
|
||||
15
_cmptest/hmacdemo/hmac.go
Normal file
15
_cmptest/hmacdemo/hmac.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/hmac"
|
||||
"crypto/sha1"
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
func main() {
|
||||
h := hmac.New(sha1.New, []byte("<key>"))
|
||||
io.WriteString(h, "The fog is getting thicker!")
|
||||
io.WriteString(h, "And Leon's getting laaarger!")
|
||||
fmt.Printf("%x", h.Sum(nil))
|
||||
}
|
||||
9
_cmptest/interf/foo/foo.go
Normal file
9
_cmptest/interf/foo/foo.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package foo
|
||||
|
||||
func Bar() any {
|
||||
return struct{ V int }{1}
|
||||
}
|
||||
|
||||
func F() any {
|
||||
return struct{ v int }{1}
|
||||
}
|
||||
35
_cmptest/interf/interf.go
Normal file
35
_cmptest/interf/interf.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/_cmptest/interf/foo"
|
||||
)
|
||||
|
||||
func Foo() any {
|
||||
return struct{ v int }{1}
|
||||
}
|
||||
|
||||
func main() {
|
||||
v := Foo()
|
||||
if x, ok := v.(struct{ v int }); ok {
|
||||
println(x.v)
|
||||
} else {
|
||||
println("Foo: not ok")
|
||||
}
|
||||
bar := foo.Bar()
|
||||
if x, ok := bar.(struct{ V int }); ok {
|
||||
println(x.V)
|
||||
} else {
|
||||
println("Bar: not ok")
|
||||
}
|
||||
if x, ok := foo.F().(struct{ v int }); ok {
|
||||
println(x.v)
|
||||
} else {
|
||||
println("F: not ok")
|
||||
}
|
||||
}
|
||||
|
||||
/* Expected output:
|
||||
1
|
||||
1
|
||||
F: not ok
|
||||
*/
|
||||
14
_cmptest/iodemo/io.go
Normal file
14
_cmptest/iodemo/io.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
|
||||
func f(w io.Writer) {
|
||||
w.Write([]byte("Hello, world\n"))
|
||||
}
|
||||
|
||||
func main() {
|
||||
f(os.Stdout)
|
||||
}
|
||||
19
_cmptest/ioutildemo/ioutil.go
Normal file
19
_cmptest/ioutildemo/ioutil.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
r := strings.NewReader("Go is a general-purpose language designed with systems programming in mind.")
|
||||
|
||||
b, err := ioutil.ReadAll(r)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
fmt.Printf("%s\n", b)
|
||||
}
|
||||
25
_cmptest/mathbigdemo/big.go
Normal file
25
_cmptest/mathbigdemo/big.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Initialize two big ints with the first two numbers in the sequence.
|
||||
a := big.NewInt(0)
|
||||
b := big.NewInt(1)
|
||||
|
||||
// Initialize limit as 10^99, the smallest integer with 100 digits.
|
||||
var limit big.Int
|
||||
limit.Exp(big.NewInt(10), big.NewInt(99), nil)
|
||||
|
||||
// Loop while a is smaller than 1e100.
|
||||
for a.Cmp(&limit) < 0 {
|
||||
// Compute the next Fibonacci number, storing it in a.
|
||||
a.Add(a, b)
|
||||
// Swap a and b so that b is the next number in the sequence.
|
||||
a, b = b, a
|
||||
}
|
||||
fmt.Println(a) // 100-digit Fibonacci number
|
||||
}
|
||||
20
_cmptest/md5demo/md5.go
Normal file
20
_cmptest/md5demo/md5.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto"
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
func main() {
|
||||
h := md5.New()
|
||||
io.WriteString(h, "The fog is getting thicker!")
|
||||
io.WriteString(h, "And Leon's getting laaarger!")
|
||||
fmt.Printf("%x\n", h.Sum(nil))
|
||||
|
||||
h = crypto.MD5.New()
|
||||
io.WriteString(h, "The fog is getting thicker!")
|
||||
io.WriteString(h, "And Leon's getting laaarger!")
|
||||
fmt.Printf("%x\n", h.Sum(nil))
|
||||
}
|
||||
18
_cmptest/osdemo/osd.go
Normal file
18
_cmptest/osdemo/osd.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
home, _ := os.UserHomeDir()
|
||||
println("home:", home)
|
||||
|
||||
cfgdir, _ := os.UserConfigDir()
|
||||
println("cfgdir:", cfgdir)
|
||||
|
||||
cache, _ := os.UserCacheDir()
|
||||
println("cachedir:", cache)
|
||||
|
||||
os.Stdout.Write([]byte("Hello, World\n"))
|
||||
}
|
||||
24
_cmptest/osexec/exec.go
Normal file
24
_cmptest/osexec/exec.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
|
||||
"github.com/goplus/llgo/xtool/env/llvm"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ls := "ls"
|
||||
if runtime.GOOS == "windows" {
|
||||
ls = "dir"
|
||||
}
|
||||
cmd := exec.Command(ls)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Run()
|
||||
|
||||
dir := llvm.New("").BinDir()
|
||||
fmt.Println(dir)
|
||||
}
|
||||
30
_cmptest/osproc/exec.go
Normal file
30
_cmptest/osproc/exec.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ls := "ls"
|
||||
args := []string{ls, "-l"}
|
||||
if runtime.GOOS == "windows" {
|
||||
ls = "dir"
|
||||
args = []string{ls}
|
||||
}
|
||||
lspath, _ := exec.LookPath(ls)
|
||||
if lspath != "" {
|
||||
ls = lspath
|
||||
}
|
||||
proc, err := os.StartProcess(ls, args, &os.ProcAttr{
|
||||
Files: []*os.File{nil, os.Stdout, os.Stderr},
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("os.StartProcess error:", err)
|
||||
return
|
||||
}
|
||||
proc.Wait()
|
||||
fmt.Println("proc.Wait done")
|
||||
}
|
||||
26
_cmptest/pipedemo/pipe.go
Normal file
26
_cmptest/pipedemo/pipe.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
func main() {
|
||||
data := []byte("This is some data that needs to be stored in Body.")
|
||||
pr, pw := io.Pipe()
|
||||
go func() {
|
||||
defer pw.Close()
|
||||
if _, err := pw.Write(data); err != nil {
|
||||
fmt.Println("Error writing to pipe:", err)
|
||||
return
|
||||
}
|
||||
}()
|
||||
defer pr.Close()
|
||||
|
||||
readData, err := io.ReadAll(pr)
|
||||
if err != nil {
|
||||
fmt.Println("Error reading from Body:", err)
|
||||
return
|
||||
}
|
||||
fmt.Println("Body:", string(readData))
|
||||
}
|
||||
12
_cmptest/printfdemo/demo.go
Normal file
12
_cmptest/printfdemo/demo.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/goplus/llgo/xtool/nm"
|
||||
)
|
||||
|
||||
func main() {
|
||||
sym := nm.Symbol{Name: "abc", Type: nm.Text}
|
||||
fmt.Printf("%016x %c %s\n", sym.Addr, sym.Type, sym.Name)
|
||||
}
|
||||
25
_cmptest/readfiledemo/readf.go
Normal file
25
_cmptest/readfiledemo/readf.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fileName := "err.log"
|
||||
os.WriteFile(fileName, []byte("123"), 0644)
|
||||
|
||||
_, err := os.Stat(fileName)
|
||||
if os.IsNotExist(err) {
|
||||
fmt.Fprintf(os.Stderr, "File %s not found\n", fileName)
|
||||
return
|
||||
}
|
||||
|
||||
data, err := os.ReadFile(fileName)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "ReadFile: %v\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Printf("%s\n", data)
|
||||
}
|
||||
13
_cmptest/reflect/reflect.go
Normal file
13
_cmptest/reflect/reflect.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import "reflect"
|
||||
|
||||
func main() {
|
||||
tyIntSlice := reflect.SliceOf(reflect.TypeOf(0))
|
||||
v := reflect.Zero(tyIntSlice)
|
||||
v = reflect.Append(v, reflect.ValueOf(1), reflect.ValueOf(2), reflect.ValueOf(3))
|
||||
for i, n := 0, v.Len(); i < n; i++ {
|
||||
item := v.Index(i)
|
||||
println(item.Int())
|
||||
}
|
||||
}
|
||||
11
_cmptest/regexdemo/regex.go
Normal file
11
_cmptest/regexdemo/regex.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/goplus/llgo/xtool/env"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println(env.ExpandEnv("$(pkg-config --libs bdw-gc)"))
|
||||
}
|
||||
14
_cmptest/rtype/rtype.go
Normal file
14
_cmptest/rtype/rtype.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import "reflect"
|
||||
|
||||
func main() {
|
||||
tyIntSlice := reflect.SliceOf(reflect.TypeOf(0))
|
||||
println(tyIntSlice.String())
|
||||
|
||||
v := reflect.Zero(tyIntSlice)
|
||||
println(v.Len())
|
||||
|
||||
v = reflect.ValueOf(100)
|
||||
println(v.Int())
|
||||
}
|
||||
14
_cmptest/sha1demo/sha1.go
Normal file
14
_cmptest/sha1demo/sha1.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/sha1"
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
func main() {
|
||||
h := sha1.New()
|
||||
io.WriteString(h, "The fog is getting thicker!")
|
||||
io.WriteString(h, "And Leon's getting laaarger!")
|
||||
fmt.Printf("%x", h.Sum(nil))
|
||||
}
|
||||
14
_cmptest/sha256demo/sha256.go
Normal file
14
_cmptest/sha256demo/sha256.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
func main() {
|
||||
h := sha256.New()
|
||||
io.WriteString(h, "The fog is getting thicker!")
|
||||
io.WriteString(h, "And Leon's getting laaarger!")
|
||||
fmt.Printf("%x", h.Sum(nil))
|
||||
}
|
||||
14
_cmptest/sha512demo/sha512.go
Normal file
14
_cmptest/sha512demo/sha512.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/sha512"
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
func main() {
|
||||
h := sha512.New()
|
||||
io.WriteString(h, "The fog is getting thicker!")
|
||||
io.WriteString(h, "And Leon's getting laaarger!")
|
||||
fmt.Printf("%x", h.Sum(nil))
|
||||
}
|
||||
23
_cmptest/sortdemo/sort.go
Normal file
23
_cmptest/sortdemo/sort.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import "sort"
|
||||
|
||||
func main() {
|
||||
vals := []int{32, 58, 25, 92, 45, 78}
|
||||
sort.Ints(vals)
|
||||
for _, v := range vals {
|
||||
println(v)
|
||||
}
|
||||
|
||||
texts := []string{"apple", "banana", "cherry", "date", "elderberry", "fig"}
|
||||
sort.Slice(texts, func(i, j int) bool {
|
||||
leni, lenj := len(texts[i]), len(texts[j])
|
||||
if leni != lenj {
|
||||
return leni < lenj
|
||||
}
|
||||
return texts[i] < texts[j]
|
||||
})
|
||||
for _, v := range texts {
|
||||
println(v)
|
||||
}
|
||||
}
|
||||
12
_cmptest/strconv/strconv.go
Normal file
12
_cmptest/strconv/strconv.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println(strconv.Itoa(-123))
|
||||
fmt.Println(strings.Split("abc,def,123", ","))
|
||||
}
|
||||
11
_cmptest/syscall/syscall.go
Normal file
11
_cmptest/syscall/syscall.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import "syscall"
|
||||
|
||||
func main() {
|
||||
wd, err := syscall.Getwd()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
println("cwd:", wd)
|
||||
}
|
||||
8
_cmptest/timedemo/time.go
Normal file
8
_cmptest/timedemo/time.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package main
|
||||
|
||||
import "time"
|
||||
|
||||
func main() {
|
||||
t := time.Date(2018, time.January, 1, 2, 3, 4, 5, time.UTC)
|
||||
println(t.String())
|
||||
}
|
||||
20
_cmptest/urldemo/url.go
Normal file
20
_cmptest/urldemo/url.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func main() {
|
||||
u, err := url.Parse("http://foo.example.com/foo?bar=1")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
u.Scheme = "https"
|
||||
u.Host = "bar.example.com"
|
||||
q := u.Query()
|
||||
q.Set("bar", "2")
|
||||
u.RawQuery = q.Encode()
|
||||
fmt.Println(u)
|
||||
}
|
||||
18
_demo/c/asmcall/asmcall.go
Normal file
18
_demo/c/asmcall/asmcall.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
//llgo:link asm llgo.asm
|
||||
func asm(instruction string) {}
|
||||
|
||||
func main() {
|
||||
start := time.Now()
|
||||
for i := 0; i < 100000; i++ {
|
||||
asm("nop")
|
||||
}
|
||||
duration := time.Since(start)
|
||||
fmt.Println("Duration:", duration)
|
||||
}
|
||||
21
_demo/c/asmfullcall/asmfullcall.go
Normal file
21
_demo/c/asmfullcall/asmfullcall.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
//llgo:link asmFull llgo.asm
|
||||
func asmFull(instruction string, regs map[string]any) uintptr { return 0 }
|
||||
|
||||
var testVar = 0
|
||||
|
||||
func main() {
|
||||
verify()
|
||||
}
|
||||
|
||||
func check(expected, actual int) {
|
||||
if expected != actual {
|
||||
panic(fmt.Sprintf("Expected: %d, Got: %d\n", expected, actual))
|
||||
}
|
||||
fmt.Println("asm check passed:", actual)
|
||||
}
|
||||
31
_demo/c/asmfullcall/asmfullcall_darwin.go
Normal file
31
_demo/c/asmfullcall/asmfullcall_darwin.go
Normal file
@@ -0,0 +1,31 @@
|
||||
//go:build darwin && arm64
|
||||
|
||||
package main
|
||||
|
||||
import "unsafe"
|
||||
|
||||
func verify() {
|
||||
// 0 output & 0 input
|
||||
asmFull("nop", nil)
|
||||
|
||||
// 0 output & 1 input with memory address
|
||||
addr := uintptr(unsafe.Pointer(&testVar))
|
||||
asmFull("str {value}, [{addr}]", map[string]any{
|
||||
"addr": addr,
|
||||
"value": 43,
|
||||
})
|
||||
check(43, testVar)
|
||||
|
||||
// 1 output & 1 input
|
||||
res1 := asmFull("mov {}, {value}", map[string]any{
|
||||
"value": 41,
|
||||
})
|
||||
check(41, int(res1))
|
||||
|
||||
// 1 output & 2 inputs
|
||||
res2 := asmFull("add {}, {a}, {b}", map[string]any{
|
||||
"a": 25,
|
||||
"b": 17,
|
||||
})
|
||||
check(42, int(res2))
|
||||
}
|
||||
30
_demo/c/asmfullcall/asmfullcall_linux.go
Normal file
30
_demo/c/asmfullcall/asmfullcall_linux.go
Normal file
@@ -0,0 +1,30 @@
|
||||
//go:build linux && amd64
|
||||
|
||||
package main
|
||||
|
||||
import "unsafe"
|
||||
|
||||
func verify() {
|
||||
// 0 output & 0 input
|
||||
asmFull("nop", nil)
|
||||
|
||||
// 0 output & 1 input with memory address
|
||||
addr := uintptr(unsafe.Pointer(&testVar))
|
||||
asmFull("movq {value}, ({addr})", map[string]any{
|
||||
"addr": addr,
|
||||
"value": 43,
|
||||
})
|
||||
check(43, testVar)
|
||||
|
||||
// 1 output & 1 input
|
||||
res1 := asmFull("movq {value}, {}", map[string]any{
|
||||
"value": 41,
|
||||
})
|
||||
check(41, int(res1))
|
||||
|
||||
res2 := asmFull("leaq ({a},{b}), {}", map[string]any{
|
||||
"a": 25,
|
||||
"b": 17,
|
||||
})
|
||||
check(42, int(res2))
|
||||
}
|
||||
395
_demo/c/cabi/main.go
Normal file
395
_demo/c/cabi/main.go
Normal file
@@ -0,0 +1,395 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
LLGoFiles = "wrap/wrap.c"
|
||||
)
|
||||
|
||||
type point struct {
|
||||
x int32
|
||||
y int32
|
||||
}
|
||||
|
||||
//go:linkname pt C.pt
|
||||
func pt(pt point) point
|
||||
|
||||
type point1 struct {
|
||||
x int32
|
||||
y int32
|
||||
z int32
|
||||
}
|
||||
|
||||
//go:linkname pt1 C.pt1
|
||||
func pt1(pt point1) point1
|
||||
|
||||
type point2 struct {
|
||||
x int8
|
||||
y int32
|
||||
z int32
|
||||
}
|
||||
|
||||
//go:linkname pt2 C.pt2
|
||||
func pt2(pt point2) point2
|
||||
|
||||
type point3 struct {
|
||||
x int8
|
||||
y int8
|
||||
z int8
|
||||
}
|
||||
|
||||
//go:linkname pt3 C.pt3
|
||||
func pt3(pt point3) point3
|
||||
|
||||
type point4 struct {
|
||||
x int8
|
||||
y int8
|
||||
z int8
|
||||
m int32
|
||||
}
|
||||
|
||||
//go:linkname pt4 C.pt4
|
||||
func pt4(pt point4) point4
|
||||
|
||||
type point5 struct {
|
||||
x int8
|
||||
y int8
|
||||
z int8
|
||||
m int8
|
||||
n int8
|
||||
}
|
||||
|
||||
//go:linkname pt5 C.pt5
|
||||
func pt5(pt point5) point5
|
||||
|
||||
type point6 struct {
|
||||
x int8
|
||||
y int8
|
||||
z int8
|
||||
m int8
|
||||
n int8
|
||||
k int32
|
||||
}
|
||||
|
||||
//go:linkname pt6 C.pt6
|
||||
func pt6(pt point6) point6
|
||||
|
||||
type point7 struct {
|
||||
x int8
|
||||
y int8
|
||||
z int8
|
||||
m int8
|
||||
n int8
|
||||
k int32
|
||||
o int8
|
||||
}
|
||||
|
||||
//go:linkname pt7 C.pt7
|
||||
func pt7(pt point7) point7
|
||||
|
||||
type data1 struct {
|
||||
x int8
|
||||
y int64
|
||||
}
|
||||
|
||||
//go:linkname fn1 C.fn1
|
||||
func fn1(data1) data1
|
||||
|
||||
type data2 struct {
|
||||
x int32
|
||||
y int64
|
||||
}
|
||||
|
||||
//go:linkname fn2 C.fn2
|
||||
func fn2(data2) data2
|
||||
|
||||
type data3 struct {
|
||||
x int64
|
||||
y int8
|
||||
}
|
||||
|
||||
//go:linkname fn3 C.fn3
|
||||
func fn3(data3) data3
|
||||
|
||||
type fdata1 struct {
|
||||
x float32
|
||||
}
|
||||
|
||||
//go:linkname ff1 C.ff1
|
||||
func ff1(fdata1) fdata1
|
||||
|
||||
type fdata2 struct {
|
||||
x float32
|
||||
y float32
|
||||
}
|
||||
|
||||
//go:linkname ff2 C.ff2
|
||||
func ff2(fdata2) fdata2
|
||||
|
||||
type fdata2i struct {
|
||||
x float32
|
||||
y int32
|
||||
}
|
||||
|
||||
//go:linkname ff2i C.ff2i
|
||||
func ff2i(fdata2i) fdata2i
|
||||
|
||||
type fdata3 struct {
|
||||
x float32
|
||||
y float32
|
||||
z float32
|
||||
}
|
||||
|
||||
//go:linkname ff3 C.ff3
|
||||
func ff3(fdata3) fdata3
|
||||
|
||||
type fdata4 struct {
|
||||
x float32
|
||||
y float32
|
||||
z float32
|
||||
m float32
|
||||
}
|
||||
|
||||
//go:linkname ff4 C.ff4
|
||||
func ff4(fdata4) fdata4
|
||||
|
||||
type fdata5 struct {
|
||||
x float32
|
||||
y float32
|
||||
z float32
|
||||
m float32
|
||||
n float32
|
||||
}
|
||||
|
||||
//go:linkname ff5 C.ff5
|
||||
func ff5(fdata5) fdata5
|
||||
|
||||
type fdata2id struct {
|
||||
x int8
|
||||
y int8
|
||||
z float64
|
||||
}
|
||||
|
||||
//go:linkname ff2id C.ff2id
|
||||
func ff2id(fdata2id) fdata2id
|
||||
|
||||
type fdata7if struct {
|
||||
x [7]int8
|
||||
y float32
|
||||
}
|
||||
|
||||
//go:linkname ff7if C.ff7if
|
||||
func ff7if(fdata7if) fdata7if
|
||||
|
||||
type fdata4if struct {
|
||||
x float32
|
||||
y int8
|
||||
z float32
|
||||
m float32
|
||||
}
|
||||
|
||||
//go:linkname ff4if C.ff4if
|
||||
func ff4if(fdata4if) fdata4if
|
||||
|
||||
type array struct {
|
||||
x [8]int32
|
||||
}
|
||||
|
||||
//go:linkname demo64 C.demo64
|
||||
func demo64(n int64) int64
|
||||
|
||||
//go:linkname demo32 C.demo32
|
||||
func demo32(n int32) int32
|
||||
|
||||
type struct32 struct {
|
||||
v int32
|
||||
}
|
||||
|
||||
//go:linkname demo32s C.demo32s
|
||||
func demo32s(v struct32) struct32
|
||||
|
||||
type point64 struct {
|
||||
x int64
|
||||
y int64
|
||||
}
|
||||
|
||||
//go:linkname pt64 C.pt64
|
||||
func pt64(pt point64) point64
|
||||
|
||||
//go:linkname demo C.demo
|
||||
func demo(a array) array
|
||||
|
||||
//go:linkname demo2 C.demo2
|
||||
func demo2(x int32) array
|
||||
|
||||
type ddata1 struct {
|
||||
x float64
|
||||
}
|
||||
|
||||
//go:linkname dd1 C.dd1
|
||||
func dd1(d ddata1) ddata1
|
||||
|
||||
type ddata2 struct {
|
||||
x float64
|
||||
y float64
|
||||
}
|
||||
|
||||
//go:linkname dd2 C.dd2
|
||||
func dd2(d ddata2) ddata2
|
||||
|
||||
type ddata3 struct {
|
||||
x float64
|
||||
y float64
|
||||
z float64
|
||||
}
|
||||
|
||||
//go:linkname dd3 C.dd3
|
||||
func dd3(d ddata3) ddata3
|
||||
|
||||
//llgo:type C
|
||||
type Callback func(array, point, point1) array
|
||||
|
||||
//go:linkname callback C.callback
|
||||
func callback(fn Callback, ar array)
|
||||
|
||||
//llgo:type C
|
||||
type Callback1 func(array, point, point1) point
|
||||
|
||||
//go:linkname callback1 C.callback1
|
||||
func callback1(fn Callback1, ar array)
|
||||
|
||||
//go:linkname mycallback C.mycallback
|
||||
func mycallback(ar array, pt point, pt1 point1) point
|
||||
|
||||
func myfn1(ar array, pt point, pt1 point1) point {
|
||||
println("=>", ar.x[0], ar.x[1], ar.x[7], pt.x, pt.y, pt1.x, pt1.y, pt1.z)
|
||||
return point{100, 200}
|
||||
}
|
||||
|
||||
//export export_demo
|
||||
func export_demo(ar array) array {
|
||||
println("=> export", ar.x[0], ar.x[1], ar.x[7])
|
||||
return ar
|
||||
}
|
||||
|
||||
func main() {
|
||||
cabi_demo()
|
||||
callback_demo()
|
||||
}
|
||||
|
||||
func callback_demo() {
|
||||
export_demo(array{x: [8]int32{1, 2, 3, 4, 5, 6, 7, 8}})
|
||||
|
||||
callback(func(ar array, pt point, pt1 point1) array {
|
||||
println("=> callback", ar.x[0], ar.x[1], ar.x[7], pt.x, pt.y, pt1.x, pt1.y, pt1.z)
|
||||
return array{x: [8]int32{8, 7, 6, 5, 4, 3, 2, 1}}
|
||||
}, array{x: [8]int32{1, 2, 3, 4, 5, 6, 7, 8}})
|
||||
|
||||
callback1(func(ar array, pt point, pt1 point1) point {
|
||||
println("=> callback1", ar.x[0], ar.x[1], ar.x[7], pt.x, pt.y, pt1.x, pt1.y, pt1.z)
|
||||
return point{100, 200}
|
||||
}, array{x: [8]int32{1, 2, 3, 4, 5, 6, 7, 8}})
|
||||
ret := mycallback(array{x: [8]int32{1, 2, 3, 4, 5, 6, 7, 8}}, point{1, 2}, point1{1, 2, 3})
|
||||
println("=> mycallback", ret.x, ret.y)
|
||||
callback1(myfn1, array{x: [8]int32{1, 2, 3, 4, 5, 6, 7, 8}})
|
||||
callback1(myfn1, array{x: [8]int32{8, 7, 6, 5, 4, 3, 2, 1}})
|
||||
callback1(mycallback, array{x: [8]int32{10, 20, 30, 40, 50, 60, 70, 80}})
|
||||
}
|
||||
|
||||
func cabi_demo() {
|
||||
i32 := demo32(1024)
|
||||
println("=> demo32", i32)
|
||||
|
||||
s32 := demo32s(struct32{100})
|
||||
println("=> demo32s", s32.v)
|
||||
|
||||
i64 := demo64(1024)
|
||||
println("=> demo64", i64)
|
||||
|
||||
p64 := pt64(point64{1024, -1024})
|
||||
println("=> pt64", p64.x, p64.y)
|
||||
|
||||
r := demo(array{x: [8]int32{1, 2, 3, 4, 5, 6, 7, 8}})
|
||||
println("=> demo", r.x[0], r.x[1])
|
||||
|
||||
r2 := demo2(100)
|
||||
println("=> demo2", r2.x[0], r2.x[1], r2.x[7])
|
||||
|
||||
p0 := pt(point{1, 2})
|
||||
println("=> pt0", p0.x, p0.y)
|
||||
|
||||
p1 := pt1(point1{1, 2, 3})
|
||||
println("=> pt1", p1.x, p1.y, p1.z)
|
||||
|
||||
p2 := pt2(point2{1, 2, 3})
|
||||
println("=> pt2", p2.x, p2.y, p2.z)
|
||||
|
||||
p3 := pt3(point3{1, 2, 3})
|
||||
println("=> pt3", p3.x, p3.y, p3.z)
|
||||
|
||||
p4 := pt4(point4{1, 2, 3, 4})
|
||||
println("=> pt4", p4.x, p4.y, p4.z, p4.m)
|
||||
|
||||
p5 := pt5(point5{1, 2, 3, 4, 5})
|
||||
println("=> pt5", p5.x, p5.y, p5.z, p5.m, p5.n)
|
||||
|
||||
p6 := pt6(point6{1, 2, 3, 4, 5, 6})
|
||||
println("=> pt6", p6.x, p6.y, p6.z, p6.m, p6.n, p6.k)
|
||||
|
||||
p7 := pt7(point7{1, 2, 3, 4, 5, 6, 7})
|
||||
println("=> pt7", p7.x, p7.y, p7.z, p7.m, p7.n, p7.k, p7.o)
|
||||
|
||||
// skip wrap
|
||||
fd1 := fn1(data1{1, 2})
|
||||
println("=> fd1", fd1.x, fd1.y)
|
||||
|
||||
fd2 := fn2(data2{1, 2})
|
||||
println("=> fd2", fd2.x, fd2.y)
|
||||
|
||||
fd3 := fn3(data3{1, 2})
|
||||
println("=> fd3", fd3.x, fd3.y)
|
||||
|
||||
// float
|
||||
f1 := ff1(fdata1{1.1})
|
||||
println("=> f1", f1.x)
|
||||
|
||||
// float
|
||||
f2 := ff2(fdata2{1.1, 2.1})
|
||||
println("=> f2", f2.x, f2.y)
|
||||
|
||||
// float
|
||||
f2i := ff2i(fdata2i{1.1, 2})
|
||||
println("=> f2i", f2i.x, f2i.y)
|
||||
|
||||
// float
|
||||
f3 := ff3(fdata3{1.1, 2.1, 3.1})
|
||||
println("=> f3", f3.x, f3.y, f3.z)
|
||||
|
||||
// float
|
||||
f4 := ff4(fdata4{1.1, 2.1, 3.1, 4.1})
|
||||
println("=> f4", f4.x, f4.y, f4.z, f4.m)
|
||||
|
||||
// float
|
||||
f5 := ff5(fdata5{1.1, 2.1, 3.1, 4.1, 5.1})
|
||||
println("=> f5", f5.x, f5.y, f5.z, f5.m, f5.n)
|
||||
|
||||
f2id := ff2id(fdata2id{1, 2, 3.1})
|
||||
println("=> f2id", f2id.x, f2id.y, f2id.z)
|
||||
|
||||
f7if := ff7if(fdata7if{[7]int8{1, 2, 3, 4, 5, 6, 7}, 3.1})
|
||||
println("=> f7if", f7if.x[0], f7if.x[1], f7if.y)
|
||||
|
||||
f4if := ff4if(fdata4if{1.1, 2, 3.1, 4.1})
|
||||
println("=> f4if", f4if.x, f4if.y, f4if.z, f4if.m)
|
||||
|
||||
d1 := dd1(ddata1{1.1})
|
||||
println("=> dd1", d1.x)
|
||||
|
||||
d2 := dd2(ddata2{1.1, 2.1})
|
||||
println("=> dd2", d2.x, d2.y)
|
||||
|
||||
d3 := dd3(ddata3{1.1, 2.1, 3.1})
|
||||
println("=> dd3", d3.x, d3.y, d3.z)
|
||||
}
|
||||
325
_demo/c/cabi/wrap/wrap.c
Normal file
325
_demo/c/cabi/wrap/wrap.c
Normal file
@@ -0,0 +1,325 @@
|
||||
extern int printf(const char *format, ...);
|
||||
|
||||
int demo32(int v) {
|
||||
return v+100;
|
||||
}
|
||||
|
||||
long long demo64(long long v) {
|
||||
return v+100;
|
||||
}
|
||||
|
||||
struct struct32 {
|
||||
int v;
|
||||
};
|
||||
|
||||
struct point64 {
|
||||
long long x;
|
||||
long long y;
|
||||
};
|
||||
|
||||
struct point64 pt64(struct point64 pt) {
|
||||
printf("point64: %lld %lld\n",pt.x,pt.y);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct struct32 demo32s(struct struct32 v) {
|
||||
printf("struct32: %d\n",v.v);
|
||||
struct struct32 v2 = {v.v+100};
|
||||
return v2;
|
||||
}
|
||||
|
||||
struct point {
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
struct point pt(struct point pt) {
|
||||
printf("point: %d %d\n",pt.x,pt.y);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct point1 {
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
};
|
||||
|
||||
struct point1 pt1(struct point1 pt) {
|
||||
printf("point1: %d %d %d\n",pt.x,pt.y,pt.z);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct point2 {
|
||||
char x;
|
||||
int y;
|
||||
int z;
|
||||
};
|
||||
|
||||
struct point2 pt2(struct point2 pt) {
|
||||
printf("point2: %d %d %d\n",pt.x,pt.y,pt.z);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct point3 {
|
||||
char x;
|
||||
char y;
|
||||
char z;
|
||||
};
|
||||
|
||||
struct point3 pt3(struct point3 pt) {
|
||||
printf("point3: %d %d %d\n",pt.x,pt.y,pt.z);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct point4 {
|
||||
char x;
|
||||
char y;
|
||||
char z;
|
||||
int m;
|
||||
};
|
||||
|
||||
struct point4 pt4(struct point4 pt) {
|
||||
printf("point4: %d %d %d %d\n",pt.x,pt.y,pt.z,pt.m);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct point5 {
|
||||
char x;
|
||||
char y;
|
||||
char z;
|
||||
char m;
|
||||
char n;
|
||||
};
|
||||
|
||||
struct point5 pt5(struct point5 pt) {
|
||||
printf("point5: %d %d %d %d %d\n",pt.x,pt.y,pt.z,pt.m,pt.n);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct point6 {
|
||||
char x;
|
||||
char y;
|
||||
char z;
|
||||
char m;
|
||||
char n;
|
||||
int k;
|
||||
};
|
||||
|
||||
struct point6 pt6(struct point6 pt) {
|
||||
printf("point6: %d %d %d %d %d %d\n",pt.x,pt.y,pt.z,pt.m,pt.n,pt.k);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct point7 {
|
||||
char x;
|
||||
char y;
|
||||
char z;
|
||||
char m;
|
||||
char n;
|
||||
int k;
|
||||
char o;
|
||||
};
|
||||
|
||||
struct point7 pt7(struct point7 pt) {
|
||||
printf("point7: %d %d %d %d %d %d %d\n",pt.x,pt.y,pt.z,pt.m,pt.n,pt.k,pt.o);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct data1 {
|
||||
char x;
|
||||
long long y;
|
||||
};
|
||||
|
||||
struct data1 fn1(struct data1 pt) {
|
||||
printf("data1: %d %lld\n",pt.x,pt.y);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct data2 {
|
||||
int x;
|
||||
long long y;
|
||||
};
|
||||
|
||||
struct data2 fn2(struct data2 pt) {
|
||||
printf("data2: %d %lld\n",pt.x,pt.y);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct data3 {
|
||||
long long x;
|
||||
char y;
|
||||
};
|
||||
|
||||
struct data3 fn3(struct data3 pt) {
|
||||
printf("data3: %lld %d\n",pt.x,pt.y);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct fdata1 {
|
||||
float x;
|
||||
};
|
||||
|
||||
struct fdata1 ff1(struct fdata1 pt) {
|
||||
printf("ff1: %f\n",pt.x);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct ddata1 {
|
||||
double x;
|
||||
};
|
||||
|
||||
struct ddata1 dd1(struct ddata1 pt) {
|
||||
printf("dd1: %f\n",pt.x);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct ddata2 {
|
||||
double x;
|
||||
double y;
|
||||
};
|
||||
|
||||
struct ddata2 dd2(struct ddata2 pt) {
|
||||
printf("dd2: %f %f\n",pt.x,pt.y);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct ddata3 {
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
};
|
||||
|
||||
struct ddata3 dd3(struct ddata3 pt) {
|
||||
printf("dd3: %f %f %f\n",pt.x,pt.y,pt.z);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct fdata2i {
|
||||
float x;
|
||||
int y;
|
||||
};
|
||||
|
||||
struct fdata2i ff2i(struct fdata2i pt) {
|
||||
printf("ff2i: %f %d\n",pt.x,pt.y);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct fdata2 {
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
struct fdata2 ff2(struct fdata2 pt) {
|
||||
printf("ff2: %f %f\n",pt.x,pt.y);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct fdata3 {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
};
|
||||
|
||||
struct fdata3 ff3(struct fdata3 pt) {
|
||||
printf("ff3: %f %f %f\n",pt.x,pt.y,pt.z);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct fdata4 {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float m;
|
||||
};
|
||||
|
||||
struct fdata4 ff4(struct fdata4 pt) {
|
||||
printf("ff4: %f %f %f %f\n",pt.x,pt.y,pt.z,pt.m);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct fdata5 {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float m;
|
||||
float n;
|
||||
};
|
||||
|
||||
struct fdata5 ff5(struct fdata5 pt) {
|
||||
printf("ff5: %f %f %f %f %f\n",pt.x,pt.y,pt.z,pt.m,pt.n);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct fdata2id {
|
||||
char x;
|
||||
char y;
|
||||
double z;
|
||||
};
|
||||
|
||||
struct fdata2id ff2id(struct fdata2id pt) {
|
||||
printf("ff6: %d %d %f\n",pt.x,pt.y,pt.z);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct fdata7if {
|
||||
char x[7];
|
||||
float z;
|
||||
};
|
||||
|
||||
struct fdata7if ff7if(struct fdata7if pt) {
|
||||
printf("ff7if: %d %d %f\n",pt.x[0],pt.x[1],pt.z);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct fdata4if {
|
||||
float x;
|
||||
char y;
|
||||
float z;
|
||||
float m;
|
||||
};
|
||||
|
||||
struct fdata4if ff4if(struct fdata4if pt) {
|
||||
printf("ff4if: %f %d %f %f\n",pt.x,pt.y,pt.z,pt.m);
|
||||
return pt;
|
||||
}
|
||||
|
||||
struct array {
|
||||
int x[8];
|
||||
};
|
||||
|
||||
struct array demo(struct array a) {
|
||||
printf("demo: %d %d %d\n",a.x[0],a.x[1],a.x[2]);
|
||||
return a;
|
||||
}
|
||||
|
||||
struct array demo2(int a1){
|
||||
struct array x;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
x.x[i] = i+a1;
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
void callback(struct array (*fn)(struct array ar, struct point pt, struct point1 pt1), struct array ar) {
|
||||
demo(ar);
|
||||
struct point pt = {1,2};
|
||||
struct point1 pt1 = {1,2,3};
|
||||
struct array ret = fn(ar,pt,pt1);
|
||||
demo(ret);
|
||||
}
|
||||
|
||||
void callback1(struct point (*fn)(struct array ar, struct point pt, struct point1 pt1), struct array ar) {
|
||||
printf("callback1 array: %d %d %d\n",ar.x[0],ar.x[1],ar.x[7]);
|
||||
struct point pt = {1,2};
|
||||
struct point1 pt1 = {1,2,3};
|
||||
struct point ret = fn(ar,pt,pt1);
|
||||
printf("callback1 ret: %d,%d\n",ret.x,ret.y);
|
||||
}
|
||||
|
||||
struct point mycallback(struct array ar, struct point pt, struct point1 pt1) {
|
||||
printf("mycallback array: %d %d %d\n",ar.x[0],ar.x[1],ar.x[7]);
|
||||
printf("mycallback pt: %d %d\n",pt.x,pt.y);
|
||||
printf("mycallback pt1: %d %d %d\n",pt1.x,pt1.y,pt1.z);
|
||||
struct point ret = {pt.x+pt1.x, pt.y+pt1.y};
|
||||
return ret;
|
||||
}
|
||||
39
_demo/c/cabisret/main.go
Normal file
39
_demo/c/cabisret/main.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package main
|
||||
|
||||
type array9 struct {
|
||||
x [9]float32
|
||||
}
|
||||
|
||||
func demo1(a array9) array9 {
|
||||
a.x[0] += 1
|
||||
return a
|
||||
}
|
||||
|
||||
func demo2(a array9) array9 {
|
||||
for i := 0; i < 1024*128; i++ {
|
||||
a = demo1(a)
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
func testDemo() {
|
||||
ar := array9{x: [9]float32{1, 2, 3, 4, 5, 6, 7, 8, 9}}
|
||||
for i := 0; i < 1024*128; i++ {
|
||||
ar = demo1(ar)
|
||||
}
|
||||
ar = demo2(ar)
|
||||
println(ar.x[0], ar.x[1])
|
||||
}
|
||||
|
||||
func testSlice() {
|
||||
var b []byte
|
||||
for i := 0; i < 1024*128; i++ {
|
||||
b = append(b, byte(i))
|
||||
}
|
||||
_ = b
|
||||
}
|
||||
|
||||
func main() {
|
||||
testDemo()
|
||||
testSlice()
|
||||
}
|
||||
144
_demo/c/cargs/demo.go
Normal file
144
_demo/c/cargs/demo.go
Normal file
@@ -0,0 +1,144 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
_ "unsafe"
|
||||
|
||||
"github.com/goplus/lib/c"
|
||||
)
|
||||
|
||||
const LLGoPackage string = "link: $(pkg-config --libs cargs);"
|
||||
|
||||
type Option struct {
|
||||
Identifier c.Char
|
||||
AccessLetters *c.Char
|
||||
AccessName *c.Char
|
||||
ValueName *c.Char
|
||||
Description *c.Char
|
||||
}
|
||||
|
||||
type OptionContext struct {
|
||||
Options *Option
|
||||
OptionCount c.SizeT
|
||||
Argc c.Int
|
||||
Argv **c.Char
|
||||
Index c.Int
|
||||
InnerIndex c.Int
|
||||
ErrorIndex c.Int
|
||||
ErrorLetter c.Char
|
||||
ForcedEnd bool
|
||||
Identifier c.Char
|
||||
Value *c.Char
|
||||
}
|
||||
|
||||
// llgo:type C
|
||||
type Printer func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{}) c.Int
|
||||
|
||||
// llgo:link (*OptionContext).OptionInit C.cag_option_init
|
||||
func (recv_ *OptionContext) OptionInit(options *Option, option_count c.SizeT, argc c.Int, argv **c.Char) {
|
||||
}
|
||||
|
||||
// llgo:link (*OptionContext).OptionFetch C.cag_option_fetch
|
||||
func (recv_ *OptionContext) OptionFetch() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// llgo:link (*OptionContext).OptionGetIdentifier C.cag_option_get_identifier
|
||||
func (recv_ *OptionContext) OptionGetIdentifier() c.Char {
|
||||
return 0
|
||||
}
|
||||
|
||||
// llgo:link (*OptionContext).OptionGetValue C.cag_option_get_value
|
||||
func (recv_ *OptionContext) OptionGetValue() *c.Char {
|
||||
return nil
|
||||
}
|
||||
|
||||
// llgo:link (*OptionContext).OptionGetIndex C.cag_option_get_index
|
||||
func (recv_ *OptionContext) OptionGetIndex() c.Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
// llgo:link (*OptionContext).OptionGetErrorIndex C.cag_option_get_error_index
|
||||
func (recv_ *OptionContext) OptionGetErrorIndex() c.Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
// llgo:link (*OptionContext).OptionGetErrorLetter C.cag_option_get_error_letter
|
||||
func (recv_ *OptionContext) OptionGetErrorLetter() c.Char {
|
||||
return 0
|
||||
}
|
||||
|
||||
// llgo:link (*OptionContext).OptionPrintError C.cag_option_print_error
|
||||
func (recv_ *OptionContext) OptionPrintError(destination *c.FILE) {
|
||||
}
|
||||
|
||||
// llgo:link (*OptionContext).OptionPrinterError C.cag_option_printer_error
|
||||
func (recv_ *OptionContext) OptionPrinterError(printer Printer, printer_ctx c.Pointer) {
|
||||
}
|
||||
|
||||
// llgo:link (*Option).OptionPrint C.cag_option_print
|
||||
func (recv_ *Option) OptionPrint(option_count c.SizeT, destination *c.FILE) {
|
||||
}
|
||||
|
||||
// llgo:link (*Option).OptionPrinter C.cag_option_printer
|
||||
func (recv_ *Option) OptionPrinter(option_count c.SizeT, printer Printer, printer_ctx c.Pointer) {
|
||||
}
|
||||
|
||||
// llgo:link (*OptionContext).OptionPrepare C.cag_option_prepare
|
||||
func (recv_ *OptionContext) OptionPrepare(options *Option, option_count c.SizeT, argc c.Int, argv **c.Char) {
|
||||
}
|
||||
|
||||
// llgo:link (*OptionContext).OptionGet C.cag_option_get
|
||||
func (recv_ *OptionContext) OptionGet() c.Char {
|
||||
return 0
|
||||
}
|
||||
|
||||
func main() {
|
||||
options := []Option{
|
||||
{
|
||||
Identifier: 'h',
|
||||
AccessLetters: c.Str("h"),
|
||||
AccessName: c.Str("help"),
|
||||
ValueName: nil,
|
||||
Description: c.Str("Show help information"),
|
||||
},
|
||||
{
|
||||
Identifier: 'v',
|
||||
AccessLetters: c.Str("v"),
|
||||
AccessName: c.Str("version"),
|
||||
ValueName: nil,
|
||||
Description: c.Str("Show version information"),
|
||||
},
|
||||
}
|
||||
|
||||
args := os.Args
|
||||
|
||||
// Convert Go string array to C-style argv
|
||||
argv := make([]*int8, len(args))
|
||||
for i, arg := range args {
|
||||
argv[i] = c.AllocaCStr(arg)
|
||||
}
|
||||
|
||||
// Initialize option context
|
||||
var context OptionContext
|
||||
context.OptionInit(&options[0], uintptr(len(options)), c.Int(len(args)), &argv[0])
|
||||
|
||||
// Process all options
|
||||
identifierFound := false
|
||||
for context.OptionFetch() {
|
||||
identifierFound = true
|
||||
identifier := context.OptionGetIdentifier()
|
||||
switch identifier {
|
||||
case 'h':
|
||||
fmt.Println("Help: This is a simple command-line parser demo")
|
||||
case 'v':
|
||||
fmt.Println("Version: 1.0.0")
|
||||
}
|
||||
}
|
||||
|
||||
// Default output if no identifier is found
|
||||
if !identifierFound {
|
||||
fmt.Println("Demo Command-line Tool\nIdentifier:\n\t-h: Help\n\t-v: Version")
|
||||
}
|
||||
}
|
||||
24
_demo/c/catomic/atomic.go
Normal file
24
_demo/c/catomic/atomic.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/lib/c/sync/atomic"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var v int64
|
||||
|
||||
atomic.Store(&v, 100)
|
||||
println("store:", atomic.Load(&v))
|
||||
|
||||
ret := atomic.Add(&v, 1)
|
||||
println("ret:", ret, "v:", v)
|
||||
|
||||
ret, _ = atomic.CompareAndExchange(&v, 100, 102)
|
||||
println("ret:", ret, "vs 100, v:", v)
|
||||
|
||||
ret, _ = atomic.CompareAndExchange(&v, 101, 102)
|
||||
println("ret:", ret, "vs 101, v:", v)
|
||||
|
||||
ret = atomic.Sub(&v, 1)
|
||||
println("ret:", ret, "v:", v)
|
||||
}
|
||||
11
_demo/c/cexec/exec.go
Normal file
11
_demo/c/cexec/exec.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/lib/c"
|
||||
"github.com/goplus/lib/c/os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ls := c.Str("ls")
|
||||
os.Execlp(ls, ls, c.Str("-l"), nil)
|
||||
}
|
||||
16
_demo/c/cgofull/bar.go
Normal file
16
_demo/c/cgofull/bar.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -DBAR
|
||||
#include <stdio.h>
|
||||
#include "foo.h"
|
||||
static void foo(Foo* f) {
|
||||
printf("foo in bar: %d\n", f->a);
|
||||
}
|
||||
*/
|
||||
import "C"
|
||||
|
||||
func Bar(f *C.Foo) {
|
||||
C.print_foo(f)
|
||||
C.foo(f)
|
||||
}
|
||||
157
_demo/c/cgofull/cgofull.go
Normal file
157
_demo/c/cgofull/cgofull.go
Normal file
@@ -0,0 +1,157 @@
|
||||
package main
|
||||
|
||||
/*
|
||||
#cgo windows,!amd64 CFLAGS: -D_WIN32
|
||||
#cgo !windows CFLAGS: -D_POSIX
|
||||
#cgo windows,amd64 CFLAGS: -D_WIN64
|
||||
#cgo linux,amd64 CFLAGS: -D_LINUX64
|
||||
#cgo !windows,amd64 CFLAGS: -D_UNIX64
|
||||
#cgo pkg-config: python3-embed
|
||||
#include <stdio.h>
|
||||
#include <Python.h>
|
||||
#include "foo.h"
|
||||
typedef struct {
|
||||
int a;
|
||||
} s4;
|
||||
|
||||
typedef struct {
|
||||
int a;
|
||||
int b;
|
||||
} s8;
|
||||
|
||||
typedef struct {
|
||||
int a;
|
||||
int b;
|
||||
int c;
|
||||
} s12;
|
||||
|
||||
typedef struct {
|
||||
int a;
|
||||
int b;
|
||||
int c;
|
||||
int d;
|
||||
} s16;
|
||||
|
||||
typedef struct {
|
||||
int a;
|
||||
int b;
|
||||
int c;
|
||||
int d;
|
||||
int e;
|
||||
} s20;
|
||||
|
||||
static int test_structs(s4* s4, s8* s8, s12* s12, s16* s16, s20* s20) {
|
||||
printf("s4.a: %d\n", s4->a);
|
||||
printf("s8.a: %d, s8.b: %d\n", s8->a, s8->b);
|
||||
printf("s12.a: %d, s12.b: %d, s12.c: %d\n", s12->a, s12->b, s12->c);
|
||||
printf("s16.a: %d, s16.b: %d, s16.c: %d, s16.d: %d\n", s16->a, s16->b, s16->c, s16->d);
|
||||
printf("s20.a: %d, s20.b: %d, s20.c: %d, s20.d: %d, s20.e: %d\n", s20->a, s20->b, s20->c, s20->d, s20->e);
|
||||
|
||||
return s4->a + s8->a + s8->b + s12->a + s12->b + s12->c + s16->a + s16->b + s16->c + s16->d + s20->a + s20->b + s20->c + s20->d + s20->e;
|
||||
}
|
||||
|
||||
static void test_macros() {
|
||||
#ifdef FOO
|
||||
printf("FOO is defined\n");
|
||||
#endif
|
||||
#ifdef BAR
|
||||
printf("BAR is defined\n");
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
printf("WIN32 is defined\n");
|
||||
#endif
|
||||
#ifdef _POSIX
|
||||
printf("POSIX is defined\n");
|
||||
#endif
|
||||
#ifdef _WIN64
|
||||
printf("WIN64 is defined\n");
|
||||
#endif
|
||||
#ifdef _LINUX64
|
||||
printf("LINUX64 is defined\n");
|
||||
#endif
|
||||
#ifdef _UNIX64
|
||||
printf("UNIX64 is defined\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
#define MY_VERSION "1.0.0"
|
||||
#define MY_CODE 0x12345678
|
||||
|
||||
static void test_void() {
|
||||
printf("test_void\n");
|
||||
}
|
||||
|
||||
typedef int (*Cb)(int);
|
||||
|
||||
extern int go_callback(int);
|
||||
|
||||
extern int c_callback(int i);
|
||||
|
||||
static void test_callback(Cb cb) {
|
||||
printf("test_callback, cb: %p, go_callback: %p, c_callback: %p\n", cb, go_callback, c_callback);
|
||||
printf("test_callback, *cb: %p, *go_callback: %p, *c_callback: %p\n", *(void**)cb, *(void**)(go_callback), *(void**)(c_callback));
|
||||
printf("cb result: %d\n", cb(123));
|
||||
printf("done\n");
|
||||
}
|
||||
|
||||
extern int go_callback_not_use_in_go(int);
|
||||
|
||||
static void run_callback() {
|
||||
test_callback(c_callback);
|
||||
test_callback(go_callback_not_use_in_go);
|
||||
}
|
||||
*/
|
||||
import "C"
|
||||
import (
|
||||
"fmt"
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/llgo/_demo/c/cgofull/pymod1"
|
||||
"github.com/goplus/llgo/_demo/c/cgofull/pymod2"
|
||||
)
|
||||
|
||||
//export go_callback_not_use_in_go
|
||||
func go_callback_not_use_in_go(i C.int) C.int {
|
||||
return i + 1
|
||||
}
|
||||
|
||||
//export go_callback
|
||||
func go_callback(i C.int) C.int {
|
||||
return i + 1
|
||||
}
|
||||
|
||||
func main() {
|
||||
runPy()
|
||||
f := &C.Foo{a: 1}
|
||||
Foo(f)
|
||||
Bar(f)
|
||||
C.test_macros()
|
||||
r := C.test_structs(&C.s4{a: 1}, &C.s8{a: 1, b: 2}, &C.s12{a: 1, b: 2, c: 3}, &C.s16{a: 1, b: 2, c: 3, d: 4}, &C.s20{a: 1, b: 2, c: 3, d: 4, e: 5})
|
||||
fmt.Println(r)
|
||||
if r != 35 {
|
||||
panic("test_structs failed")
|
||||
}
|
||||
fmt.Println(C.MY_VERSION)
|
||||
fmt.Println(int(C.MY_CODE))
|
||||
C.test_void()
|
||||
|
||||
println("call run_callback")
|
||||
C.run_callback()
|
||||
|
||||
// test _Cgo_ptr and _cgoCheckResult
|
||||
println("call with go_callback")
|
||||
C.test_callback((C.Cb)(C.go_callback))
|
||||
|
||||
println("call with c_callback")
|
||||
C.test_callback((C.Cb)(C.c_callback))
|
||||
}
|
||||
|
||||
func runPy() {
|
||||
Initialize()
|
||||
defer Finalize()
|
||||
Run("print('Hello, Python!')")
|
||||
C.PyObject_Print((*C.PyObject)(unsafe.Pointer(pymod1.Float(1.23))), C.stderr, 0)
|
||||
C.PyObject_Print((*C.PyObject)(unsafe.Pointer(pymod2.Long(123))), C.stdout, 0)
|
||||
// test _Cgo_use
|
||||
C.PyObject_Print((*C.PyObject)(unsafe.Pointer(C.PyComplex_FromDoubles(C.double(1.23), C.double(4.56)))), C.stdout, 0)
|
||||
}
|
||||
12
_demo/c/cgofull/foo.c
Normal file
12
_demo/c/cgofull/foo.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <stdio.h>
|
||||
#include "foo.h"
|
||||
|
||||
void print_foo(Foo *f)
|
||||
{
|
||||
printf("print_foo: %d\n", f->a);
|
||||
}
|
||||
|
||||
int c_callback(int i)
|
||||
{
|
||||
return i + 1;
|
||||
}
|
||||
16
_demo/c/cgofull/foo.go
Normal file
16
_demo/c/cgofull/foo.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -DFOO
|
||||
#include <stdio.h>
|
||||
#include "foo.h"
|
||||
static void foo(Foo* f) {
|
||||
printf("foo in bar: %d\n", f->a);
|
||||
}
|
||||
*/
|
||||
import "C"
|
||||
|
||||
func Foo(f *C.Foo) {
|
||||
C.print_foo(f)
|
||||
C.foo(f)
|
||||
}
|
||||
7
_demo/c/cgofull/foo.h
Normal file
7
_demo/c/cgofull/foo.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct {
|
||||
int a;
|
||||
} Foo;
|
||||
|
||||
extern void print_foo(Foo* f);
|
||||
24
_demo/c/cgofull/py.go
Normal file
24
_demo/c/cgofull/py.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
/*
|
||||
#cgo pkg-config: python3-embed
|
||||
#include <Python.h>
|
||||
*/
|
||||
import "C"
|
||||
import "fmt"
|
||||
|
||||
func Initialize() {
|
||||
C.Py_Initialize()
|
||||
}
|
||||
|
||||
func Finalize() {
|
||||
C.Py_Finalize()
|
||||
}
|
||||
|
||||
func Run(code string) error {
|
||||
if C.PyRun_SimpleString(C.CString(code)) != 0 {
|
||||
C.PyErr_Print()
|
||||
return fmt.Errorf("failed to run code")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
11
_demo/c/cgofull/pymod1/pymod1.go
Normal file
11
_demo/c/cgofull/pymod1/pymod1.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package pymod1
|
||||
|
||||
/*
|
||||
#cgo pkg-config: python3-embed
|
||||
#include <Python.h>
|
||||
*/
|
||||
import "C"
|
||||
|
||||
func Float(f float64) *C.PyObject {
|
||||
return C.PyFloat_FromDouble(C.double(f))
|
||||
}
|
||||
11
_demo/c/cgofull/pymod2/pymod2.go
Normal file
11
_demo/c/cgofull/pymod2/pymod2.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package pymod2
|
||||
|
||||
/*
|
||||
#cgo pkg-config: python3-embed
|
||||
#include <Python.h>
|
||||
*/
|
||||
import "C"
|
||||
|
||||
func Long(l int64) *C.PyObject {
|
||||
return C.PyLong_FromLongLong(C.longlong(l))
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/lib/c"
|
||||
)
|
||||
|
||||
func concat(args ...string) (ret string) {
|
||||
38
_demo/c/cppintf/cppintf.go
Normal file
38
_demo/c/cppintf/cppintf.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/lib/c"
|
||||
"github.com/goplus/lib/c/math"
|
||||
"github.com/goplus/llgo/_demo/c/cppintf/foo"
|
||||
)
|
||||
|
||||
type Bar struct {
|
||||
foo.Callback
|
||||
a c.Int
|
||||
}
|
||||
|
||||
func NewBar(a c.Int) *Bar {
|
||||
return &Bar{
|
||||
Callback: foo.Callback{
|
||||
Vptr: &foo.CallbackVtbl{
|
||||
Val: c.Func((*Bar).getA),
|
||||
Calc: c.Func((*Bar).sqrt),
|
||||
},
|
||||
},
|
||||
a: a,
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Bar) getA() c.Int {
|
||||
return p.a
|
||||
}
|
||||
|
||||
func (p *Bar) sqrt(v float64) float64 {
|
||||
return math.Sqrt(v)
|
||||
}
|
||||
|
||||
func main() {
|
||||
bar := NewBar(1)
|
||||
foo.F(&bar.Callback)
|
||||
foo.G(&bar.Callback)
|
||||
}
|
||||
15
_demo/c/cppintf/foo/bar/bar.cpp
Normal file
15
_demo/c/cppintf/foo/bar/bar.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#define interface struct
|
||||
|
||||
interface ICallback {
|
||||
virtual int val() = 0;
|
||||
virtual double calc(double v) = 0;
|
||||
};
|
||||
|
||||
extern "C" void f(ICallback* cb) {
|
||||
printf("val: %d\ncalc(2): %lf\n", cb->val(), cb->calc(2));
|
||||
}
|
||||
|
||||
void g(ICallback* cb) {
|
||||
f(cb);
|
||||
}
|
||||
25
_demo/c/cppintf/foo/foo.go
Normal file
25
_demo/c/cppintf/foo/foo.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package foo
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
LLGoFiles = "bar/bar.cpp"
|
||||
LLGoPackage = "link"
|
||||
)
|
||||
|
||||
type Callback struct {
|
||||
Vptr *CallbackVtbl
|
||||
}
|
||||
|
||||
type CallbackVtbl struct {
|
||||
Val unsafe.Pointer
|
||||
Calc unsafe.Pointer
|
||||
}
|
||||
|
||||
//go:linkname F C.f
|
||||
func F(cb *Callback)
|
||||
|
||||
//go:linkname G C._Z1gP9ICallback
|
||||
func G(cb *Callback)
|
||||
50
_demo/c/cppmintf/cpp_multi_intf.go
Normal file
50
_demo/c/cppmintf/cpp_multi_intf.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/lib/c"
|
||||
"github.com/goplus/lib/c/math"
|
||||
"github.com/goplus/llgo/_demo/c/cppmintf/foo"
|
||||
)
|
||||
|
||||
type Bar struct {
|
||||
foo.Callback
|
||||
a c.Int
|
||||
}
|
||||
|
||||
func NewBar(a c.Int) *Bar {
|
||||
return &Bar{
|
||||
Callback: foo.Callback{
|
||||
ICalc: foo.ICalc{
|
||||
Vptr: &foo.ICalcVtbl{
|
||||
Calc: c.Func((*Bar).sqrt),
|
||||
},
|
||||
},
|
||||
IVal: foo.IVal{
|
||||
Vptr: &foo.IValVtbl{
|
||||
Val: c.Func(bar_IVal_getA),
|
||||
},
|
||||
},
|
||||
},
|
||||
a: a,
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Bar) getA() c.Int {
|
||||
return p.a
|
||||
}
|
||||
|
||||
func bar_IVal_getA(this c.Pointer) c.Int {
|
||||
const delta = -int(unsafe.Offsetof(foo.Callback{}.IVal))
|
||||
return (*Bar)(c.Advance(this, delta)).getA()
|
||||
}
|
||||
|
||||
func (p *Bar) sqrt(v float64) float64 {
|
||||
return math.Sqrt(v)
|
||||
}
|
||||
|
||||
func main() {
|
||||
bar := NewBar(1)
|
||||
foo.F(&bar.Callback)
|
||||
}
|
||||
17
_demo/c/cppmintf/foo/bar/bar.cpp
Normal file
17
_demo/c/cppmintf/foo/bar/bar.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#define interface struct
|
||||
|
||||
interface ICalc {
|
||||
virtual double calc(double v) = 0;
|
||||
};
|
||||
|
||||
interface IVal {
|
||||
virtual int val() = 0;
|
||||
};
|
||||
|
||||
class Callback : public ICalc, public IVal {
|
||||
};
|
||||
|
||||
extern "C" void f(Callback* cb) {
|
||||
printf("val: %d\ncalc(2): %lf\n", cb->val(), cb->calc(2));
|
||||
}
|
||||
42
_demo/c/cppmintf/foo/foo.go
Normal file
42
_demo/c/cppmintf/foo/foo.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package foo
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
LLGoFiles = "bar/bar.cpp"
|
||||
LLGoPackage = "link"
|
||||
)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
type ICalc struct {
|
||||
Vptr *ICalcVtbl
|
||||
}
|
||||
|
||||
type ICalcVtbl struct {
|
||||
Calc unsafe.Pointer
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
type IVal struct {
|
||||
Vptr *IValVtbl
|
||||
}
|
||||
|
||||
type IValVtbl struct {
|
||||
Val unsafe.Pointer
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
type Callback struct {
|
||||
ICalc
|
||||
IVal
|
||||
}
|
||||
|
||||
//go:linkname F C.f
|
||||
func F(cb *Callback)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
12
_demo/c/cppstr/cppstr.go
Normal file
12
_demo/c/cppstr/cppstr.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/lib/c"
|
||||
"github.com/goplus/lib/cpp/std"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := std.Str("Hello world\n")
|
||||
c.Printf(s.CStr())
|
||||
print(s.Str(), s.Size(), "\n")
|
||||
}
|
||||
26
_demo/c/crand/rand.go
Normal file
26
_demo/c/crand/rand.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/goplus/lib/c"
|
||||
"github.com/goplus/lib/c/math/rand"
|
||||
"github.com/goplus/lib/c/time"
|
||||
)
|
||||
|
||||
func fastrand64() uint64 {
|
||||
v1 := uint64(rand.Random())
|
||||
v2 := uint64(rand.Random())
|
||||
return v1 ^ (v2 << 32)
|
||||
}
|
||||
|
||||
func main() {
|
||||
rand.Srand(c.Uint(time.Time(nil)))
|
||||
fmt.Printf("%x\n", rand.Rand())
|
||||
fmt.Printf("%x\n", rand.Rand())
|
||||
|
||||
rand.Srandom(c.Uint(time.Time(nil)))
|
||||
fmt.Printf("%x\n", rand.Random())
|
||||
fmt.Printf("%x\n", rand.Random())
|
||||
fmt.Printf("%x\n", fastrand64())
|
||||
}
|
||||
12
_demo/c/ctime/time.go
Normal file
12
_demo/c/ctime/time.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import "github.com/goplus/lib/c/time"
|
||||
|
||||
func main() {
|
||||
var tv time.Timespec
|
||||
time.ClockGettime(time.CLOCK_REALTIME, &tv)
|
||||
println("REALTIME sec:", tv.Sec, "nsec:", tv.Nsec)
|
||||
|
||||
time.ClockGettime(time.CLOCK_MONOTONIC, &tv)
|
||||
println("MONOTONIC sec:", tv.Sec, "nsec:", tv.Nsec)
|
||||
}
|
||||
76
_demo/c/fcntl/fcntl.go
Normal file
76
_demo/c/fcntl/fcntl.go
Normal file
@@ -0,0 +1,76 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/lib/c"
|
||||
"github.com/goplus/lib/c/os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
filename := c.Str("testfile.txt")
|
||||
data := c.Str("Hello, os!")
|
||||
var buffer [20]c.Char
|
||||
|
||||
// Open a file, O_CREAT|O_WRONLY|O_TRUNC means create, write only, or clear the file
|
||||
fd := os.Open(filename, os.O_CREAT|os.O_WRONLY|os.O_TRUNC, 0644)
|
||||
if fd == -1 {
|
||||
c.Printf(c.Str("open error\n"))
|
||||
return
|
||||
}
|
||||
|
||||
// Writing data to a file
|
||||
bytesWritten := os.Write(fd, c.Pointer(data), c.Strlen(data))
|
||||
if bytesWritten == -1 {
|
||||
c.Printf(c.Str("write error\n"))
|
||||
os.Close(fd)
|
||||
return
|
||||
}
|
||||
c.Printf(c.Str("Written %ld bytes to %s\n"), bytesWritten, filename)
|
||||
|
||||
// Get file status flags
|
||||
flags := os.Fcntl(fd, os.F_GETFL)
|
||||
if flags == -1 {
|
||||
c.Printf(c.Str("os error\n"))
|
||||
os.Close(fd)
|
||||
return
|
||||
}
|
||||
c.Printf(c.Str("File flags: %d\n"), flags)
|
||||
|
||||
// Set the file status flag to non-blocking mode
|
||||
if os.Fcntl(fd, os.F_SETFL, flags|os.O_NONBLOCK) == -1 {
|
||||
c.Printf(c.Str("os error\n"))
|
||||
os.Close(fd)
|
||||
return
|
||||
}
|
||||
c.Printf(c.Str("set file status successfully\n"))
|
||||
|
||||
c.Printf(c.Str("111"))
|
||||
// Close file
|
||||
os.Close(fd)
|
||||
|
||||
// Reopen the file, O_RDONLY means read-only
|
||||
fd = os.Open(filename, os.O_RDONLY)
|
||||
if fd == -1 {
|
||||
c.Printf(c.Str("open error\n"))
|
||||
return
|
||||
}
|
||||
|
||||
// Reading data from a file
|
||||
// &buffer[:][0]
|
||||
// unsafe.SliceData(buffer[:])
|
||||
bytesRead := os.Read(fd, c.Pointer(unsafe.SliceData(buffer[:])), unsafe.Sizeof(buffer)-1)
|
||||
if bytesRead == -1 {
|
||||
c.Printf(c.Str("read error\n"))
|
||||
os.Close(fd)
|
||||
return
|
||||
}
|
||||
|
||||
// Ensure that the buffer is null-terminated
|
||||
buffer[bytesRead] = c.Char(0)
|
||||
c.Printf(c.Str("Read %ld bytes: %s\n"), bytesRead, &buffer[0])
|
||||
|
||||
// Close file
|
||||
os.Close(fd)
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/lib/c"
|
||||
)
|
||||
|
||||
type generator struct {
|
||||
11
_demo/c/getcwd/getcwd.go
Normal file
11
_demo/c/getcwd/getcwd.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/lib/c"
|
||||
"github.com/goplus/lib/c/os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
wd := os.Getcwd(c.Alloca(os.PATH_MAX), os.PATH_MAX)
|
||||
c.Printf(c.Str("cwd: %s\n"), wd)
|
||||
}
|
||||
5
_demo/c/go.mod
Normal file
5
_demo/c/go.mod
Normal file
@@ -0,0 +1,5 @@
|
||||
module github.com/goplus/llgo/_demo/c
|
||||
|
||||
go 1.20
|
||||
|
||||
require github.com/goplus/lib v0.3.0
|
||||
2
_demo/c/go.sum
Normal file
2
_demo/c/go.sum
Normal file
@@ -0,0 +1,2 @@
|
||||
github.com/goplus/lib v0.3.0 h1:y0ZGb5Q/RikW1oMMB4Di7XIZIpuzh/7mlrR8HNbxXCA=
|
||||
github.com/goplus/lib v0.3.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
|
||||
13
_demo/c/hello/hello.go
Normal file
13
_demo/c/hello/hello.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/goplus/lib/c"
|
||||
)
|
||||
|
||||
func main() {
|
||||
println("hello world by println")
|
||||
fmt.Println("hello world by fmt.Println")
|
||||
c.Printf(c.Str("Hello world by c.Printf\n"))
|
||||
}
|
||||
15
_demo/c/helloc/helloc.go
Normal file
15
_demo/c/helloc/helloc.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/lib/c"
|
||||
)
|
||||
|
||||
func main() {
|
||||
c.Printf(c.Str("Hello world by c.Printf\n"))
|
||||
c.Printf(c.Str("%ld\n"), unsafe.Sizeof(int(0)))
|
||||
c.Printf(c.Str("%ld\n"), unsafe.Sizeof(uintptr(0)))
|
||||
// var v any = int(0)
|
||||
// c.Printf(c.Str("%ld\n"), unsafe.Sizeof(v))
|
||||
}
|
||||
10
_demo/c/linkname/linkname.go
Normal file
10
_demo/c/linkname/linkname.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package main
|
||||
|
||||
import _ "unsafe" // for go:linkname
|
||||
|
||||
//go:linkname Sqrt C.sqrt
|
||||
func Sqrt(x float64) float64
|
||||
|
||||
func main() {
|
||||
println("sqrt(2) =", Sqrt(2))
|
||||
}
|
||||
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 183 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user