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

SCM Repository

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

Diff of /sml/trunk/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.572  
changed lines
  Added in v.778

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