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

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

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