13 |
Description: |
Description: |
14 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
15 |
Name: Matthias Blume |
Name: Matthias Blume |
16 |
|
Date: 2001/01/12 21:20:00 JST |
17 |
|
Tag: blume-20010112-sync |
18 |
|
Description: |
19 |
|
|
20 |
|
I am just flushing out some minor changes that had accumulated in |
21 |
|
my private branch in order to sync with the main tree. (This is |
22 |
|
mainly because I had CVS trouble when trying to merge _into_ my |
23 |
|
private branch.) |
24 |
|
|
25 |
|
Most people should be completely unaffected by this. |
26 |
|
|
27 |
|
---------------------------------------------------------------------- |
28 |
|
Name: Allen Leung |
29 |
|
Date: Thu Jan 11 21:03:00 EST 2001 |
30 |
|
Tag: leunga-20010111-labexp=mltree |
31 |
|
Description: |
32 |
|
|
33 |
|
1. Removed the type LabelExp and replace it by MLTree. |
34 |
|
2. Rewritten mltree-simplify with the pattern matcher tool. |
35 |
|
3. There were some bugs in alpha code generator which would break |
36 |
|
64-bit code generation. |
37 |
|
4. Redo the tools to generate code with the |
38 |
|
5. The CM files in MLRISC (and in src/system/smlnj/MLRISC) |
39 |
|
are now generated by perl scripts. |
40 |
|
|
41 |
|
---------------------------------------------------------------------- |
42 |
|
Name: Matthias Blume |
43 |
|
Date: 2001/01/10 21:55:00 JST |
44 |
|
Tag: blume-20010110-rcc |
45 |
|
Description: |
46 |
|
|
47 |
|
The RCC stuff now seems to work (but only on the x86). |
48 |
|
This required hacking of the c-calls interface (and -implementation) in |
49 |
|
MLRISC. |
50 |
|
|
51 |
|
Normal compiler users should be unaffected. |
52 |
|
|
53 |
|
---------------------------------------------------------------------- |
54 |
|
Name: Matthias Blume |
55 |
|
Date: 2001/01/09 01:20:00 JST |
56 |
|
Tag: blume-20010109-rcc |
57 |
|
Description: |
58 |
|
|
59 |
|
This is a fairly big patch, flushing out a large number of pending |
60 |
|
changes that I made to my development copy over the last couple of days. |
61 |
|
|
62 |
|
Of practical relevance at this moment is a workaround for a pickling |
63 |
|
bug that Allen ran into the other day. The cause of the bug itself is |
64 |
|
still unknown and it might be hard to fix it properly, but the |
65 |
|
workaround has some merits of its own (namely somewhat reducing pickling |
66 |
|
overhead for certain libraries). Therefore, I think this solution should |
67 |
|
be satisfactory at this time. |
68 |
|
|
69 |
|
The rest of the changes (i.e., the vast majority) has to do with my |
70 |
|
ongoing efforts of providing direct support for C function calls from |
71 |
|
ML. At the moment there is a new primop "RAW_CCALL", typing magic |
72 |
|
in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new |
73 |
|
case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to |
74 |
|
translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to |
75 |
|
handle RCC. |
76 |
|
|
77 |
|
The last part (the changes to mlriscGen.sml) are still known to be |
78 |
|
wrong on the x86 and not implemented on all other architectures. But |
79 |
|
the infrastructure is in place. I had to change a few functor |
80 |
|
signatures in the backend to be able to route the CCalls interface |
81 |
|
from MLRISC there, and I had to specialize the mltree type (on the |
82 |
|
x86) to include the necessary extensions. (The extensions themselves |
83 |
|
were already there and redy to go in MLRISC/x86). |
84 |
|
|
85 |
|
Everything should be very happy as soon as someone helps me with |
86 |
|
mlriscGen.sml... |
87 |
|
|
88 |
|
In any case, nothing of this should matter to anyone as long as the |
89 |
|
new primop is not being used (which is going to be the case unless you |
90 |
|
find it where I hid it :). The rest of the compiler is completely |
91 |
|
unaffected. |
92 |
|
|
93 |
|
---------------------------------------------------------------------- |
94 |
|
Name: Matthias Blume |
95 |
|
Date: 2001/01/05 00:30:00 JST |
96 |
|
Tag: blume-20010105-primops |
97 |
|
Description: |
98 |
|
|
99 |
|
Added some experimental support for work that I am doing right now. |
100 |
|
These changes mostly concern added primops, but there is also a new |
101 |
|
experimental C library in the runtime system (but currently not enabled |
102 |
|
anywhere except on Linux/X86). |
103 |
|
|
104 |
|
In the course of adding primops (and playing with them), I discovered that |
105 |
|
Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly |
106 |
|
broken. (Zhong was very right he labeled this stuff as "major gross hack".) |
107 |
|
To recover, I made type information in INL_PRIM mandatory and changed |
108 |
|
prim.sml as well as built-in.sml accordingly. The InLine structure now |
109 |
|
has complete, correct type information (i.e., no bottom types). |
110 |
|
|
111 |
|
Since all these changes mean that we need new binfiles, I also bumped the |
112 |
|
version number to 110.32.1. |
113 |
|
|
114 |
|
---------------------------------------------------------------------- |
115 |
|
Name: Matthias Blume |
116 |
|
Date: 2000/12/30 22:10:00 JST |
117 |
|
Tag: blume-20001230-various |
118 |
|
Description: |
119 |
|
|
120 |
|
Added proxy libraries for MLRISC and let MLRISC libraries refer |
121 |
|
to each other using path anchors. (See CM manual for explanation.) |
122 |
|
|
123 |
|
Updated CM documentation. |
124 |
|
|
125 |
|
Fixed some bugs in CM. |
126 |
|
|
127 |
|
Implemented "proxy" libraries (= syntactic sugar for CM). |
128 |
|
|
129 |
|
Added "-quiet" option to makeml and changed runtime system accordingly. |
130 |
|
|
131 |
|
Added cleanup handler for exportML to reset timers and compiler stats. |
132 |
|
|
133 |
|
---------------------------------------------------------------------- |
134 |
|
Name: Lal George |
135 |
|
Date: 2000/12/22 22:22:58 EST 2000 |
136 |
|
Tag: Release_110_32 |
137 |
|
Description: |
138 |
|
|
139 |
|
Infinite precision used throughout MLRISC. |
140 |
|
see MLRISC/mltree/machine-int.sig |
141 |
|
|
142 |
|
---------------------------------------------------------------------- |
143 |
|
Name: Matthias Blume |
144 |
|
Date: 2000/12/22 23:16:00 JST |
145 |
|
Tag: blume-20001222-warn |
146 |
|
Description: |
147 |
|
|
148 |
|
Corrected wording and formatting of some CM warning message which I |
149 |
|
broke in my previous patch. |
150 |
|
|
151 |
|
---------------------------------------------------------------------- |
152 |
|
Name: Matthias Blume |
153 |
|
Date: 2000/12/22 21:20:00 JST |
154 |
|
Tag: blume-20001222-anchorenv |
155 |
|
Description: |
156 |
|
|
157 |
|
Fixed CM's handling of anchor environments in connection with CMB.make. |
158 |
|
|
159 |
|
---------------------------------------------------------------------- |
160 |
|
Name: Matthias Blume |
161 |
|
Date: 2000/12/22 13:15:00 JST |
162 |
|
Tag: blume-20001222-cleanup |
163 |
|
Description: |
164 |
|
|
165 |
|
Removed src/cm/ffi which does not (and did not) belong here. |
166 |
|
|
167 |
|
---------------------------------------------------------------------- |
168 |
|
Name: Matthias Blume |
169 |
|
Date: 2000/12/21 23:55:00 JST |
170 |
|
Tag: blume-20001221-exn |
171 |
|
Description: |
172 |
|
|
173 |
|
Probably most important: CM no longer silently swallows all exceptions |
174 |
|
in the compiler. |
175 |
|
Plus: some other minor CM changes. For example, CM now reports some |
176 |
|
sizes for generated binfiles (code, data, envpickle, lambdapickle). |
177 |
|
|
178 |
|
---------------------------------------------------------------------- |
179 |
|
Name: Matthias Blume |
180 |
|
Date: 2000/12/15 00:01:05 JST |
181 |
|
Tag: blume-20001215-dirtool |
182 |
|
Description: |
183 |
|
|
184 |
|
- "dir" tool added. |
185 |
|
- improvements and cleanup to Tools structure |
186 |
|
- documentation updates |
187 |
|
|
188 |
|
---------------------------------------------------------------------- |
189 |
|
Name: Allen Leung |
190 |
|
Date: Thu Dec 14 03:45:24 EST 2000 |
191 |
|
Description: |
192 |
|
Tag: leunga-20001214-int-inf |
193 |
|
Description: |
194 |
|
|
195 |
|
In IntInf, added these standard functions, which are missing from our |
196 |
|
implementation: |
197 |
|
|
198 |
|
andb : int * int -> int |
199 |
|
xorb : int * int -> int |
200 |
|
orb : int * int -> int |
201 |
|
notb : int -> int |
202 |
|
<< : int * word -> int |
203 |
|
~>> : int * word -> int |
204 |
|
|
205 |
|
Not tested, I hope they are correct. |
206 |
|
|
207 |
|
---------------------------------------------------------------------- |
208 |
|
Name: Allen Leung |
209 |
|
Date: Fri Dec 8 19:23:26 EST 2000 |
210 |
|
Description: |
211 |
|
Tag: leunga-20001208-nowhere |
212 |
|
Description: |
213 |
|
|
214 |
|
Slight improvements to the 'nowhere' tool to handle OR-patterns, |
215 |
|
to generate better error messages etc. Plus a brief manual. |
216 |
|
|
217 |
|
---------------------------------------------------------------------- |
218 |
|
Name: Lal George |
219 |
|
Date: 2000/12/08 09:54:02 EST 2000 |
220 |
|
Tag: Release_110_31 |
221 |
|
Description: |
222 |
|
|
223 |
|
- Version 110.31 |
224 |
|
---------------------------------------------------------------------- |
225 |
|
Name: Allen Leung |
226 |
|
Date: Thu Dec 7 22:01:04 EST 2000 |
227 |
|
Tag: leunga-20001207-cell-monster-hack |
228 |
|
Description: |
229 |
|
|
230 |
|
Major MLRISC internal changes. Affect all clients. |
231 |
|
Summary: |
232 |
|
|
233 |
|
1. Type CELLS.cell = int is now replaced by a datatype. |
234 |
|
As a result, the old regmap is now gone. Almost all interfaces |
235 |
|
in MLRISC change as a consequence. |
236 |
|
|
237 |
|
2. A new brand version of machine description tool (v3.0) that generates |
238 |
|
modules expecting the new interface. The old version is removed. |
239 |
|
|
240 |
|
3. The RA interface has been further abstracted into two new functors. |
241 |
|
RISC_RA and X86RA. These functors have much simpler interfaces. |
242 |
|
[See also directory MLRISC/demo.] |
243 |
|
|
244 |
|
4. Some other new source->source code generation tools are available: |
245 |
|
|
246 |
|
a. MLRISC/Tools/RewriteGen -- generate rewriters from rules. |
247 |
|
b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules. |
248 |
|
I use this tool to generate the peephole optimizers---with the new |
249 |
|
cell type changes, peephole rules are becoming difficult to write |
250 |
|
without conditional pattern matching. |
251 |
|
|
252 |
|
5. More Intmap -> IntHashTable change. Previous changes by Matthias didn't |
253 |
|
cover the entire MLRISC source tree so many things broke. |
254 |
|
|
255 |
|
6. CM files have been moved to the subdirectory MLRISC/cm. |
256 |
|
They are moved because there are a lot of them and they clutter up the |
257 |
|
root dir. |
258 |
|
|
259 |
|
7. More detailed documentation to come... |
260 |
|
|
261 |
|
NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do |
262 |
|
a makeml -rebuild first. This is because of other other |
263 |
|
changes that Matthias has made (see below). |
264 |
|
|
265 |
|
|
266 |
|
---------------------------------------------------------------------- |
267 |
|
Name: Matthias Blume |
268 |
|
Date: 2000/11/30 23:12:00 JST |
269 |
|
Tag: blume-20001130-filereorg |
270 |
|
Description: |
271 |
|
|
272 |
|
Some manual updates and some file reorganizations in CM. |
273 |
|
|
274 |
|
---------------------------------------------------------------------- |
275 |
|
Name: Matthias Blume |
276 |
|
Date: 2000/11/24 17:45:00 JST |
277 |
|
Tag: blume-20001124-link |
278 |
|
Description: |
279 |
|
|
280 |
|
Drastically improved link traversal code for the case that the dynamic |
281 |
|
value was already loaded at bootstrap time. As a result, CM and CMB |
282 |
|
now both load blazingly fast -- even on a very slow machine. Also, |
283 |
|
memory consumption has been further reduced by this. |
284 |
|
|
285 |
|
Warning: The format of the PIDMAP file has changed. THerefore, to |
286 |
|
bootstrap you have to do this: |
287 |
|
|
288 |
|
1. Run CMB.make |
289 |
|
2. Make a symbolic link for the boot directory: |
290 |
|
ln -s sml.boot.ARCH-OS xxx |
291 |
|
3. "Rebuild" the boot directory: |
292 |
|
./makeml -boot xxx -rebuild sml ; rm xxx |
293 |
|
4. Boot normally: |
294 |
|
./makeml |
295 |
|
|
296 |
|
---------------------------------------------------------------------- |
297 |
|
Name: Matthias Blume |
298 |
|
Date: 2000/11/21 21:20:00 JST |
299 |
|
Tag: blume-20001121-tools |
300 |
|
Description: |
301 |
|
|
302 |
|
Continued hacking on autoloading problem -- with success this time. |
303 |
|
Also changed tool-plugin mechanism. See new CM manual. |
304 |
|
|
305 |
|
---------------------------------------------------------------------- |
306 |
|
Name: Matthias Blume |
307 |
|
Date: 2000/11/19 14:30:00 JST |
308 |
|
Tag: blume-20001119-autoload |
309 |
|
Description: |
310 |
|
|
311 |
|
Some hacking to make autoloading faster. Success for CMB, no success |
312 |
|
so far for CM. There is a reduced structure CM' that autoloads faster. |
313 |
|
(This is a temporary, non-documented hack to be eliminated again when |
314 |
|
the general problem is solved.) |
315 |
|
|
316 |
|
---------------------------------------------------------------------- |
317 |
|
Name: Matthias Blume |
318 |
|
Date: 2000/11/17 14:10:00 JST |
319 |
|
Tag: blume-20001117-pickle-lib |
320 |
|
Description: |
321 |
|
|
322 |
|
1. Eliminated comp-lib.cm |
323 |
|
2. Made pickle-lib.cm |
324 |
|
3. Eliminated all uses of intset.sml (from comp-lib.cm) |
325 |
|
4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with |
326 |
|
equivalent constructs from smlnj-lib.cm (INtHashTable). |
327 |
|
5. Point 4. also goes for those uses of intmap.* in MLRISC. |
328 |
|
Duplicated intmap modules thrown out. |
329 |
|
6. Hunted down all duplicated SCC code and replaced it with |
330 |
|
equivalent stuff (GraphSCCFn from smlnj-lib.cm). |
331 |
|
7. Rewrote Feedback module. |
332 |
|
8. Moved sortedlist.sml into viscomp-lib.cm. Eventually it |
333 |
|
should be thrown out and equivalent modules from smlnj-lib.cm |
334 |
|
should be used (IntRedBlackSet, IntListSet, ...). |
335 |
|
|
336 |
|
Confirmed that compiler compiles to fixpoint. |
337 |
|
|
338 |
|
---------------------------------------------------------------------- |
339 |
|
Name: Allen Leung |
340 |
|
Date: 2000/11/10 18:00:00 |
341 |
|
Tag: leunga-20001110-new-x86-fp |
342 |
|
|
343 |
|
A new x86 floating point code generator has been added. |
344 |
|
By default this is turned off. To turn this on, do: |
345 |
|
|
346 |
|
CM.autoload "$smlnj/compiler.cm"; |
347 |
|
Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true; |
348 |
|
|
349 |
|
Changes: |
350 |
|
|
351 |
|
1. Changed FTAN to FPTAN so that the assembly output is correct. |
352 |
|
2. Changed the extension callback for FTANGENT to generate: |
353 |
|
|
354 |
|
fptan |
355 |
|
fstp %st(0) |
356 |
|
instead of |
357 |
|
fptan |
358 |
|
fstpl ftempmem |
359 |
|
|
360 |
|
3. Numerous assembly fixes for x86. |
361 |
|
|
362 |
|
5. Cleaned up the machine code output module x86/x86MC.sml and added |
363 |
|
support for a whole bunch of instructions and addressing modes: |
364 |
|
|
365 |
|
fadd/fsub/fsubr/fmul/fdiv/fdivr %st, %st(n) |
366 |
|
faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp %st, %st(n) |
367 |
|
fadd/fsub/fsubr/fmul/fdiv/fdivr %st(n), %st |
368 |
|
fiadd/fisub/fisubr/fimul/fidiv/fidivr mem |
369 |
|
fxch %st(n) |
370 |
|
fld %st(n) |
371 |
|
fst %st(n) |
372 |
|
fst mem |
373 |
|
fstp %st(n) |
374 |
|
fucom %st(n) |
375 |
|
fucomp %st(n) |
376 |
|
|
377 |
|
All these are now generated when the fast fp mode is turned on. |
378 |
|
|
379 |
|
6. Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs |
380 |
|
|
381 |
|
---------------------------------------------------------------------- |
382 |
|
Name: Matthias Blume |
383 |
|
Date: 2000/11/09 11:20:00 JST |
384 |
|
Tag: blume-20001109-scc |
385 |
|
Description: |
386 |
|
|
387 |
|
Eliminated some code duplication: |
388 |
|
|
389 |
|
1. Added "where" clause to GraphSCCFn in SML/NJ Library. |
390 |
|
(Otherwise the functor is useless.) |
391 |
|
2. Used GraphSCCFn where SCCUtilFun was used previously. |
392 |
|
3. Got rid of SCCUtilFun (in comp-lib.cm). |
393 |
|
|
394 |
|
---------------------------------------------------------------------- |
395 |
|
Name: Lal George |
396 |
|
Date: 2000/11/06 09:02:21 EST 2000 |
397 |
|
Tag: Release_110_30 |
398 |
|
Description: |
399 |
|
|
400 |
|
- Version 110.30 |
401 |
|
---------------------------------------------------------------------- |
402 |
|
Name: Matthias Blume |
403 |
|
Date: 2000/11/04 14:45:00 |
404 |
|
Tag: blume-20001104-mlbuild |
405 |
|
Description: |
406 |
|
|
407 |
|
- Made ml-build faster on startup. |
408 |
|
- Documentation fixes. |
409 |
|
|
410 |
|
---------------------------------------------------------------------- |
411 |
|
Name: Matthias Blume |
412 |
|
Date: 2000/11/02 17:00:00 JST |
413 |
|
Tag: blume-20001102-condcomp |
414 |
|
Description: |
415 |
|
|
416 |
|
- Small tweaks to pickler -- new BOOTFILES! |
417 |
|
- Version bumped to 110.29.2. |
418 |
|
- Added conditional compilation facility to init.cmi (see comment there). |
419 |
|
---------------------------------------------------------------------- |
420 |
|
Name: Allen Leung |
421 |
|
Date: 2000/10/23 19:31:00 |
422 |
|
Tag: leunga-20001023-demo-ra |
423 |
|
|
424 |
|
1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only) |
425 |
|
2. Test programs for the graph library updated |
426 |
|
3. Some new MLRISC demo programs added |
427 |
|
|
428 |
|
---------------------------------------------------------------------- |
429 |
|
Name: Matthias Blume |
430 |
|
Date: 2000/08/31 22:15:00 JST |
431 |
|
Tag: blume-20001017-errmsg |
432 |
|
Description: |
433 |
|
|
434 |
|
More error message grief: Where there used to be no messages, there |
435 |
|
now were some that had bogus error regions. Fixed. |
436 |
|
|
437 |
|
---------------------------------------------------------------------- |
438 |
|
Name: Matthias Blume |
439 |
|
Date: 2000/08/31 17:30:00 JST |
440 |
|
Tag: blume-20001017-v110p29p1 |
441 |
|
Description: |
442 |
|
|
443 |
|
I made a version 110.29.1 with new bootfiles. |
444 |
|
|
445 |
|
Changes: Modified pickler/unpickler for faster and leaner unpickling. |
446 |
|
CM documentation changes and a small bugfix in CM's error reporting. |
447 |
|
|
448 |
|
---------------------------------------------------------------------- |
449 |
|
Name: Lal George |
450 |
|
Date: 2000/09/27 14:42:35 EDT |
451 |
|
Tag: george-20000927-nodestatus |
452 |
|
Description: |
453 |
|
|
454 |
|
Changed the type of the nodestatus, so that: |
455 |
|
|
456 |
|
SPILLED(~1) is now SPILLED |
457 |
|
SPILLED(m) where m>=0 is now MEMREG(m) |
458 |
|
SPILLED(s) where s<~1 is now SPILL_LOC(~s) |
459 |
|
|
460 |
|
---------------------------------------------------------------------- |
461 |
|
Name: Matthias Blume |
462 |
|
Date: 2000/09/07 14:45:00 JST |
463 |
|
Tag: blume-20000907-cmerrmsg |
464 |
|
Description: |
465 |
|
|
466 |
|
Small tweak to CM to avoid getting ML syntax error messages twice. |
467 |
|
|
468 |
|
---------------------------------------------------------------------- |
469 |
|
Name: Matthias Blume |
470 |
|
Date: 2000/08/31 18:00:00 JST |
471 |
|
Tag: blume-20000831-cvsbootfiles |
472 |
|
Description: |
473 |
|
|
474 |
|
New URL for boot files (because the 110.29 files on the BL server do |
475 |
|
now work correctly with my updated install scripts for yacc and lex). |
476 |
|
|
477 |
|
---------------------------------------------------------------------- |
478 |
|
Name: Matthias Blume |
479 |
|
Date: 2000/08/08 12:33:00 JST |
480 |
|
Tag: blume-20000808-manual |
481 |
|
Description: |
482 |
|
|
483 |
|
Tiny update to CM manual. |
484 |
|
|
485 |
|
---------------------------------------------------------------------- |
486 |
|
Name: Allen Leung |
487 |
|
Date: 2000/08/7 19:31:00 |
488 |
|
Tag: leunga-20000807-a-whole-bunch-of-stuff |
489 |
|
|
490 |
|
Moby, C--, SSA, x86, machine descriptions etc. Should only affect C-- |
491 |
|
and Mobdy. |
492 |
|
|
493 |
|
1. x86 |
494 |
|
|
495 |
|
a. Fixes to peephole module by John and Dan. |
496 |
|
b. Assembly fix to SETcc by Allen. |
497 |
|
c. Fix to c-call by John. |
498 |
|
d. Fix to spilling by John. (This one deals with the missing FSTPT case) |
499 |
|
e. Instruction selection optimization to SETcc as suggested by John. |
500 |
|
|
501 |
|
For example, |
502 |
|
|
503 |
|
MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0)) |
504 |
|
|
505 |
|
should generate: |
506 |
|
|
507 |
|
MOVL a, x |
508 |
|
SUBL b, x |
509 |
|
SHRL 31, x |
510 |
|
|
511 |
|
2. IR stuff |
512 |
|
|
513 |
|
A bunch of new DJ-graph related algorithms added. These |
514 |
|
speed up SSA construction. |
515 |
|
|
516 |
|
3. SSA + Scheduling |
517 |
|
|
518 |
|
Added code for SSA and scheduling to the repository |
519 |
|
|
520 |
|
---------------------------------------------------------------------- |
521 |
|
Name: Lal George |
522 |
|
Date: 2000/07/27 11:53:14 EDT |
523 |
|
|
524 |
|
Tag: lal-20000727-linux-ppc |
525 |
|
Description: |
526 |
|
|
527 |
|
Made changes to support Linux PPC. |
528 |
|
p.s. I have confirmation that the 110.29 boot files work fine. |
529 |
|
|
530 |
|
---------------------------------------------------------------------- |
531 |
|
Name: Matthias Blume |
532 |
|
Date: 2000/07/27 17:40:00 JST |
533 |
|
Tag: blume-20000727-scripts |
534 |
|
Description: |
535 |
|
|
536 |
|
!!!! WARNING !!!! |
537 |
|
You must recompile the runtime system! |
538 |
|
!!!! WARNING !!!! |
539 |
|
|
540 |
|
This is basically another round of script-enhancements: |
541 |
|
|
542 |
|
1. sml, ml-build, and ml-makedepend accept options -D and -U to define |
543 |
|
and undefine CM preprocessor symbols. |
544 |
|
|
545 |
|
2. ml-build avoids generating a new heap image if it finds that the |
546 |
|
existing one is still ok. (The condition is that no ML file had to |
547 |
|
be recompiled and all ML files are found to be older that the heap |
548 |
|
file.) |
549 |
|
|
550 |
|
To make this work smoothly, I also hacked the runtime system as |
551 |
|
well as SMLofNJ.SysInfo to get access to the heap image suffix |
552 |
|
(.sparc-solaris, ...) that is currently being used. |
553 |
|
|
554 |
|
Moreover, the signature of CM.mk_standalone has changed. See the |
555 |
|
CM manual. |
556 |
|
|
557 |
|
3. ml-makedepend accepts additional options -n, -a, and -o. (See the |
558 |
|
CM manual for details.) |
559 |
|
|
560 |
|
4. More CM manual updates: |
561 |
|
- all of the above has been documented. |
562 |
|
- there is now a section describing the (CM-related) command line |
563 |
|
arguments that are accepted by the "sml" command |
564 |
|
|
565 |
|
---------------------------------------------------------------------- |
566 |
|
Name: Matthias Blume |
567 |
|
Date: 2000/07/25 16:20:00 JST |
568 |
|
Tag: blume-20000725-makedepend |
569 |
|
Description: |
570 |
|
|
571 |
|
Added a script called ml-makedepend. This can be used in makefiles |
572 |
|
for Unix' make in a way very similar to the "makedepend" command for |
573 |
|
C. |
574 |
|
|
575 |
|
The script internally uses function CM.sources. |
576 |
|
|
577 |
|
Synopsis: |
578 |
|
|
579 |
|
ml-makedepend [-f makefile] cmfile targetname |
580 |
|
|
581 |
|
The default for the makefile is "makefile" (or "Makefile" should |
582 |
|
"makefile" not exist). |
583 |
|
|
584 |
|
ml-makedepend adds a cmfile/targetname-specific section to this |
585 |
|
makefile (after removing the previous version of this section). The |
586 |
|
section contains a single dependency specification with targetname on |
587 |
|
the LHS (targetname is an arbitrary name), and a list of files derived |
588 |
|
from the cmfile on the RHS. Some of the files on the RHS are |
589 |
|
ARCH/OPSYS-specific. Therefore, ml-makedepend inserts references to |
590 |
|
"make" variables $(ARCH) and $(OPSYS) in place of the corresponding |
591 |
|
path names. The makefile writer is responsible for making sure that |
592 |
|
these variables have correct at the time "make" is invoked. |
593 |
|
|
594 |
|
---------------------------------------------------------------------- |
595 |
|
Name: Matthias Blume |
596 |
|
Date: 2000/07/22 23:30:00 JST |
597 |
|
Tag: blume-20000722-urlupdate |
598 |
|
Description: |
599 |
|
|
600 |
|
Changed BOOT and config/srcarchiveurl to point to BL server: |
601 |
|
|
602 |
|
ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/ |
603 |
|
|
604 |
|
---------------------------------------------------------------------- |
605 |
|
Name: Matthias Blume |
606 |
|
Date: 2000/07/18 18:00:00 JST |
607 |
|
Tag: blume-20000718-Version_110_29 |
608 |
|
Description: |
609 |
|
|
610 |
|
1. Updated src/compiler/TopLevel/main/version.sml to version 110.29 |
611 |
|
|
612 |
|
2. Updated config/version to 110.29 |
613 |
|
|
614 |
|
3. Updated config/srcarchiveurl |
615 |
|
|
616 |
|
3. New boot files! |
617 |
|
ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch |
618 |
|
|
619 |
|
---------------------------------------------------------------------- |
620 |
|
Name: Matthias Blume |
621 |
|
Date: 2000/07/11 13:58:00 JST |
622 |
|
Tag: blume-20000711-doctypo |
623 |
|
Description: |
624 |
|
|
625 |
|
Fixed a few typos in CM manual. |
626 |
|
|
627 |
|
---------------------------------------------------------------------- |
628 |
|
Name: Allen Leung |
629 |
|
Date: 2000/06/15 00:38:00 |
630 |
|
Tag: leunga-20000704-sparc-x86 |
631 |
|
|
632 |
|
1. x86 peephole improvement sp += k; sp -= k => nop [from John] |
633 |
|
2. fix to x86 RET bug [found by Dan Grossman] |
634 |
|
3. sparc assembly bug fix for ticc instructions [found by Fermin] |
635 |
|
|
636 |
|
Affects c-- and moby only |
637 |
|
|
638 |
|
---------------------------------------------------------------------- |
639 |
|
Name: Matthias Blume |
640 |
|
Date: 2000/07/04 15:26:00 |
641 |
|
Tag: blume-20000704-trigger |
642 |
|
Description: |
643 |
|
|
644 |
|
1. Improvements to CM manual. |
645 |
|
2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way |
646 |
|
of getting a back-trace. The function, when called, raises an |
647 |
|
internal exception which explicitly carries the full back-trace history, |
648 |
|
so it is unaffected by any intervening handle-raise pairs ("trivial" |
649 |
|
or not). The interactive loop will print that history once it arrives |
650 |
|
at top level. |
651 |
|
Short of having all exceptions implicitly carry the full history, the |
652 |
|
recommended way of using this facility is: |
653 |
|
- compile your program with instrumentation "on" |
654 |
|
- run it, when it raises an exception, look at the history |
655 |
|
- if the history is "cut off" because of some handler, go and modify |
656 |
|
your program so that it explicitly calls BTrace.trigger |
657 |
|
- recompile (still instrumented), and rerun; look at the full history |
658 |
|
|
659 |
|
---------------------------------------------------------------------- |
660 |
|
Name: Matthias Blume |
661 |
|
Date: 2000/07/03 15:36:00 JST |
662 |
|
Tag: blume-20000702-manual |
663 |
|
Description: |
664 |
|
|
665 |
|
Small corrections and updates to CM manual. |
666 |
|
|
667 |
|
---------------------------------------------------------------------- |
668 |
|
Name: Matthias Blume |
669 |
|
Date: 2000/06/29 16:04:00 JST |
670 |
|
Tag: blume-20000629-yacctool |
671 |
|
Description: |
672 |
|
|
673 |
|
Changes: |
674 |
|
|
675 |
|
1. Class "mlyacc" now takes separate arguments to pass options to |
676 |
|
generated .sml- and .sig-files independently. |
677 |
|
2. Corresponding CM manual updates. |
678 |
|
3. BTrace module now also reports call sites. (However, for loop clusters |
679 |
|
it only shows from where the cluster was entered.) There are associated |
680 |
|
modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml. |
681 |
|
|
682 |
|
---------------------------------------------------------------------- |
683 |
|
Name: Matthias Blume |
684 |
|
Date: 2000/06/27 16:51:00 JST |
685 |
|
Tag: blume-20000627-noweb |
686 |
|
Description: |
687 |
|
|
688 |
|
Changes: |
689 |
|
|
690 |
|
1. Implemented "subdir" and "witness" options for noweb tool. |
691 |
|
This caused some slight internal changes in CM's tool implementation. |
692 |
|
2. Fixed bug in "tool plugin" mechanism. This is essentially cleaning |
693 |
|
some remaining issues from earlier path anchor changes. |
694 |
|
3. Updated CM manual accordingly. |
695 |
|
|
696 |
|
4. Changed implementation of back-tracing so that I now consider it |
697 |
|
ready for prime-time. |
698 |
|
|
699 |
|
In particular, you don't have to explicitly trigger the back-trace |
700 |
|
anymore. Instead, if you are running BTrace-instrumented code and |
701 |
|
there is an uncaught exception (regardless of whether or not it was |
702 |
|
raised in instrumented code), the top-level evalloop will print |
703 |
|
the back-trace. |
704 |
|
|
705 |
|
Features: |
706 |
|
|
707 |
|
- Instrumented and uninstrumented code work together seemlessly. |
708 |
|
(Of course, uninstrumented code is never mentioned in actual |
709 |
|
back-traces.) |
710 |
|
|
711 |
|
- Asymptotic time- and space-complexity of instrumented code is |
712 |
|
equal to that of uninstrumented code. (This means that |
713 |
|
tail-recursion is preserved by the instrumentation phase.) |
714 |
|
|
715 |
|
- Modules whose code has been instrumented in different sessions |
716 |
|
work together without problem. |
717 |
|
|
718 |
|
- There is no penalty whatsoever on uninstrumented code. |
719 |
|
|
720 |
|
- There is no penalty on "raise" expressions, even in |
721 |
|
instrumented code. |
722 |
|
|
723 |
|
A potential bug (or perhaps it is a feature, too): |
724 |
|
|
725 |
|
A back-trace reaches no further than the outermost instrumented |
726 |
|
non-trivial "raise". Here, a "trivial" raise is one that is the |
727 |
|
sole RHS of a "handle" rule. Thus, back-traces reach trough |
728 |
|
|
729 |
|
<exp> handle e => raise e |
730 |
|
|
731 |
|
and even |
732 |
|
|
733 |
|
<exp> handle Foo => raise Bar |
734 |
|
|
735 |
|
and, of course, through |
736 |
|
|
737 |
|
<exp> handle Foo => ... |
738 |
|
|
739 |
|
if the exception was not Foo. |
740 |
|
|
741 |
|
Back-traces always reach right through any un-instrumented code |
742 |
|
including any of its "handle" expressions, trivial or not. |
743 |
|
|
744 |
|
To try this out, do the following: |
745 |
|
|
746 |
|
- Erase all existing binfiles for your program. |
747 |
|
(You may keep binfiles for those modules where you think you |
748 |
|
definitely don't need back-tracing.) |
749 |
|
- Turn on back-trace instrumentation: |
750 |
|
SMLofNJ.Internals.BTrace.mode (SOME true); |
751 |
|
- Recompile your program. (I.e., run "CM.make" or "use".) |
752 |
|
- You may now turn instrumentation off again (if you want): |
753 |
|
SMLofNJ.Internals.BTrace.mode (SOME false); |
754 |
|
- Run your program as usual. If it raises an exception that |
755 |
|
reaches the interactive toplevel, then a back-trace will |
756 |
|
automatically be printed. After that, the toplevel loop |
757 |
|
will print the exception history as usual. |
758 |
|
|
759 |
|
---------------------------------------------------------------------- |
760 |
|
Name: Matthias Blume |
761 |
|
Date: 2000/06/26 09:56:46 JST |
762 |
|
Tag: blume-20000626-setup |
763 |
|
Description: |
764 |
|
|
765 |
|
CM: - setup-parameter to "sml" added; this can be used to run arbitrary |
766 |
|
ML code before and after compiling a file (e.g., to set compiler |
767 |
|
flags) |
768 |
|
|
769 |
|
Compiler: - improved btrace API (in core.sml, internals.{sig,sml}) |
770 |
|
- associated changes to btrace.sml (BTrace instrumentation pass) |
771 |
|
- cleaner implementation of btimp.sml (BTrace tracing and report |
772 |
|
module) |
773 |
|
|
774 |
|
CM manual: * new path encoding documented |
775 |
|
* description of setup-parameter to "sml" added |
776 |
|
|
777 |
|
The biggest user-visible change to back-tracing is that it is no |
778 |
|
longer necessary to compile all traced modules within the same |
779 |
|
session. (This was a real limitation.) |
780 |
|
|
781 |
|
---------------------------------------------------------------------- |
782 |
|
Name: Matthias Blume |
783 |
|
Date: 2000/06/24 12:40:00 JST |
784 |
|
Tag: blume-20000624-startup |
785 |
|
Description: |
786 |
|
|
787 |
|
Fixes startup slowdown problem. (I was calling SrcPath.sync a _tad_ |
788 |
|
bit too often -- to put it mildly. :) |
789 |
|
|
790 |
|
---------------------------------------------------------------------- |
791 |
|
Name: Matthias Blume |
792 |
|
Date: 2000/06/23 18:20:00 JST |
793 |
|
Tag: blume-20000623-btrace |
794 |
|
Description: |
795 |
|
|
796 |
|
This updates adds a backtrace facility to aid programmers in debugging |
797 |
|
their programs. This involves the following changes: |
798 |
|
|
799 |
|
1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for |
800 |
|
keeping track of the current call stack. When programs are compiled |
801 |
|
in a special mode, the compiler will insert calls to these hooks |
802 |
|
into the user program. |
803 |
|
"Hook" means that it is possible for different implementations of |
804 |
|
back-tracing to register themselves (at different times). |
805 |
|
|
806 |
|
2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase |
807 |
|
as an Absyn.dec->Absyn.dec rewrite. Normally this phase is turned off. |
808 |
|
It can be turned on using this call: |
809 |
|
SMLofNJ.Internals.BTrace.mode (SOME true); |
810 |
|
Turning it off again: |
811 |
|
SMLofNJ.Internals.BTrace.mode (SOME false); |
812 |
|
Querying the current status: |
813 |
|
SMLofNJ.Internals.BTrace.mode NONE; |
814 |
|
Annotated programs are about twice as big as normal ones, and they |
815 |
|
run a factor of 2 to 4 slower with a dummy back-trace plugin (one |
816 |
|
where all hooks do nothing). The slowdown with a plugin that is |
817 |
|
actually useful (such as the one supplied by default) is even greater, |
818 |
|
but in the case of the default plugin it is still only an constant |
819 |
|
factor (amortized). |
820 |
|
|
821 |
|
3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented |
822 |
|
with a sub-structure BTrace for controlling back-tracing. In particular, |
823 |
|
the above-mentioned function "mode" controls whether the annotation |
824 |
|
phase is invoked by the compiler. Another important function is |
825 |
|
"trigger": when called it aborts the current execution and causes |
826 |
|
the top-level loop to print a full back-trace. |
827 |
|
|
828 |
|
4. compiler/MiscUtil/profile/btimp.sml is the current default plugin |
829 |
|
for back-tracing. It keeps track of the dynamic call stack and in |
830 |
|
addition to that it keeps a partial history at each "level" of that |
831 |
|
stack. For example, if a tail-calls b, b tail-calls c, and c tail-calls |
832 |
|
d and b (at separate times, dynamically), then the report will show: |
833 |
|
|
834 |
|
GOTO d |
835 |
|
/c |
836 |
|
GOTO \b |
837 |
|
CALL a |
838 |
|
|
839 |
|
This shows that there was an initial non-tail call of a, then a |
840 |
|
tail-call to b or c, looping behavior in a cluster of functions that |
841 |
|
consist of b and c, and then a goto from that cluster (i.e., either from |
842 |
|
b or from c) to d. |
843 |
|
|
844 |
|
Note that (depending on the user program) the amount of information |
845 |
|
that the back-trace module has to keep track of at each level is bounded |
846 |
|
by a constant. Thus, the whole implementation has the same asymptotical |
847 |
|
complexity as the original program (both in space and in time). |
848 |
|
|
849 |
|
5. compiler/TopLevel/interact/evalloop.sml has been modified to |
850 |
|
handle the special exception SMLofNJ.Internals.BTrace.BTrace |
851 |
|
which is raised by the "trigger" function mentioned above. |
852 |
|
|
853 |
|
Notes on usage: |
854 |
|
|
855 |
|
- Annotated code works well together with unannotated code: |
856 |
|
Unannotated calls simply do not show up at all in the backtrace. |
857 |
|
|
858 |
|
- It is not a good idea to let modules that were annotated during |
859 |
|
different sessions run at the same time. This is because the compiler |
860 |
|
chooses small integers to identify individual functions, and there |
861 |
|
will be clashes if different modules were compiled in separate sessions. |
862 |
|
(Nothing will crash, and you will even be told about the clashes, but |
863 |
|
back-trace information will in general not be useful.) |
864 |
|
|
865 |
|
- Back-tracing can be confused by callcc and capture. |
866 |
|
|
867 |
|
- The only way of getting a back-trace right now is to explicitly |
868 |
|
invoke the "trigger" function from your user program. Eventually, we |
869 |
|
should make every exception carry back-trace information (if |
870 |
|
available). But since this creates more overhead at "raise"-time |
871 |
|
(similar to the current exnHistory overhead), I have not yet |
872 |
|
implemented this. (The implementation will be rather easy.) With |
873 |
|
exceptions carrying back-trace information, this facility will be even |
874 |
|
more useful because users don't need to modify their programs... |
875 |
|
|
876 |
|
- While it is possible to compile the compiler with back-trace |
877 |
|
annotations turned on (I did it to get some confidence in |
878 |
|
correctness), you must make absolutely sure that core.sml and |
879 |
|
btimp.sml are compiled WITHOUT annotation! (core.sml cannot actually |
880 |
|
be compiled with annotation because there is no core access yet, but |
881 |
|
if you compile btimp.sml with annotation, then the system will go into |
882 |
|
an infinite recursion and crash.) |
883 |
|
Since CM currently does not know about BTrace, the only way to turn |
884 |
|
annotations on and off for different modules of the compiler is to |
885 |
|
interrupt CMB.make, change the settings, and re-invoke it. Of course, |
886 |
|
this is awkward and clumsy. |
887 |
|
|
888 |
|
Sample sessions: |
889 |
|
|
890 |
|
Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000 |
891 |
|
- SMLofNJ.Internals.BTrace.mode (SOME true); |
892 |
|
[autoloading] |
893 |
|
[autoloading done] |
894 |
|
val it = false : bool |
895 |
|
- structure X = struct |
896 |
|
- fun main n = let |
897 |
|
- fun a (x, 0) = d x |
898 |
|
- | a (x, n) = b (x, n - 1) |
899 |
|
- and b (x, n) = c (x, n) |
900 |
|
- and c (x, n) = a (x, n) |
901 |
|
- and d x = e (x, 3) |
902 |
|
- and e (x, 0) = f x |
903 |
|
- | e (x, n) = e (x, n - 1) |
904 |
|
- and f 0 = SMLofNJ.Internals.BTrace.trigger () |
905 |
|
- | f n = n * g (n - 1) |
906 |
|
- and g n = a (n, 3) |
907 |
|
- in |
908 |
|
- f n |
909 |
|
- end |
910 |
|
- end; |
911 |
|
structure X : sig val main : int -> int end |
912 |
|
- X.main 3; |
913 |
|
*** BACK-TRACE *** |
914 |
|
GOTO stdIn:4.2-13.20: X.main[2].f |
915 |
|
GOTO-( stdIn:4.2-13.20: X.main[2].e |
916 |
|
GOTO stdIn:4.2-13.20: X.main[2].d |
917 |
|
/ stdIn:4.2-13.20: X.main[2].a |
918 |
|
| stdIn:4.2-13.20: X.main[2].b |
919 |
|
GOTO-\ stdIn:4.2-13.20: X.main[2].c |
920 |
|
CALL stdIn:4.2-13.20: X.main[2].g |
921 |
|
GOTO stdIn:4.2-13.20: X.main[2].f |
922 |
|
GOTO-( stdIn:4.2-13.20: X.main[2].e |
923 |
|
GOTO stdIn:4.2-13.20: X.main[2].d |
924 |
|
/ stdIn:4.2-13.20: X.main[2].a |
925 |
|
| stdIn:4.2-13.20: X.main[2].b |
926 |
|
GOTO-\ stdIn:4.2-13.20: X.main[2].c |
927 |
|
CALL stdIn:4.2-13.20: X.main[2].g |
928 |
|
GOTO stdIn:4.2-13.20: X.main[2].f |
929 |
|
GOTO-( stdIn:4.2-13.20: X.main[2].e |
930 |
|
GOTO stdIn:4.2-13.20: X.main[2].d |
931 |
|
/ stdIn:4.2-13.20: X.main[2].a |
932 |
|
| stdIn:4.2-13.20: X.main[2].b |
933 |
|
GOTO-\ stdIn:4.2-13.20: X.main[2].c |
934 |
|
CALL stdIn:4.2-13.20: X.main[2].g |
935 |
|
GOTO stdIn:4.2-13.20: X.main[2].f |
936 |
|
CALL stdIn:2.15-17.4: X.main[2] |
937 |
|
- |
938 |
|
|
939 |
|
(Note that because of a FLINt bug the above code currently does not |
940 |
|
compile without BTrace turned on.) |
941 |
|
|
942 |
|
Here is another example, using my modified Tiger compiler: |
943 |
|
|
944 |
|
Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000 |
945 |
|
- SMLofNJ.Internals.BTrace.mode (SOME true); |
946 |
|
[autoloading] |
947 |
|
[autoloading done] |
948 |
|
val it = false : bool |
949 |
|
- CM.make "sources.cm"; |
950 |
|
[autoloading] |
951 |
|
... |
952 |
|
[autoloading done] |
953 |
|
[scanning sources.cm] |
954 |
|
[parsing (sources.cm):parse.sml] |
955 |
|
[creating directory CM/SKEL ...] |
956 |
|
[parsing (sources.cm):tiger.lex.sml] |
957 |
|
... |
958 |
|
[wrote CM/sparc-unix/semant.sml] |
959 |
|
[compiling (sources.cm):main.sml] |
960 |
|
[wrote CM/sparc-unix/main.sml] |
961 |
|
[New bindings added.] |
962 |
|
val it = true : bool |
963 |
|
- Main.compile ("../testcases/merge.tig", "foo.out"); |
964 |
|
*** BACK-TRACE *** |
965 |
|
CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar |
966 |
|
CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp |
967 |
|
CALL lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2] |
968 |
|
GOTO lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2] |
969 |
|
CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp |
970 |
|
CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp |
971 |
|
CALL lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2] |
972 |
|
/ lib/semant.sml:411.65-543.8: SemantFun[2].transDec |
973 |
|
CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2] |
974 |
|
CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp |
975 |
|
CALL lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2] |
976 |
|
CALL main.sml:1.18-118.4: Main.compile[2] |
977 |
|
- |
978 |
|
|
979 |
|
---------------------------------------------------------------------- |
980 |
|
Name: Matthias Blumen |
981 |
|
Date: 2000/06/21 18:00:00 JST |
982 |
|
Tag: blume-20000621-manual |
983 |
|
Description: |
984 |
|
|
985 |
|
CM manual update: Path environments documented. |
986 |
|
|
987 |
|
---------------------------------------------------------------------- |
988 |
|
Name: Matthias Blume |
989 |
|
Date: 2000/06/19 13:40:00 |
990 |
|
Tag: blume-20000619-manual |
991 |
|
Description: |
992 |
|
|
993 |
|
CM manual and system/README update. This only covers the fact that |
994 |
|
there are no more implicit anchors. (Path environments and the "bind" |
995 |
|
option to "cm" have yet to be documented.) |
996 |
|
|
997 |
|
---------------------------------------------------------------------- |
998 |
|
Name: Matthias Blume |
999 |
|
Date: 2000/06/19 11:05:00 JST |
1000 |
|
Tag: blume-20000619-chdir-bugfix |
1001 |
|
Description: |
1002 |
|
|
1003 |
|
Fixed a bug in new SrcPath module that sometimes led to a bad chDir call. |
1004 |
|
|
1005 |
|
---------------------------------------------------------------------- |
1006 |
|
Name: Matthias Blume |
1007 |
|
Date: 2000/06/18 22:00:10 JST |
1008 |
|
Tag: blume-20000618-implicit-anchors-really-gone |
1009 |
|
Description: |
1010 |
|
|
1011 |
|
I updates the previous HISTORY entry where I forgot to mention that |
1012 |
|
implicit anchors are no longer with us. |
1013 |
|
|
1014 |
|
The current update also gets rid of the (now useless) controller |
1015 |
|
CM.Control.implicit_anchors. |
1016 |
|
|
1017 |
|
---------------------------------------------------------------------- |
1018 |
|
Name: Matthias Blume |
1019 |
|
Date: 2000/06/16 17:30:00 JST |
1020 |
|
Tag: blume-20000616-anchorenv |
1021 |
|
Description: |
1022 |
|
|
1023 |
|
This patch implements the long anticipated (just kidding :) "anchor |
1024 |
|
environment" mechanism. In the course of doing this, I also |
1025 |
|
re-implemented CM's internal "SrcPath" module from scratch. The new |
1026 |
|
one should be more robust in certain boundary cases. In any case, it |
1027 |
|
is a lot cleaner than its predecessor (IMHO). |
1028 |
|
|
1029 |
|
This time, although there is yet another boot file format change, I |
1030 |
|
kept the unpickler backward-compatible. As a result, no new bootfiles |
1031 |
|
are necessary and bootstrapping is straightforward. (You cannot read |
1032 |
|
new bootfiles into an old system, but the other way around is no |
1033 |
|
problem.) |
1034 |
|
|
1035 |
|
Visible changes: |
1036 |
|
|
1037 |
|
** 0. Implicit path anchors (without the leading $-symbol) are no |
1038 |
|
longer recognized at all. This means that such path names are not |
1039 |
|
illegal either. For example, the name basis.cm simply refers to a |
1040 |
|
local file called "basis.cm" (i.e, the name is an ordinary path |
1041 |
|
relative to .cm-files directory). Or, to put it differently, only |
1042 |
|
names that start with $ are anchored paths. |
1043 |
|
|
1044 |
|
** 1. The $<singlearc> abbreviation for $/<singlearc> has finally |
1045 |
|
vanished. |
1046 |
|
|
1047 |
|
John (Reppy) had critizised this as soon as I originally proposed and |
1048 |
|
implemented it, but at that time I did not really deeply believe |
1049 |
|
him. :) Now I came full-circle because I need the $<singlearc> syntax |
1050 |
|
in another place where it cannot be seen as an abbreviation for |
1051 |
|
$/<singlearc>. To avoid the confusion, $<singlearc> now means what it |
1052 |
|
seems to mean (i.e., it "expands" into the corresponding anchor |
1053 |
|
value). |
1054 |
|
|
1055 |
|
However, when paths are used as members in CM description files, it |
1056 |
|
continues to be true that there must be at least another arc after the |
1057 |
|
anchor. This is now enforced separately during semantic analysis |
1058 |
|
(i.e., from a lexical/syntactical point of view, the notation is ok.) |
1059 |
|
|
1060 |
|
** 2. The "cm" class now accepts an option "bind". The option's value |
1061 |
|
is a sub-option list of precisely two items -- one labeled "anchor" |
1062 |
|
and the other one labeled "value". As you might expect, "anchor" is |
1063 |
|
used to specify an anchor name to be bound, and "value" specifies what |
1064 |
|
the anchor is being bound to. |
1065 |
|
|
1066 |
|
The value must be a directory name and can be given in either standard |
1067 |
|
syntax (including the possibility that it is itself an anchored path) |
1068 |
|
or native syntax. |
1069 |
|
|
1070 |
|
Examples: |
1071 |
|
|
1072 |
|
foo.cm (bind:(anchor:bar value:$mystuff/bar)) |
1073 |
|
lib.cm (bind:(anchor:a value:"H:\\x\\y\\z")) (* only works under windows *) |
1074 |
|
|
1075 |
|
and so on. |
1076 |
|
|
1077 |
|
The meaning of this is that the .cm-file will be processed with an |
1078 |
|
augmented anchor environment where the given anchor(s) is/are bound to |
1079 |
|
the given values(s). |
1080 |
|
|
1081 |
|
The rationale for having this feature is this: Suppose you are trying |
1082 |
|
to use two different (already stable) libraries a.cm and b.cm (that |
1083 |
|
you perhaps didn't write yourself). Further, suppose each of these |
1084 |
|
two libraries internally uses its own auxiliary library $aux/lib.cm. |
1085 |
|
Normally you would now have a problem because the anchor "lib" can not |
1086 |
|
be bound to more than one value globally. Therefore, the project that |
1087 |
|
uses both a.cm and b.cm must locally redirect the anchor to some other |
1088 |
|
place: |
1089 |
|
|
1090 |
|
a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff)) |
1091 |
|
b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff)) |
1092 |
|
|
1093 |
|
This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or |
1094 |
|
/usr/lib/smlnj/b-stuff/aux.cm, respectively. |
1095 |
|
|
1096 |
|
Hard-wiring path names is a bit inflexible (and CM will verbosely warn |
1097 |
|
you when you do so at the time of CM.stabilize). Therefore, you can |
1098 |
|
also use an anchored path as the value: |
1099 |
|
|
1100 |
|
a.cm (bind:(anchor:lib value:$a-lib)) |
1101 |
|
b.cm (bind:(anchor:lib value:$b-lib)) |
1102 |
|
|
1103 |
|
Now you can globally configure (using the usual CM.Anchor.anchor or |
1104 |
|
pathconfig machinery) bindings for "a-lib" and "b-lib". Since "lib" |
1105 |
|
itself is always locally bound, setting it globally is no longer |
1106 |
|
meaningful or necessary (but it does not hurt either). In fact, "lib" |
1107 |
|
can still be used as a global anchor for separate purposes. As a |
1108 |
|
matter of fact, one can locally define "lib" in terms of a global |
1109 |
|
"lib": |
1110 |
|
|
1111 |
|
a.cm (bind:(anchor:lib value:$lib/a)) |
1112 |
|
b.cm (bind:(anchor:lib value:$lib/b)) |
1113 |
|
|
1114 |
|
** 3: The encoding of path names has changed. This affects the way |
1115 |
|
path names are shown in CM's progress report and also the internal |
1116 |
|
protocol encoding used for parallel make. |
1117 |
|
|
1118 |
|
The encoding now uses one or more ':'-separated segments. Each |
1119 |
|
segments corresponds to a file that has been specified relative to the |
1120 |
|
file given by its preceding segment. The first segment is either |
1121 |
|
relative to the CWD, absolute, or anchored. Each segment itself is |
1122 |
|
basically a Unix pathname; all segments but the first are relative. |
1123 |
|
|
1124 |
|
Example: |
1125 |
|
|
1126 |
|
$foo/bar/baz.cm:a/b/c.sml |
1127 |
|
|
1128 |
|
This path denotes the file bar/a/b/c.sml relative to the directory |
1129 |
|
denoted by anchor "foo". Notice that the encoding also includes |
1130 |
|
baz.cm which is the .cm-file that listed a/b/c.sml. As usual, such |
1131 |
|
paths are resolved relative to the .cm-files directory, so baz.cm must |
1132 |
|
be ignored to get the "real" pathname. |
1133 |
|
|
1134 |
|
To make this fact more obvious, CM puts the names of such "virtual |
1135 |
|
arcs" into parentheses when they appear in progress reports. (No |
1136 |
|
parentheses will appear in the internal protocol encoding.) Thus, |
1137 |
|
what you really see is: |
1138 |
|
|
1139 |
|
$foo/bar/(baz.cm):a/b/c.sml |
1140 |
|
|
1141 |
|
I find this notation to be much more informative than before. |
1142 |
|
|
1143 |
|
Another new feature of the encoding is that special characters |
1144 |
|
including parentheses, colons, (back)slashes, and white space are |
1145 |
|
written as \ddd (where ddd is the decimal encoding of the character). |
1146 |
|
|
1147 |
|
*** The CM manual still needs to be updated. |
1148 |
|
|
1149 |
|
---------------------------------------------------------------------- |
1150 |
|
Name: Allen Leung |
1151 |
|
Date: 2000/06/15 00:38:00 |
1152 |
|
Tag: leunga-20000615-x86-peephole |
1153 |
|
|
1154 |
|
x86 Peephole fix by Fermin. Affects c-- and moby only. |
1155 |
|
|
1156 |
|
---------------------------------------------------------------------- |
1157 |
|
Name: Matthias Blume |
1158 |
|
Date: 2000/06/12 11:40:00 |
1159 |
|
Tag: blume-20000612-parmakefix |
1160 |
|
Description: |
1161 |
|
|
1162 |
|
More cleanup after changing the file naming scheme: This time I |
1163 |
|
repaired the parallel make mechanism for CMB.make which I broke earlier. |
1164 |
|
|
1165 |
|
---------------------------------------------------------------------- |
1166 |
|
Name: Allen Leung |
1167 |
|
Date: 2000/06/09 01:25:00 |
1168 |
|
Tag: leunga-20000609-various |
1169 |
|
|
1170 |
|
None of these things should affect normal SML/NJ operations |
1171 |
|
|
1172 |
|
1. Peephole improvements provided by Fermin (c--) |
1173 |
|
2. New annotation DEFUSE for adding extra dependence (moby) |
1174 |
|
3. New X86 LOCK instructions (moby) |
1175 |
|
4. New machine description language for reservation tables (scheduling) |
1176 |
|
5. Fixes to various optimization/analysis modules (branch chaining, dominator |
1177 |
|
trees etc.) |
1178 |
|
6. I've changed the CM files so that they can work with versions |
1179 |
|
110.0.6, 110.25 and 110.28 |
1180 |
|
|
1181 |
|
---------------------------------------------------------------------- |
1182 |
|
Name: Matthias Blume |
1183 |
|
Date: 2000/06/09 12:40:00 |
1184 |
|
Tag: blume-20000609-log |
1185 |
|
Description: |
1186 |
|
|
1187 |
|
- Removed all(?) remaining RCS Log entries from sources. |
1188 |
|
|
1189 |
|
- Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for |
1190 |
|
anchored paths). |
1191 |
|
|
1192 |
|
---------------------------------------------------------------------- |
1193 |
|
Name: Matthias Blume |
1194 |
|
Date: 2000/06/07 17:00:00 JST |
1195 |
|
Tag: blume-20000607-no-implicit-anchors |
1196 |
|
Description: |
1197 |
|
|
1198 |
|
1. This update changes the default setting for |
1199 |
|
CM.Control.implicit_anchors from true to false. This means that |
1200 |
|
implicit anchors are no longer permitted by default. I also tried to |
1201 |
|
make sure that nothing else still relies on implicit anchors. |
1202 |
|
(This is the next step on the schedule towards a CM that does not even |
1203 |
|
have the notion of implicit anchors anymore.) |
1204 |
|
|
1205 |
|
2. More CM manual updates. |
1206 |
|
|
1207 |
|
3. I managed to track down and fix the pickling bug I mentioned last |
1208 |
|
time. Because of the previously existing workaround, this entails no |
1209 |
|
immediate practical changes. |
1210 |
|
|
1211 |
|
---------------------------------------------------------------------- |
1212 |
|
Name: Matthias Blume |
1213 |
|
Date: 2000/06/06 11:15:00 JST |
1214 |
|
Tag: blume-20000606-lazierpickle |
1215 |
|
Description: |
1216 |
|
|
1217 |
|
!!!! NEW BOOT FILES !!!! |
1218 |
|
|
1219 |
|
* The main purpose of this update is to make library pickles lazier in |
1220 |
|
order to reduce the initial space penalty for autoloading a library. |
1221 |
|
As a result, it is now possible to have $smlnj/compiler.cm |
1222 |
|
pre-registered. This should take care of the many complaints or |
1223 |
|
inquiries about missing structure Compiler. This required changes to |
1224 |
|
CM's internal data structures and small tweaks to some algorithms. |
1225 |
|
|
1226 |
|
As a neat additional effect, it is no longer necessary (for the sake |
1227 |
|
of lean heap image files) to distinguish between a "minimal" CM and a |
1228 |
|
"full" CM. Now, there is only one CM (i.e., the "full" version: |
1229 |
|
$smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the |
1230 |
|
interactive top level. ($smlnj/cm/minimal.cm is gone.) |
1231 |
|
|
1232 |
|
To make the life of compiler-hackers easier, "makeml" now also |
1233 |
|
pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm). In other |
1234 |
|
words, after you bootstrap a new sml for the first time, you will not |
1235 |
|
have to autoload $smlnj/cmb.cm again afterwards. (The first time |
1236 |
|
around you will still have to do it, though.) |
1237 |
|
|
1238 |
|
* A second change consists of major updates to the CM manual. There |
1239 |
|
are now several appendices with summary information and also a full |
1240 |
|
specification of the CM description file syntax. |
1241 |
|
|
1242 |
|
* In directory src/system I added the script "allcross". This script |
1243 |
|
invokes sml and cross-compiles the compiler for all supported |
1244 |
|
architectures. (Useful when providing a new set of boot files.) |
1245 |
|
|
1246 |
|
* There seems to be a latent bug in my "lazy pickles" mechanism. I |
1247 |
|
added a small tweak to pickle-util.sml to work around this problem, |
1248 |
|
but it is not a proper fix yet. I will investigate further. (The |
1249 |
|
effect of the bug was an inflation of library pickle size.) |
1250 |
|
|
1251 |
|
* Version number increased to 110.28.1 (to avoid compatibility problems). |
1252 |
|
|
1253 |
|
---------------------------------------------------------------------- |
1254 |
|
Name: Allen Leung |
1255 |
|
Date: 2000/05/25 17:28 EDT |
1256 |
|
Tag: leunga-20000525-ra |
1257 |
|
Description: |
1258 |
|
|
1259 |
|
Fixed a bug in freezing phase of the register allocator. |
1260 |
|
|
1261 |
|
---------------------------------------------------------------------- |
1262 |
|
Name: Allen Leung |
1263 |
|
Date: 2000/05/15 22:53 EDT |
1264 |
|
Tag: leunga-20000515-alpha-x86-ra |
1265 |
|
Description: |
1266 |
|
|
1267 |
|
1. Alpha |
1268 |
|
|
1269 |
|
Slight cleanup. Removed the instruction SGNXL |
1270 |
|
|
1271 |
|
2. X86 |
1272 |
|
|
1273 |
|
Added the following instructions to the instruction set: |
1274 |
|
|
1275 |
|
ROLx, RORx, |
1276 |
|
BTx, BTSx, BTLx, BTRx, |
1277 |
|
XCHGx, and variants with the LOCK prefix |
1278 |
|
|
1279 |
|
3. Register Allocation |
1280 |
|
|
1281 |
|
The module ra-rewrite-with-renaming has been improved. |
1282 |
|
|
1283 |
|
These have no effect on SML/NJ. |
1284 |
|
|
1285 |
|
---------------------------------------------------------------------- |
1286 |
|
Name: Matthias Blume |
1287 |
|
Date: 2000/05/15 16:20:00 JST |
1288 |
|
Tag: blume-20000515-lightrebuild |
1289 |
|
Description: |
1290 |
|
|
1291 |
|
1. I added an alternative to "-rebuild" to "makeml". The difference is |
1292 |
|
that prior to calling CMB.make' the CM-variable "LIGHT" will be |
1293 |
|
defined. In effect, the command will not build any cross-compiler |
1294 |
|
backends and therefore finish more quickly. |
1295 |
|
|
1296 |
|
The "fixpt" script also takes a "-light" switch to be able to use |
1297 |
|
this new facility while compiling for a fixpoint. |
1298 |
|
|
1299 |
|
2. I replaced all mentions of anchored paths in group owner specifications |
1300 |
|
with simple relative paths (usually starting with ".."). |
1301 |
|
The rationale is that a library's internal workings should not be |
1302 |
|
compromised by the lack of some anchor. (An anchor is necessary |
1303 |
|
for someone who wants to refer to the library by an anchored path, |
1304 |
|
but it should not be necessary to build the same library in the first |
1305 |
|
place.) |
1306 |
|
|
1307 |
|
3. I changed the way CM's tool mechanism determines the shell command |
1308 |
|
string used for things like ml-yacc etc. so that it does not break |
1309 |
|
when CM.Control.implicit_anchors is turned off. |
1310 |
|
|
1311 |
|
---------------------------------------------------------------------- |
1312 |
|
Name: Matthias Blume |
1313 |
Date: 2000/05/12 18:20:00 JST |
Date: 2000/05/12 18:20:00 JST |
1314 |
Tag: blume-20000512-ml-build |
Tag: blume-20000512-ml-build |
1315 |
Description: |
Description: |
1741 |
|
|
1742 |
3. Assembly |
3. Assembly |
1743 |
|
|
1744 |
When generating assemby, resolve the value of client defined constants, |
When generating assembly, resolve the value of client defined constants, |
1745 |
instead of generating symbolic values. This is controlled by the |
instead of generating symbolic values. This is controlled by the |
1746 |
new flag "asm-resolve-constants", which is default to true. |
new flag "asm-resolve-constants", which is default to true. |
1747 |
|
|
1764 |
|
|
1765 |
To this end, I arranged that instead of "structure Core" as "structure |
To this end, I arranged that instead of "structure Core" as "structure |
1766 |
_Core" is bound in the pervasive environment. Core access is done via |
_Core" is bound in the pervasive environment. Core access is done via |
1767 |
_Core (which can never be accidentially rebound because _Core is not a |
_Core (which can never be accidentally rebound because _Core is not a |
1768 |
legal surface-syntax symbol). |
legal surface-syntax symbol). |
1769 |
|
|
1770 |
The current solution is much cleaner because the core environment is |
The current solution is much cleaner because the core environment is |
1774 |
with dynamic and symbolic parts of the core environment. |
with dynamic and symbolic parts of the core environment. |
1775 |
|
|
1776 |
Remaining hackery (to bind the "magic" symbol _Core) is localized in the |
Remaining hackery (to bind the "magic" symbol _Core) is localized in the |
1777 |
compilation mananger's bootstrap compiler (actually: in the "init group" |
compilation manager's bootstrap compiler (actually: in the "init group" |
1778 |
handling). See the comments in src/system/smlnj/init/init.cmi for |
handling). See the comments in src/system/smlnj/init/init.cmi for |
1779 |
more details. |
more details. |
1780 |
|
|
1889 |
(specified in the .cm file at each instance where the tool's class is |
(specified in the .cm file at each instance where the tool's class is |
1890 |
used). |
used). |
1891 |
|
|
1892 |
This was done to accomodate the new "make" and "shell" tools which |
This was done to accommodate the new "make" and "shell" tools which |
1893 |
facilitate fairly seemless hookup to portions of code managed using |
facilitate fairly seamless hookup to portions of code managed using |
1894 |
Makefiles or Shell scripts. |
Makefiles or Shell scripts. |
1895 |
|
|
1896 |
There are no classes "shared" or "private" anymore. Instead, the |
There are no classes "shared" or "private" anymore. Instead, the |
1902 |
|
|
1903 |
All existing tools are described in the CM manual. |
All existing tools are described in the CM manual. |
1904 |
|
|
1905 |
- Slightly better error handling. (CM now surpresses many followup |
- Slightly better error handling. (CM now suppresses many followup |
1906 |
error messages that tended to be more annoying than helpful.) |
error messages that tended to be more annoying than helpful.) |
1907 |
|
|
1908 |
2. Major changes to the compiler's static environment data structures. |
2. Major changes to the compiler's static environment data structures. |
2036 |
|
|
2037 |
I've changed andl to testl in the floating point test sequence |
I've changed andl to testl in the floating point test sequence |
2038 |
whenever appropriate. The Intel optimization guide states that |
whenever appropriate. The Intel optimization guide states that |
2039 |
testl is perferable to andl. |
testl is preferable to andl. |
2040 |
|
|
2041 |
7. RA (x86 only) |
7. RA (x86 only) |
2042 |
|
|
2218 |
|
|
2219 |
1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an |
1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an |
2220 |
additional argument called "template" which is an optional string that |
additional argument called "template" which is an optional string that |
2221 |
specifiel the layout of the tool command line. See the CM manual for |
specifies the layout of the tool command line. See the CM manual for |
2222 |
explanation. |
explanation. |
2223 |
|
|
2224 |
2. A special-purpose tool can be "regisitered" by simply dropping the |
2. A special-purpose tool can be "registered" by simply dropping the |
2225 |
corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same |
corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same |
2226 |
directory where the .cm file lives that uses this tool. (The |
directory where the .cm file lives that uses this tool. (The |
2227 |
behavior/misfeature until now was to look for the tool description |
behavior/misfeature until now was to look for the tool description |
2265 |
rebuild. Having sets of the form <base><k>.{bin,boot}.<arch>-unix for |
rebuild. Having sets of the form <base><k>.{bin,boot}.<arch>-unix for |
2266 |
<k>=1,2,... is normally not a good idea when invoking fixpt. However, |
<k>=1,2,... is normally not a good idea when invoking fixpt. However, |
2267 |
they might be the result of an earlier partial run of fixpt (which |
they might be the result of an earlier partial run of fixpt (which |
2268 |
perhaps got accidentially killed). In this case, fixpt will quickly |
perhaps got accidentally killed). In this case, fixpt will quickly |
2269 |
move through what exists before continuing where it left off earlier, |
move through what exists before continuing where it left off earlier, |
2270 |
and, thus, saves a lot of time. |
and, thus, saves a lot of time. |
2271 |
|
|
2315 |
it from that remote directory. |
it from that remote directory. |
2316 |
This should simplify installation further: For machines that have |
This should simplify installation further: For machines that have |
2317 |
access to the internet, just fetch <version>-config.tgz, unpack it, |
access to the internet, just fetch <version>-config.tgz, unpack it, |
2318 |
edit config/targets, and go (run config/install.sh). The scipt will |
edit config/targets, and go (run config/install.sh). The script will |
2319 |
fetch everything else that it might need all by itself. |
fetch everything else that it might need all by itself. |
2320 |
|
|
2321 |
For CVS users, this mechanism is not relevant for source archives, but |
For CVS users, this mechanism is not relevant for source archives, but |