Compare commits
2299 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
1463ed4835 | ||
|
|
b959de18d5 | ||
|
|
edac3f73c2 | ||
|
|
388b19eed5 | ||
|
|
a337136389 | ||
|
|
31d5a8ac10 | ||
|
|
46527f56ce | ||
|
|
a575c17eca | ||
|
|
a6ea3b1e6f | ||
|
|
4d2ad842a4 | ||
|
|
ce0f5f3797 | ||
|
|
9e0d22ac90 | ||
|
|
ddc2c56115 | ||
|
|
acfbe6902a | ||
|
|
f7dfab481b | ||
|
|
23692430d5 | ||
|
|
03fe594339 | ||
|
|
45babef689 | ||
|
|
9ac0450255 | ||
|
|
b1d55f657d | ||
|
|
aac5e7b3cd | ||
|
|
791634c377 | ||
|
|
090149eab6 | ||
|
|
acecbf587d | ||
|
|
4ef46971d0 | ||
|
|
2e3cc49782 | ||
|
|
8a0189b079 | ||
|
|
0edd7f6df0 | ||
|
|
0b058bc2e8 | ||
|
|
f9ef9cab81 | ||
|
|
fbb2150d88 | ||
|
|
0912f1f509 | ||
|
|
64c13fa9ae | ||
|
|
2a5f9d9641 | ||
|
|
6c32fe87e6 | ||
|
|
09e9cc99d3 | ||
|
|
94a7ee024a | ||
|
|
a2d7a8c978 | ||
|
|
15499ddc14 | ||
|
|
97cb312386 | ||
|
|
92827a1f04 | ||
|
|
00222c7808 | ||
|
|
427d87be68 | ||
|
|
2560a333b6 | ||
|
|
c6b76db789 | ||
|
|
1414853fce | ||
|
|
cbe384a3be | ||
|
|
cca46573ea | ||
|
|
2589c23998 | ||
|
|
29830865d9 | ||
|
|
35dbc7b0b5 | ||
|
|
cd266213ce | ||
|
|
875eadeb19 | ||
|
|
67896c63a7 | ||
|
|
c643f734e9 | ||
|
|
31d91f5e87 | ||
|
|
2a92f1bc55 | ||
|
|
d9db5528f5 | ||
|
|
22a4ffb78b | ||
|
|
1fb37c37fe | ||
|
|
aae663e5e5 | ||
|
|
e985eda857 | ||
|
|
c9cc7ad9f7 | ||
|
|
65f88cc64e | ||
|
|
374ff92444 | ||
|
|
6d56a60d2b | ||
|
|
75aea37ced | ||
|
|
b133f70b6b | ||
|
|
093af00bbe | ||
|
|
f1da2613be | ||
|
|
1800c52c04 | ||
|
|
329f65a1ad | ||
|
|
d4dd0c00ff | ||
|
|
d9a24f5ac2 | ||
|
|
a13d9a92bd | ||
|
|
2b70bb60a9 | ||
|
|
48737e361a | ||
|
|
8e9f019f82 | ||
|
|
f6a7815837 | ||
|
|
5016de56fe | ||
|
|
879e4a0061 | ||
|
|
6eaf21e5a6 | ||
|
|
b0b38c02b2 | ||
|
|
cd8e1f2080 | ||
|
|
6cc58c194f | ||
|
|
14cf646c47 | ||
|
|
d49197cbe9 | ||
|
|
1687faa438 | ||
|
|
f0e3e556cf | ||
|
|
c9e8709490 | ||
|
|
52dcfaa452 | ||
|
|
9b5a30896d | ||
|
|
4e1450bbb5 | ||
|
|
d478efe444 | ||
|
|
dacb662d99 | ||
|
|
f8cd76bd92 | ||
|
|
6392fd41c6 | ||
|
|
9d91152f01 | ||
|
|
13972c932b | ||
|
|
81ec9017fc | ||
|
|
79b11b9f51 | ||
|
|
d474a051fd | ||
|
|
073cac8530 | ||
|
|
bc3dca45e7 | ||
|
|
ff36c3dfae | ||
|
|
5a5d86ccc3 | ||
|
|
942b1f5159 | ||
|
|
c93fce87da | ||
|
|
1038b06510 | ||
|
|
f8de6022dc | ||
|
|
a8ead2543d | ||
|
|
db856c4391 | ||
|
|
68949c28c8 | ||
|
|
cf67795ff4 | ||
|
|
1136526e4c | ||
|
|
0edeb5cfd0 | ||
|
|
bc7412f6c9 | ||
|
|
025cff9494 | ||
|
|
445e7154e8 | ||
|
|
4eb7e4000b | ||
|
|
028c6cdf50 | ||
|
|
b08ae1dff3 | ||
|
|
37e7d66343 | ||
|
|
e6d06cc278 | ||
|
|
017fd150cd | ||
|
|
ea7e1de833 | ||
|
|
c2767be178 | ||
|
|
c60be43ac6 | ||
|
|
c373a5b505 | ||
|
|
da20aea408 | ||
|
|
973b5b90dc | ||
|
|
cffb5e9539 | ||
|
|
4b35586566 | ||
|
|
1e075d4830 | ||
|
|
c81b5b5df9 | ||
|
|
80b2b8d061 | ||
|
|
d1a7f63797 | ||
|
|
92359dd03b | ||
|
|
d1430c9f5a | ||
|
|
7feca4478e | ||
|
|
02b1d5ed84 | ||
|
|
99d74ce4b6 | ||
|
|
355094c7e2 | ||
|
|
7f61989869 | ||
|
|
7223ff004a | ||
|
|
df333fb144 | ||
|
|
5c08c55957 | ||
|
|
26b812a62a | ||
|
|
cd3d9c709f | ||
|
|
9da90e7ecf | ||
|
|
f17a4ca1de | ||
|
|
8ab662b373 | ||
|
|
fb839da81e | ||
|
|
244da4b10a | ||
|
|
c0c5271172 | ||
|
|
0066f8bd3f | ||
|
|
be9d209622 | ||
|
|
2bbd828f3a | ||
|
|
4f1b6e95a1 | ||
|
|
87ca3a39dc | ||
|
|
d7df46d578 | ||
|
|
489cbc4782 | ||
|
|
3c33a1d05e | ||
|
|
067cf0cba6 | ||
|
|
03a194a514 | ||
|
|
bdf45c0fcb | ||
|
|
6f679c05a3 | ||
|
|
0b131bd957 | ||
|
|
ebf4c80aff | ||
|
|
18a63e226a | ||
|
|
5d1d51dd58 | ||
|
|
52018cd424 |
48
.github/actions/setup-deps/action.yml
vendored
Normal file
48
.github/actions/setup-deps/action.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: "Setup LLGO Dependencies"
|
||||
description: "Install all required dependencies for LLGO"
|
||||
inputs:
|
||||
llvm-version:
|
||||
description: "LLVM version to install"
|
||||
required: true
|
||||
default: "18"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install macOS dependencies
|
||||
if: runner.os == 'macOS'
|
||||
shell: bash
|
||||
run: |
|
||||
brew update
|
||||
brew install llvm@${{inputs.llvm-version}} bdw-gc openssl libffi libuv
|
||||
brew link --force libffi
|
||||
echo "$(brew --prefix llvm@${{inputs.llvm-version}})/bin" >> $GITHUB_PATH
|
||||
|
||||
# Install optional deps for demos.
|
||||
#
|
||||
# NOTE: Keep this list updated as new deps are introduced.
|
||||
opt_deps=(
|
||||
cjson # for github.com/goplus/llgo/c/cjson
|
||||
sqlite # for github.com/goplus/llgo/c/sqlite
|
||||
python@3.12 # for github.com/goplus/llgo/py
|
||||
)
|
||||
brew install "${opt_deps[@]}"
|
||||
- name: Install Ubuntu dependencies
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
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}} pkg-config libgc-dev libssl-dev zlib1g-dev libffi-dev libcjson-dev libunwind-dev libuv1-dev
|
||||
echo "/usr/lib/llvm-${{inputs.llvm-version}}/bin" >> $GITHUB_PATH
|
||||
|
||||
# Install optional deps for demos.
|
||||
#
|
||||
# NOTE: Keep this list updated as new deps are introduced.
|
||||
opt_deps=(
|
||||
libcjson-dev # for github.com/goplus/llgo/c/cjson
|
||||
libsqlite3-dev # for github.com/goplus/llgo/c/sqlite
|
||||
python3.12-dev # for github.com/goplus/llgo/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
|
||||
35
.github/actions/test-helloworld/action.yml
vendored
Normal file
35
.github/actions/test-helloworld/action.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
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/llgo/c"
|
||||
)
|
||||
func main() {
|
||||
fmt.Println("Hello, LLGo!")
|
||||
println("Hello, LLGo!")
|
||||
c.Printf(c.Str("Hello, LLGo!\n"))
|
||||
}
|
||||
EOL
|
||||
go mod tidy
|
||||
llgo run .
|
||||
9
.github/codecov.yml
vendored
Normal file
9
.github/codecov.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
coverage:
|
||||
ignore:
|
||||
- "compiler/chore"
|
||||
- "compiler/cmd/internal"
|
||||
- "compiler/internal/build"
|
||||
- "compiler/internal/llgen"
|
||||
- "compiler/internal/mockable"
|
||||
- "compiler/internal/packages"
|
||||
- "compiler/internal/typepatch"
|
||||
10
.github/dependabot.yml
vendored
10
.github/dependabot.yml
vendored
@@ -17,3 +17,13 @@ updates:
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "gomod" # See documentation for possible values
|
||||
directory: "/compiler/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "gomod" # See documentation for possible values
|
||||
directory: "/runtime/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
165
.github/workflows/doc.yml
vendored
Normal file
165
.github/workflows/doc.yml
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
name: Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "**" ]
|
||||
pull_request:
|
||||
branches: [ "**" ]
|
||||
|
||||
jobs:
|
||||
doc_verify:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
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:
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-24.04
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: '1.23.6'
|
||||
|
||||
- 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:
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-24.04
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
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:
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-24.04
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
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_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
|
||||
30
.github/workflows/fmt.yml
vendored
Normal file
30
.github/workflows/fmt.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Format Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "**" ]
|
||||
pull_request:
|
||||
branches: [ "**" ]
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: ./.github/actions/setup-go
|
||||
with:
|
||||
go-version: '1.24.0'
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
for dir in . compiler runtime; do
|
||||
pushd $dir
|
||||
if [ -n "$(go fmt ./...)" ]; then
|
||||
echo "Some files are not properly formatted. Please run 'go fmt ./...'"
|
||||
exit 1
|
||||
fi
|
||||
popd
|
||||
done
|
||||
echo "All files are properly formatted."
|
||||
82
.github/workflows/go.yml
vendored
82
.github/workflows/go.yml
vendored
@@ -5,65 +5,53 @@ name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: [ "**" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: [ "**" ]
|
||||
|
||||
jobs:
|
||||
|
||||
test-macos:
|
||||
runs-on: macos-latest
|
||||
test:
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
llvm: [17]
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-24.04
|
||||
llvm: [18]
|
||||
runs-on: ${{matrix.os}}
|
||||
defaults:
|
||||
run:
|
||||
working-directory: compiler
|
||||
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
|
||||
- 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.0'
|
||||
|
||||
- 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}}
|
||||
|
||||
236
.github/workflows/llgo.yml
vendored
Normal file
236
.github/workflows/llgo.yml
vendored
Normal file
@@ -0,0 +1,236 @@
|
||||
# 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: [ "**" ]
|
||||
pull_request:
|
||||
branches: [ "**" ]
|
||||
|
||||
jobs:
|
||||
download-model:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download model file
|
||||
run: |
|
||||
mkdir -p ./_demo/llama2-c
|
||||
wget -P ./_demo/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/llama2-c/stories15M.bin
|
||||
retention-days: 1
|
||||
|
||||
llgo:
|
||||
needs: download-model
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-24.04
|
||||
llvm: [18]
|
||||
go: ['1.20.14', '1.21.13', '1.22.12', '1.23.6', '1.24.0']
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
llvm-version: ${{matrix.llvm}}
|
||||
- name: Download model artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: llama2-model
|
||||
path: ./_demo/llama2-c/
|
||||
- name: Install further optional dependencies for demos
|
||||
run: |
|
||||
py_deps=(
|
||||
numpy # for github.com/goplus/llgo/py/numpy
|
||||
torch # for github.com/goplus/llgo/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.0'
|
||||
|
||||
- name: Install
|
||||
working-directory: compiler
|
||||
run: |
|
||||
go install ./...
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Go for testing
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
|
||||
- name: Verify Go version
|
||||
run: |
|
||||
go_version=$(go version | cut -d' ' -f3 | sed 's/go//')
|
||||
if [[ "$go_version" != "${{matrix.go}}"* ]]; then
|
||||
echo "Expected Go version ${{matrix.go}}, but got $go_version"
|
||||
exit 1
|
||||
fi
|
||||
echo "Using Go version: $go_version"
|
||||
|
||||
- name: _xtool build tests
|
||||
run: |
|
||||
cd _xtool
|
||||
llgo build -v ./...
|
||||
|
||||
- name: LLGO tests
|
||||
if: ${{!startsWith(matrix.os, 'ubuntu')}}
|
||||
run: |
|
||||
echo "Test result on ${{matrix.os}} with LLVM ${{matrix.llvm}}" > result.md
|
||||
bash ./.github/workflows/test_llgo.sh
|
||||
|
||||
- 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
|
||||
bash .github/workflows/test_demo.sh
|
||||
|
||||
- name: Show test result
|
||||
run: cat result.md
|
||||
|
||||
- name: LLDB tests
|
||||
if: ${{startsWith(matrix.os, 'macos')}}
|
||||
working-directory: compiler
|
||||
run: |
|
||||
echo "Test lldb with llgo plugin on ${{matrix.os}} with LLVM ${{matrix.llvm}}"
|
||||
bash _lldb/runtest.sh -v
|
||||
|
||||
test:
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-24.04
|
||||
llvm: [18]
|
||||
go: ['1.24.0']
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- 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/llgo/py/numpy
|
||||
torch # for github.com/goplus/llgo/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.0'
|
||||
|
||||
- name: Install
|
||||
working-directory: compiler
|
||||
run: |
|
||||
go install ./...
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Go for testing
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
|
||||
- name: Verify Go version
|
||||
run: |
|
||||
go_version=$(go version | cut -d' ' -f3 | sed 's/go//')
|
||||
if [[ "$go_version" != "${{matrix.go}}"* ]]; then
|
||||
echo "Expected Go version ${{matrix.go}}, but got $go_version"
|
||||
exit 1
|
||||
fi
|
||||
echo "Using Go version: $go_version"
|
||||
|
||||
- name: run llgo test
|
||||
run: |
|
||||
llgo test ./...
|
||||
cd _demo
|
||||
llgo test -v ./runtest
|
||||
|
||||
hello:
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-24.04, macos-latest]
|
||||
llvm: [18]
|
||||
go: ['1.20.14', '1.21.13', '1.22.12', '1.23.6', '1.24.0']
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- 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.0'
|
||||
|
||||
- name: Install llgo
|
||||
working-directory: compiler
|
||||
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.20
|
||||
if: startsWith(matrix.go, '1.20') || 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.20'
|
||||
|
||||
- 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'
|
||||
40
.github/workflows/populate_darwin_sysroot.sh
vendored
Executable file
40
.github/workflows/populate_darwin_sysroot.sh
vendored
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
TMPDIR="$(mktemp -d)"
|
||||
export TMPDIR
|
||||
trap 'rm -rf "${TMPDIR}"' EXIT
|
||||
|
||||
DARWIN_AMD64_LLVM_PREFIX=.sysroot/darwin/amd64/usr/local/opt/llvm@18
|
||||
DARWIN_ARM64_LLVM_PREFIX=.sysroot/darwin/arm64/opt/homebrew/opt/llvm@18
|
||||
mkdir -p "${DARWIN_AMD64_LLVM_PREFIX}" "${DARWIN_ARM64_LLVM_PREFIX}"
|
||||
|
||||
BREW_LLVM_FORMULA_JSON="$(mktemp)"
|
||||
curl -fsSL https://formulae.brew.sh/api/formula/llvm@18.json > "${BREW_LLVM_FORMULA_JSON}"
|
||||
BREW_LLVM_AMD64_BOTTLE_URL=$(jq -r '.bottle.stable.files.sonoma.url' "${BREW_LLVM_FORMULA_JSON}")
|
||||
BREW_LLVM_ARM64_BOTTLE_URL=$(jq -r '.bottle.stable.files.arm64_sonoma.url' "${BREW_LLVM_FORMULA_JSON}")
|
||||
curl -fsSL -H "Authorization: Bearer QQ==" "${BREW_LLVM_AMD64_BOTTLE_URL}" | tar -xzf - --strip-components=2 -C "${DARWIN_AMD64_LLVM_PREFIX}"
|
||||
curl -fsSL -H "Authorization: Bearer QQ==" "${BREW_LLVM_ARM64_BOTTLE_URL}" | tar -xzf - --strip-components=2 -C "${DARWIN_ARM64_LLVM_PREFIX}"
|
||||
|
||||
patch_homebrew_lib_dir() {
|
||||
local LIB_DIR="$1"
|
||||
local HOMEBREW_PREFIX="$2"
|
||||
for DYLIB_FILE in "${LIB_DIR}"/*.dylib; do
|
||||
if [[ -f "${DYLIB_FILE}" ]]; then
|
||||
ID=$(otool -D "${DYLIB_FILE}" | grep '@@HOMEBREW_PREFIX@@' | awk '{print $1}')
|
||||
if [[ -n "${ID}" ]]; then
|
||||
NEW_ID=${ID/'@@HOMEBREW_PREFIX@@'/${HOMEBREW_PREFIX}}
|
||||
install_name_tool -id "${NEW_ID}" "${DYLIB_FILE}"
|
||||
fi
|
||||
|
||||
DEPS=$(otool -L "${DYLIB_FILE}" | grep '@@HOMEBREW_PREFIX@@' | awk '{print $1}')
|
||||
for DEP in ${DEPS}; do
|
||||
NEW_DEP=${DEP/'@@HOMEBREW_PREFIX@@'/${HOMEBREW_PREFIX}}
|
||||
install_name_tool -change "${DEP}" "${NEW_DEP}" "${DYLIB_FILE}"
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
||||
patch_homebrew_lib_dir "${DARWIN_AMD64_LLVM_PREFIX}/lib" /usr/lib
|
||||
patch_homebrew_lib_dir "${DARWIN_ARM64_LLVM_PREFIX}/lib" /opt/homebrew
|
||||
146
.github/workflows/populate_linux_sysroot.sh
vendored
Executable file
146
.github/workflows/populate_linux_sysroot.sh
vendored
Executable file
@@ -0,0 +1,146 @@
|
||||
#!/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 lsb-release gnupg2 wget rsync
|
||||
|
||||
echo "deb http://apt.llvm.org/\$(lsb_release -cs)/ llvm-toolchain-\$(lsb_release -cs)-18 main" | tee /etc/apt/sources.list.d/llvm.list
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
||||
apt-get update
|
||||
apt-get install -y llvm-18-dev
|
||||
|
||||
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+=("--info=progress2")
|
||||
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}" &
|
||||
populate_linux_sysroot arm64 "${LINUX_ARM64_PREFIX}" &
|
||||
|
||||
# Wait for both background processes to complete
|
||||
wait
|
||||
60
.github/workflows/release-build.yml
vendored
Normal file
60
.github/workflows/release-build.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
name: Release Build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
populate-darwin-sysroot:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Populate Darwin sysroot
|
||||
run: bash .github/workflows/populate_darwin_sysroot.sh
|
||||
- name: Create Darwin sysroot tarball
|
||||
run: tar -czvf .sysroot/darwin.tar.gz -C .sysroot darwin
|
||||
- name: Upload Darwin sysroot tarball
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: darwin-sysroot-tarball
|
||||
path: .sysroot/darwin.tar.gz
|
||||
compression-level: 0
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: populate-darwin-sysroot
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.x
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
image: tonistiigi/binfmt:qemu-v7.0.0-28
|
||||
- name: Download Darwin sysroot tarball
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: darwin-sysroot-tarball
|
||||
path: .sysroot
|
||||
- name: Populate Darwin sysroot
|
||||
run: tar -xzvf .sysroot/darwin.tar.gz -C .sysroot
|
||||
- name: Populate Linux sysroot
|
||||
run: bash .github/workflows/populate_linux_sysroot.sh
|
||||
- name: Run GoReleaser
|
||||
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 --clean --skip nfpm,snapcraft
|
||||
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 and _pydemo that contain *.go files
|
||||
total=0
|
||||
failed=0
|
||||
failed_cases=""
|
||||
for d in ./_demo/* ./_pydemo/*; 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
|
||||
36
.github/workflows/test_llgo.sh
vendored
Normal file
36
.github/workflows/test_llgo.sh
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
testcmd=/tmp/test
|
||||
llgo build -o $testcmd ./c/bdwgc/_test
|
||||
cases=$($testcmd)
|
||||
total=$(echo "$cases" | wc -l | tr -d ' ')
|
||||
failed=0
|
||||
failed_cases=""
|
||||
|
||||
for idx in $(seq 1 $((total))); do
|
||||
case=$(echo "$cases" | sed -n "${idx}p")
|
||||
case_name=$(echo "$case" | cut -d',' -f2)
|
||||
echo "=== Test case: $case_name"
|
||||
set +e
|
||||
out=$("$testcmd" "$((idx-1))" 2>&1)
|
||||
exit_code=$?
|
||||
set -e
|
||||
if [ "${exit_code:-0}" -ne 0 ]; then
|
||||
echo "failed: $out"
|
||||
failed=$((failed+1))
|
||||
failed_cases="$failed_cases\n* :x: $case_name"
|
||||
else
|
||||
echo "passed"
|
||||
fi
|
||||
done
|
||||
echo "=== Done"
|
||||
echo "$((total-failed))/$total tests passed"
|
||||
|
||||
if [ "$failed" -ne 0 ]; then
|
||||
echo ":bangbang: Failed llgo cases:" | tee -a result.md
|
||||
echo -e "$failed_cases" | tee -a result.md
|
||||
exit 1
|
||||
else
|
||||
echo ":white_check_mark: All llgo tests passed" | tee -a result.md
|
||||
fi
|
||||
15
.gitignore
vendored
15
.gitignore
vendored
@@ -8,16 +8,27 @@
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
test.db
|
||||
demo.ll
|
||||
llgo_autogen*.ll
|
||||
stories*.bin
|
||||
.DS_Store
|
||||
err.log
|
||||
numpy.txt
|
||||
|
||||
_go/
|
||||
_runtime/
|
||||
_tinygo/
|
||||
_output/
|
||||
build.dir/
|
||||
.vscode/
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
# Debug symbols
|
||||
*.dSYM
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
*.swp
|
||||
@@ -27,3 +38,7 @@ _tinygo/
|
||||
|
||||
# Go workspace file
|
||||
go.work*
|
||||
|
||||
# GoReleaser
|
||||
.dist/
|
||||
.sysroot/
|
||||
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "c/llama2/llama2.c"]
|
||||
path = c/llama2/llama2.c
|
||||
url = https://github.com/karpathy/llama2.c.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
|
||||
dir: compiler
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=darwin,amd64,byollvm
|
||||
ldflags:
|
||||
- -X github.com/goplus/llgo/compiler/internal/env.buildVersion=v{{.Version}}
|
||||
- -X github.com/goplus/llgo/compiler/internal/env.buildTime={{.Date}}
|
||||
- -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/usr/local/opt/llvm@18/bin/llvm-config
|
||||
env:
|
||||
- CC=o64-clang
|
||||
- CXX=o64-clang++
|
||||
- CGO_CPPFLAGS=-I{{.Env.SYSROOT_DARWIN_AMD64}}/usr/local/opt/llvm@18/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
|
||||
- CGO_LDFLAGS=-L{{.Env.SYSROOT_DARWIN_AMD64}}/usr/local/opt/llvm@18/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM-18 -lz -lm
|
||||
targets:
|
||||
- darwin_amd64
|
||||
mod_timestamp: "{{.CommitTimestamp}}"
|
||||
- id: llgo-darwin-arm64
|
||||
dir: compiler
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=darwin,arm64,byollvm
|
||||
ldflags:
|
||||
- -X github.com/goplus/llgo/compiler/internal/env.buildVersion=v{{.Version}}
|
||||
- -X github.com/goplus/llgo/compiler/internal/env.buildTime={{.Date}}
|
||||
- -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/opt/homebrew/opt/llvm@18/bin/llvm-config
|
||||
env:
|
||||
- CC=oa64-clang
|
||||
- CXX=oa64-clang++
|
||||
- CGO_CPPFLAGS=-I{{.Env.SYSROOT_DARWIN_ARM64}}/opt/homebrew/opt/llvm@18/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
|
||||
- CGO_LDFLAGS=-L{{.Env.SYSROOT_DARWIN_ARM64}}/opt/homebrew/opt/llvm@18/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM-18 -lz -lm
|
||||
targets:
|
||||
- darwin_arm64
|
||||
mod_timestamp: "{{.CommitTimestamp}}"
|
||||
- id: llgo-linux-amd64
|
||||
dir: compiler
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=linux,amd64,byollvm
|
||||
ldflags:
|
||||
- -X github.com/goplus/llgo/compiler/internal/env.buildVersion=v{{.Version}}
|
||||
- -X github.com/goplus/llgo/compiler/internal/env.buildTime={{.Date}}
|
||||
- -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/usr/lib/llvm-18/bin/llvm-config
|
||||
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}}/usr/include/llvm-18 -I{{.Env.SYSROOT_LINUX_AMD64}}/usr/include/llvm-c-18 -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}}/usr/lib/llvm-18/lib -lLLVM-18
|
||||
targets:
|
||||
- linux_amd64
|
||||
mod_timestamp: "{{.CommitTimestamp}}"
|
||||
- id: llgo-linux-arm64
|
||||
dir: compiler
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=linux,arm64,byollvm
|
||||
ldflags:
|
||||
- -X github.com/goplus/llgo/compiler/internal/env.buildVersion=v{{.Version}}
|
||||
- -X github.com/goplus/llgo/compiler/internal/env.buildTime={{.Date}}
|
||||
- -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=/usr/lib/llvm-18/bin/llvm-config
|
||||
env:
|
||||
- CC=aarch64-linux-gnu-gcc
|
||||
- CXX=aarch64-linux-gnu-g++
|
||||
- CGO_CPPFLAGS=--sysroot={{.Env.SYSROOT_LINUX_ARM64}} -I{{.Env.SYSROOT_LINUX_ARM64}}/usr/include/llvm-18 -I{{.Env.SYSROOT_LINUX_ARM64}}/usr/include/llvm-c-18 -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}}/usr/lib/llvm-18/lib -lLLVM-18
|
||||
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
|
||||
|
||||
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 Go+ project.
|
||||
|
||||
LLGo aims to expand the boundaries of Go/Go+, 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 Go+ project.
|
||||
|
||||
LLGo aims to expand the boundaries of Go/Go+, 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
|
||||
431
README.md
431
README.md
@@ -8,4 +8,433 @@ llgo - A Go compiler based on LLVM
|
||||
[](https://pkg.go.dev/github.com/goplus/llgo)
|
||||
[](https://github.com/goplus/gop)
|
||||
|
||||
This is a Go compiler based on LLVM in order to better integrate Go with the C ecosystem. 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. It's a subproject of [the Go+ project](https://github.com/goplus/gop).
|
||||
|
||||
LLGo aims to expand the boundaries of Go/Go+, providing limitless possibilities such as:
|
||||
|
||||
* Game development
|
||||
* AI and data science
|
||||
* WebAssembly
|
||||
* Embedded development
|
||||
* ...
|
||||
|
||||
How can these be achieved?
|
||||
|
||||
```
|
||||
LLGo := Go + C + Python
|
||||
```
|
||||
|
||||
LLGo is compatible with C and Python through the language's **Application Binary Interface (ABI)**, while LLGo is compatible with Go through its **syntax (source code)**. And here C doesn't just include C, but all languages that are ABI compatible with C, including C/C++, 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/llgo/c)
|
||||
* [c/syscall](https://pkg.go.dev/github.com/goplus/llgo/c/syscall)
|
||||
* [c/sys](https://pkg.go.dev/github.com/goplus/llgo/c/sys)
|
||||
* [c/os](https://pkg.go.dev/github.com/goplus/llgo/c/os)
|
||||
* [c/math](https://pkg.go.dev/github.com/goplus/llgo/c/math)
|
||||
* [c/math/cmplx](https://pkg.go.dev/github.com/goplus/llgo/c/math/cmplx)
|
||||
* [c/math/rand](https://pkg.go.dev/github.com/goplus/llgo/c/math/rand)
|
||||
* [c/pthread](https://pkg.go.dev/github.com/goplus/llgo/c/pthread)
|
||||
* [c/pthread/sync](https://pkg.go.dev/github.com/goplus/llgo/c/pthread/sync)
|
||||
* [c/sync/atomic](https://pkg.go.dev/github.com/goplus/llgo/c/sync/atomic)
|
||||
* [c/time](https://pkg.go.dev/github.com/goplus/llgo/c/time)
|
||||
* [c/net](https://pkg.go.dev/github.com/goplus/llgo/c/net)
|
||||
* [cpp/std](https://pkg.go.dev/github.com/goplus/llgo/cpp/std)
|
||||
|
||||
Here is a simple example:
|
||||
|
||||
<!-- embedme doc/_readme/llgo_simple/simple.go -->
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import "github.com/goplus/llgo/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.
|
||||
|
||||
The `_demo` directory contains some C standard libary related 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`
|
||||
* [qsort](_demo/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/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/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](c/math/math.go)):
|
||||
|
||||
<!-- embedme doc/_readme/llgo_call_cmath/call_cmath.go -->
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import "github.com/goplus/llgo/c/math"
|
||||
|
||||
func main() {
|
||||
println("sqrt(2) =", math.Sqrt(2))
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Python support
|
||||
|
||||
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/llgo/py) (abi)
|
||||
* [py/std](https://pkg.go.dev/github.com/goplus/llgo/py/std) (builtins)
|
||||
* [py/sys](https://pkg.go.dev/github.com/goplus/llgo/py/sys)
|
||||
* [py/os](https://pkg.go.dev/github.com/goplus/llgo/py/os)
|
||||
* [py/math](https://pkg.go.dev/github.com/goplus/llgo/py/math)
|
||||
* [py/json](https://pkg.go.dev/github.com/goplus/llgo/py/json)
|
||||
* [py/inspect](https://pkg.go.dev/github.com/goplus/llgo/py/inspect)
|
||||
* [py/statistics](https://pkg.go.dev/github.com/goplus/llgo/py/statistics)
|
||||
* [py/numpy](https://pkg.go.dev/github.com/goplus/llgo/py/numpy)
|
||||
* [py/pandas](https://pkg.go.dev/github.com/goplus/llgo/py/pandas)
|
||||
* [py/torch](https://pkg.go.dev/github.com/goplus/llgo/py/torch)
|
||||
* [py/matplotlib](https://pkg.go.dev/github.com/goplus/llgo/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/py"
|
||||
"github.com/goplus/llgo/py/math"
|
||||
"github.com/goplus/llgo/py/std"
|
||||
)
|
||||
|
||||
func main() {
|
||||
x := math.Sqrt(py.Float(2)) // x = sqrt(2)
|
||||
std.Print(py.Str("sqrt(2) ="), x) // print("sqrt(2) =", x)
|
||||
}
|
||||
```
|
||||
|
||||
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/llgo/py"
|
||||
"github.com/goplus/llgo/py/numpy"
|
||||
"github.com/goplus/llgo/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 `_pydemo` directory contains some python related demos:
|
||||
|
||||
* [callpy](_pydemo/callpy/callpy.go): call Python standard library function `math.sqrt`
|
||||
* [pi](_pydemo/pi/pi.go): print python constants `math.pi`
|
||||
* [statistics](_pydemo/statistics/statistics.go): define a python list and call `statistics.mean` to get the mean
|
||||
* [matrix](_pydemo/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 _pydemo/callpy
|
||||
llgo run .
|
||||
```
|
||||
|
||||
|
||||
## Other frequently used libraries
|
||||
|
||||
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/llgo/c/bdwgc)
|
||||
* [c/cjson](https://pkg.go.dev/github.com/goplus/llgo/c/cjson)
|
||||
* [c/clang](https://pkg.go.dev/github.com/goplus/llgo/c/clang)
|
||||
* [c/ffi](https://pkg.go.dev/github.com/goplus/llgo/c/ffi)
|
||||
* [c/libuv](https://pkg.go.dev/github.com/goplus/llgo/c/libuv)
|
||||
* [c/llama2](https://pkg.go.dev/github.com/goplus/llgo/c/llama2)
|
||||
* [c/lua](https://pkg.go.dev/github.com/goplus/llgo/c/lua)
|
||||
* [c/neco](https://pkg.go.dev/github.com/goplus/llgo/c/neco)
|
||||
* [c/openssl](https://pkg.go.dev/github.com/goplus/llgo/c/openssl)
|
||||
* [c/raylib](https://pkg.go.dev/github.com/goplus/llgo/c/raylib)
|
||||
* [c/sqlite](https://pkg.go.dev/github.com/goplus/llgo/c/sqlite)
|
||||
* [c/zlib](https://pkg.go.dev/github.com/goplus/llgo/c/zlib)
|
||||
* [cpp/inih](https://pkg.go.dev/github.com/goplus/llgo/cpp/inih)
|
||||
* [cpp/llvm](https://pkg.go.dev/github.com/goplus/llgo/cpp/llvm)
|
||||
|
||||
Here are some examples related to them:
|
||||
|
||||
* [llama2-c](_demo/llama2-c): inference Llama 2 (It's the first llgo AI example)
|
||||
* [mkjson](c/cjson/_demo/mkjson/mkjson.go): create a json object and print it
|
||||
* [sqlitedemo](c/sqlite/_demo/sqlitedemo/demo.go): a basic sqlite demo
|
||||
* [tetris](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/concat/concat.go): define a variadic function
|
||||
* [genints](_demo/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/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)
|
||||
* [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)
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
- [Go 1.20+](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/llgo/py](https://pkg.go.dev/github.com/goplus/llgo/py))
|
||||
|
||||
## How to install
|
||||
|
||||
Follow these steps to generate the `llgo` command (its usage is the same as the `go` command):
|
||||
|
||||
### on macOS
|
||||
|
||||
<!-- embedme doc/_readme/scripts/install_macos.sh#L2-L1000 -->
|
||||
|
||||
```sh
|
||||
brew update
|
||||
brew install llvm@18 bdw-gc openssl cjson libffi libuv pkg-config
|
||||
brew install python@3.12 # optional
|
||||
brew link --force libffi
|
||||
curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash
|
||||
|
||||
```
|
||||
|
||||
### on Linux
|
||||
|
||||
#### Debian/Ubuntu
|
||||
|
||||
<!-- embedme doc/_readme/scripts/install_ubuntu.sh#L2-L1000 -->
|
||||
|
||||
```sh
|
||||
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-18 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-18-dev clang-18 libclang-18-dev lld-18 pkg-config libgc-dev libssl-dev zlib1g-dev libcjson-dev libsqlite3-dev libunwind-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
|
||||
```
|
||||
|
||||
#### Alpine Linux
|
||||
|
||||
```sh
|
||||
apk add go llvm18-dev clang18-dev lld18 pkgconf gc-dev openssl-dev zlib-dev
|
||||
apk add python3-dev # optional
|
||||
apk add g++ # build only
|
||||
export LLVM_CONFIG=/usr/lib/llvm18/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
|
||||
```
|
||||
|
||||
### on Windows
|
||||
|
||||
TODO
|
||||
|
||||
### Install from source
|
||||
|
||||
<!-- embedme doc/_readme/scripts/install_llgo.sh#L2-L1000 -->
|
||||
|
||||
```sh
|
||||
git clone https://github.com/goplus/llgo.git
|
||||
cd llgo
|
||||
./install.sh
|
||||
```
|
||||
|
||||
## 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](compiler/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](compiler/chore/llgen): It is used to compile Go packages into LLVM IR files (*.ll).
|
||||
* [ssadump](compiler/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
|
||||
git clone https://github.com/goplus/llgo.git
|
||||
cd llgo/compiler
|
||||
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
|
||||
```
|
||||
|
||||
## Key modules
|
||||
|
||||
Below are the key modules for understanding the implementation principles of `llgo`:
|
||||
|
||||
* [ssa](https://pkg.go.dev/github.com/goplus/llgo/compiler/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/compiler/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/compiler/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)
|
||||
}
|
||||
}
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
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"))
|
||||
}
|
||||
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)
|
||||
}
|
||||
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)
|
||||
}
|
||||
31
_demo/async/async/async.go
Normal file
31
_demo/async/async/async.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package async
|
||||
|
||||
import (
|
||||
_ "unsafe"
|
||||
)
|
||||
|
||||
type Void = [0]byte
|
||||
|
||||
type Future[T any] interface {
|
||||
Then(cb func(T))
|
||||
}
|
||||
|
||||
type future[T any] struct {
|
||||
cb func(func(T))
|
||||
}
|
||||
|
||||
func (f *future[T]) Then(cb func(T)) {
|
||||
f.cb(cb)
|
||||
}
|
||||
|
||||
func Async[T any](fn func(func(T))) Future[T] {
|
||||
return &future[T]{fn}
|
||||
}
|
||||
|
||||
func Run[T any](future Future[T]) T {
|
||||
var ret T
|
||||
future.Then(func(v T) {
|
||||
ret = v
|
||||
})
|
||||
return ret
|
||||
}
|
||||
23
_demo/async/main.go
Normal file
23
_demo/async/main.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/goplus/llgo/_demo/async/async"
|
||||
"github.com/goplus/llgo/_demo/async/timeout"
|
||||
)
|
||||
|
||||
func Sleep(i int, d time.Duration) async.Future[int] {
|
||||
return async.Async(func(resolve func(int)) {
|
||||
timeout.Timeout(d).Then(func(async.Void) {
|
||||
resolve(i)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
func main() {
|
||||
async.Run(async.Async(func(resolve func(async.Void)) {
|
||||
println("read file")
|
||||
defer resolve(async.Void{})
|
||||
}))
|
||||
}
|
||||
16
_demo/async/timeout/timeout.go
Normal file
16
_demo/async/timeout/timeout.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package timeout
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/goplus/llgo/_demo/async/async"
|
||||
)
|
||||
|
||||
func Timeout(d time.Duration) async.Future[async.Void] {
|
||||
return async.Async(func(resolve func(async.Void)) {
|
||||
go func() {
|
||||
time.Sleep(d)
|
||||
resolve(async.Void{})
|
||||
}()
|
||||
})
|
||||
}
|
||||
24
_demo/catomic/atomic.go
Normal file
24
_demo/catomic/atomic.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/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/cexec/exec.go
Normal file
11
_demo/cexec/exec.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/c/os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ls := c.Str("ls")
|
||||
os.Execlp(ls, ls, c.Str("-l"), nil)
|
||||
}
|
||||
16
_demo/cgofull/bar.go
Normal file
16
_demo/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/cgofull/cgofull.go
Normal file
157
_demo/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/cgofull/pymod1"
|
||||
"github.com/goplus/llgo/_demo/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/cgofull/foo.c
Normal file
12
_demo/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/cgofull/foo.go
Normal file
16
_demo/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/cgofull/foo.h
Normal file
7
_demo/cgofull/foo.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct {
|
||||
int a;
|
||||
} Foo;
|
||||
|
||||
extern void print_foo(Foo* f);
|
||||
24
_demo/cgofull/py.go
Normal file
24
_demo/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/cgofull/pymod1/pymod1.go
Normal file
11
_demo/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/cgofull/pymod2/pymod2.go
Normal file
11
_demo/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))
|
||||
}
|
||||
28
_demo/checkfile/demo.go
Normal file
28
_demo/checkfile/demo.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func main() {
|
||||
tempDir := os.TempDir()
|
||||
noexist := filepath.Join(tempDir, "noexist.txt")
|
||||
|
||||
if _, err := os.Stat(noexist); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
fmt.Println("noexist:", err.Error())
|
||||
} else {
|
||||
fmt.Println("exist,other err:", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
if _, err := os.Open(noexist); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
fmt.Println("noexist:", err.Error())
|
||||
} else {
|
||||
fmt.Println("exist,other err:", err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
18
_demo/commandrun/commandrun.go
Normal file
18
_demo/commandrun/commandrun.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var data bytes.Buffer
|
||||
cmd := exec.Command("echo", "hello llgo")
|
||||
cmd.Stdout = &data
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
println("len:", len(data.Bytes()))
|
||||
println("data:", data.String())
|
||||
}
|
||||
9
_demo/complex/cmplx.go
Normal file
9
_demo/complex/cmplx.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"math/cmplx"
|
||||
)
|
||||
|
||||
func main() {
|
||||
println("abs(3+4i):", cmplx.Abs(3+4i))
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/internal/runtime/c"
|
||||
"github.com/goplus/llgo/c"
|
||||
)
|
||||
|
||||
func concat(args ...string) (ret string) {
|
||||
@@ -15,3 +15,7 @@ func main() {
|
||||
result := concat("Hello", " ", "World")
|
||||
c.Fprintf(c.Stderr, c.Str("Hi, %s\n"), c.AllocaCStr(result))
|
||||
}
|
||||
|
||||
/* Expected output (stderr):
|
||||
Hi, Hello World
|
||||
*/
|
||||
38
_demo/cppintf/cppintf.go
Normal file
38
_demo/cppintf/cppintf.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/_demo/cppintf/foo"
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/c/math"
|
||||
)
|
||||
|
||||
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/cppintf/foo/bar/bar.cpp
Normal file
15
_demo/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/cppintf/foo/foo.go
Normal file
25
_demo/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/cppmintf/cpp_multi_intf.go
Normal file
50
_demo/cppmintf/cpp_multi_intf.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/llgo/_demo/cppmintf/foo"
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/c/math"
|
||||
)
|
||||
|
||||
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/cppmintf/foo/bar/bar.cpp
Normal file
17
_demo/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/cppmintf/foo/foo.go
Normal file
42
_demo/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)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
26
_demo/crand/rand.go
Normal file
26
_demo/crand/rand.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/c/math/rand"
|
||||
"github.com/goplus/llgo/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/ctime/time.go
Normal file
12
_demo/ctime/time.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import "github.com/goplus/llgo/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)
|
||||
}
|
||||
18
_demo/defer/main.go
Normal file
18
_demo/defer/main.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
var a int = 5
|
||||
defer println(a)
|
||||
defer func() {
|
||||
println(a)
|
||||
}()
|
||||
defer func() {
|
||||
println(recover().(string))
|
||||
}()
|
||||
a = 10
|
||||
panic("error")
|
||||
//Output:
|
||||
// error
|
||||
// 10
|
||||
// 5
|
||||
}
|
||||
42
_demo/failed/stacktrace/main.go
Normal file
42
_demo/failed/stacktrace/main.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type MyStruct[T any] struct {
|
||||
value T
|
||||
}
|
||||
|
||||
func (m *MyStruct[T]) Method() {
|
||||
fmt.Println("In generic method")
|
||||
genericFunc[T](m.value)
|
||||
}
|
||||
|
||||
func genericFunc[T any](v T) {
|
||||
fmt.Println("In generic function")
|
||||
normalFunc()
|
||||
}
|
||||
|
||||
func normalFunc() {
|
||||
fmt.Println("In normal function")
|
||||
panic("panic occurs here")
|
||||
}
|
||||
|
||||
func main() {
|
||||
m := &MyStruct[string]{value: "hello"}
|
||||
m.Method()
|
||||
}
|
||||
|
||||
//Expected:
|
||||
// In generic method
|
||||
// In generic function
|
||||
// In normal function
|
||||
// panic: panic occurs here
|
||||
|
||||
// [0x00C6D310 github.com/goplus/llgo/internal/runtime.Rethrow+0x2f, SP = 0x60]
|
||||
// [0x00C6CF44 github.com/goplus/llgo/internal/runtime.Panic+0x2d, SP = 0x50]
|
||||
// [0x00C69420 main.normalFunc+0xf, SP = 0xa8]
|
||||
// [0x00C69564 main.genericFunc[string]+0x18, SP = 0x74]
|
||||
// [0x00C694A8 main.(*MyStruct[string]).Method+0x1f, SP = 0x84]
|
||||
// [0x00C6936C main+0x4, SP = 0x40]
|
||||
77
_demo/fcntl/fcntl.go
Normal file
77
_demo/fcntl/fcntl.go
Normal file
@@ -0,0 +1,77 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/c/os"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
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)
|
||||
}
|
||||
63
_demo/genints/genints.go
Normal file
63
_demo/genints/genints.go
Normal file
@@ -0,0 +1,63 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/c"
|
||||
)
|
||||
|
||||
type generator struct {
|
||||
val c.Int
|
||||
}
|
||||
|
||||
func (g *generator) next() c.Int {
|
||||
g.val++
|
||||
return g.val
|
||||
}
|
||||
|
||||
func genInts(n int, gen func() c.Int) []c.Int {
|
||||
a := make([]c.Int, n)
|
||||
for i := range a {
|
||||
a[i] = gen()
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
func main() {
|
||||
// generate 5 random integers
|
||||
for _, v := range genInts(5, c.Rand) {
|
||||
c.Printf(c.Str("%d\n"), v)
|
||||
}
|
||||
|
||||
// generate 5 integers, each is double of the previous one
|
||||
initVal := c.Int(1)
|
||||
ints := genInts(5, func() c.Int {
|
||||
initVal *= 2
|
||||
return initVal
|
||||
})
|
||||
for _, v := range ints {
|
||||
c.Printf(c.Str("%d\n"), v)
|
||||
}
|
||||
|
||||
// generate 5 integers, each is incremented by 1
|
||||
g := &generator{val: 1}
|
||||
for _, v := range genInts(5, g.next) {
|
||||
c.Printf(c.Str("%d\n"), v)
|
||||
}
|
||||
}
|
||||
|
||||
/* Posible output:
|
||||
16807
|
||||
282475249
|
||||
1622650073
|
||||
984943658
|
||||
1144108930
|
||||
2
|
||||
4
|
||||
8
|
||||
16
|
||||
32
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
*/
|
||||
11
_demo/getcwd/getcwd.go
Normal file
11
_demo/getcwd/getcwd.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/c/os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
wd := os.Getcwd(c.Alloca(os.PATH_MAX), os.PATH_MAX)
|
||||
c.Printf(c.Str("cwd: %s\n"), wd)
|
||||
}
|
||||
12
_demo/goroutine/goroutine.go
Normal file
12
_demo/goroutine/goroutine.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
done := false
|
||||
go func() {
|
||||
println("Hello, goroutine")
|
||||
done = true
|
||||
}()
|
||||
for !done {
|
||||
print(".")
|
||||
}
|
||||
}
|
||||
7
_demo/gotime/time.go
Normal file
7
_demo/gotime/time.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
import "time"
|
||||
|
||||
func main() {
|
||||
println(time.Now().String())
|
||||
}
|
||||
17
_demo/hello/hello.go
Normal file
17
_demo/hello/hello.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/goplus/llgo/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"))
|
||||
}
|
||||
|
||||
/* Expected output:
|
||||
Hello world
|
||||
*/
|
||||
10
_demo/linkname/linkname.go
Normal file
10
_demo/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))
|
||||
}
|
||||
137
_demo/llama2-c/README.md
Normal file
137
_demo/llama2-c/README.md
Normal file
@@ -0,0 +1,137 @@
|
||||
llama2 - Inference Llama 2 in LLGo
|
||||
=====
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/llama_cute.jpg" width="300" height="300" alt="Cute Llama">
|
||||
</p>
|
||||
|
||||
Have you ever wanted to inference a baby [Llama 2](https://ai.meta.com/llama/) model in Go? No? Well, now you can!
|
||||
|
||||
This is based on [llama2.c](https://github.com/karpathy/llama2.c), we didn't port anything! So it's very different from these Go implementations:
|
||||
* https://github.com/nikolaydubina/llama2.go
|
||||
* https://github.com/tmc/go-llama2
|
||||
|
||||
llgo plays a great role as a bridge, allowing the C ecosystem to be seamlessly connected to Go.
|
||||
|
||||
You might think that you need many billion parameter LLMs to do anything useful, but in fact very small LLMs can have surprisingly strong performance if you make the domain narrow enough (ref: [TinyStories](https://huggingface.co/datasets/roneneldan/TinyStories) paper). This repo is a "fullstack" train + inference solution for Llama 2 LLM, with focus on minimalism and simplicity.
|
||||
|
||||
As the architecture is identical, you can also load and inference Meta's Llama 2 models. However, the current code only inferences models in fp32, so you will most likely not be able to productively load models larger than 7B.
|
||||
|
||||
## feel the magic
|
||||
|
||||
How to run this example? The simplest way is to run it without any arguments:
|
||||
|
||||
```bash
|
||||
llgo run .
|
||||
```
|
||||
|
||||
This means it uses the default model checkpoint file (`stories15M.bin`), and the default prompt (`Once upon a time`).
|
||||
|
||||
You need download the model checkpoint file first. Download this 15M parameter model trained on the [TinyStories](https://huggingface.co/datasets/roneneldan/TinyStories) dataset (~60MB download):
|
||||
|
||||
```bash
|
||||
wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin
|
||||
```
|
||||
|
||||
If you want to specify a prompt (eg. `Long long ago`):
|
||||
|
||||
```bash
|
||||
llgo run . 'Long long ago'
|
||||
```
|
||||
|
||||
We can also try a bit bigger 42M parameter model (ie. `stories42M.bin`):
|
||||
|
||||
```bash
|
||||
wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories42M.bin
|
||||
llgo run . -m stories42M.bin 'Long long ago'
|
||||
```
|
||||
|
||||
There is also an even better 110M param model available, see [models](#models).
|
||||
|
||||
Quick note on sampling, the recommendation for ~best results is to sample with `-t 1.0 -p 0.9`, i.e. temperature 1.0 (default) but also top-p sampling at 0.9 (default). Intuitively, top-p ensures that tokens with tiny probabilities do not get sampled, so we can't get "unlucky" during sampling, and we are less likely to go "off the rails" afterwards. More generally, to control the diversity of samples use either the temperature (i.e. vary `-t` between 0 and 1 and keep top-p off with `-p 0`) or the top-p value (i.e. vary `-p` between 0 and 1 and keep `-t 1`), but not both. Nice explainers on LLM sampling strategies include [this](https://peterchng.com/blog/2023/05/02/token-selection-strategies-top-k-top-p-and-temperature/), [this](https://docs.cohere.com/docs/controlling-generation-with-top-k-top-p) or [this](https://huggingface.co/blog/how-to-generate).
|
||||
|
||||
|
||||
## Meta's Llama 2 models
|
||||
|
||||
As the neural net architecture is identical, we can also inference the Llama 2 models released by Meta. Sadly there is a bit of friction here due to licensing (I can't directly upload the checkpoints, I think). So Step 1, get the Llama 2 checkpoints by following the [Meta instructions](https://github.com/facebookresearch/llama). Once we have those checkpoints, we have to convert them into the llama2.c format.
|
||||
For this we need to install the python dependencies (`pip install -r requirements.txt`) and then use the `export.py` file, e.g. for 7B model:
|
||||
|
||||
```bash
|
||||
python export.py llama2_7b.bin --meta-llama path/to/llama/model/7B
|
||||
```
|
||||
|
||||
The export will take ~10 minutes or so and generate a 26GB file (the weights of the 7B model in float32) called `llama2_7b.bin` in the current directory. It has been [reported](https://github.com/karpathy/llama2.c/pull/85) that despite efforts. I would not attempt to run anything above 7B right now for two reasons: first, 13B+ currently doesn't work because of integer flow in pointer arithmetic, which is yet to be fixed, and second, even if it were fixed, this repo is doing float32 inference right now, so it would be fairly unusably slow. Once the export is done, we can run it:
|
||||
|
||||
```bash
|
||||
./run llama2_7b.bin
|
||||
```
|
||||
|
||||
This ran at about 4 tokens/s compiled with [OpenMP](#OpenMP) on 96 threads on my CPU Linux box in the cloud. (On my MacBook Air M1, currently it's closer to 30 seconds per token if you just build with `make runfast`.) Example output:
|
||||
|
||||
> The purpose of this document is to highlight the state-of-the-art of CoO generation technologies, both recent developments and those in commercial use. The focus is on the technologies with the highest merit to become the dominating processes of the future and therefore to be technologies of interest to S&T ... R&D. As such, CoO generation technologies developed in Russia, Japan and Europe are described in some depth. The document starts with an introduction to cobalt oxides as complex products and a short view on cobalt as an essential material. The document continues with the discussion of the available CoO generation processes with respect to energy and capital consumption as well as to environmental damage.
|
||||
|
||||
base models... ¯\\_(ツ)_/¯. Since we can inference the base model, it should be possible to also inference the chat model quite easily, and have a conversation with it. And if we can find a way to run 7B more efficiently, we can start adding LoRA to our training script, and going wild with finetunes all within the repo!
|
||||
|
||||
You can also try Meta's Code Llama models even if support for them is incomplete. In particular, some hyperparameters changed (e.g. the constant in RoPE layer), so the inference is not exactly correct and a bit buggy right now. Looking into fixes. Make sure to build the tokenizer for the plain and instruct variants and pass it when doing inference.
|
||||
|
||||
```bash
|
||||
python export.py codellama2_7b.bin --meta-llama /path/to/CodeLlama-7b
|
||||
python tokenizer.py --tokenizer-model=/path/to/CodeLlama-7b/tokenizer.model
|
||||
./run codellama2_7b.bin -z /path/to/CodeLlama-7b/tokenizer.bin
|
||||
```
|
||||
|
||||
Chat with Code Llama Instruct:
|
||||
|
||||
```bash
|
||||
python export.py codellama2_7b_instruct.bin --meta-llama /path/to/CodeLlama-7b-Instruct
|
||||
python tokenizer.py --tokenizer-model=/path/to/CodeLlama-7b-Instruct/tokenizer.model
|
||||
./run codellama2_7b_instruct.bin -m chat -z /path/to/CodeLlama-7b-Instruct/tokenizer.bin
|
||||
```
|
||||
|
||||
|
||||
## huggingface models
|
||||
|
||||
We can load any huggingface models that use the Llama 2 architecture. See the script [export.py](export.py) and the `--hf` flag to export the model .bin file.
|
||||
|
||||
## models
|
||||
|
||||
For the sake of examples of smaller, from-scratch models, I trained a small model series on TinyStories. All of these trained in a few hours on my training setup (4X A100 40GB GPUs). The 110M took around 24 hours. I am hosting them on huggingface hub [tinyllamas](https://huggingface.co/karpathy/tinyllamas), both in the original PyTorch .pt, and also in the llama2.c format .bin:
|
||||
|
||||
| model | dim | n_layers | n_heads | n_kv_heads | max context length | parameters | val loss | download
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| 260K | 64 | 5 | 8 | 4 | 512 | 260K | 1.297 | [stories260K](https://huggingface.co/karpathy/tinyllamas/tree/main/stories260K)
|
||||
| OG | 288 | 6 | 6 | 6 | 256 | 15M | 1.072 | [stories15M.bin](https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin) |
|
||||
| 42M| 512 | 8 | 8 | 8 | 1024 | 42M | 0.847 | [stories42M.bin](https://huggingface.co/karpathy/tinyllamas/resolve/main/stories42M.bin) |
|
||||
| 110M| 768 | 12 | 12 | 12 | 1024 | 110M | 0.760 | [stories110M.bin](https://huggingface.co/karpathy/tinyllamas/resolve/main/stories110M.bin) |
|
||||
|
||||
You'll notice that the 110M model is equivalent to GPT-1 in size. Alternatively, this is also the smallest model in the GPT-2 series (`GPT-2 small`), except the max context length is only 1024 instead of 2048. The only notable changes from GPT-1/2 architecture is that Llama uses RoPE relatively positional embeddings instead of absolute/learned positional embeddings, a bit more fancy SwiGLU non-linearity in the MLP, RMSNorm instead of LayerNorm, bias=False on all Linear layers, and is optionally multiquery.
|
||||
|
||||
|
||||
## training
|
||||
|
||||
Let's see how we can train a baby Llama 2 from scratch using the code in this repo. First let's download and pretokenize some source dataset, e.g. I like [TinyStories](https://huggingface.co/datasets/roneneldan/TinyStories) so this is the only example currently available in this repo. But it should be very easy to add datasets, see the code.
|
||||
|
||||
```bash
|
||||
python tinystories.py download
|
||||
python tinystories.py pretokenize
|
||||
```
|
||||
|
||||
Then train our model:
|
||||
|
||||
```bash
|
||||
python train.py
|
||||
```
|
||||
|
||||
**brief training guide**. See the train.py script for more exotic launches and hyperparameter overrides. Here is a brief guide to how to set the parameters. Look at the table at the very end of the [Chinchilla paper](https://arxiv.org/abs/2203.15556) to get a sense of how the Transformer parameters (dim, n_layers, n_heads) grow or shrink together. Extrapolate/interpolate this pattern to get bigger or smaller transformers. Set the max context length however you wish, depending on the problem: this should be the max number of tokens that matter to predict the next token. E.g. Llama 2 uses 2048. Next, you want the _total_ batch size per update (printed by the script as "tokens per iteration will be:") to be somewhere around 100K tokens for medium-sized applications. For tiny applications it could be lower, for large training (e.g. GPTs/LLamas) it is usually ~0.5M, or even more. You get there by first maxing out the batch_size to whatever your system allows (e.g. mine was 16 in a recent run because after that my GPU runs out of memory), and then you want to increase gradient_accumulation_steps to be as high as necessary to reach the total batch size of ~100K. Finally, you want to tune your learning_rate (LR). You want this to be as high as your training allows. Very small networks can get away with a large LR (e.g. 1e-3 or even higher). Large networks need lower LRs. 3e-4 is a safe choice in most medium-sized applications, but can be too low for small networks, so try to increase it! Finally, max_iters is the length of training. Play with different settings. I mostly only ever tune these parameters and leave most of the others unchanged. Here is an example of how I trained the 110M model, which I don't think is anywhere near optimal, but looked sensible to me: dim 768, n_layers 12, n_heads 12 (so size of each head is 768 / 12 = 64 channels), seq len of 1024, batch size 16 (this is the most that fit my A100 40GB GPU), gradient_accumulation_steps = 8 was needed to get total tokens batch size to be 16 batch size * 1024 tokens in sequence * 8 grad_accum = 131,072 tokens per update. Good. Learning rate 4e-4 (probably a little too low). max_iters 200K (probably a bit too high). Dropout 0.1, as that usually helps a bit at medium size. That was it. I ran using Distributed Data Parallel (DDP) on 4 GPUs on my cloud machine, training took ~day or so.
|
||||
|
||||
Totally understand if you want to skip model training, for simple demo just download one of the pretrained models (see [models](#models) section), e.g.:
|
||||
|
||||
```bash
|
||||
wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin
|
||||
```
|
||||
|
||||
Once we have the model.bin file, we can inference in C. Compile the C code first:
|
||||
|
||||
```bash
|
||||
llgo run . -m stories15M.bin
|
||||
```
|
||||
BIN
_demo/llama2-c/assets/llama_cute.jpg
Normal file
BIN
_demo/llama2-c/assets/llama_cute.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 183 KiB |
51
_demo/llama2-c/run.go
Normal file
51
_demo/llama2-c/run.go
Normal file
@@ -0,0 +1,51 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/c/llama2"
|
||||
"github.com/goplus/llgo/c/time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var prompt *c.Char = c.Str("Once upon a time")
|
||||
var checkpointPath *c.Char = c.Str("stories15M.bin")
|
||||
var tokenizerPath *c.Char = c.Str("tokenizer.bin")
|
||||
var temperature, topp c.Float = 1.0, 0.9
|
||||
var steps c.Int = 256
|
||||
var rngSeed uint64 = uint64(time.Time(nil))
|
||||
|
||||
loop: // parse command line arguments
|
||||
for {
|
||||
switch c.Getopt(c.Argc, c.Argv, c.Str("m:")) {
|
||||
case 'm':
|
||||
checkpointPath = c.Optarg
|
||||
c.Fprintf(c.Stderr, c.Str("==> use model: %s\n"), checkpointPath)
|
||||
case -1:
|
||||
break loop
|
||||
}
|
||||
}
|
||||
if c.Optind < c.Argc {
|
||||
prompt = c.Index(c.Argv, c.Optind)
|
||||
c.Fprintf(c.Stderr, c.Str("==> prompt: %s\n"), prompt)
|
||||
}
|
||||
|
||||
// build the Transformer via the model .bin file
|
||||
var transformer llama2.Transformer
|
||||
llama2.BuildTransformer(&transformer, checkpointPath)
|
||||
|
||||
// build the Tokenizer via the tokenizer .bin file
|
||||
var tokenizer llama2.Tokenizer
|
||||
llama2.BuildTokenizer(&tokenizer, tokenizerPath, transformer.Config.VocabSize)
|
||||
|
||||
// build the Sampler
|
||||
var sampler llama2.Sampler
|
||||
llama2.BuildSampler(&sampler, transformer.Config.VocabSize, temperature, topp, rngSeed)
|
||||
|
||||
// run!
|
||||
llama2.Generate(&transformer, &tokenizer, &sampler, prompt, steps)
|
||||
|
||||
// memory and file handles cleanup
|
||||
llama2.FreeSampler(&sampler)
|
||||
llama2.FreeTokenizer(&tokenizer)
|
||||
llama2.FreeTransformer(&transformer)
|
||||
}
|
||||
BIN
_demo/llama2-c/tokenizer.bin
Normal file
BIN
_demo/llama2-c/tokenizer.bin
Normal file
Binary file not shown.
9
_demo/logdemo/log.go
Normal file
9
_demo/logdemo/log.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
log.Println("Hello")
|
||||
}
|
||||
11
_demo/math/math.go
Normal file
11
_demo/math/math.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"math"
|
||||
)
|
||||
|
||||
func main() {
|
||||
println(math.Sqrt(2))
|
||||
println(math.Abs(-1.2))
|
||||
println(math.Ldexp(1.2, 3))
|
||||
}
|
||||
13
_demo/mimeheader/mimeheader.go
Normal file
13
_demo/mimeheader/mimeheader.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import "net/textproto"
|
||||
|
||||
func main() {
|
||||
h := make(textproto.MIMEHeader)
|
||||
h.Set("host", "www.example.com")
|
||||
println(h.Get("Host"))
|
||||
}
|
||||
|
||||
/* Expected output:
|
||||
www.example.com
|
||||
*/
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user