Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/HISTORY
ViewVC logotype

Annotation of /sml/trunk/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log


Revision 749 - (view) (download)

1 : dbm 570 This is the HISTORY file for the Yale SML/NJ CVS repository.
2 :    
3 :     An entry should be made for _every_ commit to the repository.
4 :     The entries in this file will be used when creating the README
5 :     for new versions, so keep that in mind when writing the
6 :     description.
7 :    
8 :     The form of an entry should be:
9 :    
10 :     Name:
11 :     Date:
12 :     Tag: <post-commit CVS tag>
13 :     Description:
14 : george 749 ----------------------------------------------------------------------
15 :     Name: Lal George
16 :     Date: 2000/12/08 09:54:02 EST 2000
17 :     Tag: Release_110_31
18 :     Description:
19 : george 705
20 : george 749 - Version 110.31
21 : leunga 591 ----------------------------------------------------------------------
22 : leunga 744 Name: Allen Leung
23 :     Date: Thu Dec 7 22:01:04 EST 2000
24 :     Tag: leunga-20001207-cell-monster-hack
25 :     Description:
26 :    
27 :     Major MLRISC internal changes. Affect all clients.
28 :     Summary:
29 :    
30 :     1. Type CELLS.cell = int is now replaced by a datatype.
31 :     As a result, the old regmap is now gone. Almost all interfaces
32 :     in MLRISC change as a consequence.
33 :    
34 :     2. A new brand version of machine description tool (v3.0) that generates
35 :     modules expecting the new interface. The old version is removed.
36 :    
37 :     3. The RA interface has been further abstracted into two new functors.
38 :     RISC_RA and X86RA. These functors have much simpler interfaces.
39 :     [See also directory MLRISC/demo.]
40 :    
41 :     4. Some other new source->source code generation tools are available:
42 :    
43 :     a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
44 :     b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
45 :     I use this tool to generate the peephole optimizers---with the new
46 :     cell type changes, peephole rules are becoming difficult to write
47 :     without conditional pattern matching.
48 :    
49 :     5. More Intmap -> IntHashTable change. Previous changes by Matthias didn't
50 :     cover the entire MLRISC source tree so many things broke.
51 :    
52 :     6. CM files have been moved to the subdirectory MLRISC/cm.
53 :     They are moved because there are a lot of them and they clutter up the
54 :     root dir.
55 :    
56 :     7. More detailed documentation to come...
57 :    
58 :     NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
59 :     a makeml -rebuild first. This is because of other other
60 :     changes that Matthias has made (see below).
61 :    
62 :    
63 :     ----------------------------------------------------------------------
64 : blume 733 Name: Matthias Blume
65 : blume 742 Date: 2000/11/30 23:12:00 JST
66 :     Tag: blume-20001130-filereorg
67 :     Description:
68 :    
69 :     Some manual updates and some file reorganizations in CM.
70 :    
71 :     ----------------------------------------------------------------------
72 :     Name: Matthias Blume
73 : blume 737 Date: 2000/11/24 17:45:00 JST
74 :     Tag: blume-20001124-link
75 :     Description:
76 :    
77 :     Drastically improved link traversal code for the case that the dynamic
78 :     value was already loaded at bootstrap time. As a result, CM and CMB
79 :     now both load blazingly fast -- even on a very slow machine. Also,
80 :     memory consumption has been further reduced by this.
81 :    
82 :     Warning: The format of the PIDMAP file has changed. THerefore, to
83 :     bootstrap you have to do this:
84 :    
85 :     1. Run CMB.make
86 :     2. Make a symbolic link for the boot directory:
87 :     ln -s sml.boot.ARCH-OS xxx
88 :     3. "Rebuild" the boot directory:
89 :     ./makeml -boot xxx -rebuild sml ; rm xxx
90 :     4. Boot normally:
91 :     ./makeml
92 :    
93 :     ----------------------------------------------------------------------
94 :     Name: Matthias Blume
95 : blume 735 Date: 2000/11/21 21:20:00 JST
96 :     Tag: blume-20001121-tools
97 :     Description:
98 :    
99 :     Continued hacking on autoloading problem -- with success this time.
100 :     Also changed tool-plugin mechanism. See new CM manual.
101 :    
102 :     ----------------------------------------------------------------------
103 :     Name: Matthias Blume
104 : blume 734 Date: 2000/11/19 14:30:00 JST
105 :     Tag: blume-20001119-autoload
106 :     Description:
107 :    
108 :     Some hacking to make autoloading faster. Success for CMB, no success
109 :     so far for CM. There is a reduced structure CM' that autoloads faster.
110 :     (This is a temporary, non-documented hack to be eliminated again when
111 :     the general problem is solved.)
112 :    
113 :     ----------------------------------------------------------------------
114 :     Name: Matthias Blume
115 : blume 733 Date: 2000/11/17 14:10:00 JST
116 :     Tag: blume-20001117-pickle-lib
117 :     Description:
118 :    
119 :     1. Eliminated comp-lib.cm
120 :     2. Made pickle-lib.cm
121 :     3. Eliminated all uses of intset.sml (from comp-lib.cm)
122 :     4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
123 :     equivalent constructs from smlnj-lib.cm (INtHashTable).
124 :     5. Point 4. also goes for those uses of intmap.* in MLRISC.
125 :     Duplicated intmap modules thrown out.
126 :     6. Hunted down all duplicated SCC code and replaced it with
127 :     equivalent stuff (GraphSCCFn from smlnj-lib.cm).
128 :     7. Rewrote Feedback module.
129 :     8. Moved sortedlist.sml into viscomp-lib.cm. Eventually it
130 :     should be thrown out and equivalent modules from smlnj-lib.cm
131 :     should be used (IntRedBlackSet, IntListSet, ...).
132 :    
133 :     Confirmed that compiler compiles to fixpoint.
134 :    
135 :     ----------------------------------------------------------------------
136 : leunga 731 Name: Allen Leung
137 :     Date: 2000/11/10 18:00:00
138 :     Tag: leunga-20001110-new-x86-fp
139 :    
140 :     A new x86 floating point code generator has been added.
141 :     By default this is turned off. To turn this on, do:
142 :    
143 :     CM.autoload "$smlnj/compiler.cm";
144 :     Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
145 :    
146 :     Changes:
147 :    
148 :     1. Changed FTAN to FPTAN so that the assembly output is correct.
149 :     2. Changed the extension callback for FTANGENT to generate:
150 :    
151 :     fptan
152 :     fstp %st(0)
153 :     instead of
154 :     fptan
155 :     fstpl ftempmem
156 :    
157 :     3. Numerous assembly fixes for x86.
158 :    
159 :     5. Cleaned up the machine code output module x86/x86MC.sml and added
160 :     support for a whole bunch of instructions and addressing modes:
161 :    
162 :     fadd/fsub/fsubr/fmul/fdiv/fdivr %st, %st(n)
163 :     faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp %st, %st(n)
164 :     fadd/fsub/fsubr/fmul/fdiv/fdivr %st(n), %st
165 :     fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
166 :     fxch %st(n)
167 :     fld %st(n)
168 :     fst %st(n)
169 :     fst mem
170 :     fstp %st(n)
171 :     fucom %st(n)
172 :     fucomp %st(n)
173 :    
174 :     All these are now generated when the fast fp mode is turned on.
175 :    
176 :     6. Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
177 :    
178 :     ----------------------------------------------------------------------
179 : blume 729 Name: Matthias Blume
180 :     Date: 2000/11/09 11:20:00 JST
181 :     Tag: blume-20001109-scc
182 :     Description:
183 :    
184 :     Eliminated some code duplication:
185 :    
186 :     1. Added "where" clause to GraphSCCFn in SML/NJ Library.
187 :     (Otherwise the functor is useless.)
188 :     2. Used GraphSCCFn where SCCUtilFun was used previously.
189 :     3. Got rid of SCCUtilFun (in comp-lib.cm).
190 :    
191 :     ----------------------------------------------------------------------
192 : george 721 Name: Lal George
193 :     Date: 2000/11/06 09:02:21 EST 2000
194 :     Tag: Release_110_30
195 :     Description:
196 :    
197 :     - Version 110.30
198 :     ----------------------------------------------------------------------
199 : blume 715 Name: Matthias Blume
200 : blume 716 Date: 2000/11/04 14:45:00
201 :     Tag: blume-20001104-mlbuild
202 :     Description:
203 :    
204 :     - Made ml-build faster on startup.
205 :     - Documentation fixes.
206 :    
207 :     ----------------------------------------------------------------------
208 :     Name: Matthias Blume
209 : blume 715 Date: 2000/11/02 17:00:00 JST
210 :     Tag: blume-20001102-condcomp
211 :     Description:
212 :    
213 :     - Small tweaks to pickler -- new BOOTFILES!
214 :     - Version bumped to 110.29.2.
215 :     - Added conditional compilation facility to init.cmi (see comment there).
216 :     ----------------------------------------------------------------------
217 : leunga 713 Name: Allen Leung
218 :     Date: 2000/10/23 19:31:00
219 :     Tag: leunga-20001023-demo-ra
220 :    
221 :     1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
222 :     2. Test programs for the graph library updated
223 :     3. Some new MLRISC demo programs added
224 :    
225 :     ----------------------------------------------------------------------
226 : blume 710 Name: Matthias Blume
227 : blume 711 Date: 2000/08/31 22:15:00 JST
228 :     Tag: blume-20001017-errmsg
229 :     Description:
230 :    
231 :     More error message grief: Where there used to be no messages, there
232 :     now were some that had bogus error regions. Fixed.
233 :    
234 :     ----------------------------------------------------------------------
235 :     Name: Matthias Blume
236 : blume 710 Date: 2000/08/31 17:30:00 JST
237 :     Tag: blume-20001017-v110p29p1
238 :     Description:
239 :    
240 :     I made a version 110.29.1 with new bootfiles.
241 :    
242 :     Changes: Modified pickler/unpickler for faster and leaner unpickling.
243 :     CM documentation changes and a small bugfix in CM's error reporting.
244 :    
245 :     ----------------------------------------------------------------------
246 : george 705 Name: Lal George
247 :     Date: 2000/09/27 14:42:35 EDT
248 :     Tag: george-20000927-nodestatus
249 :     Description:
250 :    
251 :     Changed the type of the nodestatus, so that:
252 :    
253 :     SPILLED(~1) is now SPILLED
254 :     SPILLED(m) where m>=0 is now MEMREG(m)
255 :     SPILLED(s) where s<~1 is now SPILL_LOC(~s)
256 :    
257 :     ----------------------------------------------------------------------
258 : blume 697 Name: Matthias Blume
259 : blume 703 Date: 2000/09/07 14:45:00 JST
260 :     Tag: blume-20000907-cmerrmsg
261 :     Description:
262 :    
263 :     Small tweak to CM to avoid getting ML syntax error messages twice.
264 :    
265 :     ----------------------------------------------------------------------
266 :     Name: Matthias Blume
267 : blume 701 Date: 2000/08/31 18:00:00 JST
268 :     Tag: blume-20000831-cvsbootfiles
269 :     Description:
270 :    
271 :     New URL for boot files (because the 110.29 files on the BL server do
272 :     now work correctly with my updated install scripts for yacc and lex).
273 :    
274 :     ----------------------------------------------------------------------
275 :     Name: Matthias Blume
276 : blume 697 Date: 2000/08/08 12:33:00 JST
277 :     Tag: blume-20000808-manual
278 :     Description:
279 :    
280 :     Tiny update to CM manual.
281 :    
282 :     ----------------------------------------------------------------------
283 : leunga 695 Name: Allen Leung
284 :     Date: 2000/08/7 19:31:00
285 :     Tag: leunga-20000807-a-whole-bunch-of-stuff
286 :    
287 :     Moby, C--, SSA, x86, machine descriptions etc. Should only affect C--
288 :     and Mobdy.
289 :    
290 :     1. x86
291 :    
292 :     a. Fixes to peephole module by John and Dan.
293 :     b. Assembly fix to SETcc by Allen.
294 :     c. Fix to c-call by John.
295 :     d. Fix to spilling by John. (This one deals with the missing FSTPT case)
296 :     e. Instruction selection optimization to SETcc as suggested by John.
297 :    
298 :     For example,
299 :    
300 :     MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
301 :    
302 :     should generate:
303 :    
304 :     MOVL a, x
305 :     SUBL b, x
306 :     SHRL 31, x
307 :    
308 :     2. IR stuff
309 :    
310 :     A bunch of new DJ-graph related algorithms added. These
311 :     speed up SSA construction.
312 :    
313 :     3. SSA + Scheduling
314 :    
315 :     Added code for SSA and scheduling to the repository
316 :    
317 :     ----------------------------------------------------------------------
318 : george 694 Name: Lal George
319 :     Date: 2000/07/27 11:53:14 EDT
320 :    
321 :     Tag: lal-20000727-linux-ppc
322 :     Description:
323 :    
324 :     Made changes to support Linux PPC.
325 :     p.s. I have confirmation that the 110.29 boot files work fine.
326 :    
327 :     ----------------------------------------------------------------------
328 : blume 684 Name: Matthias Blume
329 : blume 692 Date: 2000/07/27 17:40:00 JST
330 :     Tag: blume-20000727-scripts
331 :     Description:
332 :    
333 :     !!!! WARNING !!!!
334 :     You must recompile the runtime system!
335 :     !!!! WARNING !!!!
336 :    
337 :     This is basically another round of script-enhancements:
338 :    
339 :     1. sml, ml-build, and ml-makedepend accept options -D and -U to define
340 :     and undefine CM preprocessor symbols.
341 :    
342 :     2. ml-build avoids generating a new heap image if it finds that the
343 :     existing one is still ok. (The condition is that no ML file had to
344 :     be recompiled and all ML files are found to be older that the heap
345 :     file.)
346 :    
347 :     To make this work smoothly, I also hacked the runtime system as
348 :     well as SMLofNJ.SysInfo to get access to the heap image suffix
349 :     (.sparc-solaris, ...) that is currently being used.
350 :    
351 :     Moreover, the signature of CM.mk_standalone has changed. See the
352 :     CM manual.
353 :    
354 :     3. ml-makedepend accepts additional options -n, -a, and -o. (See the
355 :     CM manual for details.)
356 :    
357 :     4. More CM manual updates:
358 :     - all of the above has been documented.
359 :     - there is now a section describing the (CM-related) command line
360 :     arguments that are accepted by the "sml" command
361 :    
362 :     ----------------------------------------------------------------------
363 :     Name: Matthias Blume
364 : blume 691 Date: 2000/07/25 16:20:00 JST
365 :     Tag: blume-20000725-makedepend
366 :     Description:
367 :    
368 :     Added a script called ml-makedepend. This can be used in makefiles
369 :     for Unix' make in a way very similar to the "makedepend" command for
370 :     C.
371 :    
372 :     The script internally uses function CM.sources.
373 :    
374 :     Synopsis:
375 :    
376 :     ml-makedepend [-f makefile] cmfile targetname
377 :    
378 :     The default for the makefile is "makefile" (or "Makefile" should
379 :     "makefile" not exist).
380 :    
381 :     ml-makedepend adds a cmfile/targetname-specific section to this
382 :     makefile (after removing the previous version of this section). The
383 :     section contains a single dependency specification with targetname on
384 :     the LHS (targetname is an arbitrary name), and a list of files derived
385 :     from the cmfile on the RHS. Some of the files on the RHS are
386 :     ARCH/OPSYS-specific. Therefore, ml-makedepend inserts references to
387 :     "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
388 :     path names. The makefile writer is responsible for making sure that
389 :     these variables have correct at the time "make" is invoked.
390 :    
391 :     ----------------------------------------------------------------------
392 :     Name: Matthias Blume
393 : blume 690 Date: 2000/07/22 23:30:00 JST
394 :     Tag: blume-20000722-urlupdate
395 :     Description:
396 :    
397 :     Changed BOOT and config/srcarchiveurl to point to BL server:
398 :    
399 :     ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
400 :    
401 :     ----------------------------------------------------------------------
402 :     Name: Matthias Blume
403 : blume 686 Date: 2000/07/18 18:00:00 JST
404 :     Tag: blume-20000718-Version_110_29
405 :     Description:
406 :    
407 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
408 :    
409 :     2. Updated config/version to 110.29
410 :    
411 :     3. Updated config/srcarchiveurl
412 :    
413 :     3. New boot files!
414 :     ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
415 :    
416 :     ----------------------------------------------------------------------
417 :     Name: Matthias Blume
418 : blume 684 Date: 2000/07/11 13:58:00 JST
419 :     Tag: blume-20000711-doctypo
420 :     Description:
421 :    
422 :     Fixed a few typos in CM manual.
423 :    
424 :     ----------------------------------------------------------------------
425 : leunga 683 Name: Allen Leung
426 :     Date: 2000/06/15 00:38:00
427 :     Tag: leunga-20000704-sparc-x86
428 :    
429 :     1. x86 peephole improvement sp += k; sp -= k => nop [from John]
430 :     2. fix to x86 RET bug [found by Dan Grossman]
431 :     3. sparc assembly bug fix for ticc instructions [found by Fermin]
432 :    
433 :     Affects c-- and moby only
434 :    
435 :     ----------------------------------------------------------------------
436 : blume 680 Name: Matthias Blume
437 : blume 682 Date: 2000/07/04 15:26:00
438 :     Tag: blume-20000704-trigger
439 :     Description:
440 :    
441 :     1. Improvements to CM manual.
442 :     2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
443 :     of getting a back-trace. The function, when called, raises an
444 :     internal exception which explicitly carries the full back-trace history,
445 :     so it is unaffected by any intervening handle-raise pairs ("trivial"
446 :     or not). The interactive loop will print that history once it arrives
447 :     at top level.
448 :     Short of having all exceptions implicitly carry the full history, the
449 :     recommended way of using this facility is:
450 :     - compile your program with instrumentation "on"
451 :     - run it, when it raises an exception, look at the history
452 :     - if the history is "cut off" because of some handler, go and modify
453 :     your program so that it explicitly calls BTrace.trigger
454 :     - recompile (still instrumented), and rerun; look at the full history
455 :    
456 :     ----------------------------------------------------------------------
457 :     Name: Matthias Blume
458 :     Date: 2000/07/03 15:36:00 JST
459 : blume 680 Tag: blume-20000702-manual
460 :     Description:
461 :    
462 :     Small corrections and updates to CM manual.
463 :    
464 :     ----------------------------------------------------------------------
465 : blume 682 Name: Matthias Blume
466 : blume 679 Date: 2000/06/29 16:04:00 JST
467 :     Tag: blume-20000629-yacctool
468 :     Description:
469 :    
470 :     Changes:
471 :    
472 :     1. Class "mlyacc" now takes separate arguments to pass options to
473 :     generated .sml- and .sig-files independently.
474 :     2. Corresponding CM manual updates.
475 :     3. BTrace module now also reports call sites. (However, for loop clusters
476 :     it only shows from where the cluster was entered.) There are associated
477 :     modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
478 :    
479 :     ----------------------------------------------------------------------
480 : blume 675 Name: Matthias Blume
481 : blume 678 Date: 2000/06/27 16:51:00 JST
482 :     Tag: blume-20000627-noweb
483 :     Description:
484 :    
485 :     Changes:
486 :    
487 :     1. Implemented "subdir" and "witness" options for noweb tool.
488 :     This caused some slight internal changes in CM's tool implementation.
489 :     2. Fixed bug in "tool plugin" mechanism. This is essentially cleaning
490 :     some remaining issues from earlier path anchor changes.
491 :     3. Updated CM manual accordingly.
492 :    
493 :     4. Changed implementation of back-tracing so that I now consider it
494 :     ready for prime-time.
495 :    
496 :     In particular, you don't have to explicitly trigger the back-trace
497 :     anymore. Instead, if you are running BTrace-instrumented code and
498 :     there is an uncaught exception (regardless of whether or not it was
499 :     raised in instrumented code), the top-level evalloop will print
500 :     the back-trace.
501 :    
502 :     Features:
503 :    
504 :     - Instrumented and uninstrumented code work together seemlessly.
505 :     (Of course, uninstrumented code is never mentioned in actual
506 :     back-traces.)
507 :    
508 :     - Asymptotic time- and space-complexity of instrumented code is
509 :     equal to that of uninstrumented code. (This means that
510 :     tail-recursion is preserved by the instrumentation phase.)
511 :    
512 :     - Modules whose code has been instrumented in different sessions
513 :     work together without problem.
514 :    
515 :     - There is no penalty whatsoever on uninstrumented code.
516 :    
517 :     - There is no penalty on "raise" expressions, even in
518 :     instrumented code.
519 :    
520 :     A potential bug (or perhaps it is a feature, too):
521 :    
522 :     A back-trace reaches no further than the outermost instrumented
523 :     non-trivial "raise". Here, a "trivial" raise is one that is the
524 :     sole RHS of a "handle" rule. Thus, back-traces reach trough
525 :    
526 :     <exp> handle e => raise e
527 :    
528 :     and even
529 :    
530 :     <exp> handle Foo => raise Bar
531 :    
532 :     and, of course, through
533 :    
534 :     <exp> handle Foo => ...
535 :    
536 :     if the exception was not Foo.
537 :    
538 :     Back-traces always reach right through any un-instrumented code
539 :     including any of its "handle" expressions, trivial or not.
540 :    
541 :     To try this out, do the following:
542 :    
543 :     - Erase all existing binfiles for your program.
544 :     (You may keep binfiles for those modules where you think you
545 :     definitely don't need back-tracing.)
546 :     - Turn on back-trace instrumentation:
547 :     SMLofNJ.Internals.BTrace.mode (SOME true);
548 :     - Recompile your program. (I.e., run "CM.make" or "use".)
549 :     - You may now turn instrumentation off again (if you want):
550 :     SMLofNJ.Internals.BTrace.mode (SOME false);
551 :     - Run your program as usual. If it raises an exception that
552 :     reaches the interactive toplevel, then a back-trace will
553 :     automatically be printed. After that, the toplevel loop
554 :     will print the exception history as usual.
555 :    
556 :     ----------------------------------------------------------------------
557 :     Name: Matthias Blume
558 : blume 677 Date: 2000/06/26 09:56:46 JST
559 :     Tag: blume-20000626-setup
560 :     Description:
561 :    
562 :     CM: - setup-parameter to "sml" added; this can be used to run arbitrary
563 :     ML code before and after compiling a file (e.g., to set compiler
564 :     flags)
565 :    
566 :     Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
567 :     - associated changes to btrace.sml (BTrace instrumentation pass)
568 :     - cleaner implementation of btimp.sml (BTrace tracing and report
569 :     module)
570 :    
571 :     CM manual: * new path encoding documented
572 :     * description of setup-parameter to "sml" added
573 :    
574 :     The biggest user-visible change to back-tracing is that it is no
575 :     longer necessary to compile all traced modules within the same
576 :     session. (This was a real limitation.)
577 :    
578 :     ----------------------------------------------------------------------
579 :     Name: Matthias Blume
580 : blume 676 Date: 2000/06/24 12:40:00 JST
581 :     Tag: blume-20000624-startup
582 :     Description:
583 :    
584 :     Fixes startup slowdown problem. (I was calling SrcPath.sync a _tad_
585 :     bit too often -- to put it mildly. :)
586 :    
587 :     ----------------------------------------------------------------------
588 :     Name: Matthias Blume
589 : blume 675 Date: 2000/06/23 18:20:00 JST
590 :     Tag: blume-20000623-btrace
591 :     Description:
592 :    
593 :     This updates adds a backtrace facility to aid programmers in debugging
594 :     their programs. This involves the following changes:
595 :    
596 :     1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
597 :     keeping track of the current call stack. When programs are compiled
598 :     in a special mode, the compiler will insert calls to these hooks
599 :     into the user program.
600 :     "Hook" means that it is possible for different implementations of
601 :     back-tracing to register themselves (at different times).
602 :    
603 :     2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
604 :     as an Absyn.dec->Absyn.dec rewrite. Normally this phase is turned off.
605 :     It can be turned on using this call:
606 :     SMLofNJ.Internals.BTrace.mode (SOME true);
607 :     Turning it off again:
608 :     SMLofNJ.Internals.BTrace.mode (SOME false);
609 :     Querying the current status:
610 :     SMLofNJ.Internals.BTrace.mode NONE;
611 :     Annotated programs are about twice as big as normal ones, and they
612 :     run a factor of 2 to 4 slower with a dummy back-trace plugin (one
613 :     where all hooks do nothing). The slowdown with a plugin that is
614 :     actually useful (such as the one supplied by default) is even greater,
615 :     but in the case of the default plugin it is still only an constant
616 :     factor (amortized).
617 :    
618 :     3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
619 :     with a sub-structure BTrace for controlling back-tracing. In particular,
620 :     the above-mentioned function "mode" controls whether the annotation
621 :     phase is invoked by the compiler. Another important function is
622 :     "trigger": when called it aborts the current execution and causes
623 :     the top-level loop to print a full back-trace.
624 :    
625 :     4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
626 :     for back-tracing. It keeps track of the dynamic call stack and in
627 :     addition to that it keeps a partial history at each "level" of that
628 :     stack. For example, if a tail-calls b, b tail-calls c, and c tail-calls
629 :     d and b (at separate times, dynamically), then the report will show:
630 :    
631 :     GOTO d
632 :     /c
633 :     GOTO \b
634 :     CALL a
635 :    
636 :     This shows that there was an initial non-tail call of a, then a
637 :     tail-call to b or c, looping behavior in a cluster of functions that
638 :     consist of b and c, and then a goto from that cluster (i.e., either from
639 :     b or from c) to d.
640 :    
641 :     Note that (depending on the user program) the amount of information
642 :     that the back-trace module has to keep track of at each level is bounded
643 :     by a constant. Thus, the whole implementation has the same asymptotical
644 :     complexity as the original program (both in space and in time).
645 :    
646 :     5. compiler/TopLevel/interact/evalloop.sml has been modified to
647 :     handle the special exception SMLofNJ.Internals.BTrace.BTrace
648 :     which is raised by the "trigger" function mentioned above.
649 :    
650 :     Notes on usage:
651 :    
652 :     - Annotated code works well together with unannotated code:
653 :     Unannotated calls simply do not show up at all in the backtrace.
654 :    
655 :     - It is not a good idea to let modules that were annotated during
656 :     different sessions run at the same time. This is because the compiler
657 :     chooses small integers to identify individual functions, and there
658 :     will be clashes if different modules were compiled in separate sessions.
659 :     (Nothing will crash, and you will even be told about the clashes, but
660 :     back-trace information will in general not be useful.)
661 :    
662 :     - Back-tracing can be confused by callcc and capture.
663 :    
664 :     - The only way of getting a back-trace right now is to explicitly
665 :     invoke the "trigger" function from your user program. Eventually, we
666 :     should make every exception carry back-trace information (if
667 :     available). But since this creates more overhead at "raise"-time
668 :     (similar to the current exnHistory overhead), I have not yet
669 :     implemented this. (The implementation will be rather easy.) With
670 :     exceptions carrying back-trace information, this facility will be even
671 :     more useful because users don't need to modify their programs...
672 :    
673 :     - While it is possible to compile the compiler with back-trace
674 :     annotations turned on (I did it to get some confidence in
675 :     correctness), you must make absolutely sure that core.sml and
676 :     btimp.sml are compiled WITHOUT annotation! (core.sml cannot actually
677 :     be compiled with annotation because there is no core access yet, but
678 :     if you compile btimp.sml with annotation, then the system will go into
679 :     an infinite recursion and crash.)
680 :     Since CM currently does not know about BTrace, the only way to turn
681 :     annotations on and off for different modules of the compiler is to
682 :     interrupt CMB.make, change the settings, and re-invoke it. Of course,
683 :     this is awkward and clumsy.
684 :    
685 :     Sample sessions:
686 :    
687 :     Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
688 :     - SMLofNJ.Internals.BTrace.mode (SOME true);
689 :     [autoloading]
690 :     [autoloading done]
691 :     val it = false : bool
692 :     - structure X = struct
693 :     - fun main n = let
694 :     - fun a (x, 0) = d x
695 :     - | a (x, n) = b (x, n - 1)
696 :     - and b (x, n) = c (x, n)
697 :     - and c (x, n) = a (x, n)
698 :     - and d x = e (x, 3)
699 :     - and e (x, 0) = f x
700 :     - | e (x, n) = e (x, n - 1)
701 :     - and f 0 = SMLofNJ.Internals.BTrace.trigger ()
702 :     - | f n = n * g (n - 1)
703 :     - and g n = a (n, 3)
704 :     - in
705 :     - f n
706 :     - end
707 :     - end;
708 :     structure X : sig val main : int -> int end
709 :     - X.main 3;
710 :     *** BACK-TRACE ***
711 :     GOTO stdIn:4.2-13.20: X.main[2].f
712 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
713 :     GOTO stdIn:4.2-13.20: X.main[2].d
714 :     / stdIn:4.2-13.20: X.main[2].a
715 :     | stdIn:4.2-13.20: X.main[2].b
716 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
717 :     CALL stdIn:4.2-13.20: X.main[2].g
718 :     GOTO stdIn:4.2-13.20: X.main[2].f
719 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
720 :     GOTO stdIn:4.2-13.20: X.main[2].d
721 :     / stdIn:4.2-13.20: X.main[2].a
722 :     | stdIn:4.2-13.20: X.main[2].b
723 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
724 :     CALL stdIn:4.2-13.20: X.main[2].g
725 :     GOTO stdIn:4.2-13.20: X.main[2].f
726 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
727 :     GOTO stdIn:4.2-13.20: X.main[2].d
728 :     / stdIn:4.2-13.20: X.main[2].a
729 :     | stdIn:4.2-13.20: X.main[2].b
730 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
731 :     CALL stdIn:4.2-13.20: X.main[2].g
732 :     GOTO stdIn:4.2-13.20: X.main[2].f
733 :     CALL stdIn:2.15-17.4: X.main[2]
734 :     -
735 :    
736 :     (Note that because of a FLINt bug the above code currently does not
737 :     compile without BTrace turned on.)
738 :    
739 :     Here is another example, using my modified Tiger compiler:
740 :    
741 :     Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
742 :     - SMLofNJ.Internals.BTrace.mode (SOME true);
743 :     [autoloading]
744 :     [autoloading done]
745 :     val it = false : bool
746 :     - CM.make "sources.cm";
747 :     [autoloading]
748 :     ...
749 :     [autoloading done]
750 :     [scanning sources.cm]
751 :     [parsing (sources.cm):parse.sml]
752 :     [creating directory CM/SKEL ...]
753 :     [parsing (sources.cm):tiger.lex.sml]
754 :     ...
755 :     [wrote CM/sparc-unix/semant.sml]
756 :     [compiling (sources.cm):main.sml]
757 :     [wrote CM/sparc-unix/main.sml]
758 :     [New bindings added.]
759 :     val it = true : bool
760 :     - Main.compile ("../testcases/merge.tig", "foo.out");
761 :     *** BACK-TRACE ***
762 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
763 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
764 :     CALL lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
765 :     GOTO lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
766 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
767 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
768 :     CALL lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
769 :     / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
770 :     CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
771 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
772 :     CALL lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
773 :     CALL main.sml:1.18-118.4: Main.compile[2]
774 :     -
775 :    
776 :     ----------------------------------------------------------------------
777 : blume 673 Name: Matthias Blumen
778 :     Date: 2000/06/21 18:00:00 JST
779 :     Tag: blume-20000621-manual
780 :     Description:
781 :    
782 :     CM manual update: Path environments documented.
783 :    
784 :     ----------------------------------------------------------------------
785 : blume 666 Name: Matthias Blume
786 : blume 672 Date: 2000/06/19 13:40:00
787 :     Tag: blume-20000619-manual
788 :     Description:
789 :    
790 :     CM manual and system/README update. This only covers the fact that
791 :     there are no more implicit anchors. (Path environments and the "bind"
792 :     option to "cm" have yet to be documented.)
793 :    
794 :     ----------------------------------------------------------------------
795 :     Name: Matthias Blume
796 : blume 671 Date: 2000/06/19 11:05:00 JST
797 :     Tag: blume-20000619-chdir-bugfix
798 :     Description:
799 :    
800 :     Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
801 :    
802 :     ----------------------------------------------------------------------
803 :     Name: Matthias Blume
804 : blume 670 Date: 2000/06/18 22:00:10 JST
805 :     Tag: blume-20000618-implicit-anchors-really-gone
806 :     Description:
807 :    
808 :     I updates the previous HISTORY entry where I forgot to mention that
809 :     implicit anchors are no longer with us.
810 :    
811 :     The current update also gets rid of the (now useless) controller
812 :     CM.Control.implicit_anchors.
813 :    
814 :     ----------------------------------------------------------------------
815 :     Name: Matthias Blume
816 : blume 666 Date: 2000/06/16 17:30:00 JST
817 :     Tag: blume-20000616-anchorenv
818 :     Description:
819 :    
820 :     This patch implements the long anticipated (just kidding :) "anchor
821 :     environment" mechanism. In the course of doing this, I also
822 :     re-implemented CM's internal "SrcPath" module from scratch. The new
823 :     one should be more robust in certain boundary cases. In any case, it
824 :     is a lot cleaner than its predecessor (IMHO).
825 :    
826 :     This time, although there is yet another boot file format change, I
827 :     kept the unpickler backward-compatible. As a result, no new bootfiles
828 :     are necessary and bootstrapping is straightforward. (You cannot read
829 :     new bootfiles into an old system, but the other way around is no
830 :     problem.)
831 :    
832 :     Visible changes:
833 :    
834 : blume 670 ** 0. Implicit path anchors (without the leading $-symbol) are no
835 :     longer recognized at all. This means that such path names are not
836 :     illegal either. For example, the name basis.cm simply refers to a
837 :     local file called "basis.cm" (i.e, the name is an ordinary path
838 :     relative to .cm-files directory). Or, to put it differently, only
839 :     names that start with $ are anchored paths.
840 : blume 666
841 : blume 670 ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
842 :     vanished.
843 :    
844 :     John (Reppy) had critizised this as soon as I originally proposed and
845 : blume 666 implemented it, but at that time I did not really deeply believe
846 :     him. :) Now I came full-circle because I need the $<singlearc> syntax
847 :     in another place where it cannot be seen as an abbreviation for
848 :     $/<singlearc>. To avoid the confusion, $<singlearc> now means what it
849 :     seems to mean (i.e., it "expands" into the corresponding anchor
850 :     value).
851 :    
852 :     However, when paths are used as members in CM description files, it
853 :     continues to be true that there must be at least another arc after the
854 :     anchor. This is now enforced separately during semantic analysis
855 : blume 670 (i.e., from a lexical/syntactical point of view, the notation is ok.)
856 : blume 666
857 :     ** 2. The "cm" class now accepts an option "bind". The option's value
858 :     is a sub-option list of precisely two items -- one labeled "anchor"
859 :     and the other one labeled "value". As you might expect, "anchor" is
860 :     used to specify an anchor name to be bound, and "value" specifies what
861 :     the anchor is being bound to.
862 :    
863 :     The value must be a directory name and can be given in either standard
864 :     syntax (including the possibility that it is itself an anchored path)
865 :     or native syntax.
866 :    
867 :     Examples:
868 :    
869 :     foo.cm (bind:(anchor:bar value:$mystuff/bar))
870 :     lib.cm (bind:(anchor:a value:"H:\\x\\y\\z")) (* only works under windows *)
871 :    
872 :     and so on.
873 :    
874 :     The meaning of this is that the .cm-file will be processed with an
875 :     augmented anchor environment where the given anchor(s) is/are bound to
876 :     the given values(s).
877 :    
878 :     The rationale for having this feature is this: Suppose you are trying
879 :     to use two different (already stable) libraries a.cm and b.cm (that
880 :     you perhaps didn't write yourself). Further, suppose each of these
881 :     two libraries internally uses its own auxiliary library $aux/lib.cm.
882 :     Normally you would now have a problem because the anchor "lib" can not
883 :     be bound to more than one value globally. Therefore, the project that
884 :     uses both a.cm and b.cm must locally redirect the anchor to some other
885 :     place:
886 :    
887 :     a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
888 :     b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
889 :    
890 :     This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
891 :     /usr/lib/smlnj/b-stuff/aux.cm, respectively.
892 :    
893 :     Hard-wiring path names is a bit inflexible (and CM will verbosely warn
894 :     you when you do so at the time of CM.stabilize). Therefore, you can
895 :     also use an anchored path as the value:
896 :    
897 :     a.cm (bind:(anchor:lib value:$a-lib))
898 :     b.cm (bind:(anchor:lib value:$b-lib))
899 :    
900 :     Now you can globally configure (using the usual CM.Anchor.anchor or
901 :     pathconfig machinery) bindings for "a-lib" and "b-lib". Since "lib"
902 :     itself is always locally bound, setting it globally is no longer
903 :     meaningful or necessary (but it does not hurt either). In fact, "lib"
904 :     can still be used as a global anchor for separate purposes. As a
905 :     matter of fact, one can locally define "lib" in terms of a global
906 :     "lib":
907 :    
908 :     a.cm (bind:(anchor:lib value:$lib/a))
909 :     b.cm (bind:(anchor:lib value:$lib/b))
910 :    
911 :     ** 3: The encoding of path names has changed. This affects the way
912 :     path names are shown in CM's progress report and also the internal
913 :     protocol encoding used for parallel make.
914 :    
915 :     The encoding now uses one or more ':'-separated segments. Each
916 :     segments corresponds to a file that has been specified relative to the
917 :     file given by its preceding segment. The first segment is either
918 :     relative to the CWD, absolute, or anchored. Each segment itself is
919 :     basically a Unix pathname; all segments but the first are relative.
920 :    
921 :     Example:
922 :    
923 :     $foo/bar/baz.cm:a/b/c.sml
924 :    
925 :     This path denotes the file bar/a/b/c.sml relative to the directory
926 :     denoted by anchor "foo". Notice that the encoding also includes
927 :     baz.cm which is the .cm-file that listed a/b/c.sml. As usual, such
928 :     paths are resolved relative to the .cm-files directory, so baz.cm must
929 :     be ignored to get the "real" pathname.
930 :    
931 :     To make this fact more obvious, CM puts the names of such "virtual
932 :     arcs" into parentheses when they appear in progress reports. (No
933 :     parentheses will appear in the internal protocol encoding.) Thus,
934 :     what you really see is:
935 :    
936 :     $foo/bar/(baz.cm):a/b/c.sml
937 :    
938 :     I find this notation to be much more informative than before.
939 :    
940 :     Another new feature of the encoding is that special characters
941 :     including parentheses, colons, (back)slashes, and white space are
942 :     written as \ddd (where ddd is the decimal encoding of the character).
943 :    
944 : blume 670 *** The CM manual still needs to be updated.
945 :    
946 : blume 666 ----------------------------------------------------------------------
947 : leunga 660 Name: Allen Leung
948 :     Date: 2000/06/15 00:38:00
949 :     Tag: leunga-20000615-x86-peephole
950 :    
951 :     x86 Peephole fix by Fermin. Affects c-- and moby only.
952 :    
953 :     ----------------------------------------------------------------------
954 : blume 658 Name: Matthias Blume
955 :     Date: 2000/06/12 11:40:00
956 :     Tag: blume-20000612-parmakefix
957 :     Description:
958 :    
959 :     More cleanup after changing the file naming scheme: This time I
960 :     repaired the parallel make mechanism for CMB.make which I broke earlier.
961 :    
962 :     ----------------------------------------------------------------------
963 : leunga 657 Name: Allen Leung
964 :     Date: 2000/06/09 01:25:00
965 :     Tag: leunga-20000609-various
966 :    
967 :     None of these things should affect normal SML/NJ operations
968 :    
969 :     1. Peephole improvements provided by Fermin (c--)
970 :     2. New annotation DEFUSE for adding extra dependence (moby)
971 :     3. New X86 LOCK instructions (moby)
972 :     4. New machine description language for reservation tables (scheduling)
973 :     5. Fixes to various optimization/analysis modules (branch chaining, dominator
974 :     trees etc.)
975 :     6. I've changed the CM files so that they can work with versions
976 :     110.0.6, 110.25 and 110.28
977 :    
978 :     ----------------------------------------------------------------------
979 : blume 652 Name: Matthias Blume
980 : blume 656 Date: 2000/06/09 12:40:00
981 :     Tag: blume-20000609-log
982 :     Description:
983 :    
984 :     - Removed all(?) remaining RCS Log entries from sources.
985 :    
986 :     - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
987 :     anchored paths).
988 :    
989 :     ----------------------------------------------------------------------
990 :     Name: Matthias Blume
991 : blume 653 Date: 2000/06/07 17:00:00 JST
992 :     Tag: blume-20000607-no-implicit-anchors
993 :     Description:
994 :    
995 :     1. This update changes the default setting for
996 :     CM.Control.implicit_anchors from true to false. This means that
997 :     implicit anchors are no longer permitted by default. I also tried to
998 :     make sure that nothing else still relies on implicit anchors.
999 :     (This is the next step on the schedule towards a CM that does not even
1000 :     have the notion of implicit anchors anymore.)
1001 :    
1002 :     2. More CM manual updates.
1003 :    
1004 :     3. I managed to track down and fix the pickling bug I mentioned last
1005 :     time. Because of the previously existing workaround, this entails no
1006 :     immediate practical changes.
1007 :    
1008 :     ----------------------------------------------------------------------
1009 :     Name: Matthias Blume
1010 : blume 652 Date: 2000/06/06 11:15:00 JST
1011 :     Tag: blume-20000606-lazierpickle
1012 :     Description:
1013 :    
1014 :     !!!! NEW BOOT FILES !!!!
1015 :    
1016 :     * The main purpose of this update is to make library pickles lazier in
1017 :     order to reduce the initial space penalty for autoloading a library.
1018 :     As a result, it is now possible to have $smlnj/compiler.cm
1019 :     pre-registered. This should take care of the many complaints or
1020 :     inquiries about missing structure Compiler. This required changes to
1021 :     CM's internal data structures and small tweaks to some algorithms.
1022 :    
1023 :     As a neat additional effect, it is no longer necessary (for the sake
1024 :     of lean heap image files) to distinguish between a "minimal" CM and a
1025 :     "full" CM. Now, there is only one CM (i.e., the "full" version:
1026 :     $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
1027 :     interactive top level. ($smlnj/cm/minimal.cm is gone.)
1028 :    
1029 :     To make the life of compiler-hackers easier, "makeml" now also
1030 :     pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm). In other
1031 :     words, after you bootstrap a new sml for the first time, you will not
1032 :     have to autoload $smlnj/cmb.cm again afterwards. (The first time
1033 :     around you will still have to do it, though.)
1034 :    
1035 :     * A second change consists of major updates to the CM manual. There
1036 :     are now several appendices with summary information and also a full
1037 :     specification of the CM description file syntax.
1038 :    
1039 :     * In directory src/system I added the script "allcross". This script
1040 :     invokes sml and cross-compiles the compiler for all supported
1041 :     architectures. (Useful when providing a new set of boot files.)
1042 :    
1043 :     * There seems to be a latent bug in my "lazy pickles" mechanism. I
1044 :     added a small tweak to pickle-util.sml to work around this problem,
1045 :     but it is not a proper fix yet. I will investigate further. (The
1046 :     effect of the bug was an inflation of library pickle size.)
1047 :    
1048 :     * Version number increased to 110.28.1 (to avoid compatibility problems).
1049 :    
1050 :     ----------------------------------------------------------------------
1051 : leunga 646 Name: Allen Leung
1052 : leunga 648 Date: 2000/05/25 17:28 EDT
1053 :     Tag: leunga-20000525-ra
1054 :     Description:
1055 :    
1056 :     Fixed a bug in freezing phase of the register allocator.
1057 :    
1058 :     ----------------------------------------------------------------------
1059 :     Name: Allen Leung
1060 : leunga 647 Date: 2000/05/15 22:53 EDT
1061 : leunga 646 Tag: leunga-20000515-alpha-x86-ra
1062 :     Description:
1063 :    
1064 :     1. Alpha
1065 :    
1066 :     Slight cleanup. Removed the instruction SGNXL
1067 :    
1068 :     2. X86
1069 :    
1070 :     Added the following instructions to the instruction set:
1071 :    
1072 :     ROLx, RORx,
1073 :     BTx, BTSx, BTLx, BTRx,
1074 :     XCHGx, and variants with the LOCK prefix
1075 :    
1076 :     3. Register Allocation
1077 :    
1078 :     The module ra-rewrite-with-renaming has been improved.
1079 :    
1080 : leunga 647 These have no effect on SML/NJ.
1081 :    
1082 : leunga 646 ----------------------------------------------------------------------
1083 : blume 642 Name: Matthias Blume
1084 : blume 645 Date: 2000/05/15 16:20:00 JST
1085 :     Tag: blume-20000515-lightrebuild
1086 :     Description:
1087 :    
1088 :     1. I added an alternative to "-rebuild" to "makeml". The difference is
1089 :     that prior to calling CMB.make' the CM-variable "LIGHT" will be
1090 :     defined. In effect, the command will not build any cross-compiler
1091 :     backends and therefore finish more quickly.
1092 :    
1093 :     The "fixpt" script also takes a "-light" switch to be able to use
1094 :     this new facility while compiling for a fixpoint.
1095 :    
1096 :     2. I replaced all mentions of anchored paths in group owner specifications
1097 :     with simple relative paths (usually starting with "..").
1098 :     The rationale is that a library's internal workings should not be
1099 :     compromised by the lack of some anchor. (An anchor is necessary
1100 :     for someone who wants to refer to the library by an anchored path,
1101 :     but it should not be necessary to build the same library in the first
1102 :     place.)
1103 :    
1104 :     3. I changed the way CM's tool mechanism determines the shell command
1105 :     string used for things like ml-yacc etc. so that it does not break
1106 :     when CM.Control.implicit_anchors is turned off.
1107 :    
1108 :     ----------------------------------------------------------------------
1109 :     Name: Matthias Blume
1110 : blume 644 Date: 2000/05/12 18:20:00 JST
1111 :     Tag: blume-20000512-ml-build
1112 :     Description:
1113 :    
1114 :     Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from
1115 :     getting installed properly (by config/install.sh).
1116 :    
1117 :     ----------------------------------------------------------------------
1118 :     Name: Matthias Blume
1119 : blume 643 Date: 2000/05/12 17:30:00 JST
1120 :     Tag: blume-20000512-anchors
1121 :     Description:
1122 :    
1123 :     !!! NEW BOOT FILES !!!
1124 :    
1125 :     This change is in preparation of fading out support for "implicitly
1126 :     anchored path names". I went through all sources and used the
1127 :     explicit (and relatively new) $-notation. See system/README and the
1128 :     CM manual for more info on this.
1129 :    
1130 :     I also modified the anchoring scheme for some things such as "smlnj",
1131 :     "MLRISC", "cm", etc. to take advantage of the fact that explicit
1132 :     anchors are more expressive: anchor name and first arc do not have to
1133 :     coincide. This entails the following user-visible change:
1134 :    
1135 :     You have to write $smlnj/foo/bar instead of smlnj/foo/bar. In
1136 :     particular, when you fire up sml with a command-line argument, say,
1137 :     e.g.:
1138 :    
1139 :     sml '$smlnj/cmb.cm'
1140 :    
1141 :     At the ML toplevel prompt:
1142 :    
1143 :     CM.autoload "$smlnj/cmb.cm";
1144 :    
1145 :     There is also a new controller in CM.Control that can be used to turn
1146 :     off all remaining support for implicit anchors by saying:
1147 :    
1148 :     CM.autoload "$smlnj/
1149 :     #set CM.Control.implicit_anchors false;
1150 :    
1151 :     This causes CM to reject implicitly anchored paths. This is (for the
1152 :     time being) less permissive than the "final" version where there will
1153 :     be no more such implicit anchors and relative paths will be just that:
1154 :     relative.
1155 :    
1156 :     The next step (version after next version?) will be to make the
1157 :     default for CM.Control.implicit_anchors false. After the dust has
1158 :     settled, I can then produce the "final" version of this...
1159 :    
1160 :     Note: Since bootstrapping is a bit tricky, I provided new boot files.
1161 :    
1162 :     ----------------------------------------------------------------------
1163 :     Name: Matthias Blume
1164 : blume 642 Date: 2000/05/11 16:30:00 JST
1165 :     Tag: blume-20000511-sources
1166 :     Description:
1167 :    
1168 :     The main change is that I added function CM.sources as a generalized
1169 :     version of the earlier CM.makedepend. This entails the following
1170 :     additional changes:
1171 :    
1172 :     - CM.makedepend has been dropped.
1173 :    
1174 :     - CM manual has been updated.
1175 :    
1176 :     - TOOLS signature and API have been changed.
1177 :    
1178 :     ----------------------------------------------------------------------
1179 : leunga 640 Name: Allen Leung
1180 : leunga 641 Date: 2000/05/10 21:17 EDT
1181 :     Tag: leunga-20000510-moby-c--ssa
1182 :     Description:
1183 :    
1184 :     Various bug fixes and new features for C--, Moby and MLRISC optimizations.
1185 :     None of these affect SML/NJ.
1186 :    
1187 :     1. Register Allocation
1188 :    
1189 :     a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented.
1190 :     This module tries to remove local (i.e. basic block level) redundancies
1191 :     during spilling.
1192 :    
1193 :     b. A new framework for performing region based register allocation.
1194 :     Not yet entirely functional.
1195 :    
1196 :     2. X86
1197 :    
1198 :     a. DefUse for POP was missing the stack pointer [found by Lal]
1199 :     b. Reload for CALL was incorrect in X86Spill [found by John]
1200 :     c. Various fixes in X86Spill so that it can be used correctly for
1201 :     the new spilling module.
1202 :    
1203 :     3. SSA/IR
1204 :    
1205 :     a. New module ir/dj-dataflow.sml implements elimination based
1206 :     data flow analysis.
1207 :    
1208 :     4. MLRiscGen
1209 :    
1210 :     a. Fix for gc type annotation
1211 :    
1212 :     5. MDGen
1213 :    
1214 :     Various fixes for machine description -> ml code translation. For ssa
1215 :     only.
1216 :    
1217 :     ----------------------------------------------------------------------
1218 :     Name: Allen Leung
1219 : leunga 640 Date: 2000/05/08 22:17 EDT
1220 :     Tag: leunga-20000508-labexp
1221 :     Description:
1222 :    
1223 :     Fermin has found a few assembly problems with constant expressions
1224 :     generated in LabelExp. Mostly, the problems involve extra parentheses,
1225 :     which choke on dumb assemblers. This is his fix.
1226 :    
1227 :     ----------------------------------------------------------------------
1228 : dbm 635 Name: Dave MacQueen
1229 :     Date: 2000/04/09 14:00 EDT
1230 :     Tag: dbm-20000502-Version_110_28
1231 :     Description:
1232 :    
1233 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.28
1234 :    
1235 :     2. Updated config/version to 110.28
1236 :    
1237 :     3. Updated config/srcarchiveurl
1238 :    
1239 :     3. New boot files!
1240 :     ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/
1241 :    
1242 :     ----------------------------------------------------------------------
1243 : blume 634 Name: Matthias Blume
1244 :     Date: 2000/05/01 19:05:00 JST
1245 :     Tag: blume-20000501-noweb
1246 :     Description:
1247 :    
1248 :     A new noweb tool has been added. The existing system is entirely
1249 :     unaffected by this, but some CM users have asked for renewed noweb
1250 :     support. Everything is documented in the CM manual.
1251 :    
1252 :     New (plugin) libraries:
1253 :    
1254 :     noweb-tool.cm
1255 :     nw-ext.cm
1256 :    
1257 :     ----------------------------------------------------------------------
1258 : dbm 633 Name: Dave MacQueen
1259 :     Date: 2000/04/30 12:40PM EDT
1260 :     Tag: dbm-20000430-bug_fixes
1261 :     Description:
1262 :    
1263 :     1. Fix for bug 1498
1264 :     smlnj/src/system/Basis/Implementation/Unsafe/object.sig
1265 :     smlnj/src/system/Basis/Implementation/Unsafe/object.sml
1266 :     added toRealArray function
1267 :     smlnj/src/compiler/MiscUtil/print/ppobj.sml
1268 :     added check for tag Obj.RealArray to array printing case in ppObj
1269 :    
1270 :     2. Fix for bug 1510
1271 :     smlnj/src/compiler/Semant/types/typesutil.sml
1272 :     fixed definition of dummyargs (used by equalTycon) so that
1273 :     dummy args are distinct types
1274 :    
1275 :     ----------------------------------------------------------------------
1276 : blume 629 Name: Matthias Blume
1277 : blume 632 Date: 2000/04/30 01:00:00 JST
1278 :     Tag: blume-20000430-versions
1279 :     Description:
1280 :    
1281 :     1. CM version numbering added. This is an implementation of Lal's
1282 :     proposal for adding version numbers and version checking to .cm
1283 :     files. Lal said that his proposal was just that -- a proposal.
1284 :     For the time being I went ahead and implemented it so that people
1285 :     can comment on it. Everything is completely backward-compatible
1286 :     (except for the stable library format, i.e., new bootfiles!).
1287 :    
1288 :     As usual, see the CM manual for details.
1289 :    
1290 :     2. An alternative syntax for anchored paths has been implemented.
1291 :     Dave has recently voiced the same concerns that I had when I did
1292 :     this, so there should be some support. My take is that eventually
1293 :     I will let support for the current syntax (where anchors are
1294 :     "implicit") fade out in favor of the new, explicit syntax.
1295 :     In order to be backward-compatible, both old and new syntax are
1296 :     currently supported.
1297 :    
1298 :     Again, see the CM manual for details.
1299 :    
1300 :     3. Parallel make is trying to be slightly smarter: When the master
1301 :     process finds a "bottleneck", i.e., when there is only one
1302 :     compilation unit that can be compiled and everybody else is
1303 :     waiting on it, then it will simply compile it directly instead
1304 :     of clumsily telling one of the slaves to do it.
1305 :    
1306 :     4. Support for "unsharing" added. This is necessary in order to be
1307 :     able to have two different versions of the same library running
1308 :     at the same time (e.g., for trying out a new MLRISC while still
1309 :     having the old MLRISC linked into the current compiler, etc.)
1310 :     See the CM manual.
1311 :    
1312 :     5. Simple "makedepend" functionality added for generating Makefile
1313 :     dependency information. (This is rather crude at the moment.
1314 :     Expect some changes here in the future.)
1315 :    
1316 :     6. ".fun" added as a recognized suffix for ML files. Also documented
1317 :     explicitly in the manual that the fallback behavior (unknown suffix
1318 :     -> ML file) is not an official feature!
1319 :    
1320 :     7. Small changes to the pickler for stable libraries.
1321 :    
1322 :     8. Several internal changes to CM (for cleanup/improvement).
1323 :    
1324 :    
1325 :     !!!! NEW BINFILES !!!!
1326 :    
1327 :     ----------------------------------------------------------------------
1328 :     Name: Matthias Blume
1329 : blume 631 Date: 2000/04/28 17:30:00 JST
1330 :     Tag: blume-20000428-pathconfig
1331 :     Description:
1332 :    
1333 :     1. I changed config/install.sh to remove duplicate entries from the
1334 :     lib/pathconfig file at the end. Moreover, the final version of
1335 :     lib/pathconfig is sorted alphabetically. The same (sorting) is done
1336 :     in src/system/installml.
1337 :    
1338 :     2. The config/install.sh script now consistently uses relative
1339 :     pathnames in lib/pathconfig whenever the anchor is in the lib
1340 :     directory. (So far this was true for the libraries that come
1341 :     pre-compiled and bundled as part of the bootfiles but not for
1342 :     libraries that are compiled by the script itself.)
1343 :    
1344 :     ----------------------------------------------------------------------
1345 :     Name: Matthias Blume
1346 : blume 629 Date: 2000/04/26 13:10:00 JST
1347 :     Tag: blume-20000426-fun_suffix
1348 :     Description:
1349 :    
1350 :     Added ".fun" as a recognized file name suffix (for ML code).
1351 :    
1352 :     ----------------------------------------------------------------------
1353 : leunga 628 Name: Allen Leung
1354 :     Date: 2000/04/25 17:00:00 EST
1355 :     Tag: leunga-20000425-alpha-ra
1356 :     Description:
1357 :    
1358 :     1. Alpha
1359 :    
1360 :     PSEUDOARITH was missing in AlphaRewrite. This causes an endless loop
1361 :     in C--.
1362 :    
1363 :     2. RA
1364 :    
1365 :     Added a flag "ra-dump-size" to print out the size of the flowgraph
1366 :     and the interference graph.
1367 :    
1368 :     ----------------------------------------------------------------------
1369 : dbm 627 Name: Dave MacQueen
1370 :     Date: 2000/04/25/
1371 :     Tag: dbm-20000425-mlyacc_doc_examples
1372 :     Description:
1373 :     Updated mlyacc.tex sections 5 and 7 for SML '97 and CM.
1374 :     Updated all three examples in src/ml-yacc/examples to run
1375 :     under 110.* using CM.make.
1376 :    
1377 :     ----------------------------------------------------------------------
1378 : leunga 624 Name: Allen Leung
1379 :     Date: 2000/04/20 23:04:00 EST
1380 :     Tag: leunga-20000420-ssa-c---stuff
1381 :     Description:
1382 :    
1383 :     This update synchronizes my repository with Yale's. Most of these
1384 :     changes, however, do not affect SML/NJ at all (the RA is an exception).
1385 :    
1386 :     1. Register Allocator
1387 :    
1388 :     a. An improvement in the interference graph construction:
1389 :     Given a copy
1390 :    
1391 :     s <- t
1392 :    
1393 : leunga 628 no interference edge between s and t is added for this definition of s.
1394 : leunga 624
1395 :     b. I've added two new spill heuristic modules that Fermin and I developed
1396 :     (in the new library RA.cm). These are unused in SML/NJ but maybe
1397 :     useful for others (Moby?)
1398 :    
1399 :     2. X86
1400 :    
1401 :     a. Various fixes in the backend provided by Fermin [C--] and Lal.
1402 :    
1403 :     3. Alpha
1404 :    
1405 :     a. Added the BSR instruction and code generation that goes with it [C--]
1406 :     b. Other fixes too numerous to recount provided by Fermin [C--]
1407 :    
1408 :     4. Regmaps
1409 :    
1410 :     a. The regmaps are not initialized with the identity physical bindings
1411 :     at creation time. This is unneeded.
1412 :    
1413 :     5. MLRISC Optimizations
1414 :    
1415 :     a. The DJ-Graph module can now compute the iterated dominance frontiers
1416 :     intersects with liveness incrementally in linear time! Woohoo!
1417 :     This is now used in my new SSA construction algorithm.
1418 :    
1419 :     b. THe branch reorganization module is now smarter about linear chains of
1420 :     basic blocks.
1421 :    
1422 :    
1423 :     ----------------------------------------------------------------------
1424 : blume 615 Name: Matthias Blume
1425 :     Date: 2000/04/12 13:52:00 JST
1426 :     Tag: blume_main_v110p27_1
1427 :     Description:
1428 :    
1429 :     Changed install.sh script to handle archive files without version number
1430 :     and to use "boot.<arch>-<os>" instead of "sml.boot.<arch>-<os>" for the
1431 :     name of the boot file archive.
1432 :    
1433 :     ----------------------------------------------------------------------
1434 : dbm 607 Name: Dave MacQueen
1435 :     Date: 2000/04/09 14:00 EDT
1436 :     Tag: dbm-20000410-Version_110_27
1437 :     Description:
1438 :    
1439 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.27
1440 :    
1441 :     2. Updated src/config/version to 110.27
1442 :    
1443 :     3. New boot files!
1444 :    
1445 :     ----------------------------------------------------------------------
1446 : leunga 606 Name: Allen Leung
1447 :     Date: 2000/04/09 19:09:00 EST
1448 :     Tag: leunga-20000409-misc
1449 :     Description:
1450 :    
1451 :     1. Yet another fix for x86 assembly for idivl, imull, mull and friends.
1452 :    
1453 :     2. Miscellaneous improvements to MLRISC (unused in sml/nj)
1454 :    
1455 :     ----------------------------------------------------------------------
1456 : monnier 605 Name: Stefan
1457 :     Date: 2000/04/07 10:00:00 EDT
1458 :     Tag: monnier-20000406-branch-handling
1459 :     Description:
1460 :    
1461 :     Improved handling of branches (mostly those generated from
1462 :     polymorphic equality), removed switchoff and changed the
1463 :     default optimization settings (more cpsopt and less flintopt).
1464 :    
1465 :     ----------------------------------------------------------------------
1466 : leunga 601 Name: Allen Leung
1467 : leunga 602 Date: 2000/04/06 01:30:00 EST
1468 :     Tag: leunga-20000406-peephole-x86-SSA-2
1469 :     Description:
1470 :    
1471 :     Forgot a few files.
1472 :    
1473 :     ----------------------------------------------------------------------
1474 :     Name: Allen Leung
1475 : leunga 601 Date: 2000/04/06 00:36:00 EST
1476 :     Tag: leunga-20000406-peephole-x86-SSA
1477 :     Description:
1478 :    
1479 :     1. New Peephole code
1480 :    
1481 :     2. Minor improvement to X86 instruction selection
1482 :    
1483 :     3. Various fixes to SSA and machine description -> code translator
1484 :    
1485 :     ----------------------------------------------------------------------
1486 : blume 595 Name: Matthias Blume
1487 :     Date: 2000/04/05 12:30:00 JST
1488 :     Tag: blume_main_v110p26p2_3
1489 :     Description:
1490 :    
1491 :     This update just merges three minor cosmetic updates to CM's sources
1492 :     to get ready for the 110.27 code freeze on Friday. No functionality
1493 :     has changed.
1494 :    
1495 :     ----------------------------------------------------------------------
1496 : leunga 593 Name: Allen Leung
1497 : leunga 594 Date: 2000/04/04 19:39:00 EST
1498 :     Tag: leunga-20000404-x86-asm
1499 :     Description:
1500 :    
1501 :     1. Fixed a problem in X86 assembly.
1502 :    
1503 :     Things like
1504 :    
1505 :     jmp %eax
1506 :     jmp (%eax)
1507 :    
1508 :     should be output as
1509 :    
1510 :     jmp *%eax
1511 :     jmp *(%eax)
1512 :    
1513 :     2. Assembly output
1514 :    
1515 :     Added a new flag
1516 :    
1517 :     "asm-indent-copies" (default to false)
1518 :    
1519 :     When this flag is on, parallel copies will be indented an extra level.
1520 :    
1521 :     ----------------------------------------------------------------------
1522 :     Name: Allen Leung
1523 : leunga 593 Date: 2000/04/04 03:18:00 EST
1524 :     Tag: leunga-20000404-C--Moby
1525 :     Description:
1526 :    
1527 :     All of these fixes are related to C--, Moby, and my own optimization
1528 :     stuff; so they shouldn't affect SML/NJ.
1529 :    
1530 :     1. X86
1531 :    
1532 :     Various fixes related floating point, and extensions.
1533 :    
1534 :     2. Alpha
1535 :    
1536 :     Some extra patterns related to loads with signed/zero extension
1537 :     provided by Fermin.
1538 :    
1539 :     3. Assembly
1540 :    
1541 : monnier 659 When generating assembly, resolve the value of client defined constants,
1542 : leunga 593 instead of generating symbolic values. This is controlled by the
1543 :     new flag "asm-resolve-constants", which is default to true.
1544 :    
1545 :     4. Machine Descriptions
1546 :    
1547 :     a. The precedence parser was slightly broken when parsing infixr symbols.
1548 :     b. The type generalizing code had the bound variables reversed, resulting
1549 :     in a problem during arity raising.
1550 :     c. Various fixes in machine descriptions.
1551 :    
1552 :     ----------------------------------------------------------------------
1553 : blume 592 Name: Matthias Blume
1554 :     Date: 2000/04/03 16:05:00 JST
1555 :     Tag: blume_main_v110p26p2_2
1556 :     Description:
1557 :    
1558 :     I eliminated coreEnv from compInfo. Access to the "Core" structure is
1559 :     now done via the ordinary static environment that is context to each
1560 :     compilation unit.
1561 :    
1562 :     To this end, I arranged that instead of "structure Core" as "structure
1563 :     _Core" is bound in the pervasive environment. Core access is done via
1564 : monnier 659 _Core (which can never be accidentally rebound because _Core is not a
1565 : blume 592 legal surface-syntax symbol).
1566 :    
1567 :     The current solution is much cleaner because the core environment is
1568 :     now simply part of the pervasive environment which is part of every
1569 :     compilation unit's context anyway. In particular, this eliminates all
1570 :     special-case handling that was necessary until now in order to deal
1571 :     with dynamic and symbolic parts of the core environment.
1572 :    
1573 :     Remaining hackery (to bind the "magic" symbol _Core) is localized in the
1574 : monnier 659 compilation manager's bootstrap compiler (actually: in the "init group"
1575 : blume 592 handling). See the comments in src/system/smlnj/init/init.cmi for
1576 :     more details.
1577 :    
1578 :     I also tried to track down all mentions of "Core" (as string argument
1579 :     to Symbol.strSymbol) in the compiler and replaced them with a
1580 :     reference to the new CoreSym.coreSym. Seems cleaner since the actual
1581 :     name appears in one place only.
1582 :    
1583 :     Binfile and bootfile format have not changed, but the switchover from
1584 :     the old "init.cmi" to the new one is a bit tricky, so I supplied new
1585 :     bootfiles anyway.
1586 :    
1587 :     ----------------------------------------------------------------------
1588 : leunga 591 Name: Allen Leung
1589 :     Date: 2000/04/02 21:17:00 EST
1590 :     Tag: leunga-20000402-mltree
1591 :     Description:
1592 : leunga 585
1593 : leunga 591 1. Renamed the constructor CALL in MLTREE by popular demand.
1594 :     2. Added a bunch of files from my repository. These are currently
1595 :     used by other non-SMLNJ backends.
1596 :    
1597 : leunga 576 ----------------------------------------------------------------------
1598 : leunga 590 Name: Allen Leung
1599 :     Date: 2000/03/31 21:15:00 EST
1600 :     Tag: leunga-20000331-aliasing
1601 :     Description:
1602 :    
1603 :     This update contains a rewritten (and hopefully more correct) module
1604 :     for extracting aliasing information from CPS.
1605 :    
1606 :     To turn on this feature:
1607 :    
1608 :     Compiler.Control.CG.memDisambiguate := true
1609 :    
1610 :     To pretty print the region information with assembly
1611 :    
1612 :     Compiler.Control.MLRISC.getFlag "asm-show-region" := true;
1613 :    
1614 :     To control how many levels of aliasing information are printed, use:
1615 :    
1616 :     Compiler.Control.MLRISC.getInt "points-to-show-level" := n
1617 :    
1618 :     The default of n is 3.
1619 :    
1620 :     ----------------------------------------------------------------------
1621 : dbm 589 Name: David MacQueen
1622 :     Date: 2000/03/31 11:15:00 EST
1623 :     Tag: dbm-20000331-runtime_fix
1624 :     Description:
1625 :    
1626 :     This update contains:
1627 :    
1628 :     1. runtime/c-lib/c-libraries.c
1629 :     includes added in revision 1.2 caused compilation errors on hppa-hpux
1630 :    
1631 :     2. fix for bug 1556
1632 :     system/Basis/Implementation/NJ/internal-signals.sml
1633 :    
1634 :     ----------------------------------------------------------------------
1635 : blume 587 Name: Matthias Blume
1636 : blume 588 Date: 2000/03/31 18:00:00 JST
1637 :     Tag: blume_main_v110p26p2_1
1638 :     Description:
1639 :    
1640 :     This update contains:
1641 :    
1642 :     1. A small change to CM's handling of stable libraries:
1643 :     CM now maintains one "global" modmap that is used for all stable
1644 :     libraries. The use of such a global modmap maximizes sharing and
1645 :     minimizes the need for re-traversing parts of environments during
1646 :     modmap construction. (However, this has minor impact since modmap
1647 :     construction seems to account for just one percent or less of total
1648 :     compile time.)
1649 :    
1650 :     2. I added a "genmap" phase to the statistics. This is where I got the
1651 :     "one percent" number (see above).
1652 :    
1653 :     3. CM's new tool parameter mechanism just became _even_ better. :)
1654 :     - The parser understands named parameters and recursive options.
1655 :     - The "make" and "shell" tools use these new features.
1656 :     (This makes it a lot easier to cascade these tools.)
1657 :     - There is a small syntax change: named parameters use a
1658 :    
1659 :     <name> : ( <option> ... ) or
1660 :     <name> : <string>
1661 :    
1662 :     syntax. Previously, named parameters were implemented in an
1663 :     ad-hoc fashion by each tool individually (by parsing strings)
1664 :     and had the form
1665 :    
1666 :     <name>=<string>
1667 :    
1668 :     See the CM manual for a full description of these issues.
1669 :    
1670 :     ----------------------------------------------------------------------
1671 :     Name: Matthias Blume
1672 : blume 587 Date: 2000/03/30 18:00:00 JST
1673 :     Tag: blume_main_v110p26p2_0
1674 :     Description:
1675 :    
1676 :     !!!!! WARNING !!!!!!
1677 :     !! New binfiles !!
1678 :     !!!!!!!!!!!!!!!!!!!!
1679 :    
1680 :     This update contains:
1681 :    
1682 :     1. Moderate changes to CM:
1683 :    
1684 :     - Changes to CM's tools mechanism. In particular, it is now possible
1685 :     to have tools that accept additional "command line" parameters
1686 :     (specified in the .cm file at each instance where the tool's class is
1687 :     used).
1688 :    
1689 : monnier 659 This was done to accommodate the new "make" and "shell" tools which
1690 :     facilitate fairly seamless hookup to portions of code managed using
1691 : blume 587 Makefiles or Shell scripts.
1692 :    
1693 :     There are no classes "shared" or "private" anymore. Instead, the
1694 :     sharing annotation is now a parameter to the "sml" class.
1695 :    
1696 :     There is a bit of generic machinery for implementing one's own
1697 :     tools that accept command-line parameters. However, I am not yet fully
1698 :     satisfied with that part, so expect changes here in the future.
1699 :    
1700 :     All existing tools are described in the CM manual.
1701 :    
1702 : monnier 659 - Slightly better error handling. (CM now suppresses many followup
1703 : blume 587 error messages that tended to be more annoying than helpful.)
1704 :    
1705 :     2. Major changes to the compiler's static environment data structures.
1706 :    
1707 :     - no CMStaticEnv anymore.
1708 :     - no CMEnv, no "BareEnvironment" (actually, _only_ BareEnvironment,
1709 :     but it is called Environment), no conversions between different
1710 :     kinds of static environments
1711 :    
1712 :     - There is still a notion of a "modmap", but such modmaps are generated
1713 :     on demand at the time when they are needed. This sounds slow, but I
1714 :     sped up the code that generates modmaps enough for this not to lead to
1715 :     a slowdown of the compiler (at least I didn't detect any).
1716 :    
1717 :     - To facilitate rapid modmap generation, static environments now
1718 :     contain an (optional) "modtree" structure. Modtree annotations are
1719 :     constructed by the unpickler during unpickling. (This means that
1720 :     the elaborator does not have to worry about modtrees at all.)
1721 :     Modtrees have the advantage that they are compositional in the same
1722 :     way as the environment data structure itself is compositional.
1723 :     As a result, modtrees never hang on to parts of an environment that
1724 :     has already been rendered "stale" by filtering or rebinding.
1725 :    
1726 :     - I went through many, many trials and errors before arriving at the
1727 :     current solution. (The initial idea of "linkpaths" did not work.)
1728 :     But the result of all this is that I have touched a lot of files that
1729 :     depend on the "modules" and "types" data structures (most of the
1730 :     elaborator). There were a lot of changes during my "linkpath" trials
1731 :     that could have been reverted to their original state but weren't.
1732 :     Please, don't be too harsh on me for messing with this code a bit more
1733 :     than what was strictly necessary... (I _did_ resist the tempation
1734 :     of doing any "global reformatting" to avoid an untimely death at
1735 :     Dave's hands. :)
1736 :    
1737 :     - One positive aspect of the previous point: At least I made sure that
1738 :     all files that I touched now compile without warnings (other than
1739 :     "polyEqual").
1740 :    
1741 :     - compiler now tends to run "leaner" (i.e., ties up less memory in
1742 :     redundant modmaps)
1743 :    
1744 :     ----------------------------------------------------------------------
1745 : leunga 580 Name: Allen Leung
1746 : leunga 585 Date: 2000/03/29 18:00:00
1747 :     Tag: leunga-20000327-mlriscGen_hppa_alpha_x86
1748 : leunga 586 Boot files (optional): ftp://react-ilp.cs.nyu.edu/leunga/110.26.1-sml.boot.x86-unix-20000330.tar.gz
1749 : leunga 585 Description:
1750 :    
1751 :     This update contains *MAJOR* changes to the way code is generated from CPS
1752 :     in the module mlriscGen, and in various backend modules.
1753 :    
1754 :     CHANGES
1755 :     =======
1756 :    
1757 :     1. MLRiscGen: forward propagation fix.
1758 :    
1759 :     There was a bug in forward propagation introduced at about the same time
1760 :     as the MLRISC x86 backend, which prohibits coalescing to be
1761 :     performed effectively in loops.
1762 :    
1763 :     Effect: speed up of loops in RISC architectures.
1764 :     By itself, this actually slowed down certain benchmarks on the x86.
1765 :    
1766 :     2. MLRiscGen: forward propagating addresses from consing.
1767 :    
1768 :     I've changed the way consing code is generated. Basically I separated
1769 :     out the initialization part:
1770 :    
1771 :     store tag, offset(allocptr)
1772 :     store elem1, offset+4(allocptr)
1773 :     store elem2, offset+8(allocptr)
1774 :     ...
1775 :     store elemn, offset+4n(allocptr)
1776 :    
1777 :     and the address computation part:
1778 :    
1779 :     celladdr <- offset+4+alloctpr
1780 :    
1781 :     and move the address computation part
1782 :    
1783 :     Effect: register pressure is generally lower as a result. This
1784 :     makes compilation of certain expressions much faster, such as
1785 :     long lists with non-trivial elements.
1786 :    
1787 :     [(0,0), (0,0), .... (0,0)]
1788 :    
1789 :     3. MLRiscGen: base pointer elimination.
1790 :    
1791 :     As part of the linkage mechanism, we generate the sequence:
1792 :    
1793 :     L: ... <- start of the code fragment
1794 :    
1795 :     L1:
1796 :     base pointer <- linkreg - L1 + L
1797 :    
1798 :     The base pointer was then used for computing relocatable addresses
1799 :     in the code fragment. Frequently (such as in lots of continuations)
1800 :     this is not needed. We now eliminate this sequence whenever possible.
1801 :    
1802 :     For compile time efficiency, I'm using a very stupid local heuristic.
1803 :     But in general, this should be done as a control flow analysis.
1804 :    
1805 :     Effect: Smaller code size. Speed up of most programs.
1806 :    
1807 :     4. Hppa back end
1808 :    
1809 :     Long jumps in span dependence resolution used to depend on the existence
1810 :     of the base pointer.
1811 :    
1812 :     A jump to a long label L was expanded into the following sequence:
1813 :    
1814 :     LDIL %hi(L-8192), %r29
1815 :     LDO %lo(L-8192)(%r29), %r29
1816 :     ADD %r29, baseptr, %r29
1817 :     BV,n %r0(%r29)
1818 :    
1819 :     In the presence of change (3) above, this will not work. I've changed
1820 :     it so that the following sequence of instructions are generated, which
1821 :     doesn't mention the base pointer at all:
1822 :    
1823 :     BL,n L', %r29 /* branch and link, L' + 4 -> %r29 */
1824 :     L': ADDIL L-(L'+4), %r29 /* Compute address of L */
1825 :     BV,n %r0(%r29) /* Jump */
1826 :    
1827 :     5. Alpha back end
1828 :    
1829 :     New alpha instructions LDB/LDW have been added, as per Fermin's
1830 :     suggestions. This is unrelated to all other changes.
1831 :    
1832 :     6. X86 back end
1833 :    
1834 :     I've changed andl to testl in the floating point test sequence
1835 :     whenever appropriate. The Intel optimization guide states that
1836 : monnier 659 testl is preferable to andl.
1837 : leunga 585
1838 :     7. RA (x86 only)
1839 :    
1840 :     I've improved the spill propagation algorithm, using an approximation
1841 :     of maximal weighted independent sets. This seems to be necessary to
1842 :     alleviate the negative effect in light of the slow down in (1).
1843 :    
1844 :     I'll write down the algorithm one of these days.
1845 :    
1846 :     8. MLRiscGen: frequencies
1847 :    
1848 :     I've added an annotation that states that all call gc blocks have zero
1849 :     execution frequencies. This improves register allocation on the x86.
1850 :    
1851 :     BENCHMARKS
1852 :     ==========
1853 :    
1854 :     I've only perform the comparison on 110.25.
1855 :    
1856 :     The platforms are:
1857 :    
1858 :     HPPA A four processor HP machine (E9000) with 5G of memory.
1859 :     X86 A 300Hhz Pentium II with 128M of memory, and
1860 :     SPARC An Ultra sparc 2 with 512M of memory.
1861 :    
1862 :     I used the following parameters for the SML benchmarks:
1863 :    
1864 :     @SMLalloc
1865 :     HPPA 256k
1866 :     SPARC 512k
1867 :     X86 256k
1868 :    
1869 :     COMPILATION TIME
1870 :     ----------------
1871 :     Here are the numbers comparing the compilation times of the compilers.
1872 :     I've only compared 110.25 compiling the new sources versus
1873 :     a fixpoint version of the new compiler compiling the same.
1874 :    
1875 :     110.25 New
1876 :     Total Time in RA Spill+Reload Total Time In RA Spill+Reload
1877 :     HPPA 627s 116s 2684+3584 599s 95s 1003+1879
1878 :     SPARC 892s 173s 2891+3870 708s 116s 1004+1880
1879 :     X86 999s 315s 94006+130691 987s 296s 108877+141957
1880 :    
1881 :     110.25 New
1882 :     Code Size Code Size
1883 :     HPPA 8596736 8561421
1884 :     SPARC 8974299 8785143
1885 :     X86 9029180 8716783
1886 :    
1887 :     So in summary, things are at least as good as before. Dramatic
1888 :     reduction in compilation is obtained on the Sparc; I can't explain it,
1889 :     but it is reproducible. Perhaps someone should try to reproduce this
1890 :     on their own machines.
1891 :    
1892 :     SML BENCHMARKS
1893 :     --------------
1894 :    
1895 :     On the average, all benchmarks perform at least as well as before.
1896 :    
1897 :     HPPA Compilation Time Spill+Reload Run Time
1898 :     110.25 New 110.25 New 110.25 New
1899 :    
1900 :     barnesHut 3.158 3.015 4.75% 1+1 0+0 2.980 2.922 2.00%
1901 :     boyer 6.152 5.708 7.77% 0+0 0+0 0.218 0.213 2.34%
1902 :     count-graphs 1.168 1.120 4.32% 0+0 0+0 22.705 23.073 -1.60%
1903 :     fft 0.877 0.792 10.74% 1+3 1+3 0.602 0.587 2.56%
1904 :     knuthBendix 3.180 2.857 11.32% 0+0 0+0 0.675 0.662 2.02%
1905 :     lexgen 6.190 5.290 17.01% 0+0 0+0 0.913 0.788 15.86%
1906 :     life 0.803 0.703 14.22% 25+25 0+0 0.153 0.140 9.52%
1907 :     logic 2.048 2.007 2.08% 6+6 1+1 4.133 4.008 3.12%
1908 :     mandelbrot 0.077 0.080 -4.17% 0+0 0+0 0.765 0.712 7.49%
1909 :     mlyacc 22.932 20.937 9.53% 154+181 32+57 0.468 0.430 8.91%
1910 :     nucleic 5.183 5.060 2.44% 2+2 0+0 0.125 0.120 4.17%
1911 :     ratio-regions 3.357 3.142 6.84% 0+0 0+0 116.225 113.173 2.70%
1912 :     ray 1.283 1.290 -0.52% 0+0 0+0 2.887 2.855 1.11%
1913 :     simple 6.307 6.032 4.56% 28+30 5+7 3.705 3.658 1.28%
1914 :     tsp 0.888 0.862 3.09% 0+0 0+0 7.040 6.893 2.13%
1915 :     vliw 24.378 23.455 3.94% 106+127 25+45 2.758 2.707 1.91%
1916 :     --------------------------------------------------------------------------
1917 :     Average 6.12% 4.09%
1918 :    
1919 :     SPARC Compilation Time Spill+Reload Run Time
1920 :     110.25 New 110.25 New 110.25 New
1921 :    
1922 :     barnesHut 3.778 3.592 5.20% 2+2 0+0 3.648 3.453 5.65%
1923 :     boyer 6.632 6.110 8.54% 0+0 0+0 0.258 0.242 6.90%
1924 :     count-graphs 1.435 1.325 8.30% 0+0 0+0 33.672 34.737 -3.07%
1925 :     fft 0.980 0.940 4.26% 3+9 2+6 0.838 0.827 1.41%
1926 :     knuthBendix 3.590 3.138 14.39% 0+0 0+0 0.962 0.967 -0.52%
1927 :     lexgen 6.593 6.072 8.59% 1+1 0+0 1.077 1.078 -0.15%
1928 :     life 0.972 0.868 11.90% 26+26 0+0 0.143 0.140 2.38%
1929 :     logic 2.525 2.387 5.80% 7+7 1+1 5.625 5.158 9.05%
1930 :     mandelbrot 0.090 0.093 -3.57% 0+0 0+0 0.855 0.728 17.39%
1931 :     mlyacc 26.732 23.827 12.19% 162+189 32+57 0.550 0.560 -1.79%
1932 :     nucleic 6.233 6.197 0.59% 3+3 0+0 0.163 0.173 -5.77%
1933 :     ratio-regions 3.780 3.507 7.79% 0+0 0+0 133.993 131.035 2.26%
1934 :     ray 1.595 1.550 2.90% 1+1 0+0 3.440 3.418 0.63%
1935 :     simple 6.972 6.487 7.48% 29+32 5+7 3.523 3.525 -0.05%
1936 :     tsp 1.115 1.063 4.86% 0+0 0+0 7.393 7.265 1.77%
1937 :     vliw 27.765 24.818 11.87% 110+135 25+45 2.265 2.135 6.09%
1938 :     ----------------------------------------------------------------------------
1939 :     Average 6.94% 2.64%
1940 :    
1941 :     X86 Compilation Time Spill+Reload Run Time
1942 :     110.25 New 110.25 New 110.25 New
1943 :    
1944 :     barnesHut 5.530 5.420 2.03% 593+893 597+915 3.532 3.440 2.66%
1945 :     boyer 8.768 7.747 13.19% 493+199 301+289 0.327 0.297 10.11%
1946 :     count-graphs 2.040 2.010 1.49% 298+394 315+457 26.578 28.660 -7.26%
1947 :     fft 1.327 1.302 1.92% 112+209 115+210 1.055 0.962 9.71%
1948 :     knuthBendix 5.218 5.475 -4.69% 451+598 510+650 0.928 0.932 -0.36%
1949 :     lexgen 9.970 9.623 3.60% 1014+841 1157+885 0.947 0.928 1.97%
1950 :     life 1.183 1.183 0.00% 162+182 145+148 0.127 0.103 22.58%
1951 :     logic 3.285 3.512 -6.45% 514+684 591+836 5.682 5.577 1.88%
1952 :     mandelbrot 0.147 0.143 2.33% 38+41 33+54 0.703 0.690 1.93%
1953 :     mlyacc 35.457 32.763 8.22% 3496+4564 3611+4860 0.552 0.550 0.30%
1954 :     nucleic 7.100 6.888 3.07% 239+168 201+158 0.175 0.173 0.96%
1955 :     ratio-regions 6.388 6.843 -6.65% 1182+257 981+300 120.142 120.345 -0.17%
1956 :     ray 2.332 2.338 -0.29% 346+398 402+494 3.593 3.540 1.51%
1957 :     simple 9.912 9.903 0.08% 1475+941 1579+1168 3.057 3.178 -3.83%
1958 :     tsp 1.623 1.532 5.98% 266+200 250+211 8.045 7.878 2.12%
1959 :     vliw 33.947 35.470 -4.29% 2629+2774 2877+3171 2.072 1.890 9.61%
1960 :     ----------------------------------------------------------------------------
1961 :     Average 1.22% 3.36%
1962 :    
1963 :     ----------------------------------------------------------------------
1964 :     Name: Allen Leung
1965 : leunga 583 Date: 2000/03/23 16:25:00
1966 :     Tag: leunga-20000323-fix_x86_alpha
1967 :     Description:
1968 :    
1969 :     1. X86 fixes/changes
1970 :    
1971 :     a. The old code generated for SETcc was completely wrong.
1972 :     The Intel optimization guide is VERY misleading.
1973 :    
1974 :     2. ALPHA fixes/changes
1975 :    
1976 :     a. Added the instructions LDBU, LDWU, STB, STW as per Fermin's suggestion.
1977 :     b. Added a new mode byteWordLoadStores to the functor parameter to Alpha()
1978 :     c. Added reassociation code for address computation.
1979 :    
1980 :     ----------------------------------------------------------------------
1981 :     Name: Allen Leung
1982 : leunga 580 Date: 2000/03/22 01:23:00
1983 :     Tag: leunga-20000322-fix_x86_hppa_ra
1984 :     Description:
1985 :    
1986 :     1. X86 fixes/changes
1987 :    
1988 :     a. x86Rewrite bug with MUL3 (found by Lal)
1989 :     b. Added the instructions FSTS, FSTL
1990 :    
1991 :     2. PA-RISC fixes/changes
1992 :    
1993 :     a. B label should not be a delay slot candidate! Why did this work?
1994 :     b. ADDT(32, REG(32, r), LI n) now generates one instruction instead of two,
1995 :     as it should be.
1996 :     c. The assembly syntax for fstds and fstdd was wrong.
1997 :     d. Added the composite instruction COMICLR/LDO, which is the immediate
1998 :     operand variant of COMCLR/LDO.
1999 :    
2000 :     3. Generic MLRISC
2001 :    
2002 :     a. shuffle.sml rewritten to be slightly more efficient
2003 :     b. DIV bug in mltree-simplify fixed (found by Fermin)
2004 :    
2005 :     4. Register Allocator
2006 :    
2007 :     a. I now release the interference graph earlier during spilling.
2008 :     May improve memory usage.
2009 :    
2010 :     ----------------------------------------------------------------------
2011 : blume 577 Name: Matthias Blume
2012 : blume 578 Date: 2000/03/14 14:15:32
2013 :     Tag: blume_main_v110p26p1_2
2014 :     Description:
2015 :    
2016 :     1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
2017 :     additional argument called "template" which is an optional string that
2018 : monnier 659 specifies the layout of the tool command line. See the CM manual for
2019 : blume 578 explanation.
2020 :    
2021 : monnier 659 2. A special-purpose tool can be "registered" by simply dropping the
2022 : blume 578 corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
2023 :     directory where the .cm file lives that uses this tool. (The
2024 :     behavior/misfeature until now was to look for the tool description
2025 :     files in the current working directory.) As before, tool description
2026 :     files could also be anchored -- in which case they can live anywhere
2027 :     they like. Following the recent e-mail discussion, this change should
2028 :     make it easier to have special-purpose tools that are shipped together
2029 :     with the sources of the program that uses them.
2030 :    
2031 :     ----------------------------------------------------------------------
2032 :     Name: Matthias Blume
2033 : blume 577 Date: 2000/03/10 07:48:34
2034 :     Tag: blume_main_v110p26p1_1
2035 :     Description:
2036 :    
2037 :     I added a re-written version of Dave's fixpt script to src/system.
2038 :     Changes relative to the original version:
2039 :     - sh-ified (not everybody has ksh)
2040 :     - automatically figures out which architecture it runs on
2041 :     - uses ./makeml a bit more cleverly
2042 :     - never invokes ./installml (and, thus, does not clobber your
2043 :     good and working installation of sml in case something goes wrong)
2044 :     - accepts max iteration count using option "-iter <n>"
2045 :     - accepts a "base" name using option "-base <base>"
2046 :    
2047 :     It does not build any extraneous heap images but directly rebuilds
2048 :     bin- and boot-hierarchies using makeml's "-rebuild" switch. Finally,
2049 :     it can incorporate existing bin- and boot- hierarchies. For example,
2050 :     suppose the base is set to "sml" (which is the default). Then it
2051 :     successively builds
2052 :    
2053 :     sml.bin.<arch>-unix and sml.boot.<arch>-unix
2054 :     then sml1.bin.<arch>-unix and sml1.boot.<arch>-unix
2055 :     then sml2.bin.<arch>-unix and sml2.boot.<arch>-unix
2056 :     ...
2057 :     then sml<n>.bin.<arch>-unix and sml<n>.boot.<arch>-unix
2058 :    
2059 :     and so on. If any of these already exist, it will just use what's
2060 :     there. In particular, many people will have the initial set of bin
2061 :     and boot files around, so this saves time for at least one full
2062 :     rebuild. Having sets of the form <base><k>.{bin,boot}.<arch>-unix for
2063 :     <k>=1,2,... is normally not a good idea when invoking fixpt. However,
2064 :     they might be the result of an earlier partial run of fixpt (which
2065 : monnier 659 perhaps got accidentally killed). In this case, fixpt will quickly
2066 : blume 577 move through what exists before continuing where it left off earlier,
2067 :     and, thus, saves a lot of time.
2068 :    
2069 :     ----------------------------------------------------------------------
2070 : leunga 576 Name: Allen Leung
2071 :     Date: 00/03/10 02:20:00
2072 :     Tag: leunga-20000310-fix_x86_asm_ra
2073 :     Description:
2074 : dbm 570
2075 : leunga 576 More assembly output problems involving the indexed addressing mode
2076 :     on the x86 have been found and corrected. Thanks to Fermin Reig for the
2077 :     fix.
2078 :    
2079 :     The interface and implementation of the register allocator have been changed
2080 :     slightly to accommodate the possibility to skip the register allocation
2081 :     phases completely and go directly to memory allocation. This is needed
2082 :     for C-- use.
2083 :    
2084 : dbm 570 ----------------------------------------------------------------------
2085 : blume 572 Name: Matthias Blume
2086 : blume 575 Date: 00/03/09 10:23:53
2087 :     Tag: blume_main_v110p26p1_0
2088 :     Description:
2089 :    
2090 :     * Complete re-organization of library names. Many libraries have been
2091 :     consolidated so that they share the same path anchor. For example,
2092 :     all MLRISC-related libraries are anchored at MLRISC, most libraries that
2093 :     are SML/NJ-specific are under "smlnj". Notice that names like
2094 :     host-cmb.cm or host-compiler.cm no longer exist. See system/README
2095 :     for a complete description of the new naming scheme. Quick reference:
2096 :    
2097 :     host-cmb.cm -> smlnj/cmb.cm
2098 :     host-compiler.cm -> smlnj/compiler.cm
2099 :     full-cm.cm -> smlnj/cm.cm
2100 :     <arch>-<os>.cm -> smlnj/cmb/<arch>-<os>.cm
2101 :     <arch>-compiler.cm -> smlnj/compiler/<arch>.cm
2102 :    
2103 :     * Bug fixes in CM.
2104 :     - exceptions in user code are being passed through (i.e., reach top level)
2105 :     - more bugs in paranoia mode fixed
2106 :     - bug related to checking group owners fixed
2107 :    
2108 :     * New install.sh script that automagically fetches archive files:
2109 :     The new file config/srcarchiveurl must contain the URL of the
2110 :     (remote) directory that contains bin files (or other source archives).
2111 :     If install.sh does not find the archive locally, it tries to get
2112 :     it from that remote directory.
2113 :     This should simplify installation further: For machines that have
2114 :     access to the internet, just fetch <version>-config.tgz, unpack it,
2115 : monnier 659 edit config/targets, and go (run config/install.sh). The script will
2116 : blume 575 fetch everything else that it might need all by itself.
2117 :    
2118 :     For CVS users, this mechanism is not relevant for source archives, but
2119 :     it is convenient for getting new sets of binfiles.
2120 :    
2121 :     Archives should be tar files compressed with either gzip, compress, or
2122 :     bzip2. The script recognizes .tgz, .tar, tar.gz, tz, .tar.Z, and .tar.bz2.
2123 :    
2124 :     ----------------------------------------------------------------------
2125 :     Name: Matthias Blume
2126 : blume 572 Date: 2000/03/07 04:01:04
2127 :     Tag: blume_main_v110_26_2
2128 : dbm 570 Description:
2129 : blume 572 - size info in BOOTLIST
2130 :     * no fixed upper limits for number of bootfiles or length of
2131 :     bootfile names in runtime
2132 :     * falling back to old behavior if no BOOTLIST size info found
2133 :     - allocation size heuristics in .run-sml
2134 :     * tries to read cache size from /proc/cpuinfo (this is important for
2135 :     small-cache Celeron systems!)
2136 :     - install.sh robustified
2137 :     - CM manual updates
2138 :     - paranoid mode
2139 :     * no more CMB.deliver() (i.e., all done by CMB.make())
2140 :     * can re-use existing sml.boot.* files
2141 :     * init.cmi now treated as library
2142 :     * library stamps for consistency checks
2143 :     - sml.boot.<arch>-<os>/PIDMAP file
2144 :     * This file is read by the CM startup code. This is used to minimize
2145 :     the amount of dynamic state that needs to be stowed away for the
2146 :     purpose of sharing between interactive system and user code.
2147 :     - CM.Anchor.anchor instead of CM.Anchor.{set,cancel}
2148 :     * Upon request by Elsa. Anchors now controlled by get-set-pair
2149 :     like most other CM state variables.
2150 :     - Compiler.CMSA eliminated
2151 :     * No longer supported by CM anyway.
2152 :     - fixed bugs in pickler that kept biting Stefan
2153 :     * past refs to past refs (was caused by the possibility that
2154 :     ad-hoc sharing is more discriminating than hash-cons sharing)
2155 :     * integer overflow on LargeInt.minInt
2156 :     - ml-{lex,yacc} build scripts now use new mechanism
2157 :     for building standalone programs
2158 :     - fixed several gcc -Wall warnings that were caused by missing header
2159 :     files, missing initializations, etc., in runtime (not all warnings
2160 :     eliminated, though)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0