1 | TODO for trunk -*- Outline -*- |
---|
2 | |
---|
3 | |
---|
4 | * bugs |
---|
5 | |
---|
6 | ** compiler |
---|
7 | *** pre-optimization |
---|
8 | **** changes call-sites and makes them invalid for later pre-optimization |
---|
9 | *** check profiling (-profile vs. profile-declaration) |
---|
10 | **** this doesn't always seem to work, in particular with library units |
---|
11 | **** ##sys#finish-profile should always be written |
---|
12 | is it in `exit'? |
---|
13 | |
---|
14 | ** expander |
---|
15 | *** expansion of r5rs_pitfall 4.2 incorrect |
---|
16 | possibly due to a non-aliased implicit "begin" somewhere |
---|
17 | *** dirty-macros.scm loops when using `defile' |
---|
18 | possibly due to unrenamed special forms |
---|
19 | *** slow |
---|
20 | compiling dynamic.scm with profile-hacked expand: |
---|
21 | |
---|
22 | procedure calls seconds average percent |
---|
23 | ---------------------------------------------------------------- |
---|
24 | ##sys#expand 4659 0.276 0.000 100.000 |
---|
25 | ##sys#expand-0 5574 0.228 0.000 82.608 |
---|
26 | lookup 15878 0.144 0.000 52.173 |
---|
27 | ##sys#check-syntax 3328 0.128 0.000 46.376 |
---|
28 | body1099 3328 0.080 0.000 28.985 |
---|
29 | ##sys#canonicalize-body 462 0.044 0.000 15.942 |
---|
30 | ##sys#alias-global-hook 2388 0.024 0.000 8.695 |
---|
31 | def-culprit1101 683 0.020 0.000 7.246 |
---|
32 | def-se1102 683 0.016 0.000 5.797 |
---|
33 | macro-alias 958 0.012 0.000 4.347 |
---|
34 | macro? 248 0.008 0.000 2.898 |
---|
35 | body187 403 0.004 0.000 1.449 |
---|
36 | ##sys#strip-syntax 403 0.004 0.000 1.449 |
---|
37 | def-alias190 401 0.004 0.000 1.449 |
---|
38 | def-se189 400 0.004 0.000 1.449 |
---|
39 | ##sys#extended-lambda-list? 672 0.000 0.000 0.000 |
---|
40 | ##sys#register-export 229 0.000 0.000 0.000 |
---|
41 | ##sys#extend-macro-environment 60 0.000 0.000 0.000 |
---|
42 | ##sys#macro-subset 2 0.000 0.000 0.000 |
---|
43 | process-command-line 1 0.000 0.000 0.000 |
---|
44 | |
---|
45 | wrapped into a module exporting `*': |
---|
46 | |
---|
47 | procedure calls seconds average percent |
---|
48 | ----------------------------------------------------------------- |
---|
49 | ##sys#expand-0 5357 0.564 0.000 100.000 |
---|
50 | ##sys#expand 4440 0.556 0.000 98.581 |
---|
51 | lookup 15232 0.432 0.000 76.595 |
---|
52 | ##sys#check-syntax 3105 0.236 0.000 41.843 |
---|
53 | ##sys#canonicalize-body 462 0.220 0.000 39.007 |
---|
54 | body1099 3105 0.176 0.000 31.205 |
---|
55 | ##sys#alias-global-hook 1463 0.140 0.000 24.822 |
---|
56 | ##sys#register-undefined 1009 0.052 0.000 9.219 |
---|
57 | macro-alias 963 0.052 0.000 9.219 |
---|
58 | ##sys#module-rename 1715 0.048 0.000 8.510 |
---|
59 | def-culprit1101 685 0.044 0.000 7.801 |
---|
60 | module-undefined-list 1239 0.040 0.000 7.092 |
---|
61 | ##sys#register-export 229 0.028 0.000 4.964 |
---|
62 | def-se1102 685 0.024 0.000 4.255 |
---|
63 | ##sys#expand-import 1 0.024 0.024 4.255 |
---|
64 | module-name 1488 0.016 0.000 2.836 |
---|
65 | macro? 248 0.016 0.000 2.836 |
---|
66 | ##sys#strip-syntax 407 0.012 0.000 2.127 |
---|
67 | body187 407 0.008 0.000 1.418 |
---|
68 | def-alias190 405 0.008 0.000 1.418 |
---|
69 | def-se189 404 0.008 0.000 1.418 |
---|
70 | set-module-exist-list! 229 0.008 0.000 1.418 |
---|
71 | ##sys#finalize-module 1 0.008 0.008 1.418 |
---|
72 | ##sys#extended-lambda-list? 672 0.004 0.000 0.709 |
---|
73 | module-export-list 231 0.004 0.000 0.709 |
---|
74 | check-for-redef 229 0.004 0.000 0.709 |
---|
75 | ##sys#mark-imported-symbols 3 0.004 0.001 0.709 |
---|
76 | merge-se 1 0.004 0.004 0.709 |
---|
77 | set-module-undefined-list! 304 0.000 0.000 0.000 |
---|
78 | module-defined-list 231 0.000 0.000 0.000 |
---|
79 | module-exist-list 230 0.000 0.000 0.000 |
---|
80 | set-module-defined-list! 229 0.000 0.000 0.000 |
---|
81 | ##sys#extend-macro-environment 60 0.000 0.000 0.000 |
---|
82 | ##sys#find-module 4 0.000 0.000 0.000 |
---|
83 | swap1473 4 0.000 0.000 0.000 |
---|
84 | %make-module 3 0.000 0.000 0.000 |
---|
85 | make-module 3 0.000 0.000 0.000 |
---|
86 | ##sys#macro-subset 2 0.000 0.000 0.000 |
---|
87 | module-vexports 2 0.000 0.000 0.000 |
---|
88 | module-sexports 2 0.000 0.000 0.000 |
---|
89 | ##sys#register-primitive-module 2 0.000 0.000 0.000 |
---|
90 | body3068 1 0.000 0.000 0.000 |
---|
91 | set-module-vexports! 1 0.000 0.000 0.000 |
---|
92 | set-module-sexports! 1 0.000 0.000 0.000 |
---|
93 | ##sys#register-module 1 0.000 0.000 0.000 |
---|
94 | process-command-line 1 0.000 0.000 0.000 |
---|
95 | module-import-forms 1 0.000 0.000 0.000 |
---|
96 | module-indirect-exports 1 0.000 0.000 0.000 |
---|
97 | def-sexports3071 1 0.000 0.000 0.000 |
---|
98 | def-vexports3070 1 0.000 0.000 0.000 |
---|
99 | set-module-import-forms! 1 0.000 0.000 0.000 |
---|
100 | module-defined-syntax-list 1 0.000 0.000 0.000 |
---|
101 | |
---|
102 | compiling match-test.scm, with matchable.scm and test.scm included: |
---|
103 | |
---|
104 | procedure calls seconds average percent |
---|
105 | ---------------------------------------------------------------- |
---|
106 | ##sys#expand-0 27576 2.896 0.000 100.000 |
---|
107 | ##sys#expand 20616 2.504 0.000 86.464 |
---|
108 | lookup 96736 1.916 0.000 66.160 |
---|
109 | ##sys#canonicalize-body 3203 1.188 0.000 41.022 |
---|
110 | ##sys#check-syntax 15942 0.680 0.000 23.480 |
---|
111 | macro-alias 12350 0.404 0.000 13.950 |
---|
112 | body1099 15942 0.384 0.000 13.259 |
---|
113 | ##sys#process-syntax-rules 115 0.208 0.001 7.182 |
---|
114 | ##sys#alias-global-hook 7950 0.088 0.000 3.038 |
---|
115 | def-culprit1101 861 0.048 0.000 1.657 |
---|
116 | ##sys#strip-syntax 933 0.036 0.000 1.243 |
---|
117 | def-alias190 931 0.036 0.000 1.243 |
---|
118 | def-se189 930 0.036 0.000 1.243 |
---|
119 | def-se1102 861 0.028 0.000 0.966 |
---|
120 | body187 933 0.008 0.000 0.276 |
---|
121 | ##sys#extended-lambda-list? 581 0.000 0.000 0.000 |
---|
122 | ##sys#extend-macro-environment 93 0.000 0.000 0.000 |
---|
123 | ##sys#register-syntax-export 33 0.000 0.000 0.000 |
---|
124 | macro? 16 0.000 0.000 0.000 |
---|
125 | ##sys#register-export 11 0.000 0.000 0.000 |
---|
126 | ##sys#macro-subset 2 0.000 0.000 0.000 |
---|
127 | process-command-line 1 0.000 0.000 0.000 |
---|
128 | |
---|
129 | ** modules |
---|
130 | *** `require-extension' fails in interpreter when extension is .so without import library |
---|
131 | probably because load and import is in same toplevel form, and the |
---|
132 | load is performed after the import (at runtime). A possibly fix |
---|
133 | would be to load the extension immediately (at |
---|
134 | compile-/expansion-time), when import is #t and o import lib |
---|
135 | exists. |
---|
136 | |
---|
137 | |
---|
138 | * tasks |
---|
139 | |
---|
140 | ** branches |
---|
141 | *** test irregular branch, merge if performance is acceptable |
---|
142 | *** try to improve performance in lazy-gensyms |
---|
143 | |
---|
144 | ** expander |
---|
145 | *** at some stage disable debug-output in expand.scm |
---|
146 | |
---|
147 | ** module issues |
---|
148 | *** need a way to omit generating module registration without generating import lib |
---|
149 | for example when compiling static version, where implib already exists |
---|
150 | *** code-duplication in compiler and evaluator for ##core#module |
---|
151 | *** "scheme" module does not include some special forms ("define-syntax", etc.) |
---|
152 | *** import-for-syntax imports value bindings into import-env |
---|
153 | should actually be a distinct meta-import-env. |
---|
154 | (does it work at all?) |
---|
155 | *** curried define performs expansion in empty se - problem? |
---|
156 | (as comment in expand.scm indicated (##sys#register-export)) |
---|
157 | *** check phase separation and module access |
---|
158 | **** interaction for define-for-syntax, begin-for-syntax, and macros |
---|
159 | also check for different execution modes (compile-time, run-time, csi, ...) |
---|
160 | *** checks to be implemented |
---|
161 | **** reimport of imported id |
---|
162 | **** unused defs? |
---|
163 | |
---|
164 | ** compiler |
---|
165 | *** generate object-files in /tmp (or TMPDIR)? |
---|
166 | |
---|
167 | ** setup/install |
---|
168 | *** setup-download |
---|
169 | **** use HTTP_PROXY env. var |
---|
170 | **** handle redirects in http-fetch |
---|
171 | *** automatically update db after extension installation? |
---|
172 | |
---|
173 | ** library units |
---|
174 | *** read-mark list should be stored in read-table |
---|
175 | *** ports should have indicator slot about exact type (tcp, file, ...) |
---|
176 | |
---|
177 | ** syntax-error |
---|
178 | *** if ##sys#current-module is set, add name to error message? |
---|
179 | *** fluidly keep track of expanded forms (extend meaning of culprit) to pprint pruned expr on error |
---|
180 | |
---|
181 | ** build |
---|
182 | *** rules.make should really be generated by a script |
---|
183 | *** need script to process import libraries for generating indices for doc.callcc.org |
---|
184 | then tell Toby about it |
---|
185 | |
---|
186 | |
---|
187 | * tests |
---|
188 | |
---|
189 | ** optional longer run (env. var) |
---|
190 | *** syntax-rules-stress-test |
---|
191 | *** fully compiled ec-tests |
---|
192 | |
---|
193 | |
---|
194 | * documentation |
---|
195 | |
---|
196 | ** document ("HI/LO") expander (-> wiki, internals) |
---|
197 | will we ever have the time for that? |
---|
198 | ** document new .meta entries in tutorials on wiki |
---|
199 | depends, test-depends |
---|
200 | ** chicken.texi needs to be regenerated |
---|
201 | |
---|
202 | |
---|
203 | * optimizations |
---|
204 | |
---|
205 | ** self-recursion optimization |
---|
206 | what MacScheme called "benchmark-mode" (assume self-calls are recursion) |
---|
207 | *** needs declaration or option, >= -O2 |
---|
208 | |
---|
209 | ** when inlining, consing arg-list with "list" may make get-keyword possible foldable |
---|
210 | |
---|
211 | ** compiler-support for get-keyword ? |
---|
212 | |
---|
213 | ** lambda-fusion / "fuse-and-dispatch" (suggested by Alex) |
---|
214 | convert groups of local lambdas referenced to only in operator-position into |
---|
215 | looping lambda + dispatch (static variable can be used), otherwise similar to |
---|
216 | a conditional |
---|
217 | *** new forms (after optimization, prepared language) |
---|
218 | [##core#dispatch LAMBDABODY1 ... BODY] |
---|
219 | [##core#call/dispatch {INDEX} ARGUMENT1 ...} |
---|
220 | |
---|
221 | ** handle optional args primitively |
---|
222 | for example, set to distinguished val (checking argc) on C level, core |
---|
223 | primitive for checking this - should be quite simple, but llist processing |
---|
224 | (decompose-lambda-list) will be more expensive and cumbersome. |
---|
225 | |
---|
226 | ** pre-hashed symbols (extra symbol slot) |
---|
227 | The memory usage should be acceptable, performance gain is hard to guess. |
---|
228 | Some experiments indicate that hashing the string is cheaper than it appears, |
---|
229 | but low-level hashtables should get the most of this (and thus speed up |
---|
230 | the compiler) |
---|
231 | |
---|
232 | ** Lisp2-hack by Dybvig |
---|
233 | *** add function-cell to symbol, call on direct call without checks |
---|
234 | *** initialized to trap function on set!/define, which does fixup |
---|
235 | *** would also allow inline-caching hacks |
---|