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

Legend:
Removed from v.576  
changed lines
  Added in v.977

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