Compare commits
1525 Commits
master
...
fix-syntax
Author | SHA1 | Date | |
---|---|---|---|
![]() |
73e3f7915b | ||
![]() |
28f1df4cff | ||
![]() |
bece3e13e2 | ||
![]() |
aead07b5de | ||
![]() |
736cdfb2c1 | ||
![]() |
d1ba9fbb6e | ||
![]() |
8190a7730d | ||
![]() |
d0b5de398e | ||
![]() |
80e8e0f9e0 | ||
![]() |
ecaa14544f | ||
![]() |
3f2de918d8 | ||
![]() |
b138c340e1 | ||
![]() |
2cf6691439 | ||
![]() |
08ca76b741 | ||
![]() |
74909ff06b | ||
![]() |
7ef20dd606 | ||
![]() |
a860791d6f | ||
![]() |
286e5bebed | ||
![]() |
cfc0784e49 | ||
![]() |
e2070b882d | ||
![]() |
63182523df | ||
![]() |
226fb24ea9 | ||
![]() |
e331ae75a6 | ||
![]() |
3eb86584c0 | ||
![]() |
aa9d5e5614 | ||
![]() |
6bb4f2ecad | ||
![]() |
8ff011fc51 | ||
![]() |
dc9aa8a569 | ||
![]() |
57e787eec2 | ||
![]() |
c9100a98c5 | ||
![]() |
7d70c4cc6e | ||
![]() |
3fca7273c3 | ||
![]() |
527c458940 | ||
![]() |
daad01ed97 | ||
![]() |
04ec4d604e | ||
![]() |
f3dab045a8 | ||
![]() |
fddf8ffbcc | ||
![]() |
75031de6d5 | ||
![]() |
1342bef4c4 | ||
![]() |
a4012e0b2d | ||
![]() |
5a9ff6a044 | ||
![]() |
56918ad2f2 | ||
![]() |
10d48bf427 | ||
![]() |
c2cdfd6e3b | ||
![]() |
9e38074a60 | ||
![]() |
abfc979098 | ||
![]() |
e7f87cc3af | ||
![]() |
79f81a5bb7 | ||
![]() |
ea534e55c0 | ||
![]() |
7c87184951 | ||
![]() |
36f60d78e9 | ||
![]() |
9e7ff2c5c4 | ||
![]() |
8a88b9a7fa | ||
![]() |
c241e40b74 | ||
![]() |
fd16dfa02d | ||
![]() |
d7dbdc7334 | ||
![]() |
ad2000038f | ||
![]() |
b52983f52f | ||
![]() |
e743275c85 | ||
![]() |
5f5fc0935d | ||
![]() |
ba060131d1 | ||
![]() |
057ab0c5ff | ||
![]() |
67da8dbaf0 | ||
![]() |
abc061aae1 | ||
![]() |
597661fa4e | ||
![]() |
cff1c1dd4e | ||
![]() |
83d4cf4485 | ||
![]() |
78bbcec963 | ||
![]() |
88b2d5d4e6 | ||
![]() |
f1d853eeac | ||
![]() |
d031f30d2a | ||
![]() |
efb96c97b5 | ||
![]() |
ada002616e | ||
![]() |
ae21f8f875 | ||
![]() |
e041d0f32f | ||
![]() |
fc194d7337 | ||
![]() |
869d48b784 | ||
![]() |
c4926b5684 | ||
![]() |
66b199307c | ||
![]() |
9019e8b318 | ||
![]() |
f039a4c571 | ||
![]() |
a5af8708dd | ||
![]() |
710320e3dc | ||
![]() |
5cc5bb7c55 | ||
![]() |
769ca13b35 | ||
![]() |
88aa7fdeff | ||
![]() |
5a4391dd90 | ||
![]() |
992f990860 | ||
![]() |
d4ec96e35c | ||
![]() |
4bff048fb3 | ||
![]() |
eaa486db11 | ||
![]() |
cefb3aec2a | ||
![]() |
00171a3c2c | ||
![]() |
9eb7d6b84e | ||
![]() |
deaf48ae30 | ||
![]() |
3e191fef04 | ||
![]() |
02a267fdb2 | ||
![]() |
498f1795db | ||
![]() |
b99639ff97 | ||
![]() |
3e4a0353cf | ||
![]() |
3b6eda5f7d | ||
![]() |
98c3906059 | ||
![]() |
23226d4290 | ||
![]() |
21cf407616 | ||
![]() |
7fcba3fcaa | ||
![]() |
b100f4bb75 | ||
![]() |
8918279b21 | ||
![]() |
2b9d855231 | ||
![]() |
003e8c7870 | ||
![]() |
f1d6e8bfe8 | ||
![]() |
8a7852ebbf | ||
![]() |
4683b023ab | ||
![]() |
f2be44dea4 | ||
![]() |
22d61c41d5 | ||
![]() |
6d1018fbe8 | ||
![]() |
dc0898f5ef | ||
![]() |
ce370c2f64 | ||
![]() |
6ec5b27f81 | ||
![]() |
7204d3136b | ||
![]() |
d7b18e7a9c | ||
![]() |
5e94a906cd | ||
![]() |
8de6f581f3 | ||
![]() |
e0ccdc769a | ||
![]() |
8e5ccd3239 | ||
![]() |
bcc8535b78 | ||
![]() |
e676ba74a5 | ||
![]() |
db8d8f8d75 | ||
![]() |
62170e6218 | ||
![]() |
07eb3be4b6 | ||
![]() |
c7e8166725 | ||
![]() |
9c1b870769 | ||
![]() |
7812c604f4 | ||
![]() |
2b3128cdb4 | ||
![]() |
8f9d4860fd | ||
![]() |
24c2f8077c | ||
![]() |
2605437617 | ||
![]() |
6fe17be82f | ||
![]() |
20842aaf3a | ||
![]() |
8b915ea977 | ||
![]() |
25dc89a238 | ||
![]() |
200fbe9b95 | ||
![]() |
af555731a6 | ||
![]() |
cbcbc6ae0c | ||
![]() |
3d63b76730 | ||
![]() |
8130b571c4 | ||
![]() |
ac04d1e544 | ||
![]() |
ba1f5be532 | ||
![]() |
4b02c169d7 | ||
![]() |
31ca626910 | ||
![]() |
34fdd2863a | ||
![]() |
201d3760b7 | ||
![]() |
3a782d01db | ||
![]() |
87161fc5f3 | ||
![]() |
02b0a30988 | ||
![]() |
cf2030b0b1 | ||
![]() |
c5cce7aa7b | ||
![]() |
4902b5e10c | ||
![]() |
7c22c42c72 | ||
![]() |
09c1174f7e | ||
![]() |
f1128cca97 | ||
![]() |
85eee2bbbc | ||
![]() |
9ebfdb54e7 | ||
![]() |
c3595c56b4 | ||
![]() |
1582178982 | ||
![]() |
115dec6fd9 | ||
![]() |
3b9354f16b | ||
![]() |
81fa8c403d | ||
![]() |
db26a24f2f | ||
![]() |
e7a6573a20 | ||
![]() |
393afa3759 | ||
![]() |
81cd3622d3 | ||
![]() |
0d4e2a3275 | ||
![]() |
5833390396 | ||
![]() |
7c1cb1a2f0 | ||
![]() |
3760de1fa9 | ||
![]() |
2f53b436f9 | ||
![]() |
82204d1444 | ||
![]() |
2070db9c01 | ||
![]() |
19bfe3e44d | ||
![]() |
df2b1dad45 | ||
![]() |
432afc4561 | ||
![]() |
cb6af9664c | ||
![]() |
f159295e55 | ||
![]() |
2030c0b0ae | ||
![]() |
1b834d010a | ||
![]() |
b826b176d2 | ||
![]() |
4ce947da74 | ||
![]() |
c4d7e8bf1b | ||
![]() |
153dc01ccd | ||
![]() |
ddf6985020 | ||
![]() |
ff7f1ce9ff | ||
![]() |
8ccde1e5b3 | ||
![]() |
9011fe7d83 | ||
![]() |
a9f2765b4f | ||
![]() |
6e2978fe5c | ||
![]() |
9422d66601 | ||
![]() |
ecadde3a65 | ||
![]() |
58d9b3eb19 | ||
![]() |
241d87c011 | ||
![]() |
e340719e5e | ||
![]() |
d171218215 | ||
![]() |
d597983bb9 | ||
![]() |
456a72a36c | ||
![]() |
a1a2d9c2c7 | ||
![]() |
d9750064b9 | ||
![]() |
65a69417cc | ||
![]() |
97c65102b3 | ||
![]() |
c459886fc5 | ||
![]() |
4111dbc967 | ||
![]() |
684dd2d1cb | ||
![]() |
1dd934c8cb | ||
![]() |
9887669ab0 | ||
![]() |
6d63e4443f | ||
![]() |
c08a2fd57c | ||
![]() |
afa17a3df6 | ||
![]() |
8de889df5e | ||
![]() |
d409fb5e2e | ||
![]() |
6caec0249f | ||
![]() |
00644821de | ||
![]() |
5ec147ee40 | ||
![]() |
c19848f990 | ||
![]() |
2174f4a029 | ||
![]() |
cfb2a7aa32 | ||
![]() |
903afe2240 | ||
![]() |
38622ce276 | ||
![]() |
63d0f79847 | ||
![]() |
62f5b2c4e4 | ||
![]() |
fd4ce5afe4 | ||
![]() |
6e6056b9b8 | ||
![]() |
a01cf359eb | ||
![]() |
ce6b9d5931 | ||
![]() |
558fccce98 | ||
![]() |
1952bc4ede | ||
![]() |
94dbcb12dc | ||
![]() |
42f4784735 | ||
![]() |
95e8ade091 | ||
![]() |
5b1658c6b4 | ||
![]() |
17db8e57f0 | ||
![]() |
cd44e78211 | ||
![]() |
f1906d572f | ||
![]() |
d648c8cc42 | ||
![]() |
5708526055 | ||
![]() |
4cc1503d15 | ||
![]() |
1ddb4d025c | ||
![]() |
6444d078eb | ||
![]() |
f878afb82b | ||
![]() |
56c97474b0 | ||
![]() |
34ad1cec3f | ||
![]() |
c1242fa52a | ||
![]() |
a5ecc5c92e | ||
![]() |
5ef5a4f3cf | ||
![]() |
00f0311473 | ||
![]() |
6983adc31d | ||
![]() |
753d97335c | ||
![]() |
2e5b4a6515 | ||
![]() |
07718022b4 | ||
![]() |
471f37158a | ||
![]() |
a5f0e6dcfc | ||
![]() |
5f9576cb22 | ||
![]() |
d4158c2b04 | ||
![]() |
6cad51189d | ||
![]() |
0c03952ca7 | ||
![]() |
42dcc525b1 | ||
![]() |
9df2c3292e | ||
![]() |
eec3684dbd | ||
![]() |
c3355f6df2 | ||
![]() |
aef8f3e7bd | ||
![]() |
88292a6e13 | ||
![]() |
787915155f | ||
![]() |
998bfba4c4 | ||
![]() |
70adb6a502 | ||
![]() |
9f7a0af3e5 | ||
![]() |
0b21818100 | ||
![]() |
8df0d6bba3 | ||
![]() |
bd2f889251 | ||
![]() |
2c7db537cc | ||
![]() |
de3faeeda4 | ||
![]() |
c9f6f6aa31 | ||
![]() |
83196703ee | ||
![]() |
36548ea289 | ||
![]() |
232c80e340 | ||
![]() |
30f946fc4b | ||
![]() |
1b1b400f91 | ||
![]() |
1af7ec7088 | ||
![]() |
1478f64c14 | ||
![]() |
986ea517d1 | ||
![]() |
ab6f578eca | ||
![]() |
9da549ea87 | ||
![]() |
72db2b7147 | ||
![]() |
2c65aa8512 | ||
![]() |
84793e80ff | ||
![]() |
71b4f5f6c0 | ||
![]() |
c9da43378f | ||
![]() |
21d5d909a6 | ||
![]() |
db95651454 | ||
![]() |
b0ecafb731 | ||
![]() |
0034c31820 | ||
![]() |
a0a0e41908 | ||
![]() |
29997da340 | ||
![]() |
7fb52529f8 | ||
![]() |
d22a771c98 | ||
![]() |
08c1865461 | ||
![]() |
14e1d13fe6 | ||
![]() |
a5583485b6 | ||
![]() |
321000b831 | ||
![]() |
bf53f02bb1 | ||
![]() |
ad230d2ca0 | ||
![]() |
7bcc9afd4c | ||
![]() |
62b8f7aaa3 | ||
![]() |
a229640251 | ||
![]() |
3769d82b74 | ||
![]() |
b1e406b5a7 | ||
![]() |
96d212d376 | ||
![]() |
4716a6eb00 | ||
![]() |
b3b16b36a1 | ||
![]() |
dc13793c24 | ||
![]() |
31fdac8773 | ||
![]() |
9bf30e0977 | ||
![]() |
2e96b60120 | ||
![]() |
f968b87385 | ||
![]() |
d6a3a22989 | ||
![]() |
71fbe4ad7d | ||
![]() |
22b5d6b2da | ||
![]() |
1f94c4ed3a | ||
![]() |
3a7bf955c0 | ||
![]() |
ce1bf2503d | ||
![]() |
6fe55ec307 | ||
![]() |
0a7d97df86 | ||
![]() |
cb1a1e233e | ||
![]() |
1b050905e9 | ||
![]() |
bfa269982f | ||
![]() |
004fd02501 | ||
![]() |
8bb79deaa2 | ||
![]() |
99b35a5d08 | ||
![]() |
22546a3f22 | ||
![]() |
4c61013ef2 | ||
![]() |
b7bd836f0f | ||
![]() |
c56efb22a6 | ||
![]() |
169472487e | ||
![]() |
ba8b848f94 | ||
![]() |
6e4a4f4949 | ||
![]() |
ef41bf21cb | ||
![]() |
cdf9da7da4 | ||
![]() |
1b63703ac0 | ||
![]() |
e3ae0103af | ||
![]() |
3f4e7d90cb | ||
![]() |
0d0cf535de | ||
![]() |
cc9889d7ab | ||
![]() |
0198847980 | ||
![]() |
453684b694 | ||
![]() |
b9a9fdaa3f | ||
![]() |
fc345ed249 | ||
![]() |
c65ad1efad | ||
![]() |
28f693a976 | ||
![]() |
e0e2708f4e | ||
![]() |
a6b7af9733 | ||
![]() |
d0f9e4ba81 | ||
![]() |
237418ba0c | ||
![]() |
933a494fe0 | ||
![]() |
e5ff658875 | ||
![]() |
8588c43709 | ||
![]() |
b0f266fad1 | ||
![]() |
314485edfb | ||
![]() |
bd1ceb21d6 | ||
![]() |
b62d0c80e4 | ||
![]() |
1ba42bb70d | ||
![]() |
99dd403ef6 | ||
![]() |
64a1209bb5 | ||
![]() |
f6c9f058e4 | ||
![]() |
8f4250ca45 | ||
![]() |
7318b1fd34 | ||
![]() |
e2dd92c9c1 | ||
![]() |
02fa5e06b2 | ||
![]() |
6c0dfa7053 | ||
![]() |
b1adf65fd0 | ||
![]() |
046f3eef37 | ||
![]() |
562f5f01f6 | ||
![]() |
5a9241076e | ||
![]() |
7d9b84b421 | ||
![]() |
e5e781c4ec | ||
![]() |
ca6c67be68 | ||
![]() |
ad2c229af1 | ||
![]() |
d1c2daf15b | ||
![]() |
19707a54be | ||
![]() |
521ff7cc67 | ||
![]() |
689452e1c9 | ||
![]() |
9c94e5a8df | ||
![]() |
95f6a2342b | ||
![]() |
591fcb6228 | ||
![]() |
bd28c4459d | ||
![]() |
f2eba4cd09 | ||
![]() |
3afa58e8d1 | ||
![]() |
e76df3bb00 | ||
![]() |
671adc0de2 | ||
![]() |
52bfb32cd3 | ||
![]() |
956d10432b | ||
![]() |
397d604182 | ||
![]() |
f8b3ba8253 | ||
![]() |
9a5aa89fb5 | ||
![]() |
dce42313ad | ||
![]() |
9cf9897b16 | ||
![]() |
fdc3b4a685 | ||
![]() |
8d698389e7 | ||
![]() |
4650a12350 | ||
![]() |
b0c55b7394 | ||
![]() |
42be8aadff | ||
![]() |
fd85bcaf21 | ||
![]() |
e10c57623c | ||
![]() |
bacb08acf5 | ||
![]() |
8377fa842f | ||
![]() |
bdd11100bb | ||
![]() |
c5868e9ab1 | ||
![]() |
1f00509705 | ||
![]() |
8dec2485d6 | ||
![]() |
e92b07728f | ||
![]() |
762994654c | ||
![]() |
f16f54a1b1 | ||
![]() |
0f12c8e0dc | ||
![]() |
ebe3a77c2b | ||
![]() |
3fbb384604 | ||
![]() |
8ae013cdb1 | ||
![]() |
2662850ca1 | ||
![]() |
e86fa9f055 | ||
![]() |
517c3cfef9 | ||
![]() |
b9445023c1 | ||
![]() |
431110531b | ||
![]() |
4a1afa66c8 | ||
![]() |
22d397cfe1 | ||
![]() |
9978696991 | ||
![]() |
edcb1e5479 | ||
![]() |
871392f09a | ||
![]() |
b0978652b3 | ||
![]() |
e887fa56d1 | ||
![]() |
ed3e5d3e7d | ||
![]() |
2eb806d20c | ||
![]() |
51bd8f3de5 | ||
![]() |
547ddaa6f5 | ||
![]() |
6454f85397 | ||
![]() |
c71f33f9f8 | ||
![]() |
b6e252c1e3 | ||
![]() |
8d5f196f96 | ||
![]() |
cc717f1183 | ||
![]() |
9ca0513875 | ||
![]() |
b1be0a452e | ||
![]() |
c21d5e780b | ||
![]() |
5e2caa169e | ||
![]() |
5489fb937e | ||
![]() |
c735c88c2d | ||
![]() |
2a222a8f15 | ||
![]() |
f0003da766 | ||
![]() |
416c9ecec0 | ||
![]() |
d9cf3c0805 | ||
![]() |
c98986c622 | ||
![]() |
4829dd2d5d | ||
![]() |
81eb6bf4c0 | ||
![]() |
8b7f426fac | ||
![]() |
e13917adec | ||
![]() |
74723e3e95 | ||
![]() |
866c65e096 | ||
![]() |
6c9a3f0555 | ||
![]() |
9b60f6b767 | ||
![]() |
c1c427a281 | ||
![]() |
94c636fe2b | ||
![]() |
e4020cb591 | ||
![]() |
cb9d08d2ee | ||
![]() |
42e27fb4f7 | ||
![]() |
c3313b13dc | ||
![]() |
5e43c190be | ||
![]() |
62a44c0ca8 | ||
![]() |
a1ca38f30e | ||
![]() |
26663bb2d7 | ||
![]() |
d86c69fc21 | ||
![]() |
8d082a47c6 | ||
![]() |
fe03198211 | ||
![]() |
afec68f639 | ||
![]() |
8111e4ec99 | ||
![]() |
d0d85b2f31 | ||
![]() |
eb17a041ab | ||
![]() |
c0fa2eecd5 | ||
![]() |
f1bba3c2d0 | ||
![]() |
6ba3461738 | ||
![]() |
add08c902d | ||
![]() |
3da626d483 | ||
![]() |
fb5c1310d8 | ||
![]() |
669460da34 | ||
![]() |
f327a44080 | ||
![]() |
c9074c26dc | ||
![]() |
2109b26c15 | ||
![]() |
a134d0c0a3 | ||
![]() |
b243ce894a | ||
![]() |
7fbe6a4097 | ||
![]() |
49fd1e41da | ||
![]() |
80364d85dd | ||
![]() |
158f087d8e | ||
![]() |
91a03eecb3 | ||
![]() |
678369f187 | ||
![]() |
b09b5c6184 | ||
![]() |
731c7dfe12 | ||
![]() |
1149d6cdcd | ||
![]() |
d92be80f77 | ||
![]() |
8e7792d85a | ||
![]() |
6c9a4cb470 | ||
![]() |
9046d30bcf | ||
![]() |
5961313e50 | ||
![]() |
7c26614343 | ||
![]() |
9d3c193bcf | ||
![]() |
430e6e9567 | ||
![]() |
c8f3536694 | ||
![]() |
f7fff58de6 | ||
![]() |
25c9e9347a | ||
![]() |
551ef55535 | ||
![]() |
fdcbe249f9 | ||
![]() |
76418e9be8 | ||
![]() |
244d9957f1 | ||
![]() |
999f026f55 | ||
![]() |
9acd36724d | ||
![]() |
bb03281308 | ||
![]() |
caebbc65b6 | ||
![]() |
45acc19f44 | ||
![]() |
fb88abd992 | ||
![]() |
528b14025f | ||
![]() |
99b3ed55be | ||
![]() |
f549724e36 | ||
![]() |
5cc030e2ad | ||
![]() |
264a11f899 | ||
![]() |
1381b3ca36 | ||
![]() |
35ab9ffdb8 | ||
![]() |
18fd9949a6 | ||
![]() |
68b8bf760a | ||
![]() |
bbac97129e | ||
![]() |
1acaf0111d | ||
![]() |
accb87eddc | ||
![]() |
b523c9c13f | ||
![]() |
9ff64fc6ed | ||
![]() |
fa4a6d4c13 | ||
![]() |
d8c9ae8057 | ||
![]() |
3b1b4a0d26 | ||
![]() |
ddd4190edf | ||
![]() |
84bffd41af | ||
![]() |
027dd9a43c | ||
![]() |
734d81fed1 | ||
![]() |
837fe2a91a | ||
![]() |
6da3e88bd8 | ||
![]() |
4e6438eaf2 | ||
![]() |
51061c0829 | ||
![]() |
dda791c8cb | ||
![]() |
f75729ef41 | ||
![]() |
6b522f50da | ||
![]() |
d23b296627 | ||
![]() |
1fb0f4d143 | ||
![]() |
a0b5403bd8 | ||
![]() |
53ffad767b | ||
![]() |
8993398033 | ||
![]() |
4d9427af44 | ||
![]() |
1e597a885c | ||
![]() |
467979cd8b | ||
![]() |
446b93882c | ||
![]() |
4cc3aad30b | ||
![]() |
a6e773f69b | ||
![]() |
8fccc07259 | ||
![]() |
123755437c | ||
![]() |
2dce66925a | ||
![]() |
e1a5e41ddc | ||
![]() |
f2b76a675a | ||
![]() |
6369e56709 | ||
![]() |
91d6c69565 | ||
![]() |
b93d94bb67 | ||
![]() |
2d0f8f6c0f | ||
![]() |
c4e5a0b190 | ||
![]() |
f33a4ba471 | ||
![]() |
ee43151154 | ||
![]() |
6ad9a6cdf8 | ||
![]() |
3636e35480 | ||
![]() |
d83fbf81f3 | ||
![]() |
e846db0937 | ||
![]() |
c0bbfe8237 | ||
![]() |
13ebd0e1c8 | ||
![]() |
436fca7134 | ||
![]() |
c59e1a2ea9 | ||
![]() |
7a339f45b9 | ||
![]() |
249e8eabab | ||
![]() |
c0b6378e49 | ||
![]() |
8db8e643bb | ||
![]() |
b0cad81f2d | ||
![]() |
a1ba579666 | ||
![]() |
6a5b7ae9f9 | ||
![]() |
976c5e6e2b | ||
![]() |
209a4ff631 | ||
![]() |
053ca45b22 | ||
![]() |
8e05211169 | ||
![]() |
2a1dd00320 | ||
![]() |
b37d322638 | ||
![]() |
a321c85a29 | ||
![]() |
c2d31b14f7 | ||
![]() |
f4beeeb7e1 | ||
![]() |
865ecfb159 | ||
![]() |
6261cc5f18 | ||
![]() |
0fbf0343b9 | ||
![]() |
220ee74abe | ||
![]() |
0435a3639d | ||
![]() |
db250c4cf9 | ||
![]() |
12927d0e8b | ||
![]() |
fe8a2fd801 | ||
![]() |
fce78e65b3 | ||
![]() |
2ad4ca6776 | ||
![]() |
f9d224929c | ||
![]() |
73a010841f | ||
![]() |
d60185045c | ||
![]() |
423feb1e21 | ||
![]() |
cfc28ee82a | ||
![]() |
091db74ab6 | ||
![]() |
57a156351d | ||
![]() |
ef8f42f5b0 | ||
![]() |
43742a9205 | ||
![]() |
5f1d902432 | ||
![]() |
63c901f26d | ||
![]() |
7f01f8e8a5 | ||
![]() |
9928bb4395 | ||
![]() |
b773c328d2 | ||
![]() |
8e7fa0f706 | ||
![]() |
ba661e009b | ||
![]() |
f378aa1b7a | ||
![]() |
fb9a6a0484 | ||
![]() |
3385eeb32f | ||
![]() |
d3c03ee793 | ||
![]() |
00ef691ff2 | ||
![]() |
23e2b806a2 | ||
![]() |
37814da758 | ||
![]() |
02de19eb6f | ||
![]() |
61f1c1406c | ||
![]() |
ae3c87c106 | ||
![]() |
796b0796f4 | ||
![]() |
7d60d6d885 | ||
![]() |
9571b33f40 | ||
![]() |
6632070f75 | ||
![]() |
89d99b92da | ||
![]() |
2a542b3966 | ||
![]() |
c1d05fa694 | ||
![]() |
adbeebabaf | ||
![]() |
5ef6a2662d | ||
![]() |
1d9e2003ac | ||
![]() |
b8055ffaa5 | ||
![]() |
c3d1c9967f | ||
![]() |
490b10483a | ||
![]() |
b1d8d77b78 | ||
![]() |
08c406bcff | ||
![]() |
9f1489030c | ||
![]() |
d652ea0d52 | ||
![]() |
08a40b5998 | ||
![]() |
92e9ac99f5 | ||
![]() |
2a354af4e3 | ||
![]() |
cb1c9aabe6 | ||
![]() |
efbd424ec0 | ||
![]() |
b3887f37d3 | ||
![]() |
03751ec33a | ||
![]() |
a10e570edd | ||
![]() |
6933512ec2 | ||
![]() |
75ceafbf51 | ||
![]() |
5ad76a703d | ||
![]() |
1b6f2356e7 | ||
![]() |
c431d34955 | ||
![]() |
8e617a6e5b | ||
![]() |
3d46070994 | ||
![]() |
56a8886525 | ||
![]() |
6a2e75c454 | ||
![]() |
bbfdc73e5d | ||
![]() |
29d86bcaac | ||
![]() |
f23b6f8d46 | ||
![]() |
86a410dc0c | ||
![]() |
3da4b863cf | ||
![]() |
00893cbd3f | ||
![]() |
0acb35ddbb | ||
![]() |
2de9cf42eb | ||
![]() |
4a82b01845 | ||
![]() |
9de3f8b87f | ||
![]() |
88551aa8c6 | ||
![]() |
dfac49e597 | ||
![]() |
6211f43b29 | ||
![]() |
e88c746c3c | ||
![]() |
4418442d33 | ||
![]() |
81b74f9545 | ||
![]() |
a38834ebf2 | ||
![]() |
83df895eb8 | ||
![]() |
bdddd3c80d | ||
![]() |
44260da512 | ||
![]() |
c239ef7327 | ||
![]() |
b23108c4d4 | ||
![]() |
c3ce72e229 | ||
![]() |
a01e93b515 | ||
![]() |
b5ab2b66d6 | ||
![]() |
515b31ff44 | ||
![]() |
047c8bd85a | ||
![]() |
488fda33e4 | ||
![]() |
f475997263 | ||
![]() |
ed15636bfc | ||
![]() |
838a58ee84 | ||
![]() |
0c96946bdd | ||
![]() |
fe132b0cb6 | ||
![]() |
c12902b36e | ||
![]() |
e4af0cac26 | ||
![]() |
f092262df7 | ||
![]() |
678f0e9136 | ||
![]() |
81b8f8961b | ||
![]() |
539c32205e | ||
![]() |
9650129c86 | ||
![]() |
acc484f146 | ||
![]() |
b579bda4b3 | ||
![]() |
49ccf968d0 | ||
![]() |
6d99e5b268 | ||
![]() |
7678d59f14 | ||
![]() |
7767fe730d | ||
![]() |
fdd9631304 | ||
![]() |
1aee96df7d | ||
![]() |
b46e39d5eb | ||
![]() |
6e62de29ed | ||
![]() |
72864cdd93 | ||
![]() |
eb10901579 | ||
![]() |
d4adf3db45 | ||
![]() |
b42b058941 | ||
![]() |
7e762b6694 | ||
![]() |
97281eddc6 | ||
![]() |
643fcd20e1 | ||
![]() |
dc696a2385 | ||
![]() |
fefa1c520a | ||
![]() |
7b7e158b5a | ||
![]() |
8f1553919f | ||
![]() |
02f968085e | ||
![]() |
33cbe67156 | ||
![]() |
8353db2882 | ||
![]() |
f567fe3589 | ||
![]() |
8191f8b7ad | ||
![]() |
cb907d7eec | ||
![]() |
9ac14af3fc | ||
![]() |
3b984b6566 | ||
![]() |
ab575666ce | ||
![]() |
d86f9cdc4c | ||
![]() |
c66558badb | ||
![]() |
0c9af219db | ||
![]() |
60fe855cf7 | ||
![]() |
52ac9d616e | ||
![]() |
eba91e16bd | ||
![]() |
9e0e4327f1 | ||
![]() |
7117fd4e2c | ||
![]() |
4e8f41dcaf | ||
![]() |
7380ec5e0e | ||
![]() |
9f37438fe0 | ||
![]() |
fce59c1521 | ||
![]() |
4381f1eb24 | ||
![]() |
e1814d5686 | ||
![]() |
7fdf264e1d | ||
![]() |
979299850e | ||
![]() |
03a0dbd9fd | ||
![]() |
1e1d92d311 | ||
![]() |
633ec1faf5 | ||
![]() |
38f585181e | ||
![]() |
79a884aa43 | ||
![]() |
7d7c7eac78 | ||
![]() |
6762c6105a | ||
![]() |
90f45301b8 | ||
![]() |
0de368db23 | ||
![]() |
4f0c0ad3df | ||
![]() |
7824b84d6c | ||
![]() |
7faccf058a | ||
![]() |
ec06cc8428 | ||
![]() |
b0dbcfeb31 | ||
![]() |
6aec40ebfb | ||
![]() |
c6e34673ee | ||
![]() |
02cafbccb6 | ||
![]() |
3effe69d78 | ||
![]() |
a536f2adeb | ||
![]() |
049bf5d3b1 | ||
![]() |
16509fa8e8 | ||
![]() |
8453e44798 | ||
![]() |
29369130ed | ||
![]() |
b29b18178b | ||
![]() |
51e419cfc2 | ||
![]() |
74702c1f94 | ||
![]() |
ba1038998f | ||
![]() |
65ece182a7 | ||
![]() |
7ff04c1dfa | ||
![]() |
11c41cb89b | ||
![]() |
48f4bed9aa | ||
![]() |
92481e65d3 | ||
![]() |
d7bf6b1971 | ||
![]() |
15802ad775 | ||
![]() |
f9487b6168 | ||
![]() |
9101bccd5b | ||
![]() |
88c3578e52 | ||
![]() |
784ab3a94d | ||
![]() |
6ac10d087a | ||
![]() |
b94fd95bbf | ||
![]() |
f35ba28b1f | ||
![]() |
58eddf2373 | ||
![]() |
758ee94a41 | ||
![]() |
7d24faace5 | ||
![]() |
15430e3fce | ||
![]() |
d0d458e1a3 | ||
![]() |
dfa0381b92 | ||
![]() |
444cabd8c8 | ||
![]() |
d90a7c4e47 | ||
![]() |
331b6a99cd | ||
![]() |
afe7f46d35 | ||
![]() |
e1bb8f5d6c | ||
![]() |
7ce8c7c434 | ||
![]() |
103cb2bfa6 | ||
![]() |
0a855e73cf | ||
![]() |
6f1faa8e8f | ||
![]() |
8eae769bd1 | ||
![]() |
6ebcb502de | ||
![]() |
007d3fe205 | ||
![]() |
635d79c7c3 | ||
![]() |
1c9e007ae1 | ||
![]() |
8fed20859a | ||
![]() |
b3553a342f | ||
![]() |
f81a9a5cac | ||
![]() |
181c8ea6df | ||
![]() |
b4613332a3 | ||
![]() |
0203850c3c | ||
![]() |
8dfb089fc2 | ||
![]() |
b51a206bf5 | ||
![]() |
ae6ce5f2fa | ||
![]() |
15ff40050c | ||
![]() |
efb0be60c8 | ||
![]() |
eb09070c98 | ||
![]() |
4acbf22ae9 | ||
![]() |
6b5cd82d29 | ||
![]() |
c447b25384 | ||
![]() |
2214acbb94 | ||
![]() |
be324be798 | ||
![]() |
377b06a352 | ||
![]() |
3e1e9a6357 | ||
![]() |
3a67e505ba | ||
![]() |
b67856a397 | ||
![]() |
b7f32c3cf3 | ||
![]() |
05a7459d8e | ||
![]() |
7ef3b0c72a | ||
![]() |
47148430d2 | ||
![]() |
7864208102 | ||
![]() |
883be71ec5 | ||
![]() |
0c73551845 | ||
![]() |
fbb5723ba3 | ||
![]() |
f92a8c4e45 | ||
![]() |
5a758b6ecc | ||
![]() |
ff56800079 | ||
![]() |
b63d902657 | ||
![]() |
4ebcdce773 | ||
![]() |
1c93e0f023 | ||
![]() |
e6275c3b69 | ||
![]() |
3ef406b5c6 | ||
![]() |
a8b472d4c4 | ||
![]() |
04efdd405d | ||
![]() |
986ec9297b | ||
![]() |
a62b3559de | ||
![]() |
f2627708e9 | ||
![]() |
81f9d66ca1 | ||
![]() |
e828d319f8 | ||
![]() |
f4abd52fa7 | ||
![]() |
ea5ef3ff51 | ||
![]() |
4cdad9dec2 | ||
![]() |
71a343ca03 | ||
![]() |
2837513428 | ||
![]() |
8254cd3d98 | ||
![]() |
04d012960f | ||
![]() |
0416b4a5ff | ||
![]() |
bd9cf60613 | ||
![]() |
072bc1110c | ||
![]() |
7b40eb66b7 | ||
![]() |
45310eee82 | ||
![]() |
58ce10c2ee | ||
![]() |
cdbe3e0aaf | ||
![]() |
4af90112d0 | ||
![]() |
77833ba35b | ||
![]() |
d9ee32c7f3 | ||
![]() |
0e41a56b70 | ||
![]() |
0d0c10d9c4 | ||
![]() |
e37893aa04 | ||
![]() |
213f2024a0 | ||
![]() |
0a2edd7045 | ||
![]() |
92358cb553 | ||
![]() |
518051a4b3 | ||
![]() |
e3c806296d | ||
![]() |
58ad235030 | ||
![]() |
ab5c430480 | ||
![]() |
7d931543f6 | ||
![]() |
3822cad523 | ||
![]() |
a1d0fe9fe1 | ||
![]() |
ab3a963a1b | ||
![]() |
8bde42b9d5 | ||
![]() |
caa7435c1a | ||
![]() |
a66f244fd9 | ||
![]() |
3fd203d3d5 | ||
![]() |
1f8820eeaf | ||
![]() |
e128f02d8d | ||
![]() |
a49b615b9a | ||
![]() |
0f309cd525 | ||
![]() |
77a70d3e52 | ||
![]() |
e9b40d3e69 | ||
![]() |
b0e565e19b | ||
![]() |
e8bd0b51c6 | ||
![]() |
ad2b0c6587 | ||
![]() |
bd39158cab | ||
![]() |
02fb754fac | ||
![]() |
d728e9118d | ||
![]() |
e97bb74005 | ||
![]() |
ee16347918 | ||
![]() |
b2e68957cd | ||
![]() |
0deb045dde | ||
![]() |
12592019cd | ||
![]() |
cde0a28779 | ||
![]() |
55edebebbd | ||
![]() |
80dd8d58f7 | ||
![]() |
81b3b34895 | ||
![]() |
06eb0e67e2 | ||
![]() |
cb9baa4f4d | ||
![]() |
c13876971b | ||
![]() |
22acfa3cba | ||
![]() |
ea00418cfe | ||
![]() |
3c01f128b9 | ||
![]() |
39f5f77fd4 | ||
![]() |
e8f889eb05 | ||
![]() |
8a061420d0 | ||
![]() |
95d818431b | ||
![]() |
a951303303 | ||
![]() |
d668029836 | ||
![]() |
51f0506e7e | ||
![]() |
0731559f69 | ||
![]() |
3b9e13b38f | ||
![]() |
bbc7d243e9 | ||
![]() |
d003549257 | ||
![]() |
85715ca473 | ||
![]() |
03c5a46331 | ||
![]() |
0dd947ab15 | ||
![]() |
91b048020e | ||
![]() |
e023d133e7 | ||
![]() |
7c864d188f | ||
![]() |
ad98dc0ddf | ||
![]() |
191874f50f | ||
![]() |
7d47105aac | ||
![]() |
eeace01d3b | ||
![]() |
4807353e8d | ||
![]() |
5eaf286081 | ||
![]() |
639af63b3f | ||
![]() |
f6441369d9 | ||
![]() |
d9f2ed0abc | ||
![]() |
841bbb465d | ||
![]() |
462f389bb2 | ||
![]() |
3c46e5fdc6 | ||
![]() |
3fcc8dc945 | ||
![]() |
bf4ad3fdb6 | ||
![]() |
a8aec864b9 | ||
![]() |
4be962e720 | ||
![]() |
359eb87abb | ||
![]() |
fd364dc2de | ||
![]() |
45ee870f98 | ||
![]() |
767cae7e20 | ||
![]() |
c9f62c0bc5 | ||
![]() |
95e0451656 | ||
![]() |
5139f5e8d6 | ||
![]() |
c33561e005 | ||
![]() |
ae29015ee7 | ||
![]() |
d0f469f166 | ||
![]() |
ac6210c42e | ||
![]() |
7afd70f96e | ||
![]() |
4b4a17b3c6 | ||
![]() |
197004495a | ||
![]() |
51cf8696b3 | ||
![]() |
5868d51521 | ||
![]() |
6a69441d84 | ||
![]() |
1b243ce46b | ||
![]() |
32da9b50bb | ||
![]() |
db82f0dd43 | ||
![]() |
95ed87abd4 | ||
![]() |
51972b8036 | ||
![]() |
98fa97ae26 | ||
![]() |
9741ae6d98 | ||
![]() |
f2dbacc73f | ||
![]() |
a0837b2453 | ||
![]() |
43ad58579f | ||
![]() |
dbe90fa15e | ||
![]() |
02d466aec0 | ||
![]() |
ee5fdf3771 | ||
![]() |
90583ce572 | ||
![]() |
aae4950f02 | ||
![]() |
f751553b48 | ||
![]() |
e6d06d9bd5 | ||
![]() |
6feb946842 | ||
![]() |
83d3a6d984 | ||
![]() |
97f880fb94 | ||
![]() |
b232bb25ac | ||
![]() |
42503882a8 | ||
![]() |
609cd0e81b | ||
![]() |
cd5e01e03c | ||
![]() |
1d9be26746 | ||
![]() |
1963cc91b7 | ||
![]() |
52fa72bd6b | ||
![]() |
cce647bd8f | ||
![]() |
ad78dea87a | ||
![]() |
02759a74df | ||
![]() |
26326b6235 | ||
![]() |
7631e920bc | ||
![]() |
9d2461bca5 | ||
![]() |
7d7888d2ba | ||
![]() |
a849681b7d | ||
![]() |
8f9006e82e | ||
![]() |
853e6d7827 | ||
![]() |
701a815db1 | ||
![]() |
9f5362d806 | ||
![]() |
569f5e20a9 | ||
![]() |
c626b6fc7c | ||
![]() |
c663b1e957 | ||
![]() |
278f090e83 | ||
![]() |
1431714123 | ||
![]() |
d0f1f6fa23 | ||
![]() |
e143a3af4f | ||
![]() |
3e399465aa | ||
![]() |
eadd27b8d0 | ||
![]() |
185aa9c20a | ||
![]() |
6728cc4597 | ||
![]() |
96dfe15d91 | ||
![]() |
120ab7af22 | ||
![]() |
944338b0f6 | ||
![]() |
1a0336d99b | ||
![]() |
e16b530ded | ||
![]() |
2add6a09dc | ||
![]() |
932ab5feab | ||
![]() |
1161087456 | ||
![]() |
d622961559 | ||
![]() |
dd20d04fff | ||
![]() |
77ba4327f7 | ||
![]() |
55e9e0ddd7 | ||
![]() |
053734c4c8 | ||
![]() |
9dfe50c8cf | ||
![]() |
c75da5fd97 | ||
![]() |
62e93cf2a4 | ||
![]() |
b342b9b044 | ||
![]() |
eec721ff4c | ||
![]() |
c2e489dc78 | ||
![]() |
6a6f849c5c | ||
![]() |
55405d017b | ||
![]() |
844402b102 | ||
![]() |
eaed2b9eaf | ||
![]() |
481f10a622 | ||
![]() |
32d8828ab5 | ||
![]() |
1f9a6339e4 | ||
![]() |
d6dad89d3a | ||
![]() |
2f65de9812 | ||
![]() |
b5181ff032 | ||
![]() |
205c99022d | ||
![]() |
ae33722071 | ||
![]() |
d3a49471f7 | ||
![]() |
f90858601d | ||
![]() |
15cd89c4af | ||
![]() |
333c1506a9 | ||
![]() |
a8092eea36 | ||
![]() |
54f8c69298 | ||
![]() |
f9c5f5dbe3 | ||
![]() |
dfc0ca2908 | ||
![]() |
7c644a8eac | ||
![]() |
1ca7b10829 | ||
![]() |
f17d94056f | ||
![]() |
ee407d6610 | ||
![]() |
13e715ef44 | ||
![]() |
87373a2e0c | ||
![]() |
805b8627f3 | ||
![]() |
1955c935ff | ||
![]() |
a8ef109b6e | ||
![]() |
9f2fba9625 | ||
![]() |
b3fd71415d | ||
![]() |
67404ee615 | ||
![]() |
ad323a2665 | ||
![]() |
a3b9b386fe | ||
![]() |
80de0713e8 | ||
![]() |
5b5c803b8c | ||
![]() |
24c47fb793 | ||
![]() |
0ccf9ccd71 | ||
![]() |
00134af67b | ||
![]() |
e0be19cac1 | ||
![]() |
37f822ccb2 | ||
![]() |
74c7025e6e | ||
![]() |
c428f6cafe | ||
![]() |
5f064063f5 | ||
![]() |
e5b1e20529 | ||
![]() |
aae51fbb87 | ||
![]() |
8ae1cd0c3e | ||
![]() |
345f30f7e5 | ||
![]() |
969c0f4d58 | ||
![]() |
8392dd8fa4 | ||
![]() |
b8122efb82 | ||
![]() |
7e97041b8d | ||
![]() |
6b8a9b0861 | ||
![]() |
7aac10e938 | ||
![]() |
e0e144e210 | ||
![]() |
1f2e1c6647 | ||
![]() |
52163c7f17 | ||
![]() |
4830a2d141 | ||
![]() |
d2ad91ae38 | ||
![]() |
be19dcb79d | ||
![]() |
aa0d3e18ae | ||
![]() |
4c5dfd88af | ||
![]() |
428d1d383d | ||
![]() |
1f08f65282 | ||
![]() |
4d82ab734e | ||
![]() |
785033b880 | ||
![]() |
78d5856d4d | ||
![]() |
070d86473d | ||
![]() |
b8fe95cd26 | ||
![]() |
a5f557b90e | ||
![]() |
46f22d2882 | ||
![]() |
b816da148d | ||
![]() |
b63f532735 | ||
![]() |
4379002ddc | ||
![]() |
ae4b770939 | ||
![]() |
817b3186d9 | ||
![]() |
1d54bf17a5 | ||
![]() |
1b3843bd9c | ||
![]() |
7fbbc1b527 | ||
![]() |
21c34d29d4 | ||
![]() |
f38ec26ea5 | ||
![]() |
33624300a8 | ||
![]() |
9bebb5a98d | ||
![]() |
03593e433b | ||
![]() |
58ec991bd1 | ||
![]() |
646061cf40 | ||
![]() |
1adbeaa73f | ||
![]() |
4b9635cb70 | ||
![]() |
98c8c339e6 | ||
![]() |
f907cbf361 | ||
![]() |
aee68bb788 | ||
![]() |
c998fe85e9 | ||
![]() |
2efb39c391 | ||
![]() |
f7c42c1e6a | ||
![]() |
7c32e885f3 | ||
![]() |
ad67592f98 | ||
![]() |
bb6903c6bf | ||
![]() |
8e7a64be3f | ||
![]() |
b662bdef4c | ||
![]() |
d8dae45321 | ||
![]() |
9b95b87049 | ||
![]() |
99c7fa04e2 | ||
![]() |
78faf5e6d6 | ||
![]() |
b4ec84d1a9 | ||
![]() |
8e53d9458b | ||
![]() |
c1d54547d8 | ||
![]() |
b6a4c4ed65 | ||
![]() |
3128c02641 | ||
![]() |
1325701f82 | ||
![]() |
6887ead2c5 | ||
![]() |
c64f9c5582 | ||
![]() |
5b322e2bd7 | ||
![]() |
d35c8cac36 | ||
![]() |
2cd7824462 | ||
![]() |
4fc9ef6316 | ||
![]() |
c919d0df5f | ||
![]() |
405f94f6fc | ||
![]() |
a616f14181 | ||
![]() |
a5c309a12b | ||
![]() |
6a9fe98a22 | ||
![]() |
aa49f6b2de | ||
![]() |
d19d9eb8f7 | ||
![]() |
684a88a0e8 | ||
![]() |
304e5247ed | ||
![]() |
7b264d5089 | ||
![]() |
2fd3353508 | ||
![]() |
cac230bc93 | ||
![]() |
a6bd87b632 | ||
![]() |
2da4caee6c | ||
![]() |
f0add80ef2 | ||
![]() |
cc82e80835 | ||
![]() |
2e344d9137 | ||
![]() |
3e79a47bfd | ||
![]() |
4c1a8c8321 | ||
![]() |
46f7907aca | ||
![]() |
3b0c151ba1 | ||
![]() |
76b1f30a2f | ||
![]() |
732ec40e10 | ||
![]() |
d5d36523f5 | ||
![]() |
12ab929e59 | ||
![]() |
50c18d0b92 | ||
![]() |
fa984eb710 | ||
![]() |
c9e6b6cd0a | ||
![]() |
367c055644 | ||
![]() |
fc1a05de68 | ||
![]() |
dc8bf19a52 | ||
![]() |
4305d5eaa0 | ||
![]() |
de34946306 | ||
![]() |
a714e5c02a | ||
![]() |
28316d5205 | ||
![]() |
97a22c0320 | ||
![]() |
51c4e1f2d8 | ||
![]() |
8c6fbadb8c | ||
![]() |
a0686e07c1 | ||
![]() |
a42c49472e | ||
![]() |
9ed60bcafa | ||
![]() |
0fcf163a4d | ||
![]() |
4baa63802a | ||
![]() |
f0906d3131 | ||
![]() |
d650fa8fdd | ||
![]() |
d898152fa1 | ||
![]() |
6e479fda65 | ||
![]() |
abd90494f9 | ||
![]() |
3832a4ae1a | ||
![]() |
9136b6b85d | ||
![]() |
7516285c61 | ||
![]() |
e5aee8eedd | ||
![]() |
e3c66c9d47 | ||
![]() |
c5b4be68d5 | ||
![]() |
f95ba34192 | ||
![]() |
5d8ca32454 | ||
![]() |
3562d9f416 | ||
![]() |
21a504a86c | ||
![]() |
6d26d894e1 | ||
![]() |
699d7e2583 | ||
![]() |
0c18f10bf8 | ||
![]() |
3b650e1e15 | ||
![]() |
38e685e68f | ||
![]() |
2439114095 | ||
![]() |
1b7935c819 | ||
![]() |
2d1e7602c1 | ||
![]() |
ab1cebd148 | ||
![]() |
66b8a274d7 | ||
![]() |
e489b59124 | ||
![]() |
b1aeeac4a9 | ||
![]() |
06aeb59448 | ||
![]() |
11341711ff | ||
![]() |
4e9963b06b | ||
![]() |
1d0a044921 | ||
![]() |
95420f055d | ||
![]() |
bf222f9bc2 | ||
![]() |
7d589dfcff | ||
![]() |
8caf639791 | ||
![]() |
57312ea2d5 | ||
![]() |
3b13ccd8fe | ||
![]() |
cd3f1c8707 | ||
![]() |
0a8691e0bb | ||
![]() |
5b767d0b08 | ||
![]() |
918f16c1aa | ||
![]() |
0500950bc1 | ||
![]() |
dd550f0a77 | ||
![]() |
303b647cc3 | ||
![]() |
926459b339 | ||
![]() |
57d491ad1e | ||
![]() |
00a530a3d8 | ||
![]() |
7bb5dd7c67 | ||
![]() |
bd5bfaba1c | ||
![]() |
c350bac4dd | ||
![]() |
cde9437405 | ||
![]() |
0d40ac7b7f | ||
![]() |
a724fe6a00 | ||
![]() |
9cc0f1b7cd | ||
![]() |
4fea8ef742 | ||
![]() |
e3adf55ef1 | ||
![]() |
bf3aa92f31 | ||
![]() |
47596db0d2 | ||
![]() |
c53917fa4f | ||
![]() |
8432051c18 | ||
![]() |
0e41ae2e49 | ||
![]() |
34af15866c | ||
![]() |
2a6f851d43 | ||
![]() |
a309f0efe4 | ||
![]() |
66ad436925 | ||
![]() |
c3ee691e9d | ||
![]() |
5730650642 | ||
![]() |
0150fc24ed | ||
![]() |
25ac110c4f | ||
![]() |
8b1b6eec7f | ||
![]() |
67030288cd | ||
![]() |
128081a8e9 | ||
![]() |
9794d09d56 | ||
![]() |
42ec054ab9 | ||
![]() |
8b65f4ac26 | ||
![]() |
9ed7e7ba98 | ||
![]() |
ba41523036 | ||
![]() |
436c1a119a | ||
![]() |
19a098a7fa | ||
![]() |
da32616652 | ||
![]() |
a290d88c64 | ||
![]() |
9b6503df48 | ||
![]() |
6bbd79d0b7 | ||
![]() |
806cd0426f | ||
![]() |
a9acd2b5a3 | ||
![]() |
8083829c5e | ||
![]() |
e82eaf4ccd | ||
![]() |
25639e8fa5 | ||
![]() |
5117b92673 | ||
![]() |
a789e2bc7b | ||
![]() |
716a4f783e | ||
![]() |
3a067e9495 | ||
![]() |
a37ecf0b23 | ||
![]() |
8e59e04b24 | ||
![]() |
4f844dce58 | ||
![]() |
876d31975b | ||
![]() |
6e98f88320 | ||
![]() |
500974878b | ||
![]() |
aab2ad2f30 | ||
![]() |
afca02b65f | ||
![]() |
0972f7505c | ||
![]() |
eb0532306e | ||
![]() |
b3de60d674 | ||
![]() |
708357dafc | ||
![]() |
c44e2cea9e | ||
![]() |
a2320e7bd8 | ||
![]() |
98e7107573 | ||
![]() |
cc5ca119f8 | ||
![]() |
fdd76454d9 | ||
![]() |
abdb9918fe | ||
![]() |
9b4f372c3a | ||
![]() |
526f33ab6b | ||
![]() |
e8aee3d9a7 | ||
![]() |
07db7e777d | ||
![]() |
d93d687e0e | ||
![]() |
188d033252 | ||
![]() |
34bf7f52a0 | ||
![]() |
88a4e688bf | ||
![]() |
7678dce81b | ||
![]() |
50108948b0 | ||
![]() |
596f8380ba | ||
![]() |
067b2a2f25 | ||
![]() |
0e8e8692a6 | ||
![]() |
a15e4c8b84 | ||
![]() |
f404932b10 | ||
![]() |
ea42dbd423 | ||
![]() |
832a30bfb4 | ||
![]() |
7ca4d19282 | ||
![]() |
2d53c7cfb8 | ||
![]() |
755a287571 | ||
![]() |
553733c465 | ||
![]() |
34fe3cea91 | ||
![]() |
8a091a5d77 | ||
![]() |
9b958bd56a | ||
![]() |
f14fa1aaab | ||
![]() |
ab755d6138 | ||
![]() |
a578b3cfa6 | ||
![]() |
6f145ee624 | ||
![]() |
e4ad919f65 | ||
![]() |
a79b32c87b | ||
![]() |
42c11db0ff | ||
![]() |
3c2a10cc05 | ||
![]() |
df196343cb | ||
![]() |
1aa9eabee4 | ||
![]() |
a148d4e547 | ||
![]() |
948669c76e | ||
![]() |
db3fe62e39 | ||
![]() |
aa04fe03f3 | ||
![]() |
7de7d761ff | ||
![]() |
317337e409 | ||
![]() |
dc9a0507f5 | ||
![]() |
53e4c2b0aa | ||
![]() |
0237eb4442 | ||
![]() |
3996eefb9a | ||
![]() |
6b33e9615e | ||
![]() |
df4458f899 | ||
![]() |
c276d448fe | ||
![]() |
44098e1093 | ||
![]() |
e6fc4d4027 | ||
![]() |
7cc0a1760d | ||
![]() |
4d097b7bfc | ||
![]() |
067dc55727 | ||
![]() |
4b36ecd467 | ||
![]() |
d5aa14a5bd | ||
![]() |
045d90b85b | ||
![]() |
f970162284 | ||
![]() |
7af0ccb668 | ||
![]() |
0f76b637db | ||
![]() |
311bc577fc | ||
![]() |
86dc2640bc | ||
![]() |
3fe714427c | ||
![]() |
e0455bc329 | ||
![]() |
cb4f6b5e6e | ||
![]() |
25540a9279 | ||
![]() |
db3d3052bf | ||
![]() |
8d3c0e6665 | ||
![]() |
772b263eb3 | ||
![]() |
1a8d0070b7 | ||
![]() |
18ac669ebc | ||
![]() |
2e9d470935 | ||
![]() |
bdd9fc9b2f | ||
![]() |
b69a2ea5b8 | ||
![]() |
6a81603ede | ||
![]() |
6a82852338 | ||
![]() |
c922f1be91 | ||
![]() |
fc4358a088 | ||
![]() |
4ba4bc9a9a | ||
![]() |
868d42f2a8 | ||
![]() |
c409780dd7 | ||
![]() |
79ae709d16 | ||
![]() |
b227a832d0 | ||
![]() |
6cec0bd74d | ||
![]() |
b087b10700 | ||
![]() |
a10cebff2e | ||
![]() |
9d4deab7b5 | ||
![]() |
bd5e284145 | ||
![]() |
8030d5c63b | ||
![]() |
b1c4a712a8 | ||
![]() |
dff35f8603 | ||
![]() |
89b0be8e87 | ||
![]() |
e2730ac136 | ||
![]() |
943232f7ca | ||
![]() |
bd53af6570 | ||
![]() |
8fb66d6b82 | ||
![]() |
8c7451273e | ||
![]() |
0eb3014db9 | ||
![]() |
eff2d15f62 | ||
![]() |
41a8e116c7 | ||
![]() |
147b3ed23e | ||
![]() |
6d9886f436 | ||
![]() |
8ebd6ff0da | ||
![]() |
800aed2f82 | ||
![]() |
0a0ab9fcd8 | ||
![]() |
db092b517c | ||
![]() |
047cde58e9 | ||
![]() |
e0eb397a87 | ||
![]() |
9a770b7dbe | ||
![]() |
6b82080917 | ||
![]() |
6fe4561fa3 | ||
![]() |
a1d43601c2 | ||
![]() |
c87684a141 | ||
![]() |
41243281d4 | ||
![]() |
b80094cf12 | ||
![]() |
9107f0c35d | ||
![]() |
cedf20de42 | ||
![]() |
dceefe60b7 | ||
![]() |
ab0ec8ef5d | ||
![]() |
d9361d5a4a | ||
![]() |
8fae6f71f0 | ||
![]() |
91bd1cc28d | ||
![]() |
a0c6174868 | ||
![]() |
30ac911898 | ||
![]() |
e165e6b726 | ||
![]() |
e8da143d93 | ||
![]() |
c41bad8dd4 | ||
![]() |
d3d5f84bf6 | ||
![]() |
bf7e031403 | ||
![]() |
e24ab2158d | ||
![]() |
cbcda73036 | ||
![]() |
b8aaed8f42 | ||
![]() |
866e43cf4c | ||
![]() |
d84fccb4f0 | ||
![]() |
f8aa46a859 | ||
![]() |
0e1ca2f6e6 | ||
![]() |
067bdd3100 | ||
![]() |
145f4efec6 | ||
![]() |
11066aa53d | ||
![]() |
f3a3cd6605 | ||
![]() |
dbbed8f02c | ||
![]() |
d6b1760d68 | ||
![]() |
5b9c560b66 | ||
![]() |
f3889f341e | ||
![]() |
f3a76d6851 | ||
![]() |
04a3da9994 | ||
![]() |
3b38ee00be | ||
![]() |
95da566d39 | ||
![]() |
b0ce6ac5b0 | ||
![]() |
9c6da083e4 | ||
![]() |
bd8a40ca73 | ||
![]() |
619a309d1b | ||
![]() |
61a6fdeeeb | ||
![]() |
deca828ba6 | ||
![]() |
b64702832b | ||
![]() |
6816de50a4 | ||
![]() |
d30eb0f299 | ||
![]() |
04ecdd4281 | ||
![]() |
33f070b826 | ||
![]() |
b6429f88a7 | ||
![]() |
2f956ee531 | ||
![]() |
426582117c | ||
![]() |
ae621ddd83 | ||
![]() |
549c0585aa | ||
![]() |
f45a994a2a | ||
![]() |
f1bdba38c9 | ||
![]() |
f577617b2d | ||
![]() |
37a0969025 | ||
![]() |
6873e8698a | ||
![]() |
3b96f6069f | ||
![]() |
05b3a0cab1 | ||
![]() |
a450ad9490 | ||
![]() |
6f5839998d | ||
![]() |
0535cf3a07 | ||
![]() |
139f8c8e15 | ||
![]() |
f572bc2262 | ||
![]() |
576769bc3e | ||
![]() |
32cc78b2c8 | ||
![]() |
2614f4064c | ||
![]() |
558dfe6a63 | ||
![]() |
addf8be57a | ||
![]() |
fde4603d21 | ||
![]() |
dcf5a21723 | ||
![]() |
bd9415998e | ||
![]() |
21e3121848 | ||
![]() |
b917d67cde | ||
![]() |
fd5b880c0c | ||
![]() |
26fcef0c0c | ||
![]() |
08e1bc7f5f | ||
![]() |
dd45c93448 | ||
![]() |
d48c05550e | ||
![]() |
5c82f510da | ||
![]() |
d5424211cb | ||
![]() |
b59f6273b0 | ||
![]() |
186baf4aa3 | ||
![]() |
1a81b3da0f | ||
![]() |
932f8b3bbc | ||
![]() |
9a59a79ac3 | ||
![]() |
1bc83a43e6 | ||
![]() |
2b8cac5a8d | ||
![]() |
8eb2df7295 | ||
![]() |
c77d7ae67d | ||
![]() |
a53c5525f5 | ||
![]() |
f4c9a0b4e7 | ||
![]() |
2b35989012 | ||
![]() |
5800483dfd | ||
![]() |
8155b8485a | ||
![]() |
44197c8565 | ||
![]() |
4ca4d82a75 | ||
![]() |
3b6b856e3d | ||
![]() |
52ea5b868a | ||
![]() |
3aad0a1539 | ||
![]() |
536f87f7c1 | ||
![]() |
bc40d08dc6 | ||
![]() |
5df833e306 | ||
![]() |
a873589fdc | ||
![]() |
cf67831cbe | ||
![]() |
37d20338bd | ||
![]() |
598a4a009a | ||
![]() |
f4237740b3 | ||
![]() |
60b09c2a2c | ||
![]() |
e339e5174b |
.travis.ymlINSTALL.txtMakefileREADME.mdREADME.txtappveyor.yml
pkgs
at-exp-lib
base
compiler-lib
LICENSE.txt
compiler
bundle-dist.rkt
info.rktcommands
compiler-unit.rktdecompile.rktdemodularizer
alpha.rktbatch.rktgc-toplevels.rktinfo.rktmain.rktmerge.rktmodule.rktmpi.rktnodep.rktreplace-modidx.rktupdate-toplevels.rktutil.rkt
embed-sig.rktembed-unit.rktoption-unit.rktsig.rktlauncher
setup
compiler-test
LICENSE.txtinfo.rkt
tests/compiler
collection-zos.rkt
commands
ctool.rktdemodularizer
embed
embed-asl.rktembed-bsl.rktembed-bsla.rktembed-isl.rktembed-isll.rktembed-me1.rktembed-me10.rktembed-me11-rd.rktembed-me11.rktembed-me12-rd.ssembed-me12.ssembed-me13.rktembed-me14.rktembed-me15-one.rktembed-me15.rktembed-me16.rktembed-me17.rktembed-me17a.rktembed-me18.rktembed-me18a.rktembed-me19.rktembed-me1b.rktembed-me1c.rktembed-me1d.rktembed-me1e.rktembed-me1f.rktembed-me1f1.rktlembed-me2.rktembed-me20.rktembed-me21.rktembed-me22.rktembed-me23.rktembed-me24.rktembed-me25.rktembed-me26.rktembed-me27.rktembed-me28.rktembed-me29-2.rktembed-me29.rktembed-me3.rktembed-me4.rktlembed-me5.rktembed-me6.rktembed-me6b.rkt
|
@ -46,6 +46,7 @@ script:
|
|||
- raco test -l tests/zo-path
|
||||
- raco test -l tests/xml/test
|
||||
- raco test -l tests/db/all-tests
|
||||
- raco test -c tests/stxparse
|
||||
notifications:
|
||||
irc: chat.freenode.net#racket-dev
|
||||
email:
|
||||
|
@ -56,3 +57,5 @@ notifications:
|
|||
on_success: change
|
||||
slack:
|
||||
secure: A19kphrabQHO8TU6qZcBaLQxdSNpm1ypEtbQsh8Ucg6HYPP7y1q7O7JZEndoMRHE9CNKZ9oXQzqR8H1IFVTlnjFFIJfkZzZ1YSNk4abSomhpWCq9daKMfwlcuTtY6PeI1nDVpka4/hiJGn9qzmaKYXle9Sl4CX2VEYp8o8PgMEs=
|
||||
rooms:
|
||||
secure: FsKzp4ItmOqd/YxqgsElgfjGW2/TU03p2p3ss+PQl/pKDQNnR/2b4pWCQ7GuqYibkmtiH1jYwrnuaLN4Cc+JyN7Z+zUtO4VSORsh3zt/gTsfgphMpCP6cB4sTqUh6AWsZOgzikj+fh7ORHEXVswQwlRHErTgZVEdEkWHBh4UWzc=
|
||||
|
|
16
INSTALL.txt
16
INSTALL.txt
|
@ -53,7 +53,7 @@ If you stick with this repository, then you have several options:
|
|||
Quick Instructions: In-place Build
|
||||
==================================
|
||||
|
||||
On Unix (including Linux) and Mac OS X, `make' (or `make in-place')
|
||||
On Unix (including Linux) and Mac OS, `make' (or `make in-place')
|
||||
creates a build in the "racket" directory.
|
||||
|
||||
On Windows with Microsoft Visual Studio (any version between 2008/9.0
|
||||
|
@ -81,9 +81,9 @@ installs into "<dir>" (which must be an absolute path) with binaries
|
|||
in "<dir>/bin", packages in "<dir>/share/racket/pkgs", documentation
|
||||
in "<dir>/share/racket/doc", etc.
|
||||
|
||||
On Mac OS X, `make unix-style PREFIX=<dir>' builds and installs into
|
||||
"<dir>" (whichmust be an absolute path) with binaries in "<dir>/bin",
|
||||
packges in "<dir>/share/pkgs", documentation in "<dir>/doc", etc.
|
||||
On Mac OS, `make unix-style PREFIX=<dir>' builds and installs into
|
||||
"<dir>" (which must be an absolute path) with binaries in "<dir>/bin",
|
||||
packages in "<dir>/share/pkgs", documentation in "<dir>/doc", etc.
|
||||
|
||||
On Windows, Unix-style install is not supported.
|
||||
|
||||
|
@ -196,7 +196,7 @@ libraries. See the documentation for `raco setup' for information on
|
|||
the options.
|
||||
|
||||
For cross compilation, add configuration options to
|
||||
`CONFIGURE_ARGS_qq="..."' as descibed in the "README" of "racket/src",
|
||||
`CONFIGURE_ARGS_qq="..."' as described in the "README" of "racket/src",
|
||||
but also add a `PLAIN_RACKET=...' argument for the top-level makefile
|
||||
to specify the same executable as in an `--enable-racket=...' for
|
||||
`configure'.
|
||||
|
@ -212,7 +212,7 @@ If you want to install packages manually out of the "pkgs" directory,
|
|||
the `local-catalog' target creates a catalog as "racket/local/catalog"
|
||||
that merges the currently configured catalog's content with pointers
|
||||
to the packages in "pkgs". A Unix-style build works that way: it
|
||||
builds and installs minimal Racket, and then it installs packags out
|
||||
builds and installs minimal Racket, and then it installs packages out
|
||||
of a catalog that is created by `make local-catalog'.
|
||||
|
||||
To add a package catalog that is used after the content of "pkgs" but
|
||||
|
@ -321,7 +321,7 @@ normalizing the Windows results to "i386-win32" and "x86_63-win32",
|
|||
-<dist-suffix> is omitted unless a `#:dist-suffix' string is specified
|
||||
for the client in the site configuration, and <ext> is
|
||||
platform-specific: ".sh" for Unix (including Linux), ".dmg" or ".pkg"
|
||||
for Mac OS X, and ".exe" for Windows.
|
||||
for Mac OS, and ".exe" for Windows.
|
||||
|
||||
Generating Installer Web Sites
|
||||
------------------------------
|
||||
|
@ -517,7 +517,7 @@ In more detail:
|
|||
To create a ".tgz" archive instead of an installer (or any
|
||||
platform), set `TGZ_MODE' to "--tgz".
|
||||
|
||||
For a Mac OS X installer, set `SIGN_IDENTITY' as the name to
|
||||
For a Mac OS installer, set `SIGN_IDENTITY' as the name to
|
||||
which the signing certificate is associated. Set `MAC_PKG_MODE'
|
||||
to "--mac-pkg" to create a ".pkg" installer instead of a ".dmg"
|
||||
image.
|
||||
|
|
6
Makefile
6
Makefile
|
@ -98,7 +98,7 @@ win32-as-is:
|
|||
$(WIN32_RUN_RACO) setup $(ALL_PLT_SETUP_OPTIONS)
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Unix-style build (Unix and Mac OS X, only)
|
||||
# Unix-style build (Unix and Mac OS, only)
|
||||
|
||||
PREFIX =
|
||||
|
||||
|
@ -234,7 +234,7 @@ SOURCE_MODE =
|
|||
# name or installation path:
|
||||
VERSIONLESS_MODE =
|
||||
|
||||
# Set to "--mac-pkg" to create ".pkg"-based installers for Mac OS X,
|
||||
# Set to "--mac-pkg" to create ".pkg"-based installers for Mac OS,
|
||||
# instead of a ".dmg" for drag-and-drop installation:
|
||||
MAC_PKG_MODE =
|
||||
|
||||
|
@ -271,7 +271,7 @@ BUILD_STAMP =
|
|||
# the default as the version number:
|
||||
INSTALL_NAME =
|
||||
|
||||
# For Mac OS X, a signing identity (spaces allowed) for binaries in an
|
||||
# For Mac OS, a signing identity (spaces allowed) for binaries in an
|
||||
# installer:
|
||||
SIGN_IDENTITY =
|
||||
|
||||
|
|
34
README.md
Normal file
34
README.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
[](https://travis-ci.org/racket/racket)
|
||||
[](https://ci.appveyor.com/project/plt/racket)
|
||||
|
||||
|
||||
This is the source code for the core of Racket. See
|
||||
"INSTALL.txt" for full information on building Racket.
|
||||
|
||||
To build the full Racket distribution from this repository, run `make`
|
||||
in the top-level directory. To build the Minimal Racket, run `make
|
||||
base`.
|
||||
|
||||
The rest of the Racket distribution source code is in other
|
||||
repositories under [the Racket GitHub
|
||||
organization](https://github.com/racket).
|
||||
|
||||
Contribute to Racket by submitting a pull request, joining the
|
||||
[development mailing list](https://lists.racket-lang.org), or visiting
|
||||
the IRC channel.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Racket
|
||||
Copyright (c) 2010-2017 PLT Design Inc.
|
||||
|
||||
Racket is distributed under the GNU Lesser General Public License
|
||||
(LGPL). This implies that you may link Racket into proprietary
|
||||
applications, provided you follow the rules stated in the LGPL. You can
|
||||
also modify Racket; if you distribute a modified version, you must
|
||||
distribute it under the terms of the LGPL, which in particular states
|
||||
that you must release the source code for the modified software.
|
||||
|
||||
See racket/src/COPYING_LESSER.txt for more information.
|
17
README.txt
17
README.txt
|
@ -1,17 +0,0 @@
|
|||
This is the source code for the main Racket distribution. See
|
||||
"INSTALL.txt" for information on building Racket.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Racket
|
||||
Copyright (c) 2010-2016 PLT Design Inc.
|
||||
|
||||
Racket is distributed under the GNU Lesser General Public License
|
||||
(LGPL). This implies that you may link Racket into proprietary
|
||||
applications, provided you follow the rules stated in the LGPL. You can
|
||||
also modify Racket; if you distribute a modified version, you must
|
||||
distribute it under the terms of the LGPL, which in particular states
|
||||
that you must release the source code for the modified software.
|
||||
|
||||
See racket/src/COPYING_LESSER.txt for more information.
|
|
@ -27,7 +27,7 @@ test_script:
|
|||
- racket\raco.exe test -l tests/match/main
|
||||
- racket\raco.exe test -l tests/zo-path
|
||||
- racket\raco.exe test -l tests/xml/test
|
||||
|
||||
- racket\raco.exe test -c tests/stxparse
|
||||
|
||||
notifications:
|
||||
- provider: Email
|
||||
|
@ -38,5 +38,5 @@ notifications:
|
|||
|
||||
- provider: Slack
|
||||
auth_token:
|
||||
secure: WCMkqS/3iB39INmhzQoZDNJ3zcOXLaRueWvaayOD9MW15DcWrGOAxz7dGrhh/EcQ
|
||||
secure: VsZxuLzL7f/k5c/UEkiJKYxvNh9ss0Gq5ifwoZl4rlwzgtkU+2bOEo9zaP2FREF5Tb/iw4r7yQXdAYHPeo8GBQ2GQn2IksABPBEUkFrxj1k=
|
||||
channel: notifications
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
at-exp-lib
|
||||
Copyright (c) 2010-2016 PLT Design Inc.
|
||||
Copyright (c) 2010-2017 PLT Design Inc.
|
||||
|
||||
This package is distributed under the GNU Lesser General Public
|
||||
License (LGPL). This means that you can link this package into proprietary
|
||||
|
|
|
@ -16,15 +16,7 @@
|
|||
(make-meta-reader
|
||||
'at-exp
|
||||
"language path"
|
||||
(lambda (bstr)
|
||||
(let* ([str (bytes->string/latin-1 bstr)]
|
||||
[sym (string->symbol str)])
|
||||
(and (module-path? sym)
|
||||
(vector
|
||||
;; try submod first:
|
||||
`(submod ,sym reader)
|
||||
;; fall back to /lang/reader:
|
||||
(string->symbol (string-append str "/lang/reader"))))))
|
||||
lang-reader-module-paths
|
||||
wrap-reader
|
||||
(lambda (orig-read-syntax)
|
||||
(define read-syntax (wrap-reader orig-read-syntax))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
base
|
||||
Copyright (c) 2010-2016 PLT Design Inc.
|
||||
Copyright (c) 2010-2017 PLT Design Inc.
|
||||
|
||||
This package is distributed under the GNU Lesser General Public
|
||||
License (LGPL). This means that you can link this package into proprietary
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
(define collection 'multi)
|
||||
|
||||
(define version "6.4.0.15")
|
||||
(define version "6.8.0.2")
|
||||
|
||||
(define deps `("racket-lib"
|
||||
["racket" #:version ,version]))
|
||||
|
|
11
pkgs/compiler-lib/LICENSE.txt
Normal file
11
pkgs/compiler-lib/LICENSE.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
compiler-lib
|
||||
Copyright (c) 2010-2017 PLT Design Inc.
|
||||
|
||||
This package is distributed under the GNU Lesser General Public
|
||||
License (LGPL). This means that you can link this package into proprietary
|
||||
applications, provided you follow the rules stated in the LGPL. You
|
||||
can also modify this package; if you distribute a modified version,
|
||||
you must distribute it under the terms of the LGPL, which in
|
||||
particular means that you must release the source code for the
|
||||
modified software. See http://www.gnu.org/copyleft/lesser.html
|
||||
for more information.
|
94
pkgs/compiler-lib/compiler/bundle-dist.rkt
Normal file
94
pkgs/compiler-lib/compiler/bundle-dist.rkt
Normal file
|
@ -0,0 +1,94 @@
|
|||
|
||||
(module bundle-dist racket/base
|
||||
(require racket/file
|
||||
(only-in racket/base lambda)
|
||||
racket/path
|
||||
racket/system
|
||||
file/zip
|
||||
file/tar)
|
||||
|
||||
(provide bundle-put-file-extension+style+filters
|
||||
bundle-directory)
|
||||
|
||||
(define (bundle-file-suffix)
|
||||
(case (system-type)
|
||||
[(macosx) "dmg"]
|
||||
[(windows) "zip"]
|
||||
[(unix) "tgz"]))
|
||||
|
||||
(define (bundle-put-file-extension+style+filters)
|
||||
(values (bundle-file-suffix)
|
||||
null
|
||||
(case (system-type)
|
||||
[(windows) '(("Zip file" "*.zip"))]
|
||||
[(macosx) '(("Disk image" "*.dmg"))]
|
||||
[(unix) '(("Gzipped tar file" "*.tgz"))])))
|
||||
|
||||
(define (add-suffix name suffix)
|
||||
(if (filename-extension name)
|
||||
name
|
||||
(path-replace-suffix name
|
||||
(string->bytes/utf-8 (string-append "." suffix)))))
|
||||
|
||||
(define (with-prepared-directory dir for-exe? k)
|
||||
;; If `dir' contains multiple files, create a new
|
||||
;; directory that contains a copy of `dir'
|
||||
(if (and for-exe?
|
||||
(= 1 (length (directory-list dir))))
|
||||
(k dir)
|
||||
(let ([temp-dir (make-temporary-file "bundle-tmp-~a" 'directory)])
|
||||
(dynamic-wind
|
||||
void
|
||||
(lambda ()
|
||||
(let ([dest
|
||||
(let-values ([(base name dir?) (split-path dir)])
|
||||
(build-path temp-dir name))])
|
||||
(make-directory dest)
|
||||
(let loop ([src dir][dest dest])
|
||||
(for-each (lambda (f)
|
||||
(let ([src (build-path src f)]
|
||||
[dest (build-path dest f)])
|
||||
(cond
|
||||
[(directory-exists? src)
|
||||
(make-directory dest)
|
||||
(loop src dest)]
|
||||
[(file-exists? src)
|
||||
(copy-file src dest)
|
||||
(file-or-directory-modify-seconds
|
||||
dest
|
||||
(file-or-directory-modify-seconds src))])))
|
||||
(directory-list src))))
|
||||
(k temp-dir))
|
||||
(lambda () (delete-directory/files temp-dir))))))
|
||||
|
||||
(define bundle-directory
|
||||
(lambda (target dir [for-exe? #f])
|
||||
(let ([target (add-suffix target (bundle-file-suffix))])
|
||||
(case (system-type)
|
||||
[(macosx)
|
||||
(with-prepared-directory
|
||||
dir for-exe?
|
||||
(lambda (dir)
|
||||
(let* ([cout (open-output-bytes)]
|
||||
[cerr (open-output-bytes)]
|
||||
[cin (open-input-bytes #"")]
|
||||
[p (process*/ports
|
||||
cout cin cerr
|
||||
"/usr/bin/hdiutil"
|
||||
"create" "-format" "UDZO"
|
||||
"-imagekey" "zlib-level=9"
|
||||
"-mode" "555"
|
||||
"-volname" (path->string
|
||||
(path-replace-suffix (file-name-from-path target) #""))
|
||||
"-srcfolder" (path->string (cleanse-path (path->complete-path dir)))
|
||||
(path->string (cleanse-path (path->complete-path target))))])
|
||||
((list-ref p 4) 'wait)
|
||||
(unless (eq? ((list-ref p 4) 'status) 'done-ok)
|
||||
(error 'bundle-directory
|
||||
"error bundling: ~a"
|
||||
(regexp-replace #rx"[\r\n]*$" (get-output-string cerr) ""))))))]
|
||||
[(windows unix)
|
||||
(let-values ([(base name dir?) (split-path (path->complete-path dir))])
|
||||
(parameterize ([current-directory base])
|
||||
((if (eq? 'unix (system-type)) tar-gzip zip) target name)))]
|
||||
[else (error 'bundle-directory "don't know how")])))))
|
91
pkgs/compiler-lib/compiler/commands/decompile.rkt
Normal file
91
pkgs/compiler-lib/compiler/commands/decompile.rkt
Normal file
|
@ -0,0 +1,91 @@
|
|||
#lang racket/base
|
||||
(require racket/cmdline
|
||||
raco/command-name
|
||||
compiler/zo-parse
|
||||
compiler/decompile
|
||||
compiler/compilation-path
|
||||
racket/pretty
|
||||
racket/format)
|
||||
|
||||
(define (get-name)
|
||||
(string->symbol (short-program+command-name)))
|
||||
|
||||
(define force? #f)
|
||||
|
||||
(define source-files
|
||||
(command-line
|
||||
#:program (short-program+command-name)
|
||||
#:once-each
|
||||
[("--force") "Ignore timestamp mimatch on associated \".zo\""
|
||||
(set! force? #t)]
|
||||
[("--columns" "-n") n "Format for <n> columns"
|
||||
(let ([num (string->number n)])
|
||||
(unless (exact-positive-integer? num)
|
||||
(raise-user-error (get-name)
|
||||
"not a valid column count: ~a" n))
|
||||
(pretty-print-columns num))]
|
||||
#:args source-or-bytecode-file
|
||||
source-or-bytecode-file))
|
||||
|
||||
(define (check-files orig-file alt-file)
|
||||
(cond
|
||||
[(not (file-exists? alt-file))
|
||||
(cond
|
||||
[(file-exists? orig-file)
|
||||
(unless (is-bytecode-file? orig-file)
|
||||
(raise-user-error (get-name)
|
||||
(~a "not a bytecode file, and no associated \".zo\" file;\n"
|
||||
" consider using `raco make` to compile the source file to bytecode\n"
|
||||
" path: ~a\n"
|
||||
" tried associated path: ~a")
|
||||
orig-file
|
||||
alt-file))]
|
||||
[else
|
||||
(raise-user-error (get-name)
|
||||
(~a "no such file, and no associated \".zo\" file\n"
|
||||
" path: ~a\n"
|
||||
" tried associated path: ~a")
|
||||
orig-file
|
||||
alt-file)])]
|
||||
[(not (is-bytecode-file? alt-file))
|
||||
(raise-user-error (get-name)
|
||||
(~a "associated \".zo\" file is not a bytecode file\n"
|
||||
" original path: ~a\n"
|
||||
" associated path: ~a")
|
||||
orig-file
|
||||
alt-file)]
|
||||
[(and (not force?)
|
||||
((file-or-directory-modify-seconds orig-file
|
||||
#f
|
||||
(lambda () -inf.0))
|
||||
. > .
|
||||
(file-or-directory-modify-seconds alt-file)))
|
||||
;; return a warning:
|
||||
(raise-user-error (get-name)
|
||||
(~a "associated \".zo\" file's date is older than given file's date;\n"
|
||||
" consider using `raco make` to rebuild the source file, or use `--force`\n"
|
||||
" to skip the date check\n"
|
||||
" original path: ~a\n"
|
||||
" associated path: ~a")
|
||||
orig-file
|
||||
alt-file)]))
|
||||
|
||||
(define (is-bytecode-file? orig-file)
|
||||
(call-with-input-file*
|
||||
orig-file
|
||||
(lambda (i)
|
||||
(equal? #"#~" (read-bytes 2 i)))))
|
||||
|
||||
(for ([zo-file source-files])
|
||||
(let ([zo-file (path->complete-path zo-file)])
|
||||
(let-values ([(base name dir?) (split-path zo-file)])
|
||||
(let ([alt-file (get-compilation-bytecode-file zo-file)])
|
||||
(check-files zo-file alt-file)
|
||||
(parameterize ([current-load-relative-directory base]
|
||||
[print-graph #t])
|
||||
(pretty-write
|
||||
(decompile
|
||||
(call-with-input-file*
|
||||
(if (file-exists? alt-file) alt-file zo-file)
|
||||
(lambda (in)
|
||||
(zo-parse in))))))))))
|
33
pkgs/compiler-lib/compiler/commands/exe-dir.rkt
Normal file
33
pkgs/compiler-lib/compiler/commands/exe-dir.rkt
Normal file
|
@ -0,0 +1,33 @@
|
|||
#lang scheme/base
|
||||
(require scheme/cmdline
|
||||
raco/command-name
|
||||
compiler/distribute)
|
||||
|
||||
(define verbose (make-parameter #f))
|
||||
(define exe-embedded-collects-path (make-parameter #f))
|
||||
(define exe-dir-add-collects-dirs (make-parameter null))
|
||||
|
||||
(define-values (dest-dir source-files)
|
||||
(command-line
|
||||
#:program (short-program+command-name)
|
||||
#:once-each
|
||||
[("--collects-path") path "Set <path> as main collects for executables"
|
||||
(exe-embedded-collects-path path)]
|
||||
#:multi
|
||||
[("++collects-copy") dir "Add collects in <dir> to directory"
|
||||
(exe-dir-add-collects-dirs (append (exe-dir-add-collects-dirs) (list dir)))]
|
||||
#:once-each
|
||||
[("-v") "Verbose mode"
|
||||
(verbose #t)]
|
||||
#:args (dest-dir . executable)
|
||||
(values dest-dir executable)))
|
||||
|
||||
(assemble-distribution
|
||||
dest-dir
|
||||
source-files
|
||||
#:collects-path (exe-embedded-collects-path)
|
||||
#:copy-collects (exe-dir-add-collects-dirs))
|
||||
(when (verbose)
|
||||
(printf " [output to \"~a\"]\n" dest-dir))
|
||||
|
||||
(module test racket/base)
|
155
pkgs/compiler-lib/compiler/commands/exe.rkt
Normal file
155
pkgs/compiler-lib/compiler/commands/exe.rkt
Normal file
|
@ -0,0 +1,155 @@
|
|||
#lang racket/base
|
||||
(require racket/cmdline
|
||||
raco/command-name
|
||||
compiler/private/embed
|
||||
launcher/launcher
|
||||
dynext/file
|
||||
setup/dirs)
|
||||
|
||||
(define verbose (make-parameter #f))
|
||||
(define very-verbose (make-parameter #f))
|
||||
|
||||
(define gui (make-parameter #f))
|
||||
(define 3m (make-parameter #t))
|
||||
(define launcher (make-parameter #f))
|
||||
|
||||
(define exe-output (make-parameter #f))
|
||||
(define exe-embedded-flags (make-parameter '("-U" "--")))
|
||||
(define exe-embedded-libraries (make-parameter null))
|
||||
(define exe-aux (make-parameter null))
|
||||
(define exe-embedded-config-path (make-parameter "etc"))
|
||||
(define exe-embedded-collects-path (make-parameter null))
|
||||
(define exe-embedded-collects-dest (make-parameter #f))
|
||||
|
||||
(define source-file
|
||||
(command-line
|
||||
#:program (short-program+command-name)
|
||||
#:once-each
|
||||
[("-o") file "Write executable as <file>"
|
||||
(exe-output file)]
|
||||
[("--gui") "Generate GUI executable"
|
||||
(gui #t)]
|
||||
[("-l" "--launcher") "Generate a launcher"
|
||||
(when (or (find-addon-tethered-gui-bin-dir)
|
||||
(find-addon-tethered-console-bin-dir))
|
||||
;; When an addon-executable directory is configured, treat the
|
||||
;; addon directory more like an installation directory, instead
|
||||
;; of a user-specific directory: record it, and remove the -U
|
||||
;; flag (if any)
|
||||
(exe-embedded-flags
|
||||
(append
|
||||
(list "-A" (path->string (find-system-path 'addon-dir)))
|
||||
(remove "-U" (exe-embedded-flags)))))
|
||||
(launcher #t)]
|
||||
[("--config-path") path "Set <path> as configuration directory for executable"
|
||||
(exe-embedded-config-path path)]
|
||||
[("--collects-path") path "Set <path> as main collects for executable"
|
||||
(exe-embedded-collects-path path)]
|
||||
[("--collects-dest") dir "Write collection code to <dir>"
|
||||
(exe-embedded-collects-dest dir)]
|
||||
[("--ico") .ico-file "Set Windows icon for executable"
|
||||
(exe-aux (cons (cons 'ico .ico-file) (exe-aux)))]
|
||||
[("--icns") .icns-file "Set Mac OS icon for executable"
|
||||
(exe-aux (cons (cons 'icns .icns-file) (exe-aux)))]
|
||||
[("--orig-exe") "Use original executable instead of stub"
|
||||
(exe-aux (cons (cons 'original-exe? #t) (exe-aux)))]
|
||||
[("--3m") "Generate using 3m variant"
|
||||
(3m #t)]
|
||||
[("--cgc") "Generate using CGC variant"
|
||||
(3m #f)]
|
||||
#:multi
|
||||
[("++aux") aux-file "Extra executable info (based on <aux-file> suffix)"
|
||||
(let ([auxes (extract-aux-from-path (path->complete-path aux-file))])
|
||||
(when (null? auxes)
|
||||
(printf " warning: no recognized information from ~s\n" aux-file))
|
||||
(exe-aux (append auxes (exe-aux))))]
|
||||
[("++lib") lib "Embed <lib> in executable"
|
||||
(exe-embedded-libraries (append (exe-embedded-libraries) (list lib)))]
|
||||
[("++exf") flag "Add flag to embed in executable"
|
||||
(exe-embedded-flags (append (exe-embedded-flags) (list flag)))]
|
||||
[("--exf") flag "Remove flag to embed in executable"
|
||||
(exe-embedded-flags (remove flag (exe-embedded-flags)))]
|
||||
[("--exf-clear") "Clear flags to embed in executable"
|
||||
(exe-embedded-flags null)]
|
||||
[("--exf-show") "Show flags to embed in executable"
|
||||
(printf "Flags to embed: ~s\n" (exe-embedded-flags))]
|
||||
#:once-each
|
||||
[("-v") "Verbose mode"
|
||||
(verbose #t)]
|
||||
[("--vv") "Very verbose mode"
|
||||
(verbose #t)
|
||||
(very-verbose #t)]
|
||||
#:args (source-file)
|
||||
source-file))
|
||||
|
||||
(let ([dest (mzc:embedding-executable-add-suffix
|
||||
(or (exe-output)
|
||||
(extract-base-filename/ss source-file
|
||||
(string->symbol (short-program+command-name))))
|
||||
(gui))])
|
||||
(unless (file-exists? source-file)
|
||||
(raise-user-error (string->symbol (short-program+command-name))
|
||||
"source file does not exist\n path: ~a" source-file))
|
||||
(with-handlers ([exn:fail:filesystem? (lambda (exn) (void))])
|
||||
(call-with-input-file* dest
|
||||
(lambda (dest-in)
|
||||
(call-with-input-file* source-file
|
||||
(lambda (source-in)
|
||||
(when (equal? (port-file-identity dest-in)
|
||||
(port-file-identity source-in))
|
||||
(raise-user-error (string->symbol (short-program+command-name))
|
||||
(string-append
|
||||
"source file is the same as the destination file"
|
||||
"\n source path: ~a"
|
||||
"\n destination path: ~a")
|
||||
source-file
|
||||
dest)))))))
|
||||
(cond
|
||||
[(launcher)
|
||||
(parameterize ([current-launcher-variant (if (3m) '3m 'cgc)])
|
||||
((if (gui)
|
||||
make-gracket-launcher
|
||||
make-racket-launcher)
|
||||
(append (list "-t" (path->string (path->complete-path source-file)))
|
||||
(exe-embedded-flags))
|
||||
dest
|
||||
(exe-aux)))]
|
||||
[else
|
||||
(define mod-sym (string->symbol
|
||||
(format "#%mzc:~a"
|
||||
(let-values ([(base name dir?)
|
||||
(split-path source-file)])
|
||||
(path->bytes (path-replace-suffix name #""))))))
|
||||
(mzc:create-embedding-executable
|
||||
dest
|
||||
#:mred? (gui)
|
||||
#:variant (if (3m) '3m 'cgc)
|
||||
#:verbose? (very-verbose)
|
||||
#:modules (cons `(#%mzc: (file ,source-file) (main configure-runtime))
|
||||
(map (lambda (l) `(#t (lib ,l)))
|
||||
(exe-embedded-libraries)))
|
||||
#:configure-via-first-module? #t
|
||||
#:early-literal-expressions
|
||||
(parameterize ([current-namespace (make-base-namespace)])
|
||||
(define cr-sym (string->symbol (format "~a(configure-runtime)" mod-sym)))
|
||||
(list
|
||||
(compile
|
||||
`(when (module-declared? '',cr-sym)
|
||||
(dynamic-require '',cr-sym #f)))))
|
||||
#:literal-expression
|
||||
(parameterize ([current-namespace (make-base-namespace)])
|
||||
(define main-sym (string->symbol (format "~a(main)" mod-sym)))
|
||||
(compile
|
||||
`(begin
|
||||
(namespace-require '',mod-sym)
|
||||
(when (module-declared? '',main-sym)
|
||||
(dynamic-require '',main-sym #f)))))
|
||||
#:cmdline (exe-embedded-flags)
|
||||
#:collects-path (exe-embedded-collects-path)
|
||||
#:collects-dest (exe-embedded-collects-dest)
|
||||
#:aux (cons `(config-dir . ,(exe-embedded-config-path))
|
||||
(exe-aux)))])
|
||||
(when (verbose)
|
||||
(printf " [output to \"~a\"]\n" dest)))
|
||||
|
||||
(module test racket/base)
|
42
pkgs/compiler-lib/compiler/commands/expand.rkt
Normal file
42
pkgs/compiler-lib/compiler/commands/expand.rkt
Normal file
|
@ -0,0 +1,42 @@
|
|||
#lang racket/base
|
||||
|
||||
(module expand racket/base
|
||||
(require racket/cmdline
|
||||
raco/command-name
|
||||
racket/pretty)
|
||||
|
||||
(provide show-program)
|
||||
|
||||
(define (show-program expand)
|
||||
(define source-files
|
||||
(command-line
|
||||
#:program (short-program+command-name)
|
||||
#:once-each
|
||||
[("--columns" "-n") n "Format for <n> columns"
|
||||
(let ([num (string->number n)])
|
||||
(unless (exact-positive-integer? num)
|
||||
(raise-user-error (string->symbol (short-program+command-name))
|
||||
"not a valid column count: ~a" n))
|
||||
(pretty-print-columns num))]
|
||||
#:args source-file
|
||||
source-file))
|
||||
|
||||
(for ([src-file source-files])
|
||||
(let ([src-file (path->complete-path src-file)])
|
||||
(let-values ([(base name dir?) (split-path src-file)])
|
||||
(parameterize ([current-load-relative-directory base]
|
||||
[current-namespace (make-base-namespace)]
|
||||
[read-accept-reader #t])
|
||||
(call-with-input-file*
|
||||
src-file
|
||||
(lambda (in)
|
||||
(port-count-lines! in)
|
||||
(let loop ()
|
||||
(let ([e (read-syntax src-file in)])
|
||||
(unless (eof-object? e)
|
||||
(pretty-write (syntax->datum (expand e)))
|
||||
(loop))))))))))))
|
||||
|
||||
(require (submod "." expand))
|
||||
(show-program expand)
|
||||
|
15
pkgs/compiler-lib/compiler/commands/info.rkt
Normal file
15
pkgs/compiler-lib/compiler/commands/info.rkt
Normal file
|
@ -0,0 +1,15 @@
|
|||
#lang info
|
||||
|
||||
(define raco-commands
|
||||
'(("make" compiler/commands/make "compile source to bytecode" 100)
|
||||
("exe" compiler/commands/exe "create executable" 20)
|
||||
("pack" compiler/commands/pack "pack files/collections into a .plt archive" #f)
|
||||
("unpack" compiler/commands/unpack "unpack files/collections from a .plt archive" #f)
|
||||
("decompile" compiler/commands/decompile "decompile bytecode" #f)
|
||||
("test" compiler/commands/test "run tests associated with files/directories" 15)
|
||||
("expand" compiler/commands/expand "macro-expand source" #f)
|
||||
("read" compiler/commands/read "read and pretty-print source" #f)
|
||||
("distribute" compiler/commands/exe-dir "prepare executable(s) in a directory for distribution" #f)
|
||||
("demodularize" compiler/demodularizer/batch "produce a whole program from a single module" #f)))
|
||||
|
||||
(define test-responsibles '(("test.rkt" jay)))
|
119
pkgs/compiler-lib/compiler/commands/make.rkt
Normal file
119
pkgs/compiler-lib/compiler/commands/make.rkt
Normal file
|
@ -0,0 +1,119 @@
|
|||
#lang racket/base
|
||||
(require racket/cmdline
|
||||
raco/command-name
|
||||
compiler/cm
|
||||
compiler/compiler
|
||||
compiler/compilation-path
|
||||
dynext/file
|
||||
setup/parallel-build
|
||||
setup/path-to-relative
|
||||
racket/match)
|
||||
|
||||
(module test racket/base)
|
||||
|
||||
(define verbose (make-parameter #f))
|
||||
(define very-verbose (make-parameter #f))
|
||||
(define disable-inlining (make-parameter #f))
|
||||
|
||||
(define disable-deps (make-parameter #f))
|
||||
(define disable-const (make-parameter #f))
|
||||
(define prefixes (make-parameter null))
|
||||
(define assume-primitives (make-parameter #t))
|
||||
(define worker-count (make-parameter 1))
|
||||
|
||||
(define mzc-symbol (string->symbol (short-program+command-name)))
|
||||
|
||||
(define source-files
|
||||
(command-line
|
||||
#:program (short-program+command-name)
|
||||
#:once-each
|
||||
[("-j") n "Compile with up to <n> tasks in parallel"
|
||||
(let ([num (string->number n)])
|
||||
(unless num (raise-user-error (format "~a: bad count for -j: ~s"
|
||||
(short-program+command-name)
|
||||
n)))
|
||||
(worker-count num))]
|
||||
[("--disable-inline") "Disable procedure inlining during compilation"
|
||||
(disable-inlining #t)]
|
||||
[("--disable-constant") "Disable enforcement of module constants"
|
||||
(disable-const #t)]
|
||||
[("--no-deps") "Compile immediate files without updating dependencies"
|
||||
(disable-deps #t)]
|
||||
[("-p" "--prefix") file "Add elaboration-time prefix file for --no-deps"
|
||||
(prefixes (append (prefixes) (list file)))]
|
||||
[("--no-prim") "Do not assume `scheme' bindings at top level for --no-deps"
|
||||
(assume-primitives #f)]
|
||||
[("-v") "Verbose mode"
|
||||
(verbose #t)]
|
||||
[("--vv") "Very verbose mode"
|
||||
(verbose #t)
|
||||
(very-verbose #t)]
|
||||
#:args (file . another-file) (cons file another-file)))
|
||||
|
||||
(cond
|
||||
;; Just compile one file:
|
||||
[(disable-deps)
|
||||
(let ([prefix
|
||||
`(begin
|
||||
(require scheme)
|
||||
,(if (assume-primitives)
|
||||
'(void)
|
||||
'(namespace-require/copy 'scheme))
|
||||
,@(map (lambda (s) `(load ,s)) (prefixes))
|
||||
(void))])
|
||||
((compile-zos prefix #:verbose? (verbose))
|
||||
source-files
|
||||
'auto))]
|
||||
;; Normal make:
|
||||
[(= (worker-count) 1)
|
||||
(let ([n (make-base-empty-namespace)]
|
||||
[did-one? #f])
|
||||
(parameterize ([current-namespace n]
|
||||
[manager-trace-handler
|
||||
(if (very-verbose)
|
||||
(λ (p) (printf " ~a\n" p))
|
||||
(manager-trace-handler))]
|
||||
[manager-compile-notify-handler
|
||||
(lambda (p)
|
||||
(set! did-one? #t)
|
||||
(when (verbose)
|
||||
(printf " making ~s\n" p)))])
|
||||
(for ([file source-files])
|
||||
(unless (file-exists? file)
|
||||
(error mzc-symbol "file does not exist: ~a" file))
|
||||
(set! did-one? #f)
|
||||
(let ([name (extract-base-filename/ss file mzc-symbol)])
|
||||
(when (verbose)
|
||||
(printf "\"~a\":\n" file))
|
||||
(parameterize ([compile-context-preservation-enabled
|
||||
(disable-inlining)]
|
||||
[compile-enforce-module-constants
|
||||
(not (disable-const))])
|
||||
(managed-compile-zo file))
|
||||
(when (verbose)
|
||||
(printf " [~a \"~a\"]\n"
|
||||
(if did-one? "output to" "already up-to-date at")
|
||||
(get-compilation-bytecode-file file)))))))]
|
||||
;; Parallel make:
|
||||
[else
|
||||
(define path-cache (make-hash))
|
||||
(or (parallel-compile-files
|
||||
source-files
|
||||
#:worker-count (worker-count)
|
||||
#:handler (lambda (id type work msg out err)
|
||||
(define (->rel p)
|
||||
(path->relative-string/library p #:cache path-cache))
|
||||
(match type
|
||||
['start (when (verbose) (printf " ~a making ~a\n" id (->rel work)))]
|
||||
['done (when (verbose) (printf " ~a made ~a\n" id (->rel work)))]
|
||||
['output (printf " ~a output from: ~a\n~a~a" id work out err)]
|
||||
[else (printf " ~a error compiling ~a\n~a\n~a~a" id work msg out err)]))
|
||||
#:options (let ([cons-if-true (lambda (bool carv cdrv)
|
||||
(if bool
|
||||
(cons carv cdrv)
|
||||
cdrv))])
|
||||
(cons-if-true
|
||||
(very-verbose)
|
||||
'very-verbose
|
||||
(cons-if-true (disable-inlining) 'disable-inlining null))))
|
||||
(exit 1))])
|
99
pkgs/compiler-lib/compiler/commands/pack.rkt
Normal file
99
pkgs/compiler-lib/compiler/commands/pack.rkt
Normal file
|
@ -0,0 +1,99 @@
|
|||
#lang scheme/base
|
||||
(require scheme/cmdline
|
||||
raco/command-name
|
||||
setup/pack
|
||||
setup/getinfo
|
||||
compiler/distribute)
|
||||
|
||||
(define verbose (make-parameter #f))
|
||||
|
||||
(define collection? (make-parameter #f))
|
||||
|
||||
(define default-plt-name "archive")
|
||||
|
||||
(define plt-name (make-parameter default-plt-name))
|
||||
(define plt-files-replace (make-parameter #f))
|
||||
(define plt-files-plt-relative? (make-parameter #f))
|
||||
(define plt-files-plt-home-relative? (make-parameter #f))
|
||||
(define plt-force-install-dir? (make-parameter #f))
|
||||
(define plt-setup-collections (make-parameter null))
|
||||
(define plt-include-compiled (make-parameter #f))
|
||||
|
||||
(define mzc-symbol (string->symbol (short-program+command-name)))
|
||||
|
||||
(define-values (plt-output source-files)
|
||||
(command-line
|
||||
#:program (short-program+command-name)
|
||||
#:once-each
|
||||
[("--collect") "<path>s specify collections instead of files/dirs"
|
||||
(collection? #t)]
|
||||
[("--plt-name") name "Set the printed <name> describing the archive"
|
||||
(plt-name name)]
|
||||
[("--replace") "Files in archive replace existing files when unpacked"
|
||||
(plt-files-replace #t)]
|
||||
[("--at-plt") "Files/dirs in archive are relative to user's add-ons directory"
|
||||
(plt-files-plt-relative? #t)]
|
||||
#:once-any
|
||||
[("--all-users") "Files/dirs in archive go to PLT installation if writable"
|
||||
(plt-files-plt-home-relative? #t)]
|
||||
[("--force-all-users") "Files/dirs forced to PLT installation"
|
||||
(plt-files-plt-home-relative? #t) (plt-force-install-dir? #t)]
|
||||
#:once-each
|
||||
[("--include-compiled") "Include \"compiled\" subdirectories in the archive"
|
||||
(plt-include-compiled #t)]
|
||||
#:multi
|
||||
[("++setup") collect "Setup <collect> after the archive is unpacked"
|
||||
(plt-setup-collections (append (plt-setup-collections) (list collect)))]
|
||||
#:once-each
|
||||
[("-v") "Verbose mode"
|
||||
(verbose #t)]
|
||||
#:args (dest-file . path)
|
||||
(values dest-file path)))
|
||||
|
||||
(if (not (collection?))
|
||||
;; Files and directories
|
||||
(begin
|
||||
(for ([fd source-files])
|
||||
(unless (relative-path? fd)
|
||||
(error mzc-symbol
|
||||
"file/directory is not relative to the current directory: \"~a\""
|
||||
fd)))
|
||||
(pack-plt plt-output
|
||||
(plt-name)
|
||||
source-files
|
||||
#:collections (map list (plt-setup-collections))
|
||||
#:file-mode (if (plt-files-replace) 'file-replace 'file)
|
||||
#:plt-relative? (or (plt-files-plt-relative?)
|
||||
(plt-files-plt-home-relative?))
|
||||
#:at-plt-home? (plt-files-plt-home-relative?)
|
||||
#:test-plt-dirs (if (or (plt-force-install-dir?)
|
||||
(not (plt-files-plt-home-relative?)))
|
||||
#f
|
||||
'("collects" "doc" "include" "lib"))
|
||||
#:requires
|
||||
null)
|
||||
(when (verbose)
|
||||
(printf " [output to \"~a\"]\n" plt-output)))
|
||||
;; Collection
|
||||
(begin
|
||||
(pack-collections-plt
|
||||
plt-output
|
||||
(if (eq? default-plt-name (plt-name)) #f (plt-name))
|
||||
(map (lambda (sf)
|
||||
(let loop ([sf sf])
|
||||
(let ([m (regexp-match "^([^/]*)/(.*)$" sf)])
|
||||
(if m (cons (cadr m) (loop (caddr m))) (list sf)))))
|
||||
source-files)
|
||||
#:replace? (plt-files-replace)
|
||||
#:extra-setup-collections (map list (plt-setup-collections))
|
||||
#:file-filter (if (plt-include-compiled)
|
||||
(lambda (path)
|
||||
(or (regexp-match #rx#"compiled$" (path->bytes path))
|
||||
(std-filter path)))
|
||||
std-filter)
|
||||
#:at-plt-home? (plt-files-plt-home-relative?)
|
||||
#:test-plt-collects? (not (plt-force-install-dir?)))
|
||||
(when (verbose)
|
||||
(printf " [output to \"~a\"]\n" plt-output))))
|
||||
|
||||
(module test racket/base)
|
4
pkgs/compiler-lib/compiler/commands/read.rkt
Normal file
4
pkgs/compiler-lib/compiler/commands/read.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
#lang racket/base
|
||||
(require (submod "expand.rkt" expand))
|
||||
|
||||
(show-program (lambda (e) e))
|
1077
pkgs/compiler-lib/compiler/commands/test.rkt
Normal file
1077
pkgs/compiler-lib/compiler/commands/test.rkt
Normal file
File diff suppressed because it is too large
Load Diff
102
pkgs/compiler-lib/compiler/commands/unpack.rkt
Normal file
102
pkgs/compiler-lib/compiler/commands/unpack.rkt
Normal file
|
@ -0,0 +1,102 @@
|
|||
#lang scheme/base
|
||||
(require scheme/cmdline
|
||||
raco/command-name
|
||||
setup/unpack
|
||||
racket/file
|
||||
racket/port
|
||||
racket/match
|
||||
racket/string
|
||||
racket/pretty)
|
||||
|
||||
(define verbose (make-parameter #f))
|
||||
|
||||
(define just-show? (make-parameter #f))
|
||||
(define replace? (make-parameter #f))
|
||||
(define show-config? (make-parameter #f))
|
||||
|
||||
(define mzc-symbol (string->symbol (short-program+command-name)))
|
||||
|
||||
(define files
|
||||
(command-line
|
||||
#:program (short-program+command-name)
|
||||
#:once-each
|
||||
[("-l" "--list") "just list archive content"
|
||||
(just-show? #t)]
|
||||
[("-c" "--config") "show archive configuration"
|
||||
(show-config? #t)]
|
||||
[("-f" "--force") "replace existing files when unpacking"
|
||||
(replace? #t)]
|
||||
#:args archive
|
||||
archive))
|
||||
|
||||
(define (desc->path dir)
|
||||
(if (path? dir)
|
||||
dir
|
||||
(apply build-path
|
||||
(symbol->string (car dir))
|
||||
(cdr dir))))
|
||||
|
||||
(for ([filename (in-list files)])
|
||||
(fold-plt-archive filename
|
||||
(lambda (config a)
|
||||
(when (show-config?)
|
||||
(match config
|
||||
[`(lambda (request failure)
|
||||
(case request
|
||||
((name) ,name)
|
||||
((unpacker) (quote mzscheme))
|
||||
((requires) (quote ,reqs))
|
||||
((conflicts) (quote ,conflicts))
|
||||
((plt-relative?) ,plt-rel?)
|
||||
((plt-home-relative?) ,plt-home-rel?)
|
||||
((test-plt-dirs) ,test-plt-dirs)
|
||||
(else (failure))))
|
||||
(printf "config:\n")
|
||||
(printf " name: ~s\n" name)
|
||||
(printf " requires:\n")
|
||||
(for ([c (in-list reqs)])
|
||||
(printf " ~s ~s\n" (string-join (car c) "/") (cadr c)))
|
||||
(printf " conflicts:\n")
|
||||
(for ([c (in-list conflicts)])
|
||||
(printf " ~s\n" (string-join c "/")))
|
||||
(cond
|
||||
[plt-home-rel? (printf " unpack to main installation\n")]
|
||||
[plt-rel? (printf " unpack to user add-ons\n")]
|
||||
[else (printf " unpack locally\n")])]
|
||||
[else
|
||||
(printf "config function:\n")
|
||||
(pretty-write config)]))
|
||||
a)
|
||||
(lambda (setup i a)
|
||||
(when (show-config?)
|
||||
(match setup
|
||||
[`(unit (import main-collects-parent-dir mzuntar) (export) (mzuntar void) (quote ,c))
|
||||
(printf "setup collections:\n")
|
||||
(for ([c (in-list c)])
|
||||
(printf " ~s\n" (string-join c "/")))]
|
||||
[else
|
||||
(printf "setup unit:\n")
|
||||
(pretty-write setup)]))
|
||||
a)
|
||||
(lambda (dir a)
|
||||
(unless (eq? dir 'same)
|
||||
(if (just-show?)
|
||||
(printf "~a\n" (path->directory-path (desc->path dir)))
|
||||
(make-directory* (desc->path dir))))
|
||||
a)
|
||||
(lambda (file i kind a)
|
||||
(if (just-show?)
|
||||
(printf "~a~a\n" (desc->path file)
|
||||
(if (eq? kind 'file-replace)
|
||||
" [replace]"
|
||||
""))
|
||||
(call-with-output-file*
|
||||
(desc->path file)
|
||||
#:exists (if (or (eq? kind 'file-replace)
|
||||
(replace?))
|
||||
'truncate/replace
|
||||
'error)
|
||||
(lambda (o)
|
||||
(copy-port i o))))
|
||||
a)
|
||||
(void)))
|
5
pkgs/compiler-lib/compiler/compiler-unit.rkt
Normal file
5
pkgs/compiler-lib/compiler/compiler-unit.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang racket/base
|
||||
|
||||
(require compiler/compiler compiler/sig racket/unit)
|
||||
(provide compiler@)
|
||||
(define-unit-from-context compiler@ compiler^)
|
606
pkgs/compiler-lib/compiler/decompile.rkt
Normal file
606
pkgs/compiler-lib/compiler/decompile.rkt
Normal file
|
@ -0,0 +1,606 @@
|
|||
#lang racket/base
|
||||
(require compiler/zo-parse
|
||||
syntax/modcollapse
|
||||
racket/port
|
||||
racket/match
|
||||
racket/list
|
||||
racket/set
|
||||
racket/path)
|
||||
|
||||
(provide decompile)
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(define primitive-table
|
||||
;; Figure out number-to-id mapping for kernel functions in `primitive'
|
||||
(let ([bindings
|
||||
(let ([ns (make-base-empty-namespace)])
|
||||
(parameterize ([current-namespace ns])
|
||||
(namespace-require ''#%kernel)
|
||||
(namespace-require ''#%unsafe)
|
||||
(namespace-require ''#%flfxnum)
|
||||
(namespace-require ''#%extfl)
|
||||
(namespace-require ''#%futures)
|
||||
(namespace-require ''#%foreign)
|
||||
(for/list ([l (namespace-mapped-symbols)])
|
||||
(cons l (with-handlers ([exn:fail? (lambda (x) #f)])
|
||||
(compile l))))))]
|
||||
[table (make-hash)])
|
||||
(for ([b (in-list bindings)])
|
||||
(let ([v (and (cdr b)
|
||||
(zo-parse
|
||||
(open-input-bytes
|
||||
(with-output-to-bytes
|
||||
(λ () (write (cdr b)))))))])
|
||||
(let ([n (match v
|
||||
[(struct compilation-top (_ _ prefix (struct primval (n)))) n]
|
||||
[else #f])])
|
||||
(hash-set! table n (car b)))))
|
||||
table))
|
||||
|
||||
(define (list-ref/protect l pos who)
|
||||
(list-ref l pos)
|
||||
#;
|
||||
(if (pos . < . (length l))
|
||||
(list-ref l pos)
|
||||
`(OUT-OF-BOUNDS ,who ,pos ,(length l) ,l)))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(define-struct glob-desc (vars num-tls num-stxs num-lifts))
|
||||
|
||||
;; Main entry:
|
||||
(define (decompile top)
|
||||
(let ([stx-ht (make-hasheq)])
|
||||
(match top
|
||||
[(struct compilation-top (max-let-depth binding-namess prefix form))
|
||||
(let-values ([(globs defns) (decompile-prefix prefix stx-ht)])
|
||||
(expose-module-path-indexes
|
||||
`(begin
|
||||
,@defns
|
||||
,(decompile-form form globs '(#%globals) (make-hasheq) stx-ht))))]
|
||||
[else (error 'decompile "unrecognized: ~e" top)])))
|
||||
|
||||
(define (expose-module-path-indexes e)
|
||||
;; This is a nearly general replace-in-graph function. (It seems like a lot
|
||||
;; of work to expose module path index content and sharing, though.)
|
||||
(define ht (make-hasheq))
|
||||
(define mconses null)
|
||||
(define (x-mcons a b)
|
||||
(define m (mcons a b))
|
||||
(set! mconses (cons (cons m (cons a b)) mconses))
|
||||
m)
|
||||
(define main
|
||||
(let loop ([e e])
|
||||
(cond
|
||||
[(hash-ref ht e #f)]
|
||||
[(module-path-index? e)
|
||||
(define ph (make-placeholder #f))
|
||||
(hash-set! ht e ph)
|
||||
(define-values (name base) (module-path-index-split e))
|
||||
(placeholder-set! ph (x-mcons '#%modidx
|
||||
(x-mcons (loop name)
|
||||
(x-mcons (loop base)
|
||||
null))))
|
||||
ph]
|
||||
[(pair? e)
|
||||
(define ph (make-placeholder #f))
|
||||
(hash-set! ht e ph)
|
||||
(placeholder-set! ph (cons (loop (car e))
|
||||
(loop (cdr e))))
|
||||
ph]
|
||||
[(mpair? e)
|
||||
(define m (mcons #f #f))
|
||||
(hash-set! ht e m)
|
||||
(set! mconses (cons (cons m (cons (loop (mcar e))
|
||||
(loop (mcdr e))))
|
||||
mconses))
|
||||
m]
|
||||
[(box? e)
|
||||
(define ph (make-placeholder #f))
|
||||
(hash-set! ht e ph)
|
||||
(placeholder-set! ph (box (loop (unbox e))))
|
||||
ph]
|
||||
[(vector? e)
|
||||
(define ph (make-placeholder #f))
|
||||
(hash-set! ht e ph)
|
||||
(placeholder-set! ph
|
||||
(for/vector #:length (vector-length e) ([i (in-vector e)])
|
||||
(loop i)))
|
||||
ph]
|
||||
[(hash? e)
|
||||
(define ph (make-placeholder #f))
|
||||
(hash-set! ht e ph)
|
||||
(placeholder-set! ph
|
||||
((cond
|
||||
[(hash-eq? ht)
|
||||
make-hasheq-placeholder]
|
||||
[(hash-eqv? ht)
|
||||
make-hasheqv-placeholder]
|
||||
[else make-hash-placeholder])
|
||||
(for/list ([(k v) (in-hash e)])
|
||||
(cons (loop k) (loop v)))))
|
||||
ph]
|
||||
[(prefab-struct-key e)
|
||||
=> (lambda (k)
|
||||
(define ph (make-placeholder #f))
|
||||
(hash-set! ht e ph)
|
||||
(placeholder-set! ph
|
||||
(apply make-prefab-struct
|
||||
k
|
||||
(map loop
|
||||
(cdr (vector->list (struct->vector e))))))
|
||||
ph)]
|
||||
[else
|
||||
e])))
|
||||
(define l (make-reader-graph (cons main mconses)))
|
||||
(for ([i (in-list (cdr l))])
|
||||
(set-mcar! (car i) (cadr i))
|
||||
(set-mcdr! (car i) (cddr i)))
|
||||
(car l))
|
||||
|
||||
(define (decompile-prefix a-prefix stx-ht)
|
||||
(match a-prefix
|
||||
[(struct prefix (num-lifts toplevels stxs src-insp-desc))
|
||||
(let ([lift-ids (for/list ([i (in-range num-lifts)])
|
||||
(gensym 'lift))]
|
||||
[stx-ids (map (lambda (i) (gensym 'stx))
|
||||
stxs)])
|
||||
(values (glob-desc
|
||||
(append
|
||||
(map (lambda (tl)
|
||||
(match tl
|
||||
[#f '#%linkage]
|
||||
[(? symbol?) (string->symbol (format "_~a" tl))]
|
||||
[(struct global-bucket (name))
|
||||
(string->symbol (format "_~a" name))]
|
||||
[(struct module-variable (modidx sym pos phase constantness))
|
||||
(if (and (module-path-index? modidx)
|
||||
(let-values ([(n b) (module-path-index-split modidx)])
|
||||
(and (not n) (not b))))
|
||||
(string->symbol (format "_~a" sym))
|
||||
(string->symbol (format "_~s~a@~s~a"
|
||||
sym
|
||||
(match constantness
|
||||
['constant ":c"]
|
||||
['fixed ":f"]
|
||||
[(function-shape a pm?)
|
||||
(if pm? ":P" ":p")]
|
||||
[(struct-type-shape c) ":t"]
|
||||
[(constructor-shape a) ":mk"]
|
||||
[(predicate-shape) ":?"]
|
||||
[(accessor-shape c) ":ref"]
|
||||
[(mutator-shape c) ":set!"]
|
||||
[else ""])
|
||||
(mpi->string modidx)
|
||||
(if (zero? phase)
|
||||
""
|
||||
(format "/~a" phase)))))]
|
||||
[else (error 'decompile-prefix "bad toplevel: ~e" tl)]))
|
||||
toplevels)
|
||||
stx-ids
|
||||
(if (null? stx-ids) null '(#%stx-array))
|
||||
lift-ids)
|
||||
(length toplevels)
|
||||
(length stxs)
|
||||
num-lifts)
|
||||
(list*
|
||||
`(quote inspector ,src-insp-desc)
|
||||
;; `(quote tls ,toplevels)
|
||||
(map (lambda (stx id)
|
||||
`(define ,id ,(if stx
|
||||
`(#%decode-syntax
|
||||
,(decompile-stx (stx-content stx) stx-ht))
|
||||
#f)))
|
||||
stxs stx-ids))))]
|
||||
[else (error 'decompile-prefix "huh?: ~e" a-prefix)]))
|
||||
|
||||
(define (decompile-stx stx stx-ht)
|
||||
(or (hash-ref stx-ht stx #f)
|
||||
(let ([p (mcons #f #f)])
|
||||
(hash-set! stx-ht stx p)
|
||||
(match stx
|
||||
[(stx-obj datum wrap srcloc props tamper-status)
|
||||
(set-mcar! p (case tamper-status
|
||||
[(clean) 'wrap]
|
||||
[(tainted) 'wrap-tainted]
|
||||
[(armed) 'wrap-armed]))
|
||||
(set-mcdr! p (mcons
|
||||
(cond
|
||||
[(pair? datum)
|
||||
(cons (decompile-stx (car datum) stx-ht)
|
||||
(let loop ([l (cdr datum)])
|
||||
(cond
|
||||
[(null? l) null]
|
||||
[(pair? l)
|
||||
(cons (decompile-stx (car l) stx-ht)
|
||||
(loop (cdr l)))]
|
||||
[else
|
||||
(decompile-stx l stx-ht)])))]
|
||||
[(vector? datum)
|
||||
(for/vector ([e (in-vector datum)])
|
||||
(decompile-stx e stx-ht))]
|
||||
[(box? datum)
|
||||
(box (decompile-stx (unbox datum) stx-ht))]
|
||||
[else datum])
|
||||
(let* ([l (mcons wrap null)]
|
||||
[l (if (hash-count props)
|
||||
(mcons props l)
|
||||
l)]
|
||||
[l (if srcloc
|
||||
(mcons srcloc l)
|
||||
l)])
|
||||
l)))
|
||||
p]))))
|
||||
|
||||
(define (mpi->string modidx)
|
||||
(cond
|
||||
[(symbol? modidx) modidx]
|
||||
[else
|
||||
(collapse-module-path-index modidx)]))
|
||||
|
||||
(define (decompile-module mod-form orig-stack stx-ht mod-name)
|
||||
(match mod-form
|
||||
[(struct mod (name srcname self-modidx
|
||||
prefix provides requires body syntax-bodies unexported
|
||||
max-let-depth dummy lang-info
|
||||
internal-context binding-names
|
||||
flags pre-submodules post-submodules))
|
||||
(let-values ([(globs defns) (decompile-prefix prefix stx-ht)]
|
||||
[(stack) (append '(#%modvars) orig-stack)]
|
||||
[(closed) (make-hasheq)])
|
||||
`(,mod-name ,(if (symbol? name) name (last name)) ....
|
||||
(quote self ,self-modidx)
|
||||
(quote internal-context
|
||||
,(if (stx? internal-context)
|
||||
`(#%decode-syntax
|
||||
,(decompile-stx (stx-content internal-context) stx-ht))
|
||||
internal-context))
|
||||
(quote bindings ,(for/hash ([(phase ht) (in-hash binding-names)])
|
||||
(values phase
|
||||
(for/hash ([(sym id) (in-hash ht)])
|
||||
(values sym
|
||||
(if (eq? id #t)
|
||||
#t
|
||||
`(#%decode-syntax
|
||||
,(decompile-stx (stx-content id) stx-ht))))))))
|
||||
(quote language-info ,lang-info)
|
||||
,@(if (null? flags) '() (list `(quote ,flags)))
|
||||
,@(let ([l (apply
|
||||
append
|
||||
(for/list ([req (in-list requires)]
|
||||
#:when (pair? (cdr req)))
|
||||
(define l (for/list ([mpi (in-list (cdr req))])
|
||||
(define p (mpi->string mpi))
|
||||
(if (path? p)
|
||||
(let ([d (current-load-relative-directory)])
|
||||
(path->string (if d
|
||||
(find-relative-path (simplify-path d #t)
|
||||
(simplify-path p #f)
|
||||
#:more-than-root? #t)
|
||||
p)))
|
||||
p)))
|
||||
(if (eq? 0 (car req))
|
||||
l
|
||||
`((,@(case (car req)
|
||||
[(#f) `(for-label)]
|
||||
[(1) `(for-syntax)]
|
||||
[else `(for-meta ,(car req))])
|
||||
,@l)))))])
|
||||
(if (null? l)
|
||||
null
|
||||
`((require ,@l))))
|
||||
(provide ,@(apply
|
||||
append
|
||||
(for/list ([p (in-list provides)])
|
||||
(define phase (car p))
|
||||
(define l
|
||||
(for/list ([pv (in-list (append (cadr p) (caddr p)))])
|
||||
(match pv
|
||||
[(struct provided (name src src-name nom-src src-phase protected?))
|
||||
(define n (if (eq? name src-name)
|
||||
name
|
||||
`(rename-out [,src-name ,name])))
|
||||
(if protected?
|
||||
`(protect-out ,n)
|
||||
n)])))
|
||||
(if (or (null? l) (eq? phase 0))
|
||||
l
|
||||
`((,@(case phase
|
||||
[(#f) `(for-label)]
|
||||
[(1) `(for-syntax)]
|
||||
[else `(for-meta ,phase)])
|
||||
,@l))))))
|
||||
,@defns
|
||||
,@(for/list ([submod (in-list pre-submodules)])
|
||||
(decompile-module submod orig-stack stx-ht 'module))
|
||||
,@(for/list ([b (in-list syntax-bodies)])
|
||||
(let loop ([n (sub1 (car b))])
|
||||
(if (zero? n)
|
||||
(cons 'begin
|
||||
(for/list ([form (in-list (cdr b))])
|
||||
(decompile-form form globs stack closed stx-ht)))
|
||||
(list 'begin-for-syntax (loop (sub1 n))))))
|
||||
,@(map (lambda (form)
|
||||
(decompile-form form globs stack closed stx-ht))
|
||||
body)
|
||||
,@(for/list ([submod (in-list post-submodules)])
|
||||
(decompile-module submod orig-stack stx-ht 'module*))))]
|
||||
[else (error 'decompile-module "huh?: ~e" mod-form)]))
|
||||
|
||||
(define (decompile-form form globs stack closed stx-ht)
|
||||
(match form
|
||||
[(? mod?)
|
||||
(decompile-module form stack stx-ht 'module)]
|
||||
[(struct def-values (ids rhs))
|
||||
`(define-values ,(map (lambda (tl)
|
||||
(match tl
|
||||
[(struct toplevel (depth pos const? set-const?))
|
||||
(list-ref/protect (glob-desc-vars globs) pos 'def-vals)]))
|
||||
ids)
|
||||
,(if (inline-variant? rhs)
|
||||
`(begin
|
||||
,(list 'quote '%%inline-variant%%)
|
||||
,(decompile-expr (inline-variant-inline rhs) globs stack closed)
|
||||
,(decompile-expr (inline-variant-direct rhs) globs stack closed))
|
||||
(decompile-expr rhs globs stack closed)))]
|
||||
[(struct def-syntaxes (ids rhs prefix max-let-depth dummy))
|
||||
`(define-syntaxes ,ids
|
||||
,(let-values ([(globs defns) (decompile-prefix prefix stx-ht)])
|
||||
`(let ()
|
||||
,@defns
|
||||
,(decompile-form rhs globs '(#%globals) closed stx-ht))))]
|
||||
[(struct seq-for-syntax (exprs prefix max-let-depth dummy))
|
||||
`(begin-for-syntax
|
||||
,(let-values ([(globs defns) (decompile-prefix prefix stx-ht)])
|
||||
`(let ()
|
||||
,@defns
|
||||
,@(for/list ([rhs (in-list exprs)])
|
||||
(decompile-form rhs globs '(#%globals) closed stx-ht)))))]
|
||||
[(struct seq (forms))
|
||||
`(begin ,@(map (lambda (form)
|
||||
(decompile-form form globs stack closed stx-ht))
|
||||
forms))]
|
||||
[(struct splice (forms))
|
||||
`(begin ,@(map (lambda (form)
|
||||
(decompile-form form globs stack closed stx-ht))
|
||||
forms))]
|
||||
[(struct req (reqs dummy))
|
||||
`(#%require . (#%decode-syntax ,reqs))]
|
||||
[else
|
||||
(decompile-expr form globs stack closed)]))
|
||||
|
||||
(define (extract-name name)
|
||||
(if (symbol? name)
|
||||
(gensym name)
|
||||
(if (vector? name)
|
||||
(gensym (vector-ref name 0))
|
||||
#f)))
|
||||
|
||||
(define (extract-id expr)
|
||||
(match expr
|
||||
[(struct lam (name flags num-params arg-types rest? closure-map closure-types tl-map max-let-depth body))
|
||||
(extract-name name)]
|
||||
[(struct case-lam (name lams))
|
||||
(extract-name name)]
|
||||
[(struct closure (lam gen-id))
|
||||
(extract-id lam)]
|
||||
[else #f]))
|
||||
|
||||
(define (extract-ids! body ids)
|
||||
(match body
|
||||
[(struct let-rec (procs body))
|
||||
(for ([proc (in-list procs)]
|
||||
[delta (in-naturals)])
|
||||
(when (< -1 delta (vector-length ids))
|
||||
(vector-set! ids delta (extract-id proc))))
|
||||
(extract-ids! body ids)]
|
||||
[(struct install-value (val-count pos boxes? rhs body))
|
||||
(extract-ids! body ids)]
|
||||
[(struct boxenv (pos body))
|
||||
(extract-ids! body ids)]
|
||||
[else #f]))
|
||||
|
||||
(define (decompile-tl expr globs stack closed no-check?)
|
||||
(match expr
|
||||
[(struct toplevel (depth pos const? ready?))
|
||||
(let ([id (list-ref/protect (glob-desc-vars globs) pos 'toplevel)])
|
||||
(cond
|
||||
[no-check? id]
|
||||
[(and (not const?) (not ready?))
|
||||
`(#%checked ,id)]
|
||||
#;[(and const? ready?) `(#%const ,id)]
|
||||
#;[const? `(#%iconst ,id)]
|
||||
[else id]))]))
|
||||
|
||||
(define (decompile-expr expr globs stack closed)
|
||||
(match expr
|
||||
[(struct toplevel (depth pos const? ready?))
|
||||
(decompile-tl expr globs stack closed #f)]
|
||||
[(struct varref (tl dummy))
|
||||
`(#%variable-reference ,(if (eq? tl #t)
|
||||
'<constant-local>
|
||||
(decompile-tl tl globs stack closed #t)))]
|
||||
[(struct topsyntax (depth pos midpt))
|
||||
(list-ref/protect (glob-desc-vars globs) (+ midpt pos) 'topsyntax)]
|
||||
[(struct primval (id))
|
||||
(hash-ref primitive-table id (lambda () (error "unknown primitive: " id)))]
|
||||
[(struct assign (id rhs undef-ok?))
|
||||
`(set! ,(decompile-expr id globs stack closed)
|
||||
,(decompile-expr rhs globs stack closed))]
|
||||
[(struct localref (unbox? offset clear? other-clears? type))
|
||||
(let ([id (list-ref/protect stack offset 'localref)])
|
||||
(let ([e (if unbox?
|
||||
`(#%unbox ,id)
|
||||
id)])
|
||||
(if clear?
|
||||
`(#%sfs-clear ,e)
|
||||
e)))]
|
||||
[(? lam?)
|
||||
`(lambda . ,(decompile-lam expr globs stack closed))]
|
||||
[(struct case-lam (name lams))
|
||||
`(case-lambda
|
||||
,@(map (lambda (lam)
|
||||
(decompile-lam lam globs stack closed))
|
||||
lams))]
|
||||
[(struct let-one (rhs body type unused?))
|
||||
(let ([id (or (extract-id rhs)
|
||||
(gensym (or type (if unused? 'unused 'local))))])
|
||||
`(let ([,id ,(decompile-expr rhs globs (cons id stack) closed)])
|
||||
,(decompile-expr body globs (cons id stack) closed)))]
|
||||
[(struct let-void (count boxes? body))
|
||||
(let ([ids (make-vector count #f)])
|
||||
(extract-ids! body ids)
|
||||
(let ([vars (for/list ([i (in-range count)]
|
||||
[id (in-vector ids)])
|
||||
(or id (gensym (if boxes? 'localvb 'localv))))])
|
||||
`(let ,(map (lambda (i) `[,i ,(if boxes? `(#%box ?) '?)])
|
||||
vars)
|
||||
,(decompile-expr body globs (append vars stack) closed))))]
|
||||
[(struct let-rec (procs body))
|
||||
`(begin
|
||||
(#%set!-rec-values ,(for/list ([p (in-list procs)]
|
||||
[i (in-naturals)])
|
||||
(list-ref/protect stack i 'let-rec))
|
||||
,@(map (lambda (proc)
|
||||
(decompile-expr proc globs stack closed))
|
||||
procs))
|
||||
,(decompile-expr body globs stack closed))]
|
||||
[(struct install-value (count pos boxes? rhs body))
|
||||
`(begin
|
||||
(,(if boxes? '#%set-boxes! 'set!-values)
|
||||
,(for/list ([i (in-range count)])
|
||||
(list-ref/protect stack (+ i pos) 'install-value))
|
||||
,(decompile-expr rhs globs stack closed))
|
||||
,(decompile-expr body globs stack closed))]
|
||||
[(struct boxenv (pos body))
|
||||
(let ([id (list-ref/protect stack pos 'boxenv)])
|
||||
`(begin
|
||||
(set! ,id (#%box ,id))
|
||||
,(decompile-expr body globs stack closed)))]
|
||||
[(struct branch (test then else))
|
||||
`(if ,(decompile-expr test globs stack closed)
|
||||
,(decompile-expr then globs stack closed)
|
||||
,(decompile-expr else globs stack closed))]
|
||||
[(struct application (rator rands))
|
||||
(let ([stack (append (for/list ([i (in-list rands)]) (gensym 'rand))
|
||||
stack)])
|
||||
(annotate-unboxed
|
||||
rands
|
||||
(annotate-inline
|
||||
`(,(decompile-expr rator globs stack closed)
|
||||
,@(map (lambda (rand)
|
||||
(decompile-expr rand globs stack closed))
|
||||
rands)))))]
|
||||
[(struct apply-values (proc args-expr))
|
||||
`(#%apply-values ,(decompile-expr proc globs stack closed)
|
||||
,(decompile-expr args-expr globs stack closed))]
|
||||
[(struct with-immed-mark (key-expr val-expr body-expr))
|
||||
(let ([id (gensym 'cmval)])
|
||||
`(#%call-with-immediate-continuation-mark
|
||||
,(decompile-expr key-expr globs stack closed)
|
||||
(lambda (,id) ,(decompile-expr body-expr globs (cons id stack) closed))
|
||||
,(decompile-expr val-expr globs stack closed)))]
|
||||
[(struct seq (exprs))
|
||||
`(begin ,@(for/list ([expr (in-list exprs)])
|
||||
(decompile-expr expr globs stack closed)))]
|
||||
[(struct beg0 (exprs))
|
||||
`(begin0
|
||||
,@(for/list ([expr (in-list exprs)])
|
||||
(decompile-expr expr globs stack closed))
|
||||
;; Make sure a single expression doesn't look like tail position:
|
||||
,@(if (null? (cdr exprs)) (list #f) null))]
|
||||
[(struct with-cont-mark (key val body))
|
||||
`(with-continuation-mark
|
||||
,(decompile-expr key globs stack closed)
|
||||
,(decompile-expr val globs stack closed)
|
||||
,(decompile-expr body globs stack closed))]
|
||||
[(struct closure (lam gen-id))
|
||||
(if (hash-ref closed gen-id #f)
|
||||
gen-id
|
||||
(begin
|
||||
(hash-set! closed gen-id #t)
|
||||
`(#%closed ,gen-id ,(decompile-expr lam globs stack closed))))]
|
||||
[else `(quote ,expr)]))
|
||||
|
||||
(define (decompile-lam expr globs stack closed)
|
||||
(match expr
|
||||
[(struct closure (lam gen-id)) (decompile-lam lam globs stack closed)]
|
||||
[(struct lam (name flags num-params arg-types rest? closure-map closure-types tl-map max-let-depth body))
|
||||
(let ([vars (for/list ([i (in-range num-params)]
|
||||
[type (in-list arg-types)])
|
||||
(gensym (format "~a~a-"
|
||||
(case type
|
||||
[(ref) "argbox"]
|
||||
[(val) "arg"]
|
||||
[else (format "arg~a" type)])
|
||||
i)))]
|
||||
[rest-vars (if rest? (list (gensym 'rest)) null)]
|
||||
[captures (map (lambda (v)
|
||||
(list-ref/protect stack v 'lam))
|
||||
(vector->list closure-map))])
|
||||
`((,@vars . ,(if rest?
|
||||
(car rest-vars)
|
||||
null))
|
||||
,@(if (and name (not (null? name)))
|
||||
`(',name)
|
||||
null)
|
||||
,@(if (null? flags) null `('(flags: ,@flags)))
|
||||
,@(if (null? captures)
|
||||
null
|
||||
`('(captures: ,@(map (lambda (c t)
|
||||
(if t
|
||||
`(,t ,c)
|
||||
c))
|
||||
captures
|
||||
closure-types)
|
||||
,@(if (not tl-map)
|
||||
'()
|
||||
(list
|
||||
(for/list ([pos (in-list (sort (set->list tl-map) <))])
|
||||
(define tl-pos
|
||||
(cond
|
||||
[(or (pos . < . (glob-desc-num-tls globs))
|
||||
(zero? (glob-desc-num-stxs globs)))
|
||||
pos]
|
||||
[(= pos (glob-desc-num-tls globs))
|
||||
'stx]
|
||||
[else
|
||||
(+ pos (glob-desc-num-stxs globs))]))
|
||||
(if (eq? tl-pos 'stx)
|
||||
'#%syntax
|
||||
(list-ref/protect (glob-desc-vars globs)
|
||||
tl-pos
|
||||
'lam))))))))
|
||||
,(decompile-expr body globs
|
||||
(append captures
|
||||
(append vars rest-vars))
|
||||
closed)))]))
|
||||
|
||||
(define (annotate-inline a)
|
||||
a)
|
||||
|
||||
(define (annotate-unboxed args a)
|
||||
a)
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
#;
|
||||
(begin
|
||||
(require scheme/pretty)
|
||||
(define (try e)
|
||||
(pretty-print
|
||||
(decompile
|
||||
(zo-parse (let-values ([(in out) (make-pipe)])
|
||||
(write (parameterize ([current-namespace (make-base-namespace)])
|
||||
(compile e))
|
||||
out)
|
||||
(close-output-port out)
|
||||
in)))))
|
||||
(pretty-print
|
||||
(decompile
|
||||
(zo-parse (open-input-file "/home/mflatt/proj/plt/collects/tests/mzscheme/benchmarks/common/sboyer_ss.zo"))))
|
||||
#;
|
||||
(try '(lambda (q . more)
|
||||
(letrec ([f (lambda (x) f)])
|
||||
(lambda (g) f)))))
|
20
pkgs/compiler-lib/compiler/demodularizer/alpha.rkt
Normal file
20
pkgs/compiler-lib/compiler/demodularizer/alpha.rkt
Normal file
|
@ -0,0 +1,20 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/match racket/contract compiler/zo-parse)
|
||||
|
||||
(define (alpha-vary-ctop top)
|
||||
(match top
|
||||
[(struct compilation-top (max-let-depth binding-namess prefix form))
|
||||
(make-compilation-top max-let-depth binding-namess (alpha-vary-prefix prefix) form)]))
|
||||
(define (alpha-vary-prefix p)
|
||||
(struct-copy prefix p
|
||||
[toplevels
|
||||
(map (match-lambda
|
||||
[(and sym (? symbol?))
|
||||
(gensym sym)]
|
||||
[other
|
||||
other])
|
||||
(prefix-toplevels p))]))
|
||||
|
||||
(provide/contract
|
||||
[alpha-vary-ctop (compilation-top? . -> . compilation-top?)])
|
63
pkgs/compiler-lib/compiler/demodularizer/batch.rkt
Normal file
63
pkgs/compiler-lib/compiler/demodularizer/batch.rkt
Normal file
|
@ -0,0 +1,63 @@
|
|||
#lang racket/base
|
||||
|
||||
#|
|
||||
Here's the idea:
|
||||
|
||||
- Take a module's bytecode
|
||||
- Recursively get all the bytecode for modules that the target requires
|
||||
- After reading it, prune everything that isn't at phase 0 (the runtime phase)
|
||||
|
||||
- Now that we have all the modules, the next step is to merge them into a single
|
||||
module
|
||||
-- Although actually we collapse them into the top-level, not a module
|
||||
- To do that, we iterate through all the modules doing two things as we go:
|
||||
-- Incrementing all the global variable references by all the references in all
|
||||
the modules
|
||||
--- So if A has 5, then B's start at index 5 and so on
|
||||
-- Replacing module variable references with the actual global variables
|
||||
corresponding to those variables
|
||||
--- So if A's variable 'x' is in global slot 4, then if B refers to it, it
|
||||
directly uses slot 4, rather than a module-variable slot
|
||||
|
||||
- At that point we have all the module code in a single top-level, but many
|
||||
toplevels won't be used because a library function isn't really used
|
||||
- So, we do a "garbage collection" on elements of the prefix
|
||||
- First, we create a dependency graph of all toplevels and the initial scope
|
||||
- Then, we do a DFS on the initial scope and keep all those toplevels, throwing
|
||||
away the construction of everything else
|
||||
[XXX: This may be broken because of side-effects.]
|
||||
|
||||
- Now we have a small amount code, but because we want to go back to source,
|
||||
we need to fix it up a bit; because different modules may've used the same
|
||||
names
|
||||
- So, we do alpha-renaming, but it's easy because names are only used in the
|
||||
compilation-top prefix structure
|
||||
|
||||
[TODO]
|
||||
|
||||
- Next, we decompile
|
||||
- Then, it will pay to do dead code elimination and inlining, etc.
|
||||
|#
|
||||
|
||||
(require racket/cmdline
|
||||
racket/set
|
||||
raco/command-name
|
||||
"main.rkt")
|
||||
|
||||
|
||||
(let ([output-file (make-parameter #f)])
|
||||
(command-line #:program (short-program+command-name)
|
||||
#:multi
|
||||
[("-e" "--exclude-modules") path "Exclude <path> from flattening"
|
||||
(current-excluded-modules (set-add (current-excluded-modules) path))]
|
||||
#:once-each
|
||||
[("-o") dest-filename "Write output as <dest-filename>"
|
||||
(output-file (string->path dest-filename))]
|
||||
[("-g" "--garbage-collect") "Garbage-collect final module (unsound)"
|
||||
(garbage-collect-toplevels-enabled #t)]
|
||||
[("-r" "--recompile") "Recompile final module to re-run optimizations"
|
||||
(recompile-enabled #t)]
|
||||
#:args (filename)
|
||||
(demodularize filename (output-file))))
|
||||
|
||||
(module test racket/base)
|
288
pkgs/compiler-lib/compiler/demodularizer/gc-toplevels.rkt
Normal file
288
pkgs/compiler-lib/compiler/demodularizer/gc-toplevels.rkt
Normal file
|
@ -0,0 +1,288 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/match
|
||||
racket/list
|
||||
racket/dict
|
||||
racket/contract
|
||||
compiler/zo-parse
|
||||
"util.rkt")
|
||||
|
||||
; XXX Use efficient set structure
|
||||
(define (gc-toplevels top)
|
||||
(match top
|
||||
[(struct compilation-top (max-let-depth binding-namess top-prefix form))
|
||||
(define lift-start
|
||||
(prefix-lift-start top-prefix))
|
||||
(define max-depgraph-index
|
||||
(+ (prefix-num-lifts top-prefix)
|
||||
lift-start))
|
||||
(define top-node max-depgraph-index)
|
||||
(define DEP-GRAPH (make-vector (add1 top-node) (make-refs empty empty)))
|
||||
(define build-graph! (make-build-graph! DEP-GRAPH))
|
||||
(define _void (build-graph! (list top-node) form))
|
||||
(define-values (used-tls stxs) (graph-dfs DEP-GRAPH top-node))
|
||||
(define ordered-used-tls (sort (rest used-tls) <=)) ; This rest drops off the top-node
|
||||
(define ordered-stxs (sort stxs <=))
|
||||
(define (lift? i) (lift-start . <= . i))
|
||||
(define-values (lifts normal-tls) (partition lift? ordered-used-tls))
|
||||
(define new-prefix
|
||||
(make-prefix
|
||||
(length lifts)
|
||||
(for/list ([i normal-tls])
|
||||
(list-ref (prefix-toplevels top-prefix) i))
|
||||
(for/list ([i ordered-stxs])
|
||||
(list-ref (prefix-stxs top-prefix) i))))
|
||||
(define new-lift-start
|
||||
(prefix-lift-start new-prefix))
|
||||
; XXX This probably breaks max-let-depth
|
||||
(define new-form
|
||||
((gc-toplevels-form
|
||||
(lambda (pos) (index<=? pos ordered-used-tls))
|
||||
(lambda (pos)
|
||||
(if (lift? pos)
|
||||
(+ new-lift-start (index<=? pos lifts))
|
||||
(index<=? pos normal-tls)))
|
||||
(lambda (stx-pos)
|
||||
(index<=? stx-pos ordered-stxs))
|
||||
(prefix-syntax-start new-prefix))
|
||||
form))
|
||||
(log-debug (format "Total TLS: ~S" (length normal-tls)))
|
||||
(log-debug (format "Used TLS: ~S" normal-tls))
|
||||
(log-debug (format "Total lifts: ~S" (length lifts)))
|
||||
(log-debug (format "Used lifts: ~S" lifts))
|
||||
(log-debug (format "Total stxs: ~S" (length stxs)))
|
||||
(log-debug (format "Used stxs: ~S" ordered-stxs))
|
||||
(make-compilation-top
|
||||
max-let-depth
|
||||
#hash()
|
||||
new-prefix
|
||||
new-form)]))
|
||||
|
||||
(define-struct refs (tl stx) #:transparent)
|
||||
|
||||
(define (make-build-graph! DEP-GRAPH)
|
||||
(define (build-graph!* form lhs)
|
||||
(match form
|
||||
[(struct def-values (ids rhs))
|
||||
(define new-lhs (map toplevel-pos ids))
|
||||
; If we require one, we should require all, so make them reference each other
|
||||
(for-each (lambda (tl) (build-graph! new-lhs tl)) ids)
|
||||
(build-graph! new-lhs rhs)]
|
||||
[(? def-syntaxes?)
|
||||
(error 'build-graph "Doesn't handle syntax")]
|
||||
[(? seq-for-syntax?)
|
||||
(error 'build-graph "Doesn't handle syntax")]
|
||||
[(struct inline-variant (direct inline))
|
||||
(build-graph! lhs direct)]
|
||||
[(struct req (reqs dummy))
|
||||
(build-graph! lhs dummy)]
|
||||
[(? mod?)
|
||||
(error 'build-graph "Doesn't handle modules")]
|
||||
[(struct seq (forms))
|
||||
(for-each (lambda (f) (build-graph! lhs f)) forms)]
|
||||
[(struct splice (forms))
|
||||
(for-each (lambda (f) (build-graph! lhs f)) forms)]
|
||||
[(and l (struct lam (name flags num-params param-types rest? closure-map closure-types tl-map max-let-depth body)))
|
||||
(build-graph! lhs body)]
|
||||
[(and c (struct closure (code gen-id)))
|
||||
(build-graph! lhs code)]
|
||||
[(and cl (struct case-lam (name clauses)))
|
||||
(for-each (lambda (l) (build-graph! lhs l))
|
||||
clauses)]
|
||||
[(struct let-one (rhs body flonum? unused?))
|
||||
(build-graph! lhs rhs)
|
||||
(build-graph! lhs body)]
|
||||
[(and f (struct let-void (count boxes? body)))
|
||||
(build-graph! lhs body)]
|
||||
[(and f (struct install-value (_ _ _ rhs body)))
|
||||
(build-graph! lhs rhs)
|
||||
(build-graph! lhs body)]
|
||||
[(struct let-rec (procs body))
|
||||
(for-each (lambda (l) (build-graph! lhs l)) procs)
|
||||
(build-graph! lhs body)]
|
||||
[(and f (struct boxenv (_ body)))
|
||||
(build-graph! lhs body)]
|
||||
[(and f (struct toplevel (_ pos _ _)))
|
||||
(for-each (lambda (lhs)
|
||||
(dict-update! DEP-GRAPH lhs
|
||||
(match-lambda
|
||||
[(struct refs (tls stxs))
|
||||
(make-refs (list* pos tls) stxs)])))
|
||||
lhs)]
|
||||
[(and f (struct topsyntax (_ pos _)))
|
||||
(for-each (lambda (lhs)
|
||||
(dict-update! DEP-GRAPH lhs
|
||||
(match-lambda
|
||||
[(struct refs (tls stxs))
|
||||
(make-refs tls (list* pos stxs))])))
|
||||
lhs)]
|
||||
[(struct application (rator rands))
|
||||
(for-each (lambda (f) (build-graph! lhs f))
|
||||
(list* rator rands))]
|
||||
[(struct branch (test then else))
|
||||
(for-each (lambda (f) (build-graph! lhs f))
|
||||
(list test then else))]
|
||||
[(struct with-cont-mark (key val body))
|
||||
(for-each (lambda (f) (build-graph! lhs f))
|
||||
(list key val body))]
|
||||
[(struct with-immed-mark (key val body))
|
||||
(for-each (lambda (f) (build-graph! lhs f))
|
||||
(list key val body))]
|
||||
[(struct beg0 (seq))
|
||||
(for-each (lambda (f) (build-graph! lhs f))
|
||||
seq)]
|
||||
[(struct varref (tl dummy))
|
||||
(build-graph! lhs tl)
|
||||
(build-graph! lhs dummy)]
|
||||
[(and f (struct assign (id rhs undef-ok?)))
|
||||
(build-graph! lhs id)
|
||||
(build-graph! lhs rhs)]
|
||||
[(struct apply-values (proc args-expr))
|
||||
(build-graph! lhs proc)
|
||||
(build-graph! lhs args-expr)]
|
||||
[(and f (struct primval (id)))
|
||||
(void)]
|
||||
[(and f (struct localref (unbox? pos clear? other-clears? type)))
|
||||
(void)]
|
||||
[(and v (not (? form?)))
|
||||
(void)]))
|
||||
(define-values (first-build-graph!** build-graph!**)
|
||||
(build-form-memo build-graph!* #:void? #t))
|
||||
(define (build-graph! lhs form) (first-build-graph!** form lhs))
|
||||
build-graph!)
|
||||
|
||||
(define (graph-dfs g start-node)
|
||||
(define visited? (make-hasheq))
|
||||
(define (visit-tl n tls stxs)
|
||||
(if (hash-has-key? visited? n)
|
||||
(values tls stxs)
|
||||
(match (dict-ref g n)
|
||||
[(struct refs (n-tls n-stxs))
|
||||
(hash-set! visited? n #t)
|
||||
(define-values (new-tls1 new-stxs1)
|
||||
(for/fold ([new-tls tls]
|
||||
[new-stxs stxs])
|
||||
([tl (in-list n-tls)])
|
||||
(visit-tl tl new-tls new-stxs)))
|
||||
(define new-stxs2
|
||||
(for/fold ([new-stxs new-stxs1])
|
||||
([stx (in-list n-stxs)])
|
||||
(define this-stx (visit-stx stx))
|
||||
(if this-stx
|
||||
(list* this-stx new-stxs)
|
||||
new-stxs)))
|
||||
(values (list* n new-tls1)
|
||||
new-stxs2)])))
|
||||
(define stx-visited? (make-hasheq))
|
||||
(define (visit-stx n)
|
||||
(if (hash-has-key? stx-visited? n)
|
||||
#f
|
||||
(begin (hash-set! stx-visited? n #t)
|
||||
n)))
|
||||
(visit-tl start-node empty empty))
|
||||
|
||||
; index<=? : number? (listof number?) -> (or/c number? false/c)
|
||||
; returns the index of n in l and assumes that l is sorted by <=
|
||||
(define (index<=? n l)
|
||||
(match l
|
||||
[(list) #f]
|
||||
[(list-rest f l)
|
||||
(cond
|
||||
[(= n f)
|
||||
0]
|
||||
[(< n f)
|
||||
#f]
|
||||
[else
|
||||
(let ([rec (index<=? n l)])
|
||||
(if rec (add1 rec) rec))])]))
|
||||
|
||||
(define (identity x) x)
|
||||
(define (gc-toplevels-form keep? update-tl update-ts new-ts-midpt)
|
||||
(define (inner-update form)
|
||||
(match form
|
||||
[(struct def-values (ids rhs))
|
||||
(if (ormap (compose keep? toplevel-pos) ids)
|
||||
(make-def-values (map update ids)
|
||||
(update rhs))
|
||||
#f)]
|
||||
[(? def-syntaxes?)
|
||||
(error 'gc-tls "Doesn't handle syntax")]
|
||||
[(? seq-for-syntax?)
|
||||
(error 'gc-tls "Doesn't handle syntax")]
|
||||
[(struct req (reqs dummy))
|
||||
(make-req reqs (update dummy))]
|
||||
[(? mod?)
|
||||
(error 'gc-tls "Doesn't handle modules")]
|
||||
[(struct seq (forms))
|
||||
(make-seq (filter identity (map update forms)))]
|
||||
[(struct splice (forms))
|
||||
(make-splice (filter identity (map update forms)))]
|
||||
[(and l (struct lam (name flags num-params param-types rest? closure-map closure-types tl-map max-let-depth body)))
|
||||
(struct-copy lam l
|
||||
[toplevel-map #f] ; consevrative
|
||||
[body (update body)])]
|
||||
[(and c (struct closure (code gen-id)))
|
||||
(struct-copy closure c
|
||||
[code (update code)])]
|
||||
[(and cl (struct case-lam (name clauses)))
|
||||
(struct-copy case-lam cl
|
||||
[clauses (map update clauses)])]
|
||||
[(struct let-one (rhs body type unused?))
|
||||
(make-let-one (update rhs) (update body) type unused?)]
|
||||
[(and f (struct let-void (count boxes? body)))
|
||||
(struct-copy let-void f
|
||||
[body (update body)])]
|
||||
[(and f (struct install-value (_ _ _ rhs body)))
|
||||
(struct-copy install-value f
|
||||
[rhs (update rhs)]
|
||||
[body (update body)])]
|
||||
[(struct let-rec (procs body))
|
||||
(make-let-rec (map update procs) (update body))]
|
||||
[(and f (struct boxenv (_ body)))
|
||||
(struct-copy boxenv f [body (update body)])]
|
||||
[(and f (struct toplevel (_ pos _ _)))
|
||||
(struct-copy toplevel f
|
||||
[pos (update-tl pos)])]
|
||||
[(and f (struct topsyntax (_ pos _)))
|
||||
(struct-copy topsyntax f
|
||||
[pos (update-ts pos)]
|
||||
[midpt new-ts-midpt])]
|
||||
[(struct application (rator rands))
|
||||
(make-application
|
||||
(update rator)
|
||||
(map update rands))]
|
||||
[(struct branch (test then else))
|
||||
(make-branch
|
||||
(update test)
|
||||
(update then)
|
||||
(update else))]
|
||||
[(struct with-cont-mark (key val body))
|
||||
(make-with-cont-mark
|
||||
(update key)
|
||||
(update val)
|
||||
(update body))]
|
||||
[(struct beg0 (seq))
|
||||
(make-beg0 (map update seq))]
|
||||
[(struct varref (tl dummy))
|
||||
(make-varref (update tl) (update dummy))]
|
||||
[(and f (struct assign (id rhs undef-ok?)))
|
||||
(struct-copy assign f
|
||||
[id (update id)]
|
||||
[rhs (update rhs)])]
|
||||
[(struct apply-values (proc args-expr))
|
||||
(make-apply-values
|
||||
(update proc)
|
||||
(update args-expr))]
|
||||
[(and f (struct primval (id)))
|
||||
f]
|
||||
[(and f (struct localref (unbox? pos clear? other-clears? type)))
|
||||
f]
|
||||
[(and v (not (? form?)))
|
||||
v]
|
||||
))
|
||||
(define-values (first-update update)
|
||||
(build-form-memo inner-update))
|
||||
first-update)
|
||||
|
||||
(provide/contract
|
||||
[gc-toplevels (compilation-top? . -> . compilation-top?)])
|
3
pkgs/compiler-lib/compiler/demodularizer/info.rkt
Normal file
3
pkgs/compiler-lib/compiler/demodularizer/info.rkt
Normal file
|
@ -0,0 +1,3 @@
|
|||
#lang info
|
||||
|
||||
(define test-responsibles '((all jay)))
|
91
pkgs/compiler-lib/compiler/demodularizer/main.rkt
Normal file
91
pkgs/compiler-lib/compiler/demodularizer/main.rkt
Normal file
|
@ -0,0 +1,91 @@
|
|||
#lang racket/base
|
||||
(require compiler/cm
|
||||
compiler/zo-marshal
|
||||
"alpha.rkt"
|
||||
"gc-toplevels.rkt"
|
||||
"merge.rkt"
|
||||
"module.rkt"
|
||||
"mpi.rkt"
|
||||
"nodep.rkt"
|
||||
"replace-modidx.rkt")
|
||||
|
||||
(provide current-excluded-modules
|
||||
garbage-collect-toplevels-enabled
|
||||
recompile-enabled
|
||||
demodularize)
|
||||
|
||||
(define garbage-collect-toplevels-enabled (make-parameter #f))
|
||||
(define recompile-enabled (make-parameter #f))
|
||||
|
||||
(define logger (make-logger 'demodularizer (current-logger)))
|
||||
|
||||
(define (demodularize file-to-batch [output-file #f])
|
||||
(parameterize ([current-logger logger])
|
||||
(define-values (base name must-be-dir?) (split-path file-to-batch))
|
||||
(when must-be-dir?
|
||||
(error 'demodularize "Cannot run on directory: ~a" file-to-batch))
|
||||
(unless (file-exists? file-to-batch)
|
||||
(error 'demodularize "File does not exist: ~a" file-to-batch))
|
||||
|
||||
;; Compile
|
||||
(log-info "Compiling module")
|
||||
(parameterize ([current-namespace (make-base-empty-namespace)])
|
||||
(managed-compile-zo file-to-batch))
|
||||
|
||||
(define merged-zo-path
|
||||
(or output-file
|
||||
(path-add-suffix file-to-batch #"_merged.zo")))
|
||||
|
||||
;; Transformations
|
||||
(define path-cache (make-hasheq))
|
||||
|
||||
(log-info "Removing dependencies")
|
||||
(define-values (batch-nodep top-lang-info top-self-modidx get-modvar-rewrite)
|
||||
(parameterize ([MODULE-PATHS path-cache])
|
||||
(nodep-file file-to-batch)))
|
||||
|
||||
(log-info "Merging modules")
|
||||
(define batch-merge
|
||||
(parameterize ([MODULE-PATHS path-cache])
|
||||
(merge-compilation-top get-modvar-rewrite batch-nodep)))
|
||||
|
||||
(define batch-gcd
|
||||
(if (garbage-collect-toplevels-enabled)
|
||||
(begin
|
||||
(log-info "GC-ing top-levels")
|
||||
(gc-toplevels batch-merge))
|
||||
batch-merge))
|
||||
|
||||
(log-info "Alpha-varying top-levels")
|
||||
(define batch-alpha
|
||||
(alpha-vary-ctop batch-gcd))
|
||||
|
||||
(log-info "Replacing self-modidx")
|
||||
(define batch-replace-modidx
|
||||
(replace-modidx batch-alpha top-self-modidx))
|
||||
|
||||
(define batch-modname
|
||||
(string->symbol (regexp-replace #rx"\\.zo$" (path->string merged-zo-path) "")))
|
||||
(log-info (format "Modularizing into ~a" batch-modname))
|
||||
(define batch-mod
|
||||
(wrap-in-kernel-module batch-modname batch-modname top-lang-info top-self-modidx batch-replace-modidx))
|
||||
|
||||
(log-info "Writing merged zo")
|
||||
(void
|
||||
(with-output-to-file
|
||||
merged-zo-path
|
||||
(lambda ()
|
||||
(zo-marshal-to batch-mod (current-output-port)))
|
||||
#:exists 'replace))
|
||||
|
||||
(void
|
||||
(when (recompile-enabled)
|
||||
(define recomp
|
||||
(compiled-expression-recompile
|
||||
(parameterize ([read-accept-compiled #t])
|
||||
(call-with-input-file merged-zo-path read))))
|
||||
(call-with-output-file merged-zo-path
|
||||
(lambda (out)
|
||||
(write recomp out))
|
||||
#:exists 'replace)))))
|
||||
|
229
pkgs/compiler-lib/compiler/demodularizer/merge.rkt
Normal file
229
pkgs/compiler-lib/compiler/demodularizer/merge.rkt
Normal file
|
@ -0,0 +1,229 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/list
|
||||
racket/match
|
||||
racket/contract
|
||||
compiler/zo-parse
|
||||
"util.rkt"
|
||||
"mpi.rkt"
|
||||
"nodep.rkt"
|
||||
"update-toplevels.rkt")
|
||||
|
||||
(define MODULE-TOPLEVEL-OFFSETS (make-hasheq))
|
||||
|
||||
(define current-get-modvar-rewrite (make-parameter #f))
|
||||
(define (merge-compilation-top get-modvar-rewrite top)
|
||||
(parameterize ([current-get-modvar-rewrite get-modvar-rewrite])
|
||||
(match top
|
||||
[(struct compilation-top (max-let-depth binding-namess prefix form))
|
||||
(define-values (new-max-let-depth new-prefix gen-new-forms)
|
||||
(merge-form max-let-depth prefix form))
|
||||
(define total-tls (length (prefix-toplevels new-prefix)))
|
||||
(define total-stxs (length (prefix-stxs new-prefix)))
|
||||
(define total-lifts (prefix-num-lifts new-prefix))
|
||||
(log-debug (format "max-let-depth ~S to ~S" max-let-depth new-max-let-depth))
|
||||
(log-debug (format "total toplevels ~S" total-tls))
|
||||
(log-debug (format "total stxs ~S" total-stxs))
|
||||
(log-debug (format "num-lifts ~S" total-lifts))
|
||||
(for ([i (in-naturals)]
|
||||
[p (in-list (prefix-toplevels new-prefix))])
|
||||
(log-debug (format "new-prefix tls\t~v ~v" i p)))
|
||||
(make-compilation-top
|
||||
new-max-let-depth #hash() new-prefix
|
||||
(make-splice (gen-new-forms new-prefix)))]
|
||||
[else (error 'merge "unrecognized: ~e" top)])))
|
||||
|
||||
(define (merge-forms max-let-depth prefix forms)
|
||||
(if (empty? forms)
|
||||
(values max-let-depth prefix (lambda _ empty))
|
||||
(let*-values ([(fmax-let-depth fprefix gen-fform) (merge-form max-let-depth prefix (first forms))]
|
||||
[(rmax-let-depth rprefix gen-rforms) (merge-forms fmax-let-depth fprefix (rest forms))])
|
||||
(values rmax-let-depth
|
||||
rprefix
|
||||
(lambda args
|
||||
(append (apply gen-fform args)
|
||||
(apply gen-rforms args)))))))
|
||||
|
||||
(define (merge-form max-let-depth prefix form)
|
||||
(match form
|
||||
[(? mod?)
|
||||
(merge-module max-let-depth prefix form)]
|
||||
[(struct seq (forms))
|
||||
(merge-forms max-let-depth prefix forms)]
|
||||
[(struct splice (forms))
|
||||
(merge-forms max-let-depth prefix forms)]
|
||||
[else
|
||||
(values max-let-depth prefix (lambda _ (list form)))]))
|
||||
|
||||
(define (index-of v l)
|
||||
(for/or ([e (in-list l)]
|
||||
[i (in-naturals)]
|
||||
#:when (eq? e v))
|
||||
i))
|
||||
|
||||
(define (merge-prefix root-prefix mod-prefix)
|
||||
(match-define (struct prefix (root-num-lifts root-toplevels root-stxs root-src-insp-desc)) root-prefix)
|
||||
(match-define (struct prefix (mod-num-lifts mod-toplevels mod-stxs src-insp-desc)) mod-prefix)
|
||||
(make-prefix (+ root-num-lifts mod-num-lifts)
|
||||
(append root-toplevels mod-toplevels)
|
||||
(append root-stxs mod-stxs)
|
||||
root-src-insp-desc))
|
||||
|
||||
(struct toplevel-offset-rewriter (rewrite-fun meta) #:transparent)
|
||||
|
||||
(define (compute-new-modvar mv rw)
|
||||
(match mv
|
||||
[(struct module-variable (modidx sym pos phase constantness))
|
||||
(match rw
|
||||
[(struct modvar-rewrite (self-modidx provide->toplevel))
|
||||
(log-debug (format "Rewriting ~a@~a of ~S" sym pos (mpi->path* modidx)))
|
||||
(define tl (provide->toplevel sym pos))
|
||||
(log-debug (format "Rewriting ~a@~a of ~S to ~S" sym pos (mpi->path* modidx) tl))
|
||||
(match-define (toplevel-offset-rewriter rewrite-fun meta)
|
||||
(hash-ref MODULE-TOPLEVEL-OFFSETS self-modidx
|
||||
(lambda ()
|
||||
(error 'compute-new-modvar "toplevel offset not yet computed: ~S" self-modidx))))
|
||||
(log-debug (format "Rewriting ~a@~a of ~S (which is ~a) with ~S" sym pos (mpi->path* modidx) tl meta))
|
||||
(define res (rewrite-fun tl))
|
||||
(log-debug (format "Rewriting ~a@~a of ~S (which is ~a) with ~S and got ~S"
|
||||
sym pos (mpi->path* modidx) tl meta res))
|
||||
res])]))
|
||||
|
||||
(define (filter-rewritable-module-variable? name new-#f-idx toplevel-offset mod-toplevels)
|
||||
(define-values
|
||||
(i new-toplevels remap)
|
||||
(for/fold ([i 0]
|
||||
[new-toplevels empty]
|
||||
[remap empty])
|
||||
([tl (in-list mod-toplevels)]
|
||||
[idx (in-naturals)])
|
||||
(log-debug (format "[~S] mod-prefix tls\t~v ~v"
|
||||
name idx tl))
|
||||
(match tl
|
||||
[(and mv (struct module-variable (modidx sym pos phase constantness)))
|
||||
(define rw ((current-get-modvar-rewrite) modidx))
|
||||
;; XXX We probably don't need to deal with #f phase
|
||||
(unless (or (not phase) (zero? phase))
|
||||
(error 'eliminate-module-variables "Non-zero phases not supported: ~S" mv))
|
||||
(cond
|
||||
; Primitive module like #%paramz
|
||||
[(symbol? rw)
|
||||
(log-debug (format "~S from ~S" sym rw))
|
||||
(values (add1 i)
|
||||
(list* tl new-toplevels)
|
||||
(list* (+ i toplevel-offset) remap))]
|
||||
[(module-path-index? rw)
|
||||
(values (add1 i)
|
||||
(list* tl new-toplevels)
|
||||
(list* (+ i toplevel-offset) remap))]
|
||||
[(modvar-rewrite? rw)
|
||||
(values i
|
||||
new-toplevels
|
||||
(list* (compute-new-modvar mv rw) remap))]
|
||||
[else
|
||||
(error 'filter-rewritable-module-variable? "Unsupported module-rewrite: ~S" rw)])]
|
||||
[tl
|
||||
(cond
|
||||
[(and new-#f-idx (not tl))
|
||||
(log-debug (format "[~S] dropping a #f at ~v that would have been at ~v but is now at ~v"
|
||||
name idx (+ i toplevel-offset) new-#f-idx))
|
||||
(values i
|
||||
new-toplevels
|
||||
(list* new-#f-idx remap))]
|
||||
[else
|
||||
(values (add1 i)
|
||||
(list* tl new-toplevels)
|
||||
(list* (+ i toplevel-offset) remap))])])))
|
||||
; XXX This would be more efficient as a vector
|
||||
(values (reverse new-toplevels)
|
||||
(reverse remap)))
|
||||
|
||||
(define (merge-module max-let-depth top-prefix mod-form)
|
||||
(match mod-form
|
||||
[(struct mod (name srcname self-modidx
|
||||
mod-prefix provides requires body syntax-bodies
|
||||
unexported mod-max-let-depth dummy lang-info
|
||||
internal-context binding-names
|
||||
flags pre-submodules post-submodules))
|
||||
(define top-toplevels (prefix-toplevels top-prefix))
|
||||
(define toplevel-offset (length top-toplevels))
|
||||
(define topsyntax-offset (length (prefix-stxs top-prefix)))
|
||||
(define lift-offset (prefix-num-lifts top-prefix))
|
||||
(define mod-toplevels (prefix-toplevels mod-prefix))
|
||||
(define new-#f-idx
|
||||
(index-of #f top-toplevels))
|
||||
(when new-#f-idx
|
||||
(log-debug (format "[~S] found a #f entry in prefix already at ~v, squashing"
|
||||
name new-#f-idx)))
|
||||
(define-values (new-mod-toplevels toplevel-remap)
|
||||
(filter-rewritable-module-variable? name new-#f-idx toplevel-offset mod-toplevels))
|
||||
(define num-mod-toplevels
|
||||
(length toplevel-remap))
|
||||
(define mod-stxs
|
||||
(length (prefix-stxs mod-prefix)))
|
||||
(define mod-num-lifts
|
||||
(prefix-num-lifts mod-prefix))
|
||||
(define new-mod-prefix
|
||||
(struct-copy prefix mod-prefix
|
||||
[toplevels new-mod-toplevels]))
|
||||
(define offset-meta (vector name srcname self-modidx))
|
||||
(log-debug "Setting toplevel offsets rewriter for ~S and it is currently ~S"
|
||||
offset-meta
|
||||
(hash-ref MODULE-TOPLEVEL-OFFSETS self-modidx #f))
|
||||
(hash-set! MODULE-TOPLEVEL-OFFSETS self-modidx
|
||||
(toplevel-offset-rewriter
|
||||
(lambda (n)
|
||||
(log-debug "Finding offset ~a in ~S of ~S" n toplevel-remap offset-meta)
|
||||
(list-ref toplevel-remap n))
|
||||
offset-meta))
|
||||
(unless (= (length toplevel-remap)
|
||||
(length mod-toplevels))
|
||||
(error 'merge-module "Not remapping everything: ~S ~S"
|
||||
mod-toplevels toplevel-remap))
|
||||
(log-debug (format "[~S] Incrementing toplevels by ~a"
|
||||
name
|
||||
toplevel-offset))
|
||||
(log-debug (format "[~S] Incrementing lifts by ~a"
|
||||
name
|
||||
lift-offset))
|
||||
(log-debug (format "[~S] Filtered mod-vars from ~a to ~a"
|
||||
name
|
||||
(length mod-toplevels)
|
||||
(length new-mod-toplevels)))
|
||||
(values (max max-let-depth mod-max-let-depth)
|
||||
(merge-prefix top-prefix new-mod-prefix)
|
||||
(lambda (top-prefix)
|
||||
(log-debug (format "[~S] Updating top-levels" name))
|
||||
(define top-lift-start (prefix-lift-start top-prefix))
|
||||
(define mod-lift-start (prefix-lift-start mod-prefix))
|
||||
(define total-lifts (prefix-num-lifts top-prefix))
|
||||
(define max-toplevel (+ top-lift-start total-lifts))
|
||||
(define update
|
||||
(update-toplevels
|
||||
(lambda (n)
|
||||
(define new-idx
|
||||
(cond
|
||||
[(mod-lift-start . <= . n)
|
||||
(log-debug (format "[~S] ~v is a lift"
|
||||
name n))
|
||||
(define which-lift (- n mod-lift-start))
|
||||
(define lift-tl (+ top-lift-start lift-offset which-lift))
|
||||
(when (lift-tl . >= . max-toplevel)
|
||||
(error 'merge-module "[~S] lift error: orig(~a) which(~a) max(~a) lifts(~a) now(~a)"
|
||||
name n which-lift num-mod-toplevels mod-num-lifts lift-tl))
|
||||
lift-tl]
|
||||
[else
|
||||
;; xxx maybe change this to a vector after it is made to make this efficient
|
||||
(list-ref toplevel-remap n)]))
|
||||
(log-debug (format "[~S] ~v is remapped to ~v"
|
||||
name n new-idx))
|
||||
new-idx)
|
||||
(lambda (n)
|
||||
(+ n topsyntax-offset))
|
||||
(prefix-syntax-start top-prefix)))
|
||||
(map update body)))]))
|
||||
|
||||
(provide/contract
|
||||
[merge-compilation-top (-> get-modvar-rewrite/c
|
||||
compilation-top?
|
||||
compilation-top?)])
|
43
pkgs/compiler-lib/compiler/demodularizer/module.rkt
Normal file
43
pkgs/compiler-lib/compiler/demodularizer/module.rkt
Normal file
|
@ -0,0 +1,43 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/list
|
||||
racket/match
|
||||
racket/contract
|
||||
compiler/zo-parse
|
||||
"util.rkt")
|
||||
|
||||
(define (->module-path-index s)
|
||||
(if (module-path-index? s)
|
||||
s
|
||||
(module-path-index-join `(quote ,s) #f)))
|
||||
|
||||
(define (wrap-in-kernel-module name srcname lang-info self-modidx top)
|
||||
(match top
|
||||
[(struct compilation-top (max-let-depth binding-namess prefix form))
|
||||
(define-values (reqs new-forms)
|
||||
(partition req? (splice-forms form)))
|
||||
(define requires
|
||||
(map (compose ->module-path-index stx-obj-datum stx-content req-reqs) reqs))
|
||||
(make-compilation-top
|
||||
0
|
||||
#hash()
|
||||
(make-prefix 0 (list #f) empty (prefix-src-inspector-desc prefix))
|
||||
(make-mod name srcname
|
||||
self-modidx
|
||||
prefix
|
||||
empty ; provides
|
||||
(list (cons 0 requires))
|
||||
new-forms
|
||||
empty ; syntax-body
|
||||
(list) ; unexported
|
||||
max-let-depth
|
||||
(make-toplevel 0 0 #f #f) ; dummy
|
||||
lang-info
|
||||
#t
|
||||
(hash) ; no names visible via `module->namespace`
|
||||
empty
|
||||
empty
|
||||
empty))]))
|
||||
|
||||
(provide/contract
|
||||
[wrap-in-kernel-module (symbol? symbol? lang-info/c module-path-index? compilation-top? . -> . compilation-top?)])
|
41
pkgs/compiler-lib/compiler/demodularizer/mpi.rkt
Normal file
41
pkgs/compiler-lib/compiler/demodularizer/mpi.rkt
Normal file
|
@ -0,0 +1,41 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/contract
|
||||
syntax/modresolve)
|
||||
|
||||
(define current-module-path (make-parameter #f))
|
||||
|
||||
(define (mpi->string modidx)
|
||||
(cond
|
||||
[(symbol? modidx) modidx]
|
||||
[else
|
||||
(mpi->path! modidx)]))
|
||||
|
||||
(define MODULE-PATHS (make-parameter #f))
|
||||
(define (mpi->path! mpi)
|
||||
(hash-ref!
|
||||
(MODULE-PATHS) mpi
|
||||
(lambda ()
|
||||
(define _pth
|
||||
(resolve-module-path-index mpi (current-module-path)))
|
||||
(cond
|
||||
[(path? _pth) (simplify-path _pth #t)]
|
||||
[(and (pair? _pth)
|
||||
(path? (cadr _pth)))
|
||||
(list* 'submod (simplify-path (cadr _pth) #t) (cddr _pth))]
|
||||
[else _pth]))))
|
||||
(define (mpi->path* mpi)
|
||||
(hash-ref (MODULE-PATHS) mpi
|
||||
(lambda ()
|
||||
(error 'mpi->path* "Cannot locate cache of path for ~S" mpi))))
|
||||
|
||||
(define submod-path/c
|
||||
(cons/c 'submod
|
||||
(cons/c (or/c symbol? path?)
|
||||
(listof symbol?))))
|
||||
|
||||
(provide/contract
|
||||
[MODULE-PATHS (parameter/c (or/c false/c hash?))]
|
||||
[current-module-path (parameter/c (or/c path-string? submod-path/c))]
|
||||
[mpi->path! (module-path-index? . -> . (or/c symbol? path? submod-path/c))]
|
||||
[mpi->path* (module-path-index? . -> . (or/c symbol? path? pair? submod-path/c))])
|
228
pkgs/compiler-lib/compiler/demodularizer/nodep.rkt
Normal file
228
pkgs/compiler-lib/compiler/demodularizer/nodep.rkt
Normal file
|
@ -0,0 +1,228 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/list
|
||||
racket/match
|
||||
racket/contract
|
||||
compiler/zo-parse
|
||||
"util.rkt"
|
||||
"mpi.rkt"
|
||||
racket/set)
|
||||
|
||||
(define current-excluded-modules (make-parameter (set)))
|
||||
|
||||
(define ZOS (make-parameter #f))
|
||||
(define MODULE-IDX-MAP (make-parameter #f))
|
||||
(define PHASE*MODULE-CACHE (make-parameter #f))
|
||||
|
||||
(define (nodep-file file-to-batch)
|
||||
(define idx-map (make-hash))
|
||||
(parameterize ([ZOS (make-hash)]
|
||||
[MODULE-IDX-MAP idx-map]
|
||||
[PHASE*MODULE-CACHE (make-hasheq)])
|
||||
(define (get-modvar-rewrite modidx)
|
||||
(define pth (mpi->path* modidx))
|
||||
(hash-ref idx-map pth
|
||||
(lambda ()
|
||||
(error 'get-modvar-rewrite "Cannot locate modvar rewrite for ~S" pth))))
|
||||
(match (get-nodep-module-code/path file-to-batch 0)
|
||||
[(struct @phase (_ (struct module-code (modvar-rewrite lang-info ctop))))
|
||||
(values ctop lang-info (modvar-rewrite-modidx modvar-rewrite) get-modvar-rewrite)])))
|
||||
|
||||
(define (path->comp-top pth submod)
|
||||
(hash-ref! (ZOS) (cons pth submod)
|
||||
(λ ()
|
||||
(define zo (call-with-input-file pth zo-parse))
|
||||
(if submod
|
||||
(extract-submod zo submod)
|
||||
zo))))
|
||||
|
||||
(define (extract-submod zo submod)
|
||||
(define m (compilation-top-code zo))
|
||||
(struct-copy compilation-top
|
||||
zo
|
||||
[code (let loop ([m m])
|
||||
(if (and (pair? (mod-name m))
|
||||
(equal? submod (cdr (mod-name m))))
|
||||
m
|
||||
(or (ormap loop (mod-pre-submodules m))
|
||||
(ormap loop (mod-post-submodules m)))))]))
|
||||
|
||||
(define (excluded? pth)
|
||||
(and (path? pth)
|
||||
(set-member? (current-excluded-modules) (path->string pth))))
|
||||
|
||||
(define (get-nodep-module-code/index mpi phase)
|
||||
(define pth (mpi->path! mpi))
|
||||
(cond
|
||||
[(symbol? pth)
|
||||
(hash-set! (MODULE-IDX-MAP) pth pth)
|
||||
pth]
|
||||
[(excluded? pth)
|
||||
(hash-set! (MODULE-IDX-MAP) pth mpi)
|
||||
mpi]
|
||||
[else
|
||||
(get-nodep-module-code/path pth phase)]))
|
||||
|
||||
(define-struct @phase (phase code))
|
||||
(define-struct modvar-rewrite (modidx provide->toplevel))
|
||||
(define-struct module-code (modvar-rewrite lang-info ctop))
|
||||
(define @phase-ctop (compose module-code-ctop @phase-code))
|
||||
|
||||
(define (get-nodep-module-code/path pth phase)
|
||||
(define MODULE-CACHE
|
||||
(hash-ref! (PHASE*MODULE-CACHE) phase make-hash))
|
||||
(if (hash-ref MODULE-CACHE pth #f)
|
||||
#f
|
||||
(hash-ref!
|
||||
MODULE-CACHE pth
|
||||
(lambda ()
|
||||
(define-values (base file dir?) (split-path (if (path-string? pth)
|
||||
pth
|
||||
(cadr pth))))
|
||||
(define base-directory
|
||||
(if (path? base)
|
||||
(path->complete-path base (current-directory))
|
||||
(current-directory)))
|
||||
(define-values (modvar-rewrite lang-info ctop)
|
||||
(begin
|
||||
(log-debug (format "Load ~S @ ~S" pth phase))
|
||||
(nodep/dir
|
||||
(parameterize ([current-load-relative-directory base-directory])
|
||||
(path->comp-top
|
||||
(build-compiled-path
|
||||
base
|
||||
(path-add-suffix file #".zo"))
|
||||
(and (pair? pth) (cddr pth))))
|
||||
pth
|
||||
phase)))
|
||||
(when (and phase (zero? phase))
|
||||
(hash-set! (MODULE-IDX-MAP) pth modvar-rewrite))
|
||||
(make-@phase
|
||||
phase
|
||||
(make-module-code modvar-rewrite lang-info ctop))))))
|
||||
|
||||
(define (nodep/dir top pth phase)
|
||||
(define pth*
|
||||
(cond
|
||||
[(string? pth) (string->path pth)]
|
||||
[(list? pth) (cadr pth)]
|
||||
[else pth]))
|
||||
(parameterize ([current-module-path pth*])
|
||||
(nodep top phase)))
|
||||
|
||||
(define (nodep top phase)
|
||||
(match top
|
||||
[(struct compilation-top (max-let-depth binding-namess prefix form))
|
||||
(define-values (modvar-rewrite lang-info new-form) (nodep-form form phase))
|
||||
(values modvar-rewrite lang-info (make-compilation-top max-let-depth #hash() prefix new-form))]
|
||||
[else (error 'nodep "unrecognized: ~e" top)]))
|
||||
|
||||
(define (nodep-form form phase)
|
||||
(if (mod? form)
|
||||
(let-values ([(modvar-rewrite lang-info mods)
|
||||
(nodep-module form phase)])
|
||||
(values modvar-rewrite lang-info (make-splice mods)))
|
||||
(error 'nodep-form "Doesn't support non mod forms")))
|
||||
|
||||
; XXX interning is hack to fix test/add04.ss and provide/contract renaming
|
||||
(define (intern s) (string->symbol (symbol->string s)))
|
||||
(define (construct-provide->toplevel prefix provides)
|
||||
(define provide-ht (make-hasheq))
|
||||
(for ([tl (prefix-toplevels prefix)]
|
||||
[i (in-naturals)])
|
||||
(when (symbol? tl)
|
||||
(hash-set! provide-ht (intern tl) i)))
|
||||
(lambda (sym pos)
|
||||
(define isym (intern sym))
|
||||
(log-debug (format "Looking up ~S@~a [~S] in ~S" sym pos isym prefix))
|
||||
(define res
|
||||
(hash-ref provide-ht isym
|
||||
(lambda ()
|
||||
(error 'provide->toplevel "Cannot find ~S in ~S" sym prefix))))
|
||||
(log-debug (format "Looked up ~S@~a and got ~v" sym pos res))
|
||||
res))
|
||||
|
||||
(define (nodep-module mod-form phase)
|
||||
(match mod-form
|
||||
[(struct mod (name srcname self-modidx
|
||||
prefix provides requires body syntax-bodies
|
||||
unexported max-let-depth dummy lang-info
|
||||
internal-context binding-names
|
||||
flags pre-submodules post-submodules))
|
||||
(define new-prefix prefix)
|
||||
;; Cache all the mpi paths
|
||||
(for-each (match-lambda
|
||||
[(and mv (struct module-variable (modidx sym pos phase constantness)))
|
||||
(mpi->path! modidx)]
|
||||
[tl
|
||||
(void)])
|
||||
(prefix-toplevels new-prefix))
|
||||
(define mvs (filter module-variable? (prefix-toplevels new-prefix)))
|
||||
(log-debug (format "[~S] module-variables: ~S - ~S" name (length mvs) mvs))
|
||||
(values (make-modvar-rewrite self-modidx (construct-provide->toplevel new-prefix provides))
|
||||
lang-info
|
||||
(append (requires->modlist requires phase)
|
||||
(if (and phase (zero? phase))
|
||||
(begin (log-debug (format "[~S] lang-info : ~S" name lang-info)) ; XXX Seems to always be #f now
|
||||
(list (make-mod name srcname self-modidx
|
||||
new-prefix provides requires body empty
|
||||
unexported max-let-depth dummy lang-info internal-context #hash()
|
||||
empty empty empty)))
|
||||
(begin (log-debug (format "[~S] Dropping module @ ~S" name phase))
|
||||
empty))))]
|
||||
[else (error 'nodep-module "huh?: ~e" mod-form)]))
|
||||
|
||||
(define (+* l r)
|
||||
(if (and l r) (+ l r) #f))
|
||||
|
||||
(define (requires->modlist requires current-phase)
|
||||
(apply append
|
||||
(map
|
||||
(match-lambda
|
||||
[(list-rest req-phase mpis)
|
||||
(define phase (+* current-phase req-phase))
|
||||
(apply append
|
||||
(map (compose extract-modules (lambda (mpi) (get-nodep-module-code/index mpi phase))) mpis))])
|
||||
requires)))
|
||||
|
||||
(define (all-but-last l)
|
||||
(reverse (rest (reverse l))))
|
||||
|
||||
(define REQUIRED (make-hasheq))
|
||||
(define (extract-modules ct)
|
||||
(cond
|
||||
[(compilation-top? ct)
|
||||
(match (compilation-top-code ct)
|
||||
[(and m (? mod?))
|
||||
(list m)]
|
||||
[(struct splice (mods))
|
||||
mods])]
|
||||
[(symbol? ct)
|
||||
(if (hash-has-key? REQUIRED ct)
|
||||
empty
|
||||
(begin
|
||||
(hash-set! REQUIRED ct #t)
|
||||
(list (make-req (make-stx (make-stx-obj ct (wrap empty empty empty) #f #hasheq() 'clean)) (make-toplevel 0 0 #f #f)))))]
|
||||
[(module-path-index? ct)
|
||||
(if (hash-has-key? REQUIRED ct)
|
||||
empty
|
||||
(begin
|
||||
(hash-set! REQUIRED ct #t)
|
||||
(list (make-req (make-stx (make-stx-obj ct (wrap empty empty empty) #f #hasheq() 'clean)) (make-toplevel 0 0 #f #f)))))]
|
||||
[(not ct)
|
||||
empty]
|
||||
[(@phase? ct)
|
||||
(extract-modules (@phase-ctop ct))]
|
||||
[else
|
||||
(error 'extract-modules "Unknown extraction: ~S" ct)]))
|
||||
|
||||
(define get-modvar-rewrite/c
|
||||
(module-path-index? . -> . (or/c symbol? modvar-rewrite? module-path-index?)))
|
||||
(provide/contract
|
||||
[struct modvar-rewrite
|
||||
([modidx module-path-index?]
|
||||
[provide->toplevel (symbol? exact-nonnegative-integer? . -> . exact-nonnegative-integer?)])]
|
||||
[get-modvar-rewrite/c contract?]
|
||||
[current-excluded-modules (parameter/c generic-set?)]
|
||||
[nodep-file (-> path-string?
|
||||
(values compilation-top? lang-info/c module-path-index? get-modvar-rewrite/c))])
|
29
pkgs/compiler-lib/compiler/demodularizer/replace-modidx.rkt
Normal file
29
pkgs/compiler-lib/compiler/demodularizer/replace-modidx.rkt
Normal file
|
@ -0,0 +1,29 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/match
|
||||
racket/vector
|
||||
racket/struct
|
||||
"util.rkt")
|
||||
|
||||
(provide replace-modidx)
|
||||
|
||||
(define (replace-modidx expr self-modidx)
|
||||
(define (inner-update e)
|
||||
(match e
|
||||
[(app prefab-struct-key (and key (not #f)))
|
||||
(apply make-prefab-struct key
|
||||
(map update
|
||||
(struct->list e)))]
|
||||
[(? module-path-index?)
|
||||
(define-values (path mpi) (module-path-index-split e))
|
||||
(if (not path)
|
||||
self-modidx
|
||||
(module-path-index-join path (update mpi)))]
|
||||
[(cons a b)
|
||||
(cons (update a) (update b))]
|
||||
[(? vector?)
|
||||
(vector-map update e)]
|
||||
[else e]))
|
||||
(define-values (first-update update)
|
||||
(build-form-memo inner-update))
|
||||
(first-update expr))
|
108
pkgs/compiler-lib/compiler/demodularizer/update-toplevels.rkt
Normal file
108
pkgs/compiler-lib/compiler/demodularizer/update-toplevels.rkt
Normal file
|
@ -0,0 +1,108 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/match
|
||||
racket/contract
|
||||
compiler/zo-structs
|
||||
"util.rkt")
|
||||
|
||||
(define (update-toplevels toplevel-updater topsyntax-updater topsyntax-new-midpt)
|
||||
(define (inner-update form)
|
||||
(match form
|
||||
[(struct def-values (ids rhs))
|
||||
(make-def-values (map update ids)
|
||||
(update rhs))]
|
||||
[(? def-syntaxes?)
|
||||
(error 'increment "Doesn't handle syntax")]
|
||||
[(? seq-for-syntax?)
|
||||
(error 'increment "Doesn't handle syntax")]
|
||||
[(struct inline-variant (direct inline))
|
||||
(update direct)]
|
||||
[(struct req (reqs dummy))
|
||||
(make-req reqs (update dummy))]
|
||||
[(? mod?)
|
||||
(error 'increment "Doesn't handle modules")]
|
||||
[(struct seq (forms))
|
||||
(make-seq (map update forms))]
|
||||
[(struct splice (forms))
|
||||
(make-splice (map update forms))]
|
||||
[(and l (struct lam (name flags num-params param-types rest? closure-map closure-types tl-map max-let-depth body)))
|
||||
(struct-copy lam l
|
||||
[toplevel-map #f] ; conservative
|
||||
[body (update body)])]
|
||||
[(and c (struct closure (code gen-id)))
|
||||
(struct-copy closure c
|
||||
[code (update code)])]
|
||||
[(and cl (struct case-lam (name clauses)))
|
||||
(define new-clauses
|
||||
(map update clauses))
|
||||
(struct-copy case-lam cl
|
||||
[clauses new-clauses])]
|
||||
[(struct let-one (rhs body type unused?))
|
||||
(make-let-one (update rhs) (update body) type unused?)]
|
||||
[(and f (struct let-void (count boxes? body)))
|
||||
(struct-copy let-void f
|
||||
[body (update body)])]
|
||||
[(and f (struct install-value (_ _ _ rhs body)))
|
||||
(struct-copy install-value f
|
||||
[rhs (update rhs)]
|
||||
[body (update body)])]
|
||||
[(struct let-rec (procs body))
|
||||
(make-let-rec (map update procs) (update body))]
|
||||
[(and f (struct boxenv (_ body)))
|
||||
(struct-copy boxenv f [body (update body)])]
|
||||
[(and f (struct toplevel (_ pos _ _)))
|
||||
(struct-copy toplevel f
|
||||
[pos (toplevel-updater pos)])]
|
||||
[(and f (struct topsyntax (_ pos _)))
|
||||
(struct-copy topsyntax f
|
||||
[pos (topsyntax-updater pos)]
|
||||
[midpt topsyntax-new-midpt])]
|
||||
[(struct application (rator rands))
|
||||
(make-application
|
||||
(update rator)
|
||||
(map update rands))]
|
||||
[(struct branch (test then else))
|
||||
(make-branch
|
||||
(update test)
|
||||
(update then)
|
||||
(update else))]
|
||||
[(struct with-cont-mark (key val body))
|
||||
(make-with-cont-mark
|
||||
(update key)
|
||||
(update val)
|
||||
(update body))]
|
||||
[(struct with-immed-mark (key val body))
|
||||
(make-with-immed-mark
|
||||
(update key)
|
||||
(update val)
|
||||
(update body))]
|
||||
[(struct beg0 (seq))
|
||||
(make-beg0 (map update seq))]
|
||||
[(struct varref (tl dummy))
|
||||
(make-varref (update tl) (update dummy))]
|
||||
[(and f (struct assign (id rhs undef-ok?)))
|
||||
(struct-copy assign f
|
||||
[id (update id)]
|
||||
[rhs (update rhs)])]
|
||||
[(struct apply-values (proc args-expr))
|
||||
(make-apply-values
|
||||
(update proc)
|
||||
(update args-expr))]
|
||||
[(and f (struct primval (id)))
|
||||
f]
|
||||
[(and f (struct localref (unbox? pos clear? other-clears? type)))
|
||||
f]
|
||||
[(and f (not (? form?)))
|
||||
f]
|
||||
))
|
||||
(define-values (first-update update)
|
||||
(build-form-memo inner-update))
|
||||
first-update)
|
||||
|
||||
(provide/contract
|
||||
[update-toplevels
|
||||
((exact-nonnegative-integer? . -> . exact-nonnegative-integer?)
|
||||
(exact-nonnegative-integer? . -> . exact-nonnegative-integer?)
|
||||
exact-nonnegative-integer?
|
||||
. -> .
|
||||
(form? . -> . form?))])
|
79
pkgs/compiler-lib/compiler/demodularizer/util.rkt
Normal file
79
pkgs/compiler-lib/compiler/demodularizer/util.rkt
Normal file
|
@ -0,0 +1,79 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/contract
|
||||
compiler/zo-parse)
|
||||
|
||||
(define (prefix-syntax-start pre)
|
||||
(length (prefix-toplevels pre)))
|
||||
|
||||
(define (prefix-lift-start pre)
|
||||
(define syntax-start (prefix-syntax-start pre))
|
||||
(define total-stxs (length (prefix-stxs pre)))
|
||||
(+ syntax-start total-stxs (if (zero? total-stxs) 0 1)))
|
||||
|
||||
(struct nothing ())
|
||||
|
||||
(define-syntax-rule (eprintf* . args) (void))
|
||||
|
||||
(define (build-form-memo inner-update #:void? [void? #f])
|
||||
(define memo (make-hasheq))
|
||||
(define (update form . args)
|
||||
(eprintf* "Updating on ~a\n" form)
|
||||
(define fin
|
||||
(cond
|
||||
[(hash-ref memo form #f)
|
||||
=> (λ (x)
|
||||
(eprintf* "Found in memo table\n")
|
||||
x)]
|
||||
[else
|
||||
(eprintf* "Not in memo table\n")
|
||||
(let ()
|
||||
(define ph (make-placeholder (nothing)))
|
||||
(hash-set! memo form ph)
|
||||
(define nv (nothing))
|
||||
(dynamic-wind void
|
||||
(λ ()
|
||||
(set! nv (apply inner-update form args)))
|
||||
(λ ()
|
||||
(if (nothing? nv)
|
||||
(eprintf* "inner-update returned nothing (or there was an escape) on ~a\n" form)
|
||||
(begin
|
||||
(placeholder-set! ph nv)
|
||||
(hash-set! memo form nv)))))
|
||||
nv)]))
|
||||
(eprintf* "Updating on ~a ---->\n ~a\n" form fin)
|
||||
fin)
|
||||
(define (first-update form . args)
|
||||
(eprintf* "Top level update on ~a\n" form)
|
||||
(define final (apply update form args))
|
||||
(eprintf* "Top level update on ~a ---->\n ~a\n" form final)
|
||||
(define fin (make-reader-graph final))
|
||||
(eprintf* "Top level update on ~a ---->\n ~a [after reader-graph]\n" form fin)
|
||||
fin)
|
||||
(values first-update update))
|
||||
|
||||
(define lang-info/c
|
||||
(or/c #f (vector/c module-path? symbol? any/c)))
|
||||
|
||||
|
||||
(define (build-compiled-path base name)
|
||||
(build-path
|
||||
(cond [(path? base) base]
|
||||
[(eq? base 'relative) 'same]
|
||||
[(eq? base #f) (error 'batch "Impossible")])
|
||||
"compiled"
|
||||
name))
|
||||
|
||||
|
||||
(provide/contract
|
||||
[prefix-syntax-start (prefix? . -> . exact-nonnegative-integer?)]
|
||||
[prefix-lift-start (prefix? . -> . exact-nonnegative-integer?)]
|
||||
[eprintf ((string?) () #:rest (listof any/c) . ->* . void)]
|
||||
[build-form-memo
|
||||
(((unconstrained-domain-> any/c))
|
||||
(#:void? boolean?)
|
||||
. ->* .
|
||||
(values (unconstrained-domain-> any/c)
|
||||
(unconstrained-domain-> any/c)))]
|
||||
[lang-info/c contract?]
|
||||
[build-compiled-path ((or/c path-string? (symbols 'relative) false/c) path-string? . -> . (or/c path-string? (symbols 'same 'up)))])
|
13
pkgs/compiler-lib/compiler/embed-sig.rkt
Normal file
13
pkgs/compiler-lib/compiler/embed-sig.rkt
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
(module embed-sig racket/base
|
||||
(require racket/unit)
|
||||
(provide compiler:embed^)
|
||||
|
||||
(define-signature compiler:embed^
|
||||
(create-embedding-executable
|
||||
make-embedding-executable
|
||||
write-module-bundle
|
||||
embedding-executable-is-directory?
|
||||
embedding-executable-is-actually-directory?
|
||||
embedding-executable-put-file-extension+style+filters
|
||||
embedding-executable-add-suffix)))
|
9
pkgs/compiler-lib/compiler/embed-unit.rkt
Normal file
9
pkgs/compiler-lib/compiler/embed-unit.rkt
Normal file
|
@ -0,0 +1,9 @@
|
|||
#lang racket/base
|
||||
(require racket/unit
|
||||
racket/contract
|
||||
"sig.rkt"
|
||||
compiler/embed
|
||||
"embed-sig.rkt")
|
||||
|
||||
(define-unit-from-context compiler:embed@ compiler:embed^)
|
||||
(provide compiler:embed@)
|
7
pkgs/compiler-lib/compiler/option-unit.rkt
Normal file
7
pkgs/compiler-lib/compiler/option-unit.rkt
Normal file
|
@ -0,0 +1,7 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/unit compiler/sig compiler/option)
|
||||
|
||||
(provide compiler:option@)
|
||||
|
||||
(define-unit-from-context compiler:option@ compiler:option^)
|
39
pkgs/compiler-lib/compiler/sig.rkt
Normal file
39
pkgs/compiler-lib/compiler/sig.rkt
Normal file
|
@ -0,0 +1,39 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/unit)
|
||||
|
||||
(provide compiler:option^
|
||||
compiler^)
|
||||
|
||||
;; Compiler options
|
||||
(define-signature compiler:option^
|
||||
(somewhat-verbose ; default = #f
|
||||
verbose ; default = #f
|
||||
|
||||
|
||||
setup-prefix ; string to embed in public names;
|
||||
; used mainly for compiling extensions
|
||||
; with the collection name so that
|
||||
; cross-extension conflicts are less
|
||||
; likely in architectures that expose
|
||||
; the public names of loaded extensions
|
||||
; default = ""
|
||||
|
||||
3m ; #t => build for 3m
|
||||
; default = #f
|
||||
|
||||
compile-subcollections ; #t => compile collection subdirectories
|
||||
; default = #t
|
||||
|
||||
))
|
||||
|
||||
;; Compiler procedures
|
||||
(define-signature compiler^
|
||||
(compile-zos
|
||||
|
||||
compile-collection-zos
|
||||
compile-directory-zos
|
||||
compile-directory-srcs
|
||||
|
||||
current-compiler-dynamic-require-wrapper
|
||||
compile-notify-handler))
|
16
pkgs/compiler-lib/info.rkt
Normal file
16
pkgs/compiler-lib/info.rkt
Normal file
|
@ -0,0 +1,16 @@
|
|||
#lang info
|
||||
|
||||
(define collection 'multi)
|
||||
|
||||
(define deps '(["base" #:version "6.5.0.2"]
|
||||
"scheme-lib"
|
||||
"rackunit-lib"
|
||||
"zo-lib"))
|
||||
|
||||
(define implies '("zo-lib"))
|
||||
|
||||
(define pkg-desc "implementation (no documentation) part of \"compiler\"")
|
||||
|
||||
(define pkg-authors '(mflatt))
|
||||
|
||||
(define version "1.4")
|
57
pkgs/compiler-lib/launcher/launcher-sig.rkt
Normal file
57
pkgs/compiler-lib/launcher/launcher-sig.rkt
Normal file
|
@ -0,0 +1,57 @@
|
|||
#lang racket/signature
|
||||
|
||||
make-gracket-launcher
|
||||
make-racket-launcher
|
||||
make-mred-launcher
|
||||
make-mzscheme-launcher
|
||||
|
||||
make-gracket-program-launcher
|
||||
make-racket-program-launcher
|
||||
make-mred-program-launcher
|
||||
make-mzscheme-program-launcher
|
||||
|
||||
gracket-program-launcher-path
|
||||
racket-program-launcher-path
|
||||
mred-program-launcher-path
|
||||
mzscheme-program-launcher-path
|
||||
|
||||
install-gracket-program-launcher
|
||||
install-racket-program-launcher
|
||||
install-mred-program-launcher
|
||||
install-mzscheme-program-launcher
|
||||
|
||||
gracket-launcher-up-to-date?
|
||||
racket-launcher-up-to-date?
|
||||
mred-launcher-up-to-date?
|
||||
mzscheme-launcher-up-to-date?
|
||||
|
||||
gracket-launcher-is-directory?
|
||||
racket-launcher-is-directory?
|
||||
mred-launcher-is-directory?
|
||||
mzscheme-launcher-is-directory?
|
||||
|
||||
gracket-launcher-is-actually-directory?
|
||||
racket-launcher-is-actually-directory?
|
||||
mred-launcher-is-actually-directory?
|
||||
mzscheme-launcher-is-actually-directory?
|
||||
|
||||
gracket-launcher-add-suffix
|
||||
racket-launcher-add-suffix
|
||||
mred-launcher-add-suffix
|
||||
mzscheme-launcher-add-suffix
|
||||
|
||||
gracket-launcher-put-file-extension+style+filters
|
||||
racket-launcher-put-file-extension+style+filters
|
||||
mred-launcher-put-file-extension+style+filters
|
||||
mzscheme-launcher-put-file-extension+style+filters
|
||||
|
||||
build-aux-from-path
|
||||
extract-aux-from-path
|
||||
current-launcher-variant
|
||||
available-mred-variants
|
||||
available-mzscheme-variants
|
||||
available-gracket-variants
|
||||
available-racket-variants
|
||||
|
||||
installed-executable-path->desktop-path
|
||||
installed-desktop-path->icon-path
|
7
pkgs/compiler-lib/launcher/launcher-unit.rkt
Normal file
7
pkgs/compiler-lib/launcher/launcher-unit.rkt
Normal file
|
@ -0,0 +1,7 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/unit "launcher-sig.rkt" launcher/launcher)
|
||||
|
||||
(provide launcher@)
|
||||
|
||||
(define-unit-from-context launcher@ launcher^)
|
37
pkgs/compiler-lib/setup/option-sig.rkt
Normal file
37
pkgs/compiler-lib/setup/option-sig.rkt
Normal file
|
@ -0,0 +1,37 @@
|
|||
(module option-sig racket/base
|
||||
(require racket/unit)
|
||||
|
||||
(provide setup-option^)
|
||||
|
||||
(define-signature setup-option^
|
||||
(setup-program-name
|
||||
verbose
|
||||
make-verbose
|
||||
compiler-verbose
|
||||
clean
|
||||
compile-mode
|
||||
make-only
|
||||
make-zo
|
||||
make-info-domain
|
||||
make-foreign-libs
|
||||
make-launchers
|
||||
make-docs
|
||||
make-user
|
||||
make-planet
|
||||
avoid-main-installation
|
||||
make-tidy
|
||||
make-doc-index
|
||||
check-dependencies
|
||||
fix-dependencies
|
||||
call-install
|
||||
call-post-install
|
||||
pause-on-errors
|
||||
parallel-workers
|
||||
force-unpacks
|
||||
doc-pdf-dest
|
||||
specific-collections
|
||||
specific-planet-dirs
|
||||
archives
|
||||
archive-implies-reindex
|
||||
current-target-directory-getter
|
||||
current-target-plt-directory-getter)))
|
6
pkgs/compiler-lib/setup/option-unit.rkt
Normal file
6
pkgs/compiler-lib/setup/option-unit.rkt
Normal file
|
@ -0,0 +1,6 @@
|
|||
#lang racket/base
|
||||
(require racket/unit setup/option "option-sig.rkt")
|
||||
|
||||
(provide setup:option@ set-flag-params)
|
||||
|
||||
(define-unit-from-context setup:option@ setup-option^)
|
9
pkgs/compiler-lib/setup/setup-unit.rkt
Normal file
9
pkgs/compiler-lib/setup/setup-unit.rkt
Normal file
|
@ -0,0 +1,9 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/unit setup/setup-core)
|
||||
|
||||
(provide setup@)
|
||||
(define-unit setup@
|
||||
(import)
|
||||
(export)
|
||||
(setup-core))
|
11
pkgs/compiler-test/LICENSE.txt
Normal file
11
pkgs/compiler-test/LICENSE.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
compiler-test
|
||||
Copyright (c) 2010-2017 PLT Design Inc.
|
||||
|
||||
This package is distributed under the GNU Lesser General Public
|
||||
License (LGPL). This means that you can link this package into proprietary
|
||||
applications, provided you follow the rules stated in the LGPL. You
|
||||
can also modify this package; if you distribute a modified version,
|
||||
you must distribute it under the terms of the LGPL, which in
|
||||
particular means that you must release the source code for the
|
||||
modified software. See http://www.gnu.org/copyleft/lesser.html
|
||||
for more information.
|
20
pkgs/compiler-test/info.rkt
Normal file
20
pkgs/compiler-test/info.rkt
Normal file
|
@ -0,0 +1,20 @@
|
|||
#lang info
|
||||
|
||||
(define collection 'multi)
|
||||
|
||||
(define deps '("base"))
|
||||
|
||||
(define pkg-desc "tests for \"compiler-lib\"")
|
||||
|
||||
(define pkg-authors '(mflatt))
|
||||
(define build-deps '("compiler-lib"
|
||||
"eli-tester"
|
||||
"rackunit-lib"
|
||||
"net-lib"
|
||||
"scheme-lib"
|
||||
"compatibility-lib"
|
||||
"gui-lib"
|
||||
"htdp-lib"
|
||||
"plai-lib"
|
||||
"rackunit-lib"))
|
||||
(define update-implies '("compiler-lib"))
|
5
pkgs/compiler-test/tests/compiler/collection-zos.rkt
Normal file
5
pkgs/compiler-test/tests/compiler/collection-zos.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang racket
|
||||
(require compiler/compiler)
|
||||
|
||||
;; minimal sanity check:
|
||||
(compile-collection-zos "setup")
|
5
pkgs/compiler-test/tests/compiler/commands/test.rkt
Normal file
5
pkgs/compiler-test/tests/compiler/commands/test.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang racket
|
||||
(require rackunit)
|
||||
(require (only-in (submod compiler/commands/test paths) collection-paths))
|
||||
|
||||
(check-exn exn? (lambda () (collection-paths ".")))
|
19
pkgs/compiler-test/tests/compiler/ctool.rkt
Normal file
19
pkgs/compiler-test/tests/compiler/ctool.rkt
Normal file
|
@ -0,0 +1,19 @@
|
|||
#lang racket
|
||||
(require setup/dirs)
|
||||
|
||||
(define raco (build-path (find-console-bin-dir)
|
||||
(if (eq? (system-type) 'windows)
|
||||
"raco.exe"
|
||||
"raco")))
|
||||
|
||||
(define tmp (make-temporary-file))
|
||||
|
||||
(system* raco
|
||||
"ctool"
|
||||
"--3m"
|
||||
"--c-mods"
|
||||
tmp
|
||||
"++lib"
|
||||
"racket")
|
||||
|
||||
(delete-file tmp)
|
|
@ -0,0 +1,53 @@
|
|||
#lang racket
|
||||
(require tests/eli-tester
|
||||
racket/runtime-path
|
||||
compiler/find-exe)
|
||||
|
||||
(define (capture-output command . args)
|
||||
(define o (open-output-string))
|
||||
(define e (open-output-string))
|
||||
(parameterize ([current-input-port (open-input-string "")]
|
||||
[current-output-port o]
|
||||
[current-error-port e])
|
||||
(apply system* command args))
|
||||
(values (get-output-string o) (get-output-string e)))
|
||||
|
||||
(define (test-on-program filename)
|
||||
;; run modular program, capture output
|
||||
(define-values (modular-output modular-error)
|
||||
(capture-output (find-exe) filename))
|
||||
|
||||
(define demod-filename
|
||||
(let-values ([(base filename dir?) (split-path filename)])
|
||||
(path->string
|
||||
(build-path
|
||||
(find-system-path 'temp-dir)
|
||||
(path-add-suffix filename #"_merged.zo")))))
|
||||
|
||||
;; demodularize
|
||||
(parameterize ([current-input-port (open-input-string "")])
|
||||
(system* (find-exe) "-l-" "raco" "demod" "-o" demod-filename filename))
|
||||
|
||||
;; run whole program
|
||||
(define-values (whole-output whole-error)
|
||||
(capture-output (find-exe) demod-filename))
|
||||
|
||||
;; compare output
|
||||
(test
|
||||
#:failure-prefix (format "~a stdout" filename)
|
||||
whole-output => modular-output
|
||||
#:failure-prefix (format "~a stderr" filename)
|
||||
whole-error => modular-error))
|
||||
|
||||
(define-runtime-path tests "tests")
|
||||
|
||||
(define (modular-program? filename)
|
||||
(and (not (regexp-match #rx"merged" filename))
|
||||
(regexp-match #rx"rkt$" filename)))
|
||||
|
||||
(test
|
||||
(for ([i (in-list (directory-list tests))])
|
||||
(define ip (build-path tests i))
|
||||
(when (modular-program? ip)
|
||||
(printf "Checking ~a\n" ip)
|
||||
(test-on-program (path->string ip)))))
|
3
pkgs/compiler-test/tests/compiler/demodularizer/info.rkt
Normal file
3
pkgs/compiler-test/tests/compiler/demodularizer/info.rkt
Normal file
|
@ -0,0 +1,3 @@
|
|||
#lang info
|
||||
|
||||
(define test-timeouts '(("demod-test.rkt" 300)))
|
|
@ -0,0 +1,2 @@
|
|||
#lang racket/base
|
||||
5
|
|
@ -0,0 +1,5 @@
|
|||
(module kernel-5 '#%kernel
|
||||
(#%require racket/private/map)
|
||||
(define-values (id) (λ (x) x))
|
||||
(define-values (xs) (list 1 2 3 4 5))
|
||||
(map id (map id xs)))
|
|
@ -0,0 +1,2 @@
|
|||
#lang racket
|
||||
5
|
4
pkgs/compiler-test/tests/compiler/embed/embed-asl.rkt
Normal file
4
pkgs/compiler-test/tests/compiler/embed/embed-asl.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
;; The first three lines of this file were inserted by DrRacket. They record metadata
|
||||
;; about the language level of this file in a form that our tools can easily process.
|
||||
#reader(lib "htdp-advanced-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
|
||||
10
|
4
pkgs/compiler-test/tests/compiler/embed/embed-bsl.rkt
Normal file
4
pkgs/compiler-test/tests/compiler/embed/embed-bsl.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
;; The first three lines of this file were inserted by DrRacket. They record metadata
|
||||
;; about the language level of this file in a form that our tools can easily process.
|
||||
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
|
||||
10
|
4
pkgs/compiler-test/tests/compiler/embed/embed-bsla.rkt
Normal file
4
pkgs/compiler-test/tests/compiler/embed/embed-bsla.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
;; The first three lines of this file were inserted by DrRacket. They record metadata
|
||||
;; about the language level of this file in a form that our tools can easily process.
|
||||
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
|
||||
10
|
4
pkgs/compiler-test/tests/compiler/embed/embed-isl.rkt
Normal file
4
pkgs/compiler-test/tests/compiler/embed/embed-isl.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
;; The first three lines of this file were inserted by DrRacket. They record metadata
|
||||
;; about the language level of this file in a form that our tools can easily process.
|
||||
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
|
||||
10
|
4
pkgs/compiler-test/tests/compiler/embed/embed-isll.rkt
Normal file
4
pkgs/compiler-test/tests/compiler/embed/embed-isll.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
;; The first three lines of this file were inserted by DrRacket. They record metadata
|
||||
;; about the language level of this file in a form that our tools can easily process.
|
||||
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
|
||||
10
|
5
pkgs/compiler-test/tests/compiler/embed/embed-me1.rkt
Normal file
5
pkgs/compiler-test/tests/compiler/embed/embed-me1.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
(module embed-me1 mzscheme
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 1\n"))
|
||||
'append))
|
||||
|
9
pkgs/compiler-test/tests/compiler/embed/embed-me10.rkt
Normal file
9
pkgs/compiler-test/tests/compiler/embed/embed-me10.rkt
Normal file
|
@ -0,0 +1,9 @@
|
|||
(module embed-me10 mzscheme
|
||||
(require openssl/mzssl)
|
||||
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda ()
|
||||
(printf "~a\n" ssl-available?))
|
||||
'append))
|
||||
|
||||
|
15
pkgs/compiler-test/tests/compiler/embed/embed-me11-rd.rkt
Normal file
15
pkgs/compiler-test/tests/compiler/embed/embed-me11-rd.rkt
Normal file
|
@ -0,0 +1,15 @@
|
|||
(module embed-me11-rd mzscheme
|
||||
(provide (rename *read-syntax read-syntax)
|
||||
(rename *read read))
|
||||
|
||||
(define (*read port)
|
||||
`(module embed-me11 mzscheme
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda ()
|
||||
(printf ,(read port)
|
||||
;; Use `getenv' at read time!!!
|
||||
,(getenv "ELEVEN")))
|
||||
'append)))
|
||||
|
||||
(define (*read-syntax src port)
|
||||
(*read port)))
|
2
pkgs/compiler-test/tests/compiler/embed/embed-me11.rkt
Normal file
2
pkgs/compiler-test/tests/compiler/embed/embed-me11.rkt
Normal file
|
@ -0,0 +1,2 @@
|
|||
#reader(lib "embed-me11-rd.ss" "tests" "compiler" "embed")
|
||||
"It goes to ~a!\n"
|
15
pkgs/compiler-test/tests/compiler/embed/embed-me12-rd.ss
Normal file
15
pkgs/compiler-test/tests/compiler/embed/embed-me12-rd.ss
Normal file
|
@ -0,0 +1,15 @@
|
|||
(module embed-me11-rd mzscheme
|
||||
(provide (rename *read-syntax read-syntax)
|
||||
(rename *read read))
|
||||
|
||||
(define (*read port)
|
||||
`(module embed-me11 mzscheme
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda ()
|
||||
(printf ,(read port)
|
||||
;; Use `getenv' at read time!!!
|
||||
,(getenv "ELEVEN")))
|
||||
'append)))
|
||||
|
||||
(define (*read-syntax src port)
|
||||
(*read port)))
|
2
pkgs/compiler-test/tests/compiler/embed/embed-me12.ss
Normal file
2
pkgs/compiler-test/tests/compiler/embed/embed-me12.ss
Normal file
|
@ -0,0 +1,2 @@
|
|||
#reader(lib "embed-me12-rd.rkt" "tests" "compiler" "embed")
|
||||
"It goes to ~a!\n"
|
4
pkgs/compiler-test/tests/compiler/embed/embed-me13.rkt
Normal file
4
pkgs/compiler-test/tests/compiler/embed/embed-me13.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
#lang racket/base
|
||||
(require racket/runtime-path)
|
||||
(define-runtime-module-path-index _mod "embed-me14.rkt")
|
||||
(dynamic-require _mod #f)
|
5
pkgs/compiler-test/tests/compiler/embed/embed-me14.rkt
Normal file
5
pkgs/compiler-test/tests/compiler/embed/embed-me14.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang racket/base
|
||||
(require "embed-me13.rkt")
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 14\n"))
|
||||
#:exists 'append)
|
13
pkgs/compiler-test/tests/compiler/embed/embed-me15-one.rkt
Normal file
13
pkgs/compiler-test/tests/compiler/embed/embed-me15-one.rkt
Normal file
|
@ -0,0 +1,13 @@
|
|||
#lang racket/base
|
||||
(define two 2)
|
||||
(provide two)
|
||||
|
||||
(module* one #f
|
||||
(require (submod "." ".." three))
|
||||
(define one 1)
|
||||
(provide one two three))
|
||||
|
||||
(module three racket/base
|
||||
(define three 3)
|
||||
(provide three))
|
||||
|
5
pkgs/compiler-test/tests/compiler/embed/embed-me15.rkt
Normal file
5
pkgs/compiler-test/tests/compiler/embed/embed-me15.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang racket/base
|
||||
(require (submod "embed-me15-one.rkt" one))
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is ~a.\n" (+ 9 one two three)))
|
||||
#:exists 'append)
|
7
pkgs/compiler-test/tests/compiler/embed/embed-me16.rkt
Normal file
7
pkgs/compiler-test/tests/compiler/embed/embed-me16.rkt
Normal file
|
@ -0,0 +1,7 @@
|
|||
#lang racket/base
|
||||
|
||||
;; a `main' submodule:
|
||||
(module main racket/base
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 16.\n"))
|
||||
#:exists 'append))
|
2
pkgs/compiler-test/tests/compiler/embed/embed-me17.rkt
Normal file
2
pkgs/compiler-test/tests/compiler/embed/embed-me17.rkt
Normal file
|
@ -0,0 +1,2 @@
|
|||
#lang racket/base
|
||||
(require (submod "embed-me17a.rkt" sub))
|
9
pkgs/compiler-test/tests/compiler/embed/embed-me17a.rkt
Normal file
9
pkgs/compiler-test/tests/compiler/embed/embed-me17a.rkt
Normal file
|
@ -0,0 +1,9 @@
|
|||
#lang racket
|
||||
|
||||
(define print-17
|
||||
(lambda () (printf "This is 17.\n")))
|
||||
|
||||
(module+ sub
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
print-17
|
||||
#:exists 'append))
|
5
pkgs/compiler-test/tests/compiler/embed/embed-me18.rkt
Normal file
5
pkgs/compiler-test/tests/compiler/embed/embed-me18.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang racket/base
|
||||
(require (submod tests/compiler/embed/embed-me18a sub))
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(dynamic-require '(submod tests/compiler/embed/embed-me18a sub) 'print-18)
|
||||
#:exists 'append)
|
9
pkgs/compiler-test/tests/compiler/embed/embed-me18a.rkt
Normal file
9
pkgs/compiler-test/tests/compiler/embed/embed-me18a.rkt
Normal file
|
@ -0,0 +1,9 @@
|
|||
#lang racket/base
|
||||
(module sub racket/base
|
||||
(provide print-18)
|
||||
(define (print-18)
|
||||
(printf "This is 18.\n")))
|
||||
|
||||
|
||||
|
||||
|
14
pkgs/compiler-test/tests/compiler/embed/embed-me19.rkt
Normal file
14
pkgs/compiler-test/tests/compiler/embed/embed-me19.rkt
Normal file
|
@ -0,0 +1,14 @@
|
|||
#lang racket/base
|
||||
(require racket/runtime-path)
|
||||
|
||||
(define-runtime-module-path plai plai)
|
||||
(define-runtime-module-path plai-reader plai/lang/reader)
|
||||
(define-runtime-module-path runtime racket/runtime-config)
|
||||
|
||||
(parameterize ([read-accept-reader #t])
|
||||
(namespace-require 'racket/base)
|
||||
(eval (read (open-input-string "#lang plai 10"))))
|
||||
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 19.\n"))
|
||||
#:exists 'append)
|
9
pkgs/compiler-test/tests/compiler/embed/embed-me1b.rkt
Normal file
9
pkgs/compiler-test/tests/compiler/embed/embed-me1b.rkt
Normal file
|
@ -0,0 +1,9 @@
|
|||
#lang scheme/base
|
||||
|
||||
(require scheme/runtime-path
|
||||
(for-syntax scheme/base))
|
||||
(define-runtime-path file '(lib "icons/file.gif"))
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 1b\n"))
|
||||
#:exists 'append)
|
||||
|
9
pkgs/compiler-test/tests/compiler/embed/embed-me1c.rkt
Normal file
9
pkgs/compiler-test/tests/compiler/embed/embed-me1c.rkt
Normal file
|
@ -0,0 +1,9 @@
|
|||
#lang scheme/base
|
||||
|
||||
(require scheme/runtime-path
|
||||
(for-syntax scheme/base))
|
||||
(define-runtime-path file '(lib "etc.ss")) ; in mzlib
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 1c\n"))
|
||||
#:exists 'append)
|
||||
|
8
pkgs/compiler-test/tests/compiler/embed/embed-me1d.rkt
Normal file
8
pkgs/compiler-test/tests/compiler/embed/embed-me1d.rkt
Normal file
|
@ -0,0 +1,8 @@
|
|||
#lang scheme/base
|
||||
|
||||
(require scheme/runtime-path
|
||||
(for-syntax scheme/base))
|
||||
(define-runtime-path file '(lib "file.gif" "icons"))
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 1d\n"))
|
||||
#:exists 'append)
|
8
pkgs/compiler-test/tests/compiler/embed/embed-me1e.rkt
Normal file
8
pkgs/compiler-test/tests/compiler/embed/embed-me1e.rkt
Normal file
|
@ -0,0 +1,8 @@
|
|||
#lang scheme/base
|
||||
|
||||
(require scheme/runtime-path
|
||||
(for-syntax scheme/base))
|
||||
(define-runtime-path file '(lib "html"))
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 1e\n"))
|
||||
#:exists 'append)
|
12
pkgs/compiler-test/tests/compiler/embed/embed-me1f.rkt
Normal file
12
pkgs/compiler-test/tests/compiler/embed/embed-me1f.rkt
Normal file
|
@ -0,0 +1,12 @@
|
|||
#lang scheme/base
|
||||
|
||||
(require scheme/runtime-path)
|
||||
|
||||
;; Check that relative paths are preserved:
|
||||
(define-runtime-path f1 "embed-me1f1.rktl")
|
||||
(define-runtime-path f2 "sub/embed-me1f2.rktl")
|
||||
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (parameterize ([current-namespace (make-base-namespace)])
|
||||
(load f1)))
|
||||
#:exists 'append)
|
1
pkgs/compiler-test/tests/compiler/embed/embed-me1f1.rktl
Normal file
1
pkgs/compiler-test/tests/compiler/embed/embed-me1f1.rktl
Normal file
|
@ -0,0 +1 @@
|
|||
(load-relative "sub/embed-me1f2.rktl")
|
6
pkgs/compiler-test/tests/compiler/embed/embed-me2.rkt
Normal file
6
pkgs/compiler-test/tests/compiler/embed/embed-me2.rkt
Normal file
|
@ -0,0 +1,6 @@
|
|||
(module embed-me2 mzscheme
|
||||
(require "embed-me1.ss"
|
||||
mzlib/etc)
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 2: ~a\n" true))
|
||||
'append))
|
7
pkgs/compiler-test/tests/compiler/embed/embed-me20.rkt
Normal file
7
pkgs/compiler-test/tests/compiler/embed/embed-me20.rkt
Normal file
|
@ -0,0 +1,7 @@
|
|||
#lang racket/base
|
||||
|
||||
;; like "embed-me16.rkt" using `module+'
|
||||
(module+ main
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 20.\n"))
|
||||
#:exists 'append))
|
12
pkgs/compiler-test/tests/compiler/embed/embed-me21.rkt
Normal file
12
pkgs/compiler-test/tests/compiler/embed/embed-me21.rkt
Normal file
|
@ -0,0 +1,12 @@
|
|||
#lang racket/base
|
||||
(require racket/match)
|
||||
|
||||
;; check using `racket/match', particularly with a pattern
|
||||
;; that eneds run-time support that may go through a
|
||||
;; compile-time `lazy-require':
|
||||
|
||||
(match "x"
|
||||
[(pregexp "x")
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 21.\n"))
|
||||
#:exists 'append)])
|
6
pkgs/compiler-test/tests/compiler/embed/embed-me22.rkt
Normal file
6
pkgs/compiler-test/tests/compiler/embed/embed-me22.rkt
Normal file
|
@ -0,0 +1,6 @@
|
|||
#lang racket/kernel
|
||||
|
||||
(printf "This is 22.\n")
|
||||
|
||||
(module configure-runtime racket/kernel
|
||||
(printf "Configure!\n"))
|
8
pkgs/compiler-test/tests/compiler/embed/embed-me23.rkt
Normal file
8
pkgs/compiler-test/tests/compiler/embed/embed-me23.rkt
Normal file
|
@ -0,0 +1,8 @@
|
|||
#lang racket/base
|
||||
(require racket/serialize)
|
||||
|
||||
(serializable-struct foo (a b))
|
||||
|
||||
(define f (deserialize (serialize (foo 1 2))))
|
||||
(foo-a f)
|
||||
(foo-b f)
|
3
pkgs/compiler-test/tests/compiler/embed/embed-me24.rkt
Normal file
3
pkgs/compiler-test/tests/compiler/embed/embed-me24.rkt
Normal file
|
@ -0,0 +1,3 @@
|
|||
#lang racket
|
||||
|
||||
"Ok"
|
9
pkgs/compiler-test/tests/compiler/embed/embed-me25.rkt
Normal file
9
pkgs/compiler-test/tests/compiler/embed/embed-me25.rkt
Normal file
|
@ -0,0 +1,9 @@
|
|||
#lang racket/base
|
||||
|
||||
(module+ main
|
||||
12)
|
||||
|
||||
(module submod racket/base
|
||||
11)
|
||||
|
||||
10
|
10
pkgs/compiler-test/tests/compiler/embed/embed-me26.rkt
Normal file
10
pkgs/compiler-test/tests/compiler/embed/embed-me26.rkt
Normal file
|
@ -0,0 +1,10 @@
|
|||
#lang racket/base
|
||||
|
||||
(module+ main
|
||||
12)
|
||||
|
||||
(module submod racket/base
|
||||
11)
|
||||
|
||||
10
|
||||
(require (submod "embed-me27.rkt" other-submod))
|
3
pkgs/compiler-test/tests/compiler/embed/embed-me27.rkt
Normal file
3
pkgs/compiler-test/tests/compiler/embed/embed-me27.rkt
Normal file
|
@ -0,0 +1,3 @@
|
|||
#lang racket/base
|
||||
|
||||
(module+ other-submod 'y)
|
14
pkgs/compiler-test/tests/compiler/embed/embed-me28.rkt
Normal file
14
pkgs/compiler-test/tests/compiler/embed/embed-me28.rkt
Normal file
|
@ -0,0 +1,14 @@
|
|||
#lang racket/base
|
||||
(require racket/place)
|
||||
|
||||
(define (go)
|
||||
(place pch
|
||||
(place-channel-put pch 28)))
|
||||
|
||||
(module+ main
|
||||
(define p (go))
|
||||
(define n (place-channel-get p))
|
||||
(void (place-wait p))
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "~a\n" n))
|
||||
#:exists 'append))
|
5
pkgs/compiler-test/tests/compiler/embed/embed-me29-2.rkt
Normal file
5
pkgs/compiler-test/tests/compiler/embed/embed-me29-2.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang racket/base
|
||||
|
||||
(module inside racket/base
|
||||
(define inside 'inside)
|
||||
(provide inside))
|
5
pkgs/compiler-test/tests/compiler/embed/embed-me29.rkt
Normal file
5
pkgs/compiler-test/tests/compiler/embed/embed-me29.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang racket/base
|
||||
|
||||
(module main racket/base
|
||||
(require (submod "embed-me29-2.rkt" inside))
|
||||
inside)
|
7
pkgs/compiler-test/tests/compiler/embed/embed-me3.rkt
Normal file
7
pkgs/compiler-test/tests/compiler/embed/embed-me3.rkt
Normal file
|
@ -0,0 +1,7 @@
|
|||
(module embed-me3 mzscheme
|
||||
(require mzlib/etc)
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda ()
|
||||
(printf "3 is here, too? ~a\n" true))
|
||||
'append))
|
||||
|
4
pkgs/compiler-test/tests/compiler/embed/embed-me4.rktl
Normal file
4
pkgs/compiler-test/tests/compiler/embed/embed-me4.rktl
Normal file
|
@ -0,0 +1,4 @@
|
|||
(with-output-to-file "stdout"
|
||||
(lambda () (printf "This is the literal expression 4.\n"))
|
||||
'append)
|
||||
|
6
pkgs/compiler-test/tests/compiler/embed/embed-me5.rkt
Normal file
6
pkgs/compiler-test/tests/compiler/embed/embed-me5.rkt
Normal file
|
@ -0,0 +1,6 @@
|
|||
(module embed-me5 mzscheme
|
||||
(require mred)
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda () (printf "This is 5: ~s\n" button%))
|
||||
'append))
|
||||
|
8
pkgs/compiler-test/tests/compiler/embed/embed-me6.rkt
Normal file
8
pkgs/compiler-test/tests/compiler/embed/embed-me6.rkt
Normal file
|
@ -0,0 +1,8 @@
|
|||
(module embed-me6 mzscheme
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda ()
|
||||
(printf "This is 6\n")
|
||||
(with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))])
|
||||
(printf "~a\n" (dynamic-require 'mzlib/etc 'true))))
|
||||
'append))
|
||||
|
8
pkgs/compiler-test/tests/compiler/embed/embed-me6b.rkt
Normal file
8
pkgs/compiler-test/tests/compiler/embed/embed-me6b.rkt
Normal file
|
@ -0,0 +1,8 @@
|
|||
(module embed-me6b racket/base
|
||||
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
|
||||
(lambda ()
|
||||
(printf "This is 6\n")
|
||||
(with-handlers ([void (lambda (exn) (printf "no etc.ss\n"))])
|
||||
(printf "~a\n" (and (dynamic-require 'racket/fixnum #f) #t))))
|
||||
#:exists 'append))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user