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 634, Mon May 1 10:03:50 2000 UTC revision 972, Sun Oct 28 00:37:02 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: Allen Leung
17    Date: 2001/10/27 20:34:00 EDT
18    Tag: leunga-20011027-x86-fast-fp-call
19    Description:
20    
21       Fixed the bug described in blume-20010920-slowfp.
22    
23       The fix involves
24          1. generating FCOPYs in FSTP in ia32-svid
25          2. marking a CALL with the appropriate annotation
26    
27    ----------------------------------------------------------------------
28    Name: Matthias Blume
29    Date: 2001/10/16 11:32:00 EDT
30    Tag: blume-20011016-netbsd
31    Description:
32    
33    Underscore patch from Chris Richards (fixing problem with compiling
34    runtime system under recent NetBSD).
35    
36    ----------------------------------------------------------------------
37    Name: Allen Leung
38    Date: 2001/10/12 17:18:32 EDT 2001
39    Tag: leung-20011012-x86-printflowgraph
40    Description:
41    
42    X86RA now uses a valid (instead of dummy) PrintFlowgraph module.
43    
44    ----------------------------------------------------------------------
45    Name: Lal George
46    Date: 2001/10/11 23:51:34 EDT
47    Tag: george-20011011-too-many-instrs
48    Description:
49    
50    The representation of a program point never expected to see more
51    than 65536 instructions in a basic block!
52    
53    ----------------------------------------------------------------------
54    Name: Lal George
55    Date: 2001/10/09 09:41:37 EDT
56    Tag: george-20011008-mlrisc-labels
57    Description:
58    
59    Changed the machine description files to support printing of
60    local and global labels in assembly code, based on host assembler
61    conventions.
62    
63    ----------------------------------------------------------------------
64    Name: Matthias Blume
65    Date: 2001/09/25 15:25:00 EDT
66    Tag: blume-20010925-exninfo
67    Description:
68    
69    I provided a non-hook implementation of exnName (at the toplevel) and
70    made the "dummy" implementation of exnMessage (at the toplevel) more
71    useful: if nothing gets "hooked in", then at least you are going to
72    see the exception name and a message indicating why you don't see more.
73    
74    [For the time being, programs that need exnMessage and want to use
75    ml-build should either use General.exnMessage (strongly recommended) or
76    refer to structure General at some other point so that CM sees a
77    static dependency.]
78    
79    [Similar remarks go for "print" and "use":  If you want to use their
80    functionality in stand-alone programs generated by ml-build, then use
81    TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).]
82    
83    ----------------------------------------------------------------------
84    Name: Matthias Blume
85    Date: 2001/09/20 17:28:00 EDT
86    Tag: blume-20010920-slowfp
87    Description:
88    
89    Allen says that x86-fast-fp is not safe yet, so I turned it off again...
90    
91    ----------------------------------------------------------------------
92    Name: Matthias Blume
93    Date: 2001/09/20 17:20:00 EDT
94    Tag: blume-20010920-canonicalpaths
95    Description:
96    
97    0. Updated the BOOT file (something that I forgot to do earlier).
98    
99    1. Small internal change to CM so that it avoids "/../" in filenames
100       as much as possible (but only where it is safe).
101    
102    2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so
103       that arguments that contain delimiters are passed through correctly.
104       This change also means that all "special" arguments of the form
105       @SMLxxx... must come first.
106    
107    3. Changed install script to put relative anchor names for tool commands
108       into pathconfig.
109    
110    ----------------------------------------------------------------------
111    Name: Matthias Blume
112    >>>>>>> 1.169
113    Date: 2001/09/18 15:35:00 EDT
114    Tag: blume-20010918-readme11036
115    Description:
116    
117    Added README files.
118    
119    ----------------------------------------------------------------------
120    Name: Matthias Blume
121    Date: 2001/09/18 11:45:00 EDT
122    Tag: Release_110_36 (retag)
123    Description:
124    
125    Fixed mistake in config/preloads. Retagged as 110.36.
126    
127    ----------------------------------------------------------------------
128    Name: Matthias Blume
129    Date: 2001/09/18 09:40:00 EDT
130    Tag: Release_110_36_orig (tag changed)
131    Description:
132    
133    New version (110.36).  New bootfiles.
134    
135    ----------------------------------------------------------------------
136    Name: Matthias Blume
137    Date: 2001/09/14 16:15:00 EDT
138    Tag: blume-20010914-x86fastfp
139    Description:
140    
141    John committed some changes that Allen made, in particular a (hopefully)
142    correctly working version of the x86-fp module.
143    
144    I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp"
145    flag to "true".  Everything seems to compile to a fixpoint ok, and
146    "mandelbrot" speeds up by about 15%.
147    
148    ----------------------------------------------------------------------
149    Name: Matthias Blume
150    Date: 2001/09/13 11:20:00 EDT
151    Tag: blume-20010913-minimal
152    Description:
153    
154    1. Stefan Monnier's patch to fix a miscompilation problem that
155       was brought to light by John Reppy's work on Moby.
156    
157    2. Implemented a minimal "structure Compiler" that contains just
158       "version" and "architecture".  The minimal version will be
159       available when the full version is not.  This is for backward-
160       compatibility with code that wants to test Compiler.version.
161    
162    ----------------------------------------------------------------------
163    Name: Matthias Blume
164    Date: 2001/08/28 14:03:00 EDT
165    Tag: blume-20010828-ml-lex
166    Description:
167    
168    Fix for bug 1581, received from Neophytos Michael.
169    
170    ----------------------------------------------------------------------
171    Name: Matthias Blume
172    Date: 2001/08/27 11:20:00 EDT
173    Tag: blume-20010827-readme11035
174    Description:
175    
176    Fleshed out the README file for 110.35.
177    
178    ----------------------------------------------------------------------
179    Name: Matthias Blume
180    Date: 2001/08/24 17:10:00 EDT
181    Tag: Release_110_35
182    Description:
183    
184    New version number (110.35).  New bootfiles.
185    
186    ----------------------------------------------------------------------
187    Name: Lal George
188    Date: 2001/08/24 13:47:18 EDT 2001
189    Tag: george-20010824-MLRISC-graphs
190    Description:
191    
192     removed clusters from MLRISC completely and replaced with graphs.
193    
194    ----------------------------------------------------------------------
195    Name: Matthias Blume
196    Date: 2001/08/23 17:50:00 EDT
197    Tag: blume-20010823-toplevel
198    Description:
199    
200    - some reorganization of the code that implements various kinds of
201      environments in the compiler (static, dynamic, symbolic, combined)
202    - re-implemented the EnvRef module so that evalStream works properly
203      (if the stream contains references to "use", "CM.make", etc.)
204    - cleaned up evalloop.sml and interact.sml (but they need more cleaning)
205    
206    ----------------------------------------------------------------------
207    Name: Matthias Blume
208    Date: 2001/08/20 15:50 EDT
209    Tag: blume20010820-slipup
210    Description:
211    
212    I forgot to commit a few files.  Here they are...
213    
214    ----------------------------------------------------------------------
215    Name: Matthias Blume
216    Date: 2001/08/20 15:35:00 EDT
217    Tag: blume-20010820-debugprof
218    Description:
219    
220    !!!! NEW BOOTFILES !!!!
221    
222    This is another round of reorganizing the compiler sources.  This
223    time the main goal was to factor out all the "instrumentation"
224    passes (for profiling and backtracing) into their own library.
225    The difficulty was to do it in such a way that it does not depend
226    on elaborate.cm but only on elabdata.cm.
227    
228    Therefore there have been further changes to both elaborate.cm and
229    elabdata.cm -- more "generic" things have been moved from the former
230    to the latter.  As a result, I was forced to split the assignment
231    of numbers indicating "primtyc"s into two portions: SML-generic and
232    SML/NJ-specific.  Since it would have been awkward to maintain,
233    I bit the bullet and actually _changed_ the mapping between these
234    numbers and primtycs.  The bottom line of this is that you need
235    a new set of bin- and bootfiles.
236    
237    I have built new bootfiles for all architectures, so doing a fresh
238    checkout and config/install.sh should be all you need.
239    
240    The newly created library's name is
241    
242        $smlnj/viscomp/debugprof.cm
243    
244    and its sources live under
245    
246        src/compiler/DebugProf
247    
248    ----------------------------------------------------------------------
249    Name: Matthias Blume
250    Date: 2001/08/15 17:15:00 EDT
251    Tag: blume-20010815-compreorg
252    Description:
253    
254    This is a first cut at reorganizing the CM libraries that make up the
255    core of the compiler.  The idea is to separate out pieces that could
256    be used independently by tools, e.g., the parser, the typechecker, etc.
257    
258    The current status is a step in this direction, but it is not quite
259    satisfactory yet.  Expect more changes in the future.
260    
261    Here is the current (new) organization...
262    
263        What used to be $smlnj/viscomp/core.cm is now divided into
264        six CM libraries:
265    
266             $smlnj/viscomp/basics.cm
267                           /parser.cm
268                           /elabdata.cm
269                           /elaborate.cm
270                           /execute.cm
271                           /core.cm
272    
273        The CM files for these libraries live under src/system/smlnj/viscomp.
274        All these libraries are proxy libraries that contain precisely
275        one CM library component.  Here are the locations of the components
276        (all within the src/compiler tree):
277    
278             Basics/basics.cm
279             Parse/parser.cm
280             ElabData/elabdata.cm
281             Elaborator/elaborate.cm
282             Execution/execute.cm
283             core.cm
284    
285         [This organization is the same that has been used already
286         for a while for the architecture-specific parts of the visible
287         compiler and for the old version of core.cm.]
288    
289         As you will notice, many source files have been moved from their
290         respective original locations to a new home in one of the above
291         subtrees.
292    
293         The division of labor between the new libraries is the following:
294    
295             basics.cm:
296                - Simple, basic definitions that pertain to many (or all) of
297                  the other libraries.
298             parser.cm:
299                - The SML parser, producing output of type Ast.dec.
300                - The type family for Ast is also defined and exported here.
301             elabdata.cm:
302                - The datatypes that describe input and output of the elaborator.
303                  This includes types, absyn, and static environments.
304             elaborator.cm:
305                - The SML/NJ type checker and elaborator.
306                  This maps an Ast.dec (with a given static environment) to
307                  an Absyn.dec (with a new static environment).
308                - This libraries implements certain modules that used to be
309                  structures as functors (to remove dependencies on FLINT).
310             execute.cm:
311                - Everything having to do with executing binary code objects.
312                - Dynamic environments.
313             core.cm:
314                - SML/NJ-specific instantiations of the elaborator and MLRISC.
315                - Top-level modules.
316                - FLINT (this should eventually become its own library)
317    
318    Notes:
319    
320    I am not 100% happy with the way I separated the elaborator (and its
321    data structures) from FLINT.  Two instances of the same problem:
322    
323        1. Data structures contain certain fields that carry FLINT-specific
324           information.  I hacked around this using exn and the property list
325           module from smlnj-lib.  But the fact that there are middle-end
326           specific fields around at all is a bit annoying.
327    
328        2. The elaborator calculates certain FLINT-related information.  I tried
329           to make this as abstract as I could using functorization, but, again,
330           the fact that the elaborator has to perform calculations on behalf
331           of the middle-end at all is not nice.
332    
333        3. Having to used exn and property lists is unfortunate because it
334           weakens type checking.  The other alternative (parameterizing
335           nearly *everything*) is not appealing, though.
336    
337    I removed the "rebinding =" warning hack because due to the new organization
338    it was awkward to maintain it.  As a result, the compiler now issues some of
339    these warnings when compiling init.cmi during bootstrap compilation. On
340    the plus side, you also get a warning when you do, for example:
341       val op = = Int32.+
342    which was not the case up to now.
343    
344    I placed "assign" and "deref" into the _Core structure so that the
345    code that deals with the "lazy" keyword can find them there.  This
346    removes the need for having access to the primitive environment
347    during elaboration.
348    
349    ----------------------------------------------------------------------
350    Name: Matthias Blume
351    Date: 2001/08/13
352    Tag: blume-20010813-closures
353    Description:
354    
355    This fix was sent to us by Zhong Shao.  It is supposed to improve the
356    performance of certain loops by avoiding needless closure allocation.
357    
358    ----------------------------------------------------------------------
359    Name: Lal George
360    Date: 2001/07/31 10:03:23 EDT 2001
361    Tag: george-20010731-x86-fmalloc
362    Description: Fixed bug in x86 calls
363    
364        There was a bug where call instructions would mysteriously
365        vanish. The call instruction had to be one that returned
366        a floating point value.
367    
368    ----------------------------------------------------------------------
369    Name: Lal George
370    Date: 2001/07/19 16:36:29 EDT 2001
371    Tag: george-20010719-simple-cells
372    Description:
373    
374    I have dramatically simplified the interface for CELLS in MLRISC.
375    
376    In summary, the cells interface is broken up into three parts:
377    
378      1. CellsBasis : CELLS_BASIS
379    
380            CellsBasis is a top level structure and common for all
381            architectures.  it contains the definitions of basic datatypes
382            and utility  functions over these types.
383    
384      2. functor Cells() : CELLS
385    
386            Cells generates an interface for CELLS that incorporates the
387            specific resources on the target architecture, such as the
388            presence of special register classes, their number and size,
389            and various useful substructures.
390    
391      3. <ARCH>CELLS
392    
393            e.g. SparcCells: SPARCCELLS
394    
395            <ARCH>CELLS usually contains additional bindings for special
396            registers  on the architecture, such as:
397    
398                    val r0 : cell           (* register zero *)
399                    val y : cell            (* Y register *)
400                    val psr : cell          (* processor status register *)
401                    ...
402    
403            The structure returned by applying the Cells functor is opened
404            in this interface.
405    
406    The main implication of all this is that the datatypes for cells is
407    split between CellsBasis and CELLS -- a fairly simple change for user
408    code.
409    
410    In the old scheme the CELLS interface had a definitional binding of
411    the form:
412    
413            signature CELLS = sig
414    
415               structure CellsBasis = CellsBasis
416    
417               ...
418    
419            end
420    
421    With all the sharing constraints that goes on in MLRISC, this old
422    design  quickly leads to errors such as:
423    
424            "structure definition spec inside of sharing ... "
425    
426    
427    and appears to require an unacceptable amount of sharing and where
428    constraint hackery.
429    
430    I think this error message (the interaction of definitional specs and
431    sharing) requires more explanation on our web page.
432    
433    ----------------------------------------------------------------------
434    Name: Matthias Blume
435    Date: 2001/07/19 15:00:00 EDT
436    Tag: blume-20010719-libreorg
437    Description:
438    
439    This update puts together a fairly extensive but straightforward change
440    to the way the libraries that implement the interactive system are
441    organized:
442    
443       The biggest change is the elimination of structure Compiler.  As a
444       replacement for this structure, there is now a CM library
445       (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm)
446       that exports all the substructures of the original structure Compiler
447       directly.  So instead of saying Compiler.Foo.bar one now simply
448       says Foo.bar.  (The CM libraries actually export a collection of
449       structures that is richer than the collection of substructures of
450       structure Compiler.)
451    
452       To make the transition smooth, there is a separate library called
453       $smlnj/compiler/compiler.cm which puts together and exports the
454       original structure Compiler (or at least something very close to it).
455    
456       There are five members of the original structure Compiler
457       that are not exported directly but which instead became members
458       of a new structure Backend (described by signature BACKEND).  These are:
459       structure Profile (: PROFILE), structure Compile (: COMPILE), structure
460       Interact (: INTERACT), structure Machine (: MACHINE), and val
461       architecture (: string).
462    
463       Structure Compiler.Version has become structure CompilerVersion.
464    
465       Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided
466       by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc,
467       or x86, respectively.
468       Each of these exports the same frontend structures that
469       $smlnj/compiler.cm exports.  But they do not have a structure Backend
470       and instead export some structure <Arch>Backend where <Arch> is Alpha32,
471       Hppa, PPC, Sparc, or X86, respectively.
472    
473       Library $smlnj/compiler/all.cm exports the union of the exports of
474       $smlnj/compiler/<arch>.cm
475    
476       There are no structures <Arch>Compiler anymore, use
477       $smlnj/compiler/<arch>.cm instead.
478    
479       Library host-compiler-0.cm is gone.  Instead, the internal library
480       that instantiates CM is now called cm0.cm.  Selection of the host
481       compiler (backend) is no longer done here but. (Responsibility for it
482       now lies with $smlnj/compiler/current.cm.  This seems to be more
483       logical.)
484    
485       Many individual files have been moved or renamed.  Some files have
486       been split into multiple files, and some "dead" files have been deleted.
487    
488    Aside from these changes to library organization, there are also changes
489    to the way the code itself is organized:
490    
491       Structure Binfile has been re-implemented in such a way that it no
492       longer needs any knowledge of the compiler.  It exclusively deals
493       with the details of binfile layout.  It no longer invokes the
494       compiler (for the purpose of creating new prospective binfile
495       content), and it no longer has any knowledge of how to interpret
496       pickles.
497    
498       Structure Compile (: COMPILE) has been stripped down to the bare
499       essentials of compilation.  It no longer deals with linking/execution.
500       The interface has been cleaned up considerably.
501    
502       Utility routines for dealing with linking and execution have been
503       moved into their own substructures.
504    
505       (The ultimate goal of these changes is to provide a light-weight
506       binfile loader/linker (at least for, e.g., stable libraries) that
507       does not require CM or the compiler to be present.)
508    
509    CM documentation has been updated to reflect the changes to library
510    organization.
511    
512    ----------------------------------------------------------------------
513    Name: Matthias Blume
514    Date: 2001/07/10 17:30:00 EDT
515    Tag: Release_110_34
516    Description:
517    
518    Minor tweak to 110.34 (re-tagged):
519    
520      - README.html file added to CVS repository
521      - runtime compiles properly under FreeBSD 3.X and 4.X
522    
523    ----------------------------------------------------------------------
524    Name: Matthias Blume
525    Date: 2001/07/10 17:30:00 EDT
526    Tag: Release_110_34
527    Description:
528    
529    New version number (110.34). New bootfiles.
530    
531    ----------------------------------------------------------------------
532    Name: Matthias Blume
533    Date: 2001/07/09 16:00:00 EDT
534    Tag: blume-20010709-more-varargs
535    Description:
536    
537    I changed the handling of varargs in ml-nlffigen again:
538    The ellipsis ... will now simply be ignored (with an accompanying warning).
539    
540    The immediate effect is that you can actually call a varargs function
541    from ML -- but you can't actually supply any arguments beyond the ones
542    specified explicitly.  (For example, you can call printf with its format
543    string, but you cannot pass additional arguments.)
544    
545    This behavior is only marginally more useful than the one before, but
546    it has the advantage that a function or, more importantly, a function
547    type never gets dropped on the floor, thus avoiding follow-up problems with
548    other types that refer to the offending one.
549    
550    ----------------------------------------------------------------------
551    Name: Matthias Blume
552    Date: 2001/07/09 11:25:00 EDT
553    Tag: blume-20010709-varargs
554    Description:
555    
556    1. ckit-lib.cm now exports structure Error
557    2. ml-nlffigen reports occurences of "..." (i.e., varargs function types)
558       with a warning accompanied by a source location.  Moreover, it
559       merely skips the offending function or type and proceeds with the
560       rest of its work.u  As a result, one can safely feed C code containing
561       "..." to ml-nlffigen.
562    3. There are some internal improvements to CM, providing slightly
563       more general string substitutions in the tools subsystem.
564    
565    ----------------------------------------------------------------------
566    Name: Matthias Blume
567    Date: 2001/06/27 15:10:00 EDT
568    Tag: blume-20010627-concur
569    Description:
570    
571    Fixed a small bug in CM's handling of parallel compilation.
572    (You could observe the bug by Control-C-interrupting an ordinary
573    CMB.make or CM.stabilize and then attaching some compile servers.
574    The result was that all of a sudden the previously interrupted
575    compilation would continue on its own.  This was because of
576    an over-optimization: CM did not bother to clean out certain queues
577    when no servers were attached "anyway", resulting in the contents
578    of these queues to grab control when new servers did get attached.)
579    
580    There is also another minor update to the CM manual.
581    
582    ----------------------------------------------------------------------
583    Name: Matthias Blume
584    Date: 2001/06/26 16:15:00 EDT
585    Tag: blume-20010626-cmdoc
586    Description:
587    
588    Minor typo fixed in CM manual (syntax diagram for libraries).
589    
590    ----------------------------------------------------------------------
591    Name: Matthias Blume
592    Date: 2001/06/25 22:55:00 EDT
593    Tag: blume-20010625-x86pc
594    Description:
595    
596    Fixed a nasty bug in the X86 assembly code that caused signal
597    handlers to fail (crash) randomly.
598    
599    ----------------------------------------------------------------------
600    Name: Matthias Blume
601    Date: 2001/06/25 12:05:00 EDT
602    Tag: blume-20010625-nlffigen
603    Description:
604    
605    This update fixes a number of minor bugs in ml-nlffigen as reported by
606    Nick Carter <nbc@andrew.cmu.edu>.
607    
608      1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted.
609      2. Default names for generated files are now derived from the name of
610         the C file *without its directory*.  In particular, this causes generated
611         files to be placed locally even if the C file is in some system directory.
612      3. Default names for generated signatures and structures are also derived
613         from the C file name without its directory.  This avoids silly things
614         like "structure GL/GL".
615         (Other silly names are still possible because ml-nlffigen does not do
616          a thorough check of whether generated names are legal ML identifiers.
617          When in doubt, use command line arguments to force particular names.)
618    
619    ----------------------------------------------------------------------
620    Name: Matthias Blume
621    Date: 2001/06/21 12:25:00 EDT
622    Tag: blume-20010621-eXene
623    Description:
624    
625    eXene now compiles and (sort of) works again.
626    
627    The library name (for version > 110.33) is $/eXene.cm.
628    
629    I also added an new example in src/eXene/examples/nbody.  See the
630    README file there for details.
631    
632    ----------------------------------------------------------------------
633    Name: Matthias Blume
634    Date: 2001/06/20 16:40:00 EDT
635    Tag: blume-20010620-cml
636    Description:
637    
638    CML now compiles and works again.
639    
640    Libraries (for version > 110.33):
641    
642      $cml/cml.cm            Main CML library.
643      $cml/basis.cm          CML's version of $/basis.cm.
644      $cml/cml-internal.cm   Internal helper library.
645      $cml/core-cml.cm       Internal helper library.
646      $cml-lib/trace-cml.cm  Tracing facility.
647      $cml-lib/smlnj-lib.cm  CML's version of $/smlnj-lib.cm
648    
649    The installer (config/install.sh) has been taught how to properly
650    install this stuff.
651    
652    ----------------------------------------------------------------------
653    Name: Matthias Blume
654    Date: 2001/06/19 17:55:00 EDT
655    Tag: blume-20010619-instantiate
656    Description:
657    
658    This un-breaks the fix for bug 1432.
659    (The bug was originally fixed in 110.9 but I broke it again some
660    time after that.)
661    
662    ----------------------------------------------------------------------
663    Name: Matthias Blume
664    Date: 2001/06/19 17:25:00 EDT
665    Tag: blume-20010619-signals
666    Description:
667    
668    This should (hopefully) fix the long-standing signal handling bug.
669    (The runtime system was constructing a continuation record with an
670    incorrect descriptor which would cause the GC to drop data on the floor...)
671    
672    ----------------------------------------------------------------------
673    Name: Matthias Blume
674    Date: 2001/06/15 15:05:00 EDT
675    Tag: blume-20010615-moresparc
676    Description:
677    
678    Here is a short late-hour update related to Sparc c-calls:
679    
680     -- made handling of double-word arguments a bit smarter
681    
682     -- instruction selection phase tries to collapse certain clumsily
683        constructed ML-Trees; typical example:
684    
685            ADD(ty,ADD(_,e,LI d1),LI d2)  ->  ADD(ty,e,LI(d1+d2))
686    
687        This currently has no further impact on SML/NJ since mlriscGen does
688        not seem to generate such patterns in the first place, and c-calls
689        (which did generate them in the beginning) has meanwhile been fixed
690        so as to avoid them as well.
691    
692    ----------------------------------------------------------------------
693    Name: Matthias Blume
694    Date: 2001/06/15 15:05:00 EDT
695    Tag: blume-20010615-sparc
696    Description:
697    
698    The purpose of this update is to provide an implementation of NLFFI
699    on Sparc machines.
700    
701    Here are the changes in detail:
702    
703       * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing
704       the Sparc implementation of the c-calls API.
705       * The Sparc backend of SML/NJ has been modified to uniformely use %fp
706       for accessing the ML frame.  Thus, we have a real frame pointer and
707       can freely modify %sp without need for an omit-frame-ptr phase.
708       The vfp logic in src/compiler/CodeGen/* has been changed to accomodate
709       this case.
710       * ml-nlffigen has been taught to produce code for different architectures
711       and calling conventions.
712       * In a way similar to what was done in the x86 case, the Sparc
713       backend uses its own specific extension to mltree.  (For example,
714       it needs to be able to generate UNIMP instructions which are part
715       of the calling convention.)
716       * ml-nlffi-lib was reorganized to make it more modular (in particular,
717       to make it easier to plug in new machine- and os-dependent parts).
718    
719    There are some other fairly unrelated bug fixes and cleanups as well:
720    
721       * I further hacked the .cm files for MLRISC tools (like MDLGen) so
722       that they properly share their libraries with existing SML/NJ libraries.
723       * I fixed a minor cosmetic bug in CM, supressing certain spurious
724       follow-up error messages.
725       * Updates to CM/CMB documentation.
726    
727    TODO items:
728    
729       * MLRISC should use a different register as its asmTemp on the Sparc.
730         (The current %o2 is a really bad choice because it is part of the
731         calling conventions, so things might interfere in unexpected ways.)
732    
733    ----------------------------------------------------------------------
734    Name: Matthias Blume
735    Date: 2001/06/07
736    Tag: blume-20010607-calls
737    Description:
738    
739    A number of internal changes related to C calls and calling conventions:
740    
741    1. ML-Tree CALL statements now carry a "pops" field.  It indicates the
742       number of bytes popped implicitly (by the callee).  In most cases
743       this field is 0 but on x86/win32 it is some non-zero value.  This
744       is information provided for the benefit of the "omit-frameptr" pass.
745    2. The CALL instruction on the x86 carries a similar "pops" field.
746       The instruction selection phase copies its value from the ML-Tree
747       CALL statement.
748    3. On all other architectures, the instruction selection phase checks
749       whether "pops=0" and complains if not.
750    4. The c-calls implementation for x86 now accepts two calling conventions:
751       "ccall" and "stdcall".  When "ccall" is selected, the caller cleans
752       up after the call and pops is set to 0.  For "stdcall", the caller
753       does nothing, leaving the cleanup to the callee; pops is set to
754       the number of bytes that were pushed onto the stack.
755    5. The cproto decoder (compiler/Semant/types/cproto.sml) now can
756       distinguish between "ccall" and "stdcall".
757    6. The UNIMP instruction has been added to the supported Sparc instruction
758       set. (This is needed for implementing the official C calling convention
759       on this architecture.)
760    7. I fixed some of the .cm files under src/MLRISC/Tools to make them
761       work with the latest CM.
762    
763    ----------------------------------------------------------------------
764    Name: Matthias Blume
765    Date: 2001/06/05 15:10:00 EDT
766    Tag: blume-20010605-cm-index
767    Description:
768    
769    0. The "lambdasplit" parameter for class "sml" in CM has been documented.
770    
771    1. CM can now generate "index files".  These are human-readable files
772       that list on a per-.cm-file basis each toplevel symbol defined or
773       imported.  The location of the index file for
774       <p>/<d>.cm is <p>/CM/INDEX/<d>.cm.
775       To enable index-file generation, set CM.Control.generate_index to true
776       or export an environment-symbol: export CM_GENERATE_INDEX=true.
777    
778       The CM manual has been updated accordingly.
779    
780    2. I made some slight modifications to the c-calls API in MLRISC.
781    
782         a) There is now a callback to support saving/restoring of
783            dedicated but caller-save registers around the actual call
784            instruction.
785         b) One can optionally specify a comment-annotation for the
786            call instruction.
787    
788    3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop.
789       (For example, the comment annotation shows the C prototype of
790        the function being called.)
791    
792    ----------------------------------------------------------------------
793    Name: Matthias Blume
794    Date: 2001/06/01 13:30:00 EDT
795    Tag: blume-20010601-nlffi-cleanup
796    Description:
797    
798    This is mostly a cleanup of MLFFI stuff:
799    
800       - some signature files have been put into a more exposed place
801       - the ugly 'f type parameter is gone (simplifies types tremendously!)
802       - ml-nlffigen changed accordingly
803       - tutorial updated
804    
805    Other changes:
806    
807       - author's affiliation in CM manual(s) updated
808       - some more recognized keywords added to Allen's sml.sty
809    
810    ----------------------------------------------------------------------
811    Name: Matthias Blume
812    Date: 2001/05/25 15:30:00 EDT
813    Tag: blume-20010525-iptr
814    Description:
815    
816      - put the official 110.33-README (as it appears on the ftp server) under
817        CVS
818      - fixed a small bug related to incomplete pointer types in
819        ml-nlffigen
820      - small cosmetic change to the ml-nlffi-lib's "arr" type constructor
821        (it does not need the 'f type parameter)
822    
823    ----------------------------------------------------------------------
824    Name: Matthias Blume
825    Date: 2001/05/23 14:30:00 EDT
826    Tag: Release_110_33
827    Description:
828    
829    New version number (110.33).  New bootfiles.
830    
831    ----------------------------------------------------------------------
832    Name: Matthias Blume
833    Date: 2001/05/22 18:06:00 EDT
834    Tag: blume-20010522-targets
835    Description:
836    
837    Made install.sh use file config/targets.customized if it exists, falling
838    back to config/targets if it doesn't.  This way one can have a customized
839    version of the targets file without touching the "real thing", thus
840    eliminating the constant fear of accidentally checking something bogus
841    back into the CVS repository...  (File config/targets.customized must
842    not be added to the repository!)
843    
844    ----------------------------------------------------------------------
845    Name: Matthias Blume
846    Date: 2001/05/22 16:30:00 EDT
847    Tag: blume-20010522-minitut
848    Description:
849    
850    1. Bug fix in ml-nlffigen; now (hopefully) correctly handling
851       struct returns.
852    2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt.  This is some very
853       incomplete, preliminary documentation for NLFFI.
854    
855    ----------------------------------------------------------------------
856    Name: Matthias Blume
857    Date: 2001/05/14 11:30:00 EDT
858    Tag: blume-20010514-script
859    Description:
860    
861    Some bugs in install script fixed.
862    
863    In addition to that I also made a slight change to the NLFFI API:
864    Functors generated by ml-nlffigen now take the dynamic library as a
865    straight functor argument, not as a suspended one.  (The original
866    functor code used to force the suspension right away anyway, so there
867    was nothing gained by this complication of the interface.)
868    
869    ----------------------------------------------------------------------
870    Name: Matthias Blume
871    Date: 2001/05/11 14:35:00 EDT
872    Tag: blume-20010511-ml-nlffi
873    Description:
874    
875    I finally took the plunge and added my new FFI code to the main
876    repository.  For x86-linux it is now ready for prime-time.
877    
878    There are two new subdirectories of "src":
879    
880      - ml-nlffi-lib:
881           The utility library for programs using the FFI interface.
882           Here is the implementation of $/c.cm and its associated low-level
883           partners $/c-int.cm and $/memory.cm.
884      - ml-nlffigen:
885           A stand-alone program for generating ML glue code from C source
886           code.
887    
888    Building ml-nlffigen requires $/ckit-lib.cm.
889    
890    The config/install.sh script has been updates to do the Right Thing
891    (hopefully).
892    
893    Notice that the source tree for the C-Kit will not be put under "src"
894    but directly under the installation root directory.  (This is the
895    structure that currently exists on the CVS server when you check out
896    module "sml".)  Fortunately, config/install.sh knows about this oddity.
897    
898    Bugs: No documentation yet.
899    
900    ----------------------------------------------------------------------
901    Name: Matthias Blume
902    Date: 2001/05/09 16:35:00 EDT
903    Tag: blume-20010509-cpscontract
904    Description:
905    
906    Fixed a bug in the accounting code in cpsopt/contract.sml.  (The
907    wrapper/unwrapper elimination did not decrement usage counts and some
908    dead variables got overlooked by the dead-up logic.)
909    
910    ----------------------------------------------------------------------
911    Name: Lal George
912    Date: 2001/05/08  17:26:09 EDT
913    Tag: george-20010508-omit-frameptr
914    Description:
915    
916    Changes to implement the omit-frame-pointer optimization to support
917    raw C calls. For now, there is only support on the Intel x86, but
918    other architectures will follow as more experience is gained with this.
919    
920    
921    ----------------------------------------------------------------------
922    Name: Matthias Blume
923    Date: 2001/05/07 14:40:00 EDT
924    Tag: blume-20010507-proxies
925    Description:
926    
927    I made into "proxy libraries" all libraries that qualify for such a
928    change.  (A qualifying library is a library that has another library or
929    groups as its sole member and repeats that member's export list
930    verbatim.  A proxy library avoids this repetition by omitting its export
931    list, effectively inheriting the list that its (only) member exports.
932    See the CM manual for more explanation.)
933    The main effect is that explicit export lists for these libraries
934    do not have to be kepts in sync, making maintenance a bit easier.
935    
936    I also added copyright notices to many .cm-files.
937    
938    Last but not least, I made a new set of bootfiles.
939    
940    ----------------------------------------------------------------------
941    Name: Matthias Blume
942    Date: 2001/05/04 17:00:00 EDT
943    Tag: blume-20010504-cm-lsplit
944    Description:
945    
946    0. John merged pending changes to $/smlnj-lib.cm
947    
948    1. Allen's previous change accidentally backed out of one of Lal's
949       earlier changes.  I undid this mistake (re-introducing Lal's change).
950    
951    2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm)
952       within the compiler where applicable.  There is some code simplification
953       because of that.
954    
955    3. The "split" phase (in FLINT) is now part of the default list of phases.
956       Compiler.Control.LambdaSplitting.* can be used to globally control the
957       lambda-splitting (cross-module-inlining) engine.  In addition to that,
958       it can now also be controlled on a per-source basis: CM has been taught
959       a new tool parameter applicable to ML source files.
960    
961       - To turn lambda-splitting off completely:
962            local open Compiler.Control.LambdaSplitting in
963                val _ = set Off
964            end
965       - To make "no lambda-splitting" the global default (but allow per-source
966         overriding); this is the initial setting:
967            local open Compiler.Control.LambdaSplitting in
968                val _ = set (Default NONE)
969            end
970       - To make "lambda-splitting with aggressiveness a" the global default
971         (and allow per-source overriding):
972            local open Compiler.Control.LambdaSplitting in
973                val _ = set (Default (SOME a))
974            end
975    
976       - To turn lambda-splitting off for a given ML souce file (say: a.sml)
977         write (in the respective .cm-file):
978            a.sml (lambdasplitting:off)
979       - To turn lambda-splitting for a.sml on with minimal aggressiveness:
980            a.sml (lambdasplitting:on)
981       - To turn lambda-splitting for a.sml on with aggressiveness <a> (where
982         <a> is a decimal non-negative integer):
983            a.sml (lambdasplitting:<a>)
984       - To turn lambda-splitting for a.sml on with maximal aggressiveness:
985            a.sml (lambdasplitting:infinity)
986       - To use the global default for a.sml:
987            a.sml (lambdasplitting:default)
988         or simply
989            a.sml
990    
991    ----------------------------------------------------------------------
992    Name: Allen Leung
993    Date: 2001/05/04 01:57:00 EDT
994    Tag: leunga-20010504-sync
995    Description:
996    
997      MLRISC features.
998    
999      1. Fix to CMPXCHG instructions.
1000      2. Changed RA interface to allow annotations in callbacks.
1001      3. Added a new method to the stream interface to allow annotations updates.
1002    
1003    ----------------------------------------------------------------------
1004    Name: Matthias Blume
1005    Date: 2001/05/01 11:45:00 EDT
1006    Tag: blume-20010501-pcedittmp
1007    Description:
1008    
1009    Changed install.sh to use the current working directory instead of
1010    /usr/tmp for a temporary file (pcedittmp).  The previous choice
1011    of /usr/tmp caused trouble with MacOS X because of file premission
1012    problems.
1013    
1014    ----------------------------------------------------------------------
1015    Name: Matthias Blume
1016    Date: 2001/04/20 11:10:00 EDT
1017    Tag: blume-20010420-inMLflag
1018    Description:
1019    
1020     - added vp_limitPtrMask to vproc-state.h
1021       (for use by the raw-C-calls mechanism to implement proper interrupt
1022        handling)
1023     - made the ML compiler aware of various data-structure offsets so it
1024       can generate code for accessing the vp_inML flag and vp_limitPtrMask
1025     - tweaked mlriscGen.sml to have it emit interrupt-handling code for
1026       raw C-calls
1027    
1028    ----------------------------------------------------------------------
1029    Name: Lal George
1030    Date: 2001/04/20 09:15:28 EDT
1031    Tag: george-20010420-macosX
1032    Description:
1033    
1034     - Changes to port to Mac OS X; Darwin.
1035    
1036     - In the process I found that sqrt was broken on the PPC, because the
1037       fsqrt instruction is not implemented.
1038    
1039    ----------------------------------------------------------------------
1040    Name: Matthias Blume
1041    Date: 2001/04/18 12:45:00 EDT
1042    Tag: blume-20010418-ccalls
1043    Description:
1044    
1045     - fixed two off-by-4 errors in the x86-specific c-calls implementation
1046       (this bug prevented structure arguments containing pointers from being
1047        passed correctly)
1048     - changed the raw-C-call code in mlriscGen.sml in such a way that
1049       structure arguments are represented as a pointer to the beginning
1050       of the structure (instead of having a series of synthesized arguments,
1051       one for each structure member)
1052    
1053     - made makeml script's verbosity level configurable via environment
1054       variable (MAKEML_VERBOSITY)
1055    
1056     - eliminated placeholder implementations for f32l, w16s, i16s, and f32s
1057       in rawmem-x86.sml; we are now using the real thing
1058    
1059    ----------------------------------------------------------------------
1060    Name: Matthias Blume
1061    Date: 2001/03/22 16:25:00 EST
1062    Tag: blume-20010322-bootfiles
1063    Description:
1064    
1065    Created a new set of bootfiles (for your automatic installation convenience).
1066    
1067    ----------------------------------------------------------------------
1068    Name: Matthias Blume
1069    Date: 2001/03/22 15:10:00 EST
1070    Tag: blume-20010322-rawmem-parcm
1071    Description:
1072    
1073    1. All "raw memory access" primitives for the new FFI are implemented now
1074       (at least on the x86).
1075    2. Some further cleanup of CM's parallel make mechanism.
1076    
1077    ----------------------------------------------------------------------
1078    Name: Matthias Blume
1079    Date: 2001/03/19 17:53:00 EST
1080    Tag: blume-20010319-parallel
1081    Description:
1082    
1083    Parallel make (using compile servers) now works again.
1084    
1085    To this end, CM.stabilize and CMB.make have been modified to work in
1086    two passes when compile servers are attached:
1087       1. Compile everything, do not perform stabilization; this pass
1088          uses compile servers
1089       2. Stabilize everything; this pass does not use compile servers
1090    If there are no compile servers, the two passes are combined into one
1091    (as before).  Splitting the passes increases the inherent parallelism
1092    in the dependency graph because the entire graph including all
1093    libraries is available at the same time.  This, in turn, improves
1094    server utilization.  The downside is that the master process will
1095    have to do some extra work after compilation is done (because for
1096    technical reasons it must re-read all the binfiles during stabilization).
1097    
1098    ----------------------------------------------------------------------
1099    Name: Matthias Blume
1100    Date: 2001/03/16 12:22:00 EST
1101    Tag: blume-20010316-bootfiles
1102    Description:
1103    
1104    Created a new set of bootfiles (for your automatic installation convenience).
1105    
1106    ----------------------------------------------------------------------
1107    Name: Matthias Blume
1108    Date: 2001/03/16 11:00:00 EST
1109    Tag: blume-20010316-MLTREE-fixup
1110    Description:
1111    
1112    This is a minor fixup for an (untagged) earlier commit by Allen.
1113    (A file was missing).
1114    
1115    ----------------------------------------------------------------------
1116    Name: Allen Leung
1117    Date: Mon Mar  5 18:54:57 EST 2001
1118    Tag: leunga-20010305-cut-support
1119    
1120    1. New support for alternative control-flow in MLTREE.
1121       Currently we support
1122    
1123          FLOW_TO(CALL ...., [k1,...,kn])
1124    
1125       This is needed for 'cuts to' in C-- and try/handle-like constructs
1126       in Moby
1127    
1128       New assembler flag "asm-show-cutsto" to turn on control-flow debugging.
1129    
1130    2. Register Allocator
1131    
1132       Changes in interface [from Fermin, John]
1133    
1134    3. Alpha 8-bit SLL support [Fermin]
1135    
1136    4. All architectures
1137    
1138       A new module (ClusterExpandCopies) for expanding parallel copies.
1139    
1140    ----------------------------------------------------------------------
1141    Name: Allen Leung
1142    Date: 2001/02/27 23:07:00 EST
1143    Tag: leunga-20010227-minor-stuff
1144    
1145    1. Alpha bug fix for CMOVNE
1146    2. Handle mltree COND(..,FCMP ...,...)
1147    3. Bug fix in simplifier
1148    
1149    ----------------------------------------------------------------------
1150    Name: Matthias Blume
1151    Date: 2001/01/30 17:50:00 EST
1152    Tag: blume-20010130-sync
1153    Description:
1154    
1155    This is just a minor update to sync my devel branch with the main brach.
1156    The only visible change is the addition of some README files.
1157    
1158    ----------------------------------------------------------------------
1159    Name: Matthias Blume
1160    Date: 2001/01/12 23:30:00 JST
1161    Tag: blume-20010112-bootfiles
1162    Description:
1163    
1164    Made a new set of bootfiles that goes with the current state of the
1165    repository.
1166    
1167    ----------------------------------------------------------------------
1168    Name: Matthias Blume
1169    Date: 2001/01/12 21:20:00 JST
1170    Tag: blume-20010112-sync
1171    Description:
1172    
1173    I am just flushing out some minor changes that had accumulated in
1174    my private branch in order to sync with the main tree.  (This is
1175    mainly because I had CVS trouble when trying to merge _into_ my
1176    private branch.)
1177    
1178    Most people should be completely unaffected by this.
1179    
1180    ----------------------------------------------------------------------
1181    Name: Allen Leung
1182    Date: Thu Jan 11 21:03:00 EST 2001
1183    Tag: leunga-20010111-labexp=mltree
1184    Description:
1185    
1186    1.  Removed the type LabelExp and replace it by MLTree.
1187    2.  Rewritten mltree-simplify with the pattern matcher tool.
1188    3.  There were some bugs in alpha code generator which would break
1189        64-bit code generation.
1190    4.  Redo the tools to generate code with the
1191    5.  The CM files in MLRISC (and in src/system/smlnj/MLRISC)
1192        are now generated by perl scripts.
1193    
1194    ----------------------------------------------------------------------
1195    Name: Matthias Blume
1196    Date: 2001/01/10 21:55:00 JST
1197    Tag: blume-20010110-rcc
1198    Description:
1199    
1200    The RCC stuff now seems to work (but only on the x86).
1201    This required hacking of the c-calls interface (and -implementation) in
1202    MLRISC.
1203    
1204    Normal compiler users should be unaffected.
1205    
1206    ----------------------------------------------------------------------
1207    Name: Matthias Blume
1208    Date: 2001/01/09 01:20:00 JST
1209    Tag: blume-20010109-rcc
1210    Description:
1211    
1212    This is a fairly big patch, flushing out a large number of pending
1213    changes that I made to my development copy over the last couple of days.
1214    
1215    Of practical relevance at this moment is a workaround for a pickling
1216    bug that Allen ran into the other day.  The cause of the bug itself is
1217    still unknown and it might be hard to fix it properly, but the
1218    workaround has some merits of its own (namely somewhat reducing pickling
1219    overhead for certain libraries).  Therefore, I think this solution should
1220    be satisfactory at this time.
1221    
1222    The rest of the changes (i.e., the vast majority) has to do with my
1223    ongoing efforts of providing direct support for C function calls from
1224    ML.  At the moment there is a new primop "RAW_CCALL", typing magic
1225    in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new
1226    case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to
1227    translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to
1228    handle RCC.
1229    
1230    The last part (the changes to mlriscGen.sml) are still known to be
1231    wrong on the x86 and not implemented on all other architectures.  But
1232    the infrastructure is in place. I had to change a few functor
1233    signatures in the backend to be able to route the CCalls interface
1234    from MLRISC there, and I had to specialize the mltree type (on the
1235    x86) to include the necessary extensions. (The extensions themselves
1236    were already there and redy to go in MLRISC/x86).
1237    
1238    Everything should be very happy as soon as someone helps me with
1239    mlriscGen.sml...
1240    
1241    In any case, nothing of this should matter to anyone as long as the
1242    new primop is not being used (which is going to be the case unless you
1243    find it where I hid it :). The rest of the compiler is completely
1244    unaffected.
1245    
1246    ----------------------------------------------------------------------
1247    Name: Matthias Blume
1248    Date: 2001/01/05 00:30:00 JST
1249    Tag: blume-20010105-primops
1250    Description:
1251    
1252    Added some experimental support for work that I am doing right now.
1253    These changes mostly concern added primops, but there is also a new
1254    experimental C library in the runtime system (but currently not enabled
1255    anywhere except on Linux/X86).
1256    
1257    In the course of adding primops (and playing with them), I discovered that
1258    Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly
1259    broken.  (Zhong was very right he labeled this stuff as "major gross hack".)
1260    To recover, I made type information in INL_PRIM mandatory and changed
1261    prim.sml as well as built-in.sml accordingly.  The InLine structure now
1262    has complete, correct type information (i.e., no bottom types).
1263    
1264    Since all these changes mean that we need new binfiles, I also bumped the
1265    version number to 110.32.1.
1266    
1267    ----------------------------------------------------------------------
1268    Name: Matthias Blume
1269    Date: 2000/12/30 22:10:00 JST
1270    Tag: blume-20001230-various
1271    Description:
1272    
1273    Added proxy libraries for MLRISC and let MLRISC libraries refer
1274    to each other using path anchors.  (See CM manual for explanation.)
1275    
1276    Updated CM documentation.
1277    
1278    Fixed some bugs in CM.
1279    
1280    Implemented "proxy" libraries (= syntactic sugar for CM).
1281    
1282    Added "-quiet" option to makeml and changed runtime system accordingly.
1283    
1284    Added cleanup handler for exportML to reset timers and compiler stats.
1285    
1286    ----------------------------------------------------------------------
1287    Name: Lal George
1288    Date: 2000/12/22 22:22:58 EST 2000
1289    Tag: Release_110_32
1290    Description:
1291    
1292            Infinite precision used throughout MLRISC.
1293            see MLRISC/mltree/machine-int.sig
1294    
1295    ----------------------------------------------------------------------
1296    Name: Matthias Blume
1297    Date: 2000/12/22 23:16:00 JST
1298    Tag: blume-20001222-warn
1299    Description:
1300    
1301    Corrected wording and formatting of some CM warning message which I
1302    broke in my previous patch.
1303    
1304    ----------------------------------------------------------------------
1305    Name: Matthias Blume
1306    Date: 2000/12/22 21:20:00 JST
1307    Tag: blume-20001222-anchorenv
1308    Description:
1309    
1310    Fixed CM's handling of anchor environments in connection with CMB.make.
1311    
1312    ----------------------------------------------------------------------
1313    Name: Matthias Blume
1314    Date: 2000/12/22 13:15:00 JST
1315    Tag: blume-20001222-cleanup
1316    Description:
1317    
1318    Removed src/cm/ffi which does not (and did not) belong here.
1319    
1320    ----------------------------------------------------------------------
1321    Name: Matthias Blume
1322    Date: 2000/12/21 23:55:00 JST
1323    Tag: blume-20001221-exn
1324    Description:
1325    
1326    Probably most important: CM no longer silently swallows all exceptions
1327    in the compiler.
1328    Plus: some other minor CM changes.  For example, CM now reports some
1329    sizes for generated binfiles (code, data, envpickle, lambdapickle).
1330    
1331    ----------------------------------------------------------------------
1332    Name: Matthias Blume
1333    Date: 2000/12/15 00:01:05 JST
1334    Tag: blume-20001215-dirtool
1335    Description:
1336    
1337    - "dir" tool added.
1338    - improvements and cleanup to Tools structure
1339    - documentation updates
1340    
1341    ----------------------------------------------------------------------
1342    Name: Allen Leung
1343    Date: Thu Dec 14 03:45:24 EST 2000
1344    Description:
1345    Tag:  leunga-20001214-int-inf
1346    Description:
1347    
1348       In IntInf, added these standard functions, which are missing from our
1349    implementation:
1350    
1351        andb : int * int -> int
1352        xorb : int * int -> int
1353        orb  : int * int -> int
1354        notb : int -> int
1355         <<   : int * word -> int
1356        ~>>  : int * word -> int
1357    
1358       Not tested, I hope they are correct.
1359    
1360    ----------------------------------------------------------------------
1361    Name: Allen Leung
1362    Date: Fri Dec  8 19:23:26 EST 2000
1363    Description:
1364    Tag:  leunga-20001208-nowhere
1365    Description:
1366    
1367      Slight improvements to the 'nowhere' tool to handle OR-patterns,
1368    to generate better error messages etc.  Plus a brief manual.
1369    
1370    ----------------------------------------------------------------------
1371    Name: Lal George
1372    Date: 2000/12/08 09:54:02 EST 2000
1373    Tag: Release_110_31
1374    Description:
1375    
1376    - Version 110.31
1377    ----------------------------------------------------------------------
1378    Name: Allen Leung
1379    Date: Thu Dec  7 22:01:04 EST 2000
1380    Tag:  leunga-20001207-cell-monster-hack
1381    Description:
1382    
1383    Major MLRISC internal changes.  Affect all clients.
1384    Summary:
1385    
1386    1.  Type CELLS.cell = int is now replaced by a datatype.
1387        As a result, the old regmap is now gone.  Almost all interfaces
1388        in MLRISC change as a consequence.
1389    
1390    2.  A new brand version of machine description tool (v3.0) that generates
1391        modules expecting the new interface.  The old version is removed.
1392    
1393    3.  The RA interface has been further abstracted into two new functors.
1394        RISC_RA and X86RA.  These functors have much simpler interfaces.
1395        [See also directory MLRISC/demo.]
1396    
1397    4.  Some other new source->source code generation tools are available:
1398    
1399        a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
1400        b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
1401           I use this tool to generate the peephole optimizers---with the new
1402           cell type changes, peephole rules are becoming difficult to write
1403           without conditional pattern matching.
1404    
1405    5.  More Intmap -> IntHashTable change.  Previous changes by Matthias didn't
1406        cover the entire MLRISC source tree so many things broke.
1407    
1408    6.  CM files have been moved to the subdirectory MLRISC/cm.
1409        They are moved because there are a lot of them and they clutter up the
1410        root dir.
1411    
1412    7.  More detailed documentation to come...
1413    
1414        NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
1415        a makeml -rebuild first.  This is because of other other
1416        changes that Matthias has made (see below).
1417    
1418    
1419    ----------------------------------------------------------------------
1420    Name: Matthias Blume
1421    Date: 2000/11/30 23:12:00 JST
1422    Tag: blume-20001130-filereorg
1423    Description:
1424    
1425    Some manual updates and some file reorganizations in CM.
1426    
1427    ----------------------------------------------------------------------
1428    Name: Matthias Blume
1429    Date: 2000/11/24 17:45:00 JST
1430    Tag: blume-20001124-link
1431    Description:
1432    
1433    Drastically improved link traversal code for the case that the dynamic
1434    value was already loaded at bootstrap time.  As a result, CM and CMB
1435    now both load blazingly fast -- even on a very slow machine.  Also,
1436    memory consumption has been further reduced by this.
1437    
1438    Warning: The format of the PIDMAP file has changed.  THerefore, to
1439    bootstrap you have to do this:
1440    
1441    1. Run CMB.make
1442    2. Make a symbolic link for the boot directory:
1443         ln -s sml.boot.ARCH-OS xxx
1444    3. "Rebuild" the boot directory:
1445         ./makeml -boot xxx -rebuild sml ; rm xxx
1446    4. Boot normally:
1447          ./makeml
1448    
1449    ----------------------------------------------------------------------
1450    Name: Matthias Blume
1451    Date: 2000/11/21 21:20:00 JST
1452    Tag: blume-20001121-tools
1453    Description:
1454    
1455    Continued hacking on autoloading problem -- with success this time.
1456    Also changed tool-plugin mechanism.  See new CM manual.
1457    
1458    ----------------------------------------------------------------------
1459    Name: Matthias Blume
1460    Date: 2000/11/19 14:30:00 JST
1461    Tag:  blume-20001119-autoload
1462    Description:
1463    
1464    Some hacking to make autoloading faster.  Success for CMB, no success
1465    so far for CM.  There is a reduced structure CM' that autoloads faster.
1466    (This is a temporary, non-documented hack to be eliminated again when
1467    the general problem is solved.)
1468    
1469    ----------------------------------------------------------------------
1470    Name: Matthias Blume
1471    Date: 2000/11/17 14:10:00 JST
1472    Tag: blume-20001117-pickle-lib
1473    Description:
1474    
1475    1. Eliminated comp-lib.cm
1476    2. Made pickle-lib.cm
1477    3. Eliminated all uses of intset.sml (from comp-lib.cm)
1478    4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
1479       equivalent constructs from smlnj-lib.cm (INtHashTable).
1480    5. Point 4. also goes for those uses of intmap.* in MLRISC.
1481       Duplicated intmap modules thrown out.
1482    6. Hunted down all duplicated SCC code and replaced it with
1483       equivalent stuff (GraphSCCFn from smlnj-lib.cm).
1484    7. Rewrote Feedback module.
1485    8. Moved sortedlist.sml into viscomp-lib.cm.  Eventually it
1486       should be thrown out and equivalent modules from smlnj-lib.cm
1487       should be used (IntRedBlackSet, IntListSet, ...).
1488    
1489    Confirmed that compiler compiles to fixpoint.
1490    
1491    ----------------------------------------------------------------------
1492    Name: Allen Leung
1493    Date: 2000/11/10 18:00:00
1494    Tag: leunga-20001110-new-x86-fp
1495    
1496    A new x86 floating point code generator has been added.
1497    By default this is turned off.  To turn this on, do:
1498    
1499        CM.autoload "$smlnj/compiler.cm";
1500        Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
1501    
1502    Changes:
1503    
1504    1.  Changed FTAN to FPTAN so that the assembly output is correct.
1505    2.  Changed the extension callback for FTANGENT to generate:
1506    
1507              fptan
1508              fstp  %st(0)
1509        instead of
1510              fptan
1511              fstpl ftempmem
1512    
1513    3.  Numerous assembly fixes for x86.
1514    
1515    5.  Cleaned up the machine code output module x86/x86MC.sml and added
1516        support for a whole bunch of instructions and addressing modes:
1517    
1518          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st, %st(n)
1519          faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp  %st, %st(n)
1520          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st(n), %st
1521          fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
1522          fxch %st(n)
1523          fld %st(n)
1524          fst %st(n)
1525          fst mem
1526          fstp %st(n)
1527          fucom %st(n)
1528          fucomp %st(n)
1529    
1530        All these are now generated when the fast fp mode is turned on.
1531    
1532    6.  Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
1533    
1534    ----------------------------------------------------------------------
1535    Name: Matthias Blume
1536    Date: 2000/11/09 11:20:00 JST
1537    Tag: blume-20001109-scc
1538    Description:
1539    
1540    Eliminated some code duplication:
1541    
1542    1. Added "where" clause to GraphSCCFn in SML/NJ Library.
1543       (Otherwise the functor is useless.)
1544    2. Used GraphSCCFn where SCCUtilFun was used previously.
1545    3. Got rid of SCCUtilFun (in comp-lib.cm).
1546    
1547    ----------------------------------------------------------------------
1548    Name: Lal George
1549    Date: 2000/11/06 09:02:21 EST 2000
1550    Tag: Release_110_30
1551    Description:
1552    
1553    - Version 110.30
1554    ----------------------------------------------------------------------
1555    Name: Matthias Blume
1556    Date: 2000/11/04 14:45:00
1557    Tag: blume-20001104-mlbuild
1558    Description:
1559    
1560    - Made ml-build faster on startup.
1561    - Documentation fixes.
1562    
1563    ----------------------------------------------------------------------
1564    Name: Matthias Blume
1565    Date: 2000/11/02 17:00:00 JST
1566    Tag: blume-20001102-condcomp
1567    Description:
1568    
1569    - Small tweaks to pickler -- new BOOTFILES!
1570    - Version bumped to 110.29.2.
1571    - Added conditional compilation facility to init.cmi (see comment there).
1572    ----------------------------------------------------------------------
1573    Name: Allen Leung
1574    Date: 2000/10/23 19:31:00
1575    Tag: leunga-20001023-demo-ra
1576    
1577    1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
1578    2. Test programs for the graph library updated
1579    3. Some new MLRISC demo programs added
1580    
1581    ----------------------------------------------------------------------
1582    Name: Matthias Blume
1583    Date: 2000/08/31 22:15:00 JST
1584    Tag: blume-20001017-errmsg
1585    Description:
1586    
1587    More error message grief: Where there used to be no messages, there
1588    now were some that had bogus error regions.  Fixed.
1589    
1590    ----------------------------------------------------------------------
1591    Name: Matthias Blume
1592    Date: 2000/08/31 17:30:00 JST
1593    Tag: blume-20001017-v110p29p1
1594    Description:
1595    
1596    I made a version 110.29.1 with new bootfiles.
1597    
1598    Changes:  Modified pickler/unpickler for faster and leaner unpickling.
1599              CM documentation changes and a small bugfix in CM's error reporting.
1600    
1601    ----------------------------------------------------------------------
1602    Name: Lal George
1603    Date: 2000/09/27 14:42:35 EDT
1604    Tag: george-20000927-nodestatus
1605    Description:
1606    
1607    Changed the type of the nodestatus, so that:
1608    
1609            SPILLED(~1)             is now SPILLED
1610            SPILLED(m) where m>=0   is now MEMREG(m)
1611            SPILLED(s) where s<~1   is now SPILL_LOC(~s)
1612    
1613    ----------------------------------------------------------------------
1614    Name: Matthias Blume
1615    Date: 2000/09/07 14:45:00 JST
1616    Tag: blume-20000907-cmerrmsg
1617    Description:
1618    
1619    Small tweak to CM to avoid getting ML syntax error messages twice.
1620    
1621    ----------------------------------------------------------------------
1622    Name: Matthias Blume
1623    Date: 2000/08/31 18:00:00 JST
1624    Tag: blume-20000831-cvsbootfiles
1625    Description:
1626    
1627    New URL for boot files (because the 110.29 files on the BL server do
1628    now work correctly with my updated install scripts for yacc and lex).
1629    
1630    ----------------------------------------------------------------------
1631    Name: Matthias Blume
1632    Date: 2000/08/08 12:33:00 JST
1633    Tag: blume-20000808-manual
1634    Description:
1635    
1636    Tiny update to CM manual.
1637    
1638    ----------------------------------------------------------------------
1639    Name: Allen Leung
1640    Date: 2000/08/7 19:31:00
1641    Tag: leunga-20000807-a-whole-bunch-of-stuff
1642    
1643      Moby, C--, SSA, x86, machine descriptions etc.  Should only affect C--
1644    and Mobdy.
1645    
1646    1.  x86
1647    
1648       a.  Fixes to peephole module by John and Dan.
1649       b.  Assembly fix to SETcc by Allen.
1650       c.  Fix to c-call by John.
1651       d.  Fix to spilling by John.  (This one deals with the missing FSTPT case)
1652       e.  Instruction selection optimization to SETcc as suggested by John.
1653    
1654           For example,
1655    
1656            MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
1657    
1658           should generate:
1659    
1660            MOVL a, x
1661            SUBL b, x
1662            SHRL 31, x
1663    
1664    2.  IR stuff
1665    
1666         A bunch of new DJ-graph related algorithms added.  These
1667         speed up SSA construction.
1668    
1669    3.  SSA + Scheduling
1670    
1671         Added code for SSA and scheduling to the repository
1672    
1673    ----------------------------------------------------------------------
1674    Name: Lal George
1675    Date: 2000/07/27 11:53:14 EDT
1676    
1677    Tag: lal-20000727-linux-ppc
1678    Description:
1679    
1680     Made changes to support Linux PPC.
1681     p.s. I have confirmation that the 110.29 boot files work fine.
1682    
1683    ----------------------------------------------------------------------
1684    Name: Matthias Blume
1685    Date: 2000/07/27 17:40:00 JST
1686    Tag: blume-20000727-scripts
1687    Description:
1688    
1689    !!!! WARNING !!!!
1690    You must recompile the runtime system!
1691    !!!! WARNING !!!!
1692    
1693    This is basically another round of script-enhancements:
1694    
1695    1. sml, ml-build, and ml-makedepend accept options -D and -U to define
1696       and undefine CM preprocessor symbols.
1697    
1698    2. ml-build avoids generating a new heap image if it finds that the
1699       existing one is still ok.  (The condition is that no ML file had to
1700       be recompiled and all ML files are found to be older that the heap
1701       file.)
1702    
1703       To make this work smoothly, I also hacked the runtime system as
1704       well as SMLofNJ.SysInfo to get access to the heap image suffix
1705       (.sparc-solaris, ...) that is currently being used.
1706    
1707       Moreover, the signature of CM.mk_standalone has changed.  See the
1708       CM manual.
1709    
1710    3. ml-makedepend accepts additional options -n, -a, and -o.  (See the
1711       CM manual for details.)
1712    
1713    4. More CM manual updates:
1714        - all of the above has been documented.
1715        - there is now a section describing the (CM-related) command line
1716          arguments that are accepted by the "sml" command
1717    
1718    ----------------------------------------------------------------------
1719    Name: Matthias Blume
1720    Date: 2000/07/25 16:20:00 JST
1721    Tag: blume-20000725-makedepend
1722    Description:
1723    
1724    Added a script called ml-makedepend.  This can be used in makefiles
1725    for Unix' make in a way very similar to the "makedepend" command for
1726    C.
1727    
1728    The script internally uses function CM.sources.
1729    
1730    Synopsis:
1731    
1732        ml-makedepend [-f makefile] cmfile targetname
1733    
1734    The default for the makefile is "makefile" (or "Makefile" should
1735    "makefile" not exist).
1736    
1737    ml-makedepend adds a cmfile/targetname-specific section to this
1738    makefile (after removing the previous version of this section).  The
1739    section contains a single dependency specification with targetname on
1740    the LHS (targetname is an arbitrary name), and a list of files derived
1741    from the cmfile on the RHS.  Some of the files on the RHS are
1742    ARCH/OPSYS-specific.  Therefore, ml-makedepend inserts references to
1743    "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
1744    path names.  The makefile writer is responsible for making sure that
1745    these variables have correct at the time "make" is invoked.
1746    
1747    ----------------------------------------------------------------------
1748    Name: Matthias Blume
1749    Date: 2000/07/22 23:30:00 JST
1750    Tag: blume-20000722-urlupdate
1751    Description:
1752    
1753    Changed BOOT and config/srcarchiveurl to point to BL server:
1754    
1755        ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
1756    
1757    ----------------------------------------------------------------------
1758    Name: Matthias Blume
1759    Date: 2000/07/18 18:00:00 JST
1760    Tag: blume-20000718-Version_110_29
1761    Description:
1762    
1763    1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
1764    
1765    2. Updated config/version to 110.29
1766    
1767    3. Updated config/srcarchiveurl
1768    
1769    3. New boot files!
1770       ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
1771    
1772    ----------------------------------------------------------------------
1773    Name: Matthias Blume
1774    Date: 2000/07/11 13:58:00 JST
1775    Tag: blume-20000711-doctypo
1776    Description:
1777    
1778    Fixed a few typos in CM manual.
1779    
1780    ----------------------------------------------------------------------
1781    Name: Allen Leung
1782    Date: 2000/06/15 00:38:00
1783    Tag: leunga-20000704-sparc-x86
1784    
1785    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
1786    2. fix to x86 RET bug [found by Dan Grossman]
1787    3. sparc assembly bug fix for ticc instructions [found by Fermin]
1788    
1789       Affects c-- and moby only
1790    
1791    ----------------------------------------------------------------------
1792    Name: Matthias Blume
1793    Date: 2000/07/04 15:26:00
1794    Tag: blume-20000704-trigger
1795    Description:
1796    
1797    1. Improvements to CM manual.
1798    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
1799       of getting a back-trace.  The function, when called, raises an
1800       internal exception which explicitly carries the full back-trace history,
1801       so it is unaffected by any intervening handle-raise pairs ("trivial"
1802       or not).  The interactive loop will print that history once it arrives
1803       at top level.
1804       Short of having all exceptions implicitly carry the full history, the
1805       recommended way of using this facility is:
1806         - compile your program with instrumentation "on"
1807         - run it, when it raises an exception, look at the history
1808         - if the history is "cut off" because of some handler, go and modify
1809           your program so that it explicitly calls BTrace.trigger
1810         - recompile (still instrumented), and rerun; look at the full history
1811    
1812    ----------------------------------------------------------------------
1813    Name: Matthias Blume
1814    Date: 2000/07/03 15:36:00 JST
1815    Tag: blume-20000702-manual
1816    Description:
1817    
1818    Small corrections and updates to CM manual.
1819    
1820    ----------------------------------------------------------------------
1821    Name: Matthias Blume
1822    Date: 2000/06/29 16:04:00 JST
1823    Tag: blume-20000629-yacctool
1824    Description:
1825    
1826    Changes:
1827    
1828    1. Class "mlyacc" now takes separate arguments to pass options to
1829       generated .sml- and .sig-files independently.
1830    2. Corresponding CM manual updates.
1831    3. BTrace module now also reports call sites.  (However, for loop clusters
1832       it only shows from where the cluster was entered.)  There are associated
1833       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
1834    
1835    ----------------------------------------------------------------------
1836    Name: Matthias Blume
1837    Date: 2000/06/27 16:51:00 JST
1838    Tag: blume-20000627-noweb
1839    Description:
1840    
1841    Changes:
1842    
1843     1. Implemented "subdir" and "witness" options for noweb tool.
1844        This caused some slight internal changes in CM's tool implementation.
1845     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
1846        some remaining issues from earlier path anchor changes.
1847     3. Updated CM manual accordingly.
1848    
1849     4. Changed implementation of back-tracing so that I now consider it
1850        ready for prime-time.
1851    
1852        In particular, you don't have to explicitly trigger the back-trace
1853        anymore.  Instead, if you are running BTrace-instrumented code and
1854        there is an uncaught exception (regardless of whether or not it was
1855        raised in instrumented code), the top-level evalloop will print
1856        the back-trace.
1857    
1858        Features:
1859    
1860          - Instrumented and uninstrumented code work together seemlessly.
1861            (Of course, uninstrumented code is never mentioned in actual
1862             back-traces.)
1863    
1864          - Asymptotic time- and space-complexity of instrumented code is
1865            equal to that of uninstrumented code.  (This means that
1866            tail-recursion is preserved by the instrumentation phase.)
1867    
1868          - Modules whose code has been instrumented in different sessions
1869            work together without problem.
1870    
1871          - There is no penalty whatsoever on uninstrumented code.
1872    
1873          - There is no penalty on "raise" expressions, even in
1874            instrumented code.
1875    
1876        A potential bug (or perhaps it is a feature, too):
1877    
1878          A back-trace reaches no further than the outermost instrumented
1879          non-trivial "raise".  Here, a "trivial" raise is one that is the
1880          sole RHS of a "handle" rule.  Thus, back-traces reach trough
1881    
1882               <exp> handle e => raise e
1883    
1884          and even
1885    
1886               <exp> handle Foo => raise Bar
1887    
1888          and, of course, through
1889    
1890               <exp> handle Foo => ...
1891    
1892         if the exception was not Foo.
1893    
1894         Back-traces always reach right through any un-instrumented code
1895         including any of its "handle" expressions, trivial or not.
1896    
1897       To try this out, do the following:
1898    
1899         - Erase all existing binfiles for your program.
1900           (You may keep binfiles for those modules where you think you
1901            definitely don't need back-tracing.)
1902         - Turn on back-trace instrumentation:
1903              SMLofNJ.Internals.BTrace.mode (SOME true);
1904         - Recompile your program.  (I.e., run "CM.make" or "use".)
1905         - You may now turn instrumentation off again (if you want):
1906              SMLofNJ.Internals.BTrace.mode (SOME false);
1907         - Run your program as usual.  If it raises an exception that
1908           reaches the interactive toplevel, then a back-trace will
1909           automatically be printed.  After that, the toplevel loop
1910           will print the exception history as usual.
1911    
1912    ----------------------------------------------------------------------
1913    Name: Matthias Blume
1914    Date: 2000/06/26 09:56:46 JST
1915    Tag: blume-20000626-setup
1916    Description:
1917    
1918    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
1919          ML code before and after compiling a file (e.g., to set compiler
1920          flags)
1921    
1922    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
1923              - associated changes to btrace.sml (BTrace instrumentation pass)
1924              - cleaner implementation of btimp.sml (BTrace tracing and report
1925                module)
1926    
1927    CM manual: * new path encoding documented
1928               * description of setup-parameter to "sml" added
1929    
1930    The biggest user-visible change to back-tracing is that it is no
1931    longer necessary to compile all traced modules within the same
1932    session.  (This was a real limitation.)
1933    
1934    ----------------------------------------------------------------------
1935    Name: Matthias Blume
1936    Date: 2000/06/24 12:40:00 JST
1937    Tag: blume-20000624-startup
1938    Description:
1939    
1940    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
1941    bit too often -- to put it mildly. :)
1942    
1943    ----------------------------------------------------------------------
1944    Name: Matthias Blume
1945    Date: 2000/06/23 18:20:00 JST
1946    Tag: blume-20000623-btrace
1947    Description:
1948    
1949    This updates adds a backtrace facility to aid programmers in debugging
1950    their programs.  This involves the following changes:
1951    
1952    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
1953       keeping track of the current call stack.  When programs are compiled
1954       in a special mode, the compiler will insert calls to these hooks
1955       into the user program.
1956       "Hook" means that it is possible for different implementations of
1957       back-tracing to register themselves (at different times).
1958    
1959    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
1960       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
1961       It can be turned on using this call:
1962         SMLofNJ.Internals.BTrace.mode (SOME true);
1963       Turning it off again:
1964         SMLofNJ.Internals.BTrace.mode (SOME false);
1965       Querying the current status:
1966         SMLofNJ.Internals.BTrace.mode NONE;
1967       Annotated programs are about twice as big as normal ones, and they
1968       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
1969       where all hooks do nothing).  The slowdown with a plugin that is
1970       actually useful (such as the one supplied by default) is even greater,
1971       but in the case of the default plugin it is still only an constant
1972       factor (amortized).
1973    
1974    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
1975       with a sub-structure BTrace for controlling back-tracing.  In particular,
1976       the above-mentioned function "mode" controls whether the annotation
1977       phase is invoked by the compiler.  Another important function is
1978       "trigger": when called it aborts the current execution and causes
1979       the top-level loop to print a full back-trace.
1980    
1981    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
1982       for back-tracing.  It keeps track of the dynamic call stack and in
1983       addition to that it keeps a partial history at each "level" of that
1984       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
1985       d and b (at separate times, dynamically), then the report will show:
1986    
1987       GOTO   d
1988             /c
1989       GOTO  \b
1990       CALL   a
1991    
1992       This shows that there was an initial non-tail call of a, then a
1993       tail-call to b or c, looping behavior in a cluster of functions that
1994       consist of b and c, and then a goto from that cluster (i.e., either from
1995       b or from c) to d.
1996    
1997       Note that (depending on the user program) the amount of information
1998       that the back-trace module has to keep track of at each level is bounded
1999       by a constant.  Thus, the whole implementation has the same asymptotical
2000       complexity as the original program (both in space and in time).
2001    
2002    5. compiler/TopLevel/interact/evalloop.sml has been modified to
2003       handle the special exception SMLofNJ.Internals.BTrace.BTrace
2004       which is raised by the "trigger" function mentioned above.
2005    
2006    Notes on usage:
2007    
2008    - Annotated code works well together with unannotated code:
2009    Unannotated calls simply do not show up at all in the backtrace.
2010    
2011    - It is not a good idea to let modules that were annotated during
2012    different sessions run at the same time.  This is because the compiler
2013    chooses small integers to identify individual functions, and there
2014    will be clashes if different modules were compiled in separate sessions.
2015    (Nothing will crash, and you will even be told about the clashes, but
2016    back-trace information will in general not be useful.)
2017    
2018    - Back-tracing can be confused by callcc and capture.
2019    
2020    - The only way of getting a back-trace right now is to explicitly
2021    invoke the "trigger" function from your user program.  Eventually, we
2022    should make every exception carry back-trace information (if
2023    available).  But since this creates more overhead at "raise"-time
2024    (similar to the current exnHistory overhead), I have not yet
2025    implemented this.  (The implementation will be rather easy.)  With
2026    exceptions carrying back-trace information, this facility will be even
2027    more useful because users don't need to modify their programs...
2028    
2029    - While it is possible to compile the compiler with back-trace
2030    annotations turned on (I did it to get some confidence in
2031    correctness), you must make absolutely sure that core.sml and
2032    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
2033    be compiled with annotation because there is no core access yet, but
2034    if you compile btimp.sml with annotation, then the system will go into
2035    an infinite recursion and crash.)
2036    Since CM currently does not know about BTrace, the only way to turn
2037    annotations on and off for different modules of the compiler is to
2038    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
2039    this is awkward and clumsy.
2040    
2041    Sample sessions:
2042    
2043    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
2044    - SMLofNJ.Internals.BTrace.mode (SOME true);
2045    [autoloading]
2046    [autoloading done]
2047    val it = false : bool
2048    - structure X = struct
2049    -     fun main n = let
2050    -         fun a (x, 0) = d x
2051    -           | a (x, n) = b (x, n - 1)
2052    -         and b (x, n) = c (x, n)
2053    -         and c (x, n) = a (x, n)
2054    -         and d x = e (x, 3)
2055    -         and e (x, 0) = f x
2056    -           | e (x, n) = e (x, n - 1)
2057    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
2058    -           | f n = n * g (n - 1)
2059    -         and g n = a (n, 3)
2060    -     in
2061    -         f n
2062    -     end
2063    - end;
2064    structure X : sig val main : int -> int end
2065    - X.main 3;
2066    *** BACK-TRACE ***
2067    GOTO   stdIn:4.2-13.20: X.main[2].f
2068    GOTO-( stdIn:4.2-13.20: X.main[2].e
2069    GOTO   stdIn:4.2-13.20: X.main[2].d
2070         / stdIn:4.2-13.20: X.main[2].a
2071         | stdIn:4.2-13.20: X.main[2].b
2072    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2073    CALL   stdIn:4.2-13.20: X.main[2].g
2074    GOTO   stdIn:4.2-13.20: X.main[2].f
2075    GOTO-( stdIn:4.2-13.20: X.main[2].e
2076    GOTO   stdIn:4.2-13.20: X.main[2].d
2077         / stdIn:4.2-13.20: X.main[2].a
2078         | stdIn:4.2-13.20: X.main[2].b
2079    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2080    CALL   stdIn:4.2-13.20: X.main[2].g
2081    GOTO   stdIn:4.2-13.20: X.main[2].f
2082    GOTO-( stdIn:4.2-13.20: X.main[2].e
2083    GOTO   stdIn:4.2-13.20: X.main[2].d
2084         / stdIn:4.2-13.20: X.main[2].a
2085         | stdIn:4.2-13.20: X.main[2].b
2086    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2087    CALL   stdIn:4.2-13.20: X.main[2].g
2088    GOTO   stdIn:4.2-13.20: X.main[2].f
2089    CALL   stdIn:2.15-17.4: X.main[2]
2090    -
2091    
2092    (Note that because of a FLINt bug the above code currently does not
2093    compile without BTrace turned on.)
2094    
2095    Here is another example, using my modified Tiger compiler:
2096    
2097    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
2098    - SMLofNJ.Internals.BTrace.mode (SOME true);
2099    [autoloading]
2100    [autoloading done]
2101    val it = false : bool
2102    - CM.make "sources.cm";
2103    [autoloading]
2104    ...
2105    [autoloading done]
2106    [scanning sources.cm]
2107    [parsing (sources.cm):parse.sml]
2108    [creating directory CM/SKEL ...]
2109    [parsing (sources.cm):tiger.lex.sml]
2110    ...
2111    [wrote CM/sparc-unix/semant.sml]
2112    [compiling (sources.cm):main.sml]
2113    [wrote CM/sparc-unix/main.sml]
2114    [New bindings added.]
2115    val it = true : bool
2116    - Main.compile ("../testcases/merge.tig", "foo.out");
2117    *** BACK-TRACE ***
2118    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
2119    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2120    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
2121    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
2122    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2123    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2124    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
2125         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
2126    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
2127    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2128    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
2129    CALL   main.sml:1.18-118.4: Main.compile[2]
2130    -
2131    
2132    ----------------------------------------------------------------------
2133    Name: Matthias Blumen
2134    Date: 2000/06/21 18:00:00 JST
2135    Tag: blume-20000621-manual
2136    Description:
2137    
2138    CM manual update: Path environments documented.
2139    
2140    ----------------------------------------------------------------------
2141    Name: Matthias Blume
2142    Date: 2000/06/19 13:40:00
2143    Tag: blume-20000619-manual
2144    Description:
2145    
2146    CM manual and system/README update.  This only covers the fact that
2147    there are no more implicit anchors.  (Path environments and the "bind"
2148    option to "cm" have yet to be documented.)
2149    
2150    ----------------------------------------------------------------------
2151    Name: Matthias Blume
2152    Date: 2000/06/19 11:05:00 JST
2153    Tag: blume-20000619-chdir-bugfix
2154    Description:
2155    
2156    Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
2157    
2158    ----------------------------------------------------------------------
2159    Name: Matthias Blume
2160    Date: 2000/06/18 22:00:10 JST
2161    Tag: blume-20000618-implicit-anchors-really-gone
2162    Description:
2163    
2164    I updates the previous HISTORY entry where I forgot to mention that
2165    implicit anchors are no longer with us.
2166    
2167    The current update also gets rid of the (now useless) controller
2168    CM.Control.implicit_anchors.
2169    
2170    ----------------------------------------------------------------------
2171    Name: Matthias Blume
2172    Date: 2000/06/16 17:30:00 JST
2173    Tag: blume-20000616-anchorenv
2174    Description:
2175    
2176    This patch implements the long anticipated (just kidding :) "anchor
2177    environment" mechanism.  In the course of doing this, I also
2178    re-implemented CM's internal "SrcPath" module from scratch.  The new
2179    one should be more robust in certain boundary cases.  In any case, it
2180    is a lot cleaner than its predecessor (IMHO).
2181    
2182    This time, although there is yet another boot file format change, I
2183    kept the unpickler backward-compatible.  As a result, no new bootfiles
2184    are necessary and bootstrapping is straightforward.  (You cannot read
2185    new bootfiles into an old system, but the other way around is no
2186    problem.)
2187    
2188    Visible changes:
2189    
2190    ** 0. Implicit path anchors (without the leading $-symbol) are no
2191    longer recognized at all. This means that such path names are not
2192    illegal either.  For example, the name basis.cm simply refers to a
2193    local file called "basis.cm" (i.e, the name is an ordinary path
2194    relative to .cm-files directory).  Or, to put it differently, only
2195    names that start with $ are anchored paths.
2196    
2197    ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
2198    vanished.
2199    
2200    John (Reppy) had critizised this as soon as I originally proposed and
2201    implemented it, but at that time I did not really deeply believe
2202    him. :) Now I came full-circle because I need the $<singlearc> syntax
2203    in another place where it cannot be seen as an abbreviation for
2204    $/<singlearc>.  To avoid the confusion, $<singlearc> now means what it
2205    seems to mean (i.e., it "expands" into the corresponding anchor
2206    value).
2207    
2208    However, when paths are used as members in CM description files, it
2209    continues to be true that there must be at least another arc after the
2210    anchor.  This is now enforced separately during semantic analysis
2211    (i.e., from a lexical/syntactical point of view, the notation is ok.)
2212    
2213    ** 2. The "cm" class now accepts an option "bind".  The option's value
2214    is a sub-option list of precisely two items -- one labeled "anchor"
2215    and the other one labeled "value".  As you might expect, "anchor" is
2216    used to specify an anchor name to be bound, and "value" specifies what
2217    the anchor is being bound to.
2218    
2219    The value must be a directory name and can be given in either standard
2220    syntax (including the possibility that it is itself an anchored path)
2221    or native syntax.
2222    
2223    Examples:
2224    
2225       foo.cm (bind:(anchor:bar value:$mystuff/bar))
2226       lib.cm (bind:(anchor:a value:"H:\\x\\y\\z"))  (* only works under windows *)
2227    
2228    and so on.
2229    
2230    The meaning of this is that the .cm-file will be processed with an
2231    augmented anchor environment where the given anchor(s) is/are bound to
2232    the given values(s).
2233    
2234    The rationale for having this feature is this: Suppose you are trying
2235    to use two different (already stable) libraries a.cm and b.cm (that
2236    you perhaps didn't write yourself).  Further, suppose each of these
2237    two libraries internally uses its own auxiliary library $aux/lib.cm.
2238    Normally you would now have a problem because the anchor "lib" can not
2239    be bound to more than one value globally.  Therefore, the project that
2240    uses both a.cm and b.cm must locally redirect the anchor to some other
2241    place:
2242    
2243       a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
2244       b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
2245    
2246    This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
2247    /usr/lib/smlnj/b-stuff/aux.cm, respectively.
2248    
2249    Hard-wiring path names is a bit inflexible (and CM will verbosely warn
2250    you when you do so at the time of CM.stabilize).  Therefore, you can
2251    also use an anchored path as the value:
2252    
2253      a.cm (bind:(anchor:lib value:$a-lib))
2254      b.cm (bind:(anchor:lib value:$b-lib))
2255    
2256    Now you can globally configure (using the usual CM.Anchor.anchor or
2257    pathconfig machinery) bindings for "a-lib" and "b-lib".  Since "lib"
2258    itself is always locally bound, setting it globally is no longer
2259    meaningful or necessary (but it does not hurt either).  In fact, "lib"
2260    can still be used as a global anchor for separate purposes.  As a
2261    matter of fact, one can locally define "lib" in terms of a global
2262    "lib":
2263    
2264      a.cm (bind:(anchor:lib value:$lib/a))
2265      b.cm (bind:(anchor:lib value:$lib/b))
2266    
2267    ** 3: The encoding of path names has changed.  This affects the way
2268    path names are shown in CM's progress report and also the internal
2269    protocol encoding used for parallel make.
2270    
2271    The encoding now uses one or more ':'-separated segments.  Each
2272    segments corresponds to a file that has been specified relative to the
2273    file given by its preceding segment.  The first segment is either
2274    relative to the CWD, absolute, or anchored.  Each segment itself is
2275    basically a Unix pathname; all segments but the first are relative.
2276    
2277    Example:
2278    
2279       $foo/bar/baz.cm:a/b/c.sml
2280    
2281    This path denotes the file bar/a/b/c.sml relative to the directory
2282    denoted by anchor "foo".  Notice that the encoding also includes
2283    baz.cm which is the .cm-file that listed a/b/c.sml.  As usual, such
2284    paths are resolved relative to the .cm-files directory, so baz.cm must
2285    be ignored to get the "real" pathname.
2286    
2287    To make this fact more obvious, CM puts the names of such "virtual
2288    arcs" into parentheses when they appear in progress reports. (No
2289    parentheses will appear in the internal protocol encoding.)  Thus,
2290    what you really see is:
2291    
2292      $foo/bar/(baz.cm):a/b/c.sml
2293    
2294    I find this notation to be much more informative than before.
2295    
2296    Another new feature of the encoding is that special characters
2297    including parentheses, colons, (back)slashes, and white space are
2298    written as \ddd (where ddd is the decimal encoding of the character).
2299    
2300    *** The CM manual still needs to be updated.
2301    
2302    ----------------------------------------------------------------------
2303    Name: Allen Leung
2304    Date: 2000/06/15 00:38:00
2305    Tag: leunga-20000615-x86-peephole
2306    
2307    x86 Peephole fix by Fermin.  Affects c-- and moby only.
2308    
2309    ----------------------------------------------------------------------
2310    Name: Matthias Blume
2311    Date: 2000/06/12 11:40:00
2312    Tag: blume-20000612-parmakefix
2313    Description:
2314    
2315    More cleanup after changing the file naming scheme: This time I
2316    repaired the parallel make mechanism for CMB.make which I broke earlier.
2317    
2318    ----------------------------------------------------------------------
2319    Name: Allen Leung
2320    Date: 2000/06/09 01:25:00
2321    Tag: leunga-20000609-various
2322    
2323    None of these things should affect normal SML/NJ operations
2324    
2325    1. Peephole improvements provided by Fermin (c--)
2326    2. New annotation DEFUSE for adding extra dependence (moby)
2327    3. New X86 LOCK instructions (moby)
2328    4. New machine description language for reservation tables (scheduling)
2329    5. Fixes to various optimization/analysis modules (branch chaining, dominator
2330       trees etc.)
2331    6. I've changed the CM files so that they can work with versions
2332       110.0.6, 110.25 and 110.28
2333    
2334    ----------------------------------------------------------------------
2335    Name: Matthias Blume
2336    Date: 2000/06/09 12:40:00
2337    Tag: blume-20000609-log
2338    Description:
2339    
2340    - Removed all(?) remaining RCS Log entries from sources.
2341    
2342    - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
2343      anchored paths).
2344    
2345    ----------------------------------------------------------------------
2346    Name: Matthias Blume
2347    Date: 2000/06/07 17:00:00 JST
2348    Tag: blume-20000607-no-implicit-anchors
2349    Description:
2350    
2351    1. This update changes the default setting for
2352    CM.Control.implicit_anchors from true to false.  This means that
2353    implicit anchors are no longer permitted by default.  I also tried to
2354    make sure that nothing else still relies on implicit anchors.
2355    (This is the next step on the schedule towards a CM that does not even
2356    have the notion of implicit anchors anymore.)
2357    
2358    2. More CM manual updates.
2359    
2360    3. I managed to track down and fix the pickling bug I mentioned last
2361    time.  Because of the previously existing workaround, this entails no
2362    immediate practical changes.
2363    
2364    ----------------------------------------------------------------------
2365    Name: Matthias Blume
2366    Date: 2000/06/06 11:15:00 JST
2367    Tag: blume-20000606-lazierpickle
2368    Description:
2369    
2370    !!!! NEW BOOT FILES !!!!
2371    
2372    * The main purpose of this update is to make library pickles lazier in
2373    order to reduce the initial space penalty for autoloading a library.
2374    As a result, it is now possible to have $smlnj/compiler.cm
2375    pre-registered.  This should take care of the many complaints or
2376    inquiries about missing structure Compiler.  This required changes to
2377    CM's internal data structures and small tweaks to some algorithms.
2378    
2379    As a neat additional effect, it is no longer necessary (for the sake
2380    of lean heap image files) to distinguish between a "minimal" CM and a
2381    "full" CM.  Now, there is only one CM (i.e., the "full" version:
2382    $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
2383    interactive top level. ($smlnj/cm/minimal.cm is gone.)
2384    
2385    To make the life of compiler-hackers easier, "makeml" now also
2386    pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm).  In other
2387    words, after you bootstrap a new sml for the first time, you will not
2388    have to autoload $smlnj/cmb.cm again afterwards.  (The first time
2389    around you will still have to do it, though.)
2390    
2391    * A second change consists of major updates to the CM manual.  There
2392    are now several appendices with summary information and also a full
2393    specification of the CM description file syntax.
2394    
2395    * In directory src/system I added the script "allcross".  This script
2396    invokes sml and cross-compiles the compiler for all supported
2397    architectures.  (Useful when providing a new set of boot files.)
2398    
2399    * There seems to be a latent bug in my "lazy pickles" mechanism.  I
2400    added a small tweak to pickle-util.sml to work around this problem,
2401    but it is not a proper fix yet.  I will investigate further.  (The
2402    effect of the bug was an inflation of library pickle size.)
2403    
2404    * Version number increased to 110.28.1 (to avoid compatibility problems).
2405    
2406    ----------------------------------------------------------------------
2407    Name: Allen Leung
2408    Date: 2000/05/25 17:28 EDT
2409    Tag: leunga-20000525-ra
2410    Description:
2411    
2412      Fixed a bug in freezing phase of the register allocator.
2413    
2414    ----------------------------------------------------------------------
2415    Name: Allen Leung
2416    Date: 2000/05/15 22:53 EDT
2417    Tag: leunga-20000515-alpha-x86-ra
2418    Description:
2419    
2420      1. Alpha
2421    
2422          Slight cleanup.  Removed the instruction SGNXL
2423    
2424      2. X86
2425    
2426          Added the following instructions to the instruction set:
2427    
2428            ROLx, RORx,
2429            BTx, BTSx, BTLx, BTRx,
2430            XCHGx, and variants with the LOCK prefix
2431    
2432      3. Register Allocation
2433    
2434          The module ra-rewrite-with-renaming has been improved.
2435    
2436      These have no effect on SML/NJ.
2437    
2438    ----------------------------------------------------------------------
2439    Name: Matthias Blume
2440    Date: 2000/05/15 16:20:00 JST
2441    Tag: blume-20000515-lightrebuild
2442    Description:
2443    
2444    1. I added an alternative to "-rebuild" to "makeml".  The difference is
2445       that prior to calling CMB.make' the CM-variable "LIGHT" will be
2446       defined.  In effect, the command will not build any cross-compiler
2447       backends and therefore finish more quickly.
2448    
2449       The "fixpt" script also takes a "-light" switch to be able to use
2450       this new facility while compiling for a fixpoint.
2451    
2452    2. I replaced all mentions of anchored paths in group owner specifications
2453       with simple relative paths (usually starting with "..").
2454       The rationale is that a library's internal workings should not be
2455       compromised by the lack of some anchor.  (An anchor is necessary
2456       for someone who wants to refer to the library by an anchored path,
2457       but it should not be necessary to build the same library in the first
2458       place.)
2459    
2460    3. I changed the way CM's tool mechanism determines the shell command
2461       string used for things like ml-yacc etc. so that it does not break
2462       when CM.Control.implicit_anchors is turned off.
2463    
2464    ----------------------------------------------------------------------
2465    Name: Matthias Blume
2466    Date: 2000/05/12 18:20:00 JST
2467    Tag: blume-20000512-ml-build
2468    Description:
2469    
2470    Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from
2471    getting installed properly (by config/install.sh).
2472    
2473    ----------------------------------------------------------------------
2474    Name: Matthias Blume
2475    Date: 2000/05/12 17:30:00 JST
2476    Tag: blume-20000512-anchors
2477    Description:
2478    
2479    !!! NEW BOOT FILES !!!
2480    
2481    This change is in preparation of fading out support for "implicitly
2482    anchored path names".  I went through all sources and used the
2483    explicit (and relatively new) $-notation.  See system/README and the
2484    CM manual for more info on this.
2485    
2486    I also modified the anchoring scheme for some things such as "smlnj",
2487    "MLRISC", "cm", etc. to take advantage of the fact that explicit
2488    anchors are more expressive: anchor name and first arc do not have to
2489    coincide.  This entails the following user-visible change:
2490    
2491    You have to write $smlnj/foo/bar instead of smlnj/foo/bar.  In
2492    particular, when you fire up sml with a command-line argument, say,
2493    e.g.:
2494    
2495       sml '$smlnj/cmb.cm'
2496    
2497    At the ML toplevel prompt:
2498    
2499       CM.autoload "$smlnj/cmb.cm";
2500    
2501    There is also a new controller in CM.Control that can be used to turn
2502    off all remaining support for implicit anchors by saying:
2503    
2504        CM.autoload "$smlnj/
2505        #set CM.Control.implicit_anchors false;
2506    
2507    This causes CM to reject implicitly anchored paths.  This is (for the
2508    time being) less permissive than the "final" version where there will
2509    be no more such implicit anchors and relative paths will be just that:
2510    relative.
2511    
2512    The next step (version after next version?) will be to make the
2513    default for CM.Control.implicit_anchors false.  After the dust has
2514    settled, I can then produce the "final" version of this...
2515    
2516    Note: Since bootstrapping is a bit tricky, I provided new boot files.
2517    
2518    ----------------------------------------------------------------------
2519    Name: Matthias Blume
2520    Date: 2000/05/11 16:30:00 JST
2521    Tag: blume-20000511-sources
2522    Description:
2523    
2524    The main change is that I added function CM.sources as a generalized
2525    version of the earlier CM.makedepend.  This entails the following
2526    additional changes:
2527    
2528      - CM.makedepend has been dropped.
2529    
2530      - CM manual has been updated.
2531    
2532      - TOOLS signature and API have been changed.
2533    
2534    ----------------------------------------------------------------------
2535    Name: Allen Leung
2536    Date: 2000/05/10 21:17 EDT
2537    Tag: leunga-20000510-moby-c--ssa
2538    Description:
2539    
2540      Various bug fixes and new features for C--, Moby and MLRISC optimizations.
2541    None of these affect SML/NJ.
2542    
2543    1. Register Allocation
2544    
2545        a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented.
2546           This module tries to remove local (i.e. basic block level) redundancies
2547           during spilling.
2548    
2549        b. A new framework for performing region based register allocation.
2550           Not yet entirely functional.
2551    
2552    2. X86
2553    
2554       a. DefUse for POP was missing the stack pointer [found by Lal]
2555       b. Reload for CALL was incorrect in X86Spill [found by John]
2556       c. Various fixes in X86Spill so that it can be used correctly for
2557          the new spilling module.
2558    
2559    3. SSA/IR
2560    
2561       a. New module ir/dj-dataflow.sml implements elimination based
2562          data flow analysis.
2563    
2564    4. MLRiscGen
2565    
2566       a. Fix for gc type annotation
2567    
2568    5. MDGen
2569    
2570       Various fixes for machine description -> ml code translation.  For ssa
2571       only.
2572    
2573    ----------------------------------------------------------------------
2574    Name: Allen Leung
2575    Date: 2000/05/08 22:17 EDT
2576    Tag: leunga-20000508-labexp
2577    Description:
2578    
2579      Fermin has found a few assembly problems with constant expressions
2580      generated in LabelExp.  Mostly, the problems involve extra parentheses,
2581      which choke on dumb assemblers.  This is his fix.
2582    
2583    ----------------------------------------------------------------------
2584    Name: Dave MacQueen
2585    Date: 2000/04/09 14:00 EDT
2586    Tag: dbm-20000502-Version_110_28
2587    Description:
2588    
2589    1. Updated src/compiler/TopLevel/main/version.sml to version 110.28
2590    
2591    2. Updated config/version to 110.28
2592    
2593    3. Updated config/srcarchiveurl
2594    
2595    3. New boot files!
2596       ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/
2597    
2598  ----------------------------------------------------------------------  ----------------------------------------------------------------------
2599  Name: Matthias Blume  Name: Matthias Blume
2600  Date: 2000/05/01 19:05:00 JST  Date: 2000/05/01 19:05:00 JST
# Line 310  Line 2894 
2894    
2895  3.  Assembly  3.  Assembly
2896    
2897      When generating assemby, resolve the value of client defined constants,      When generating assembly, resolve the value of client defined constants,
2898      instead of generating symbolic values.  This is controlled by the      instead of generating symbolic values.  This is controlled by the
2899      new flag "asm-resolve-constants", which is default to true.      new flag "asm-resolve-constants", which is default to true.
2900    
# Line 333  Line 2917 
2917    
2918  To this end, I arranged that instead of "structure Core" as "structure  To this end, I arranged that instead of "structure Core" as "structure
2919  _Core" is bound in the pervasive environment.  Core access is done via  _Core" is bound in the pervasive environment.  Core access is done via
2920  _Core (which can never be accidentially rebound because _Core is not a  _Core (which can never be accidentally rebound because _Core is not a
2921  legal surface-syntax symbol).  legal surface-syntax symbol).
2922    
2923  The current solution is much cleaner because the core environment is  The current solution is much cleaner because the core environment is
# Line 343  Line 2927 
2927  with dynamic and symbolic parts of the core environment.  with dynamic and symbolic parts of the core environment.
2928    
2929  Remaining hackery (to bind the "magic" symbol _Core) is localized in the  Remaining hackery (to bind the "magic" symbol _Core) is localized in the
2930  compilation mananger's bootstrap compiler (actually: in the "init group"  compilation manager's bootstrap compiler (actually: in the "init group"
2931  handling).  See the comments in src/system/smlnj/init/init.cmi for  handling).  See the comments in src/system/smlnj/init/init.cmi for
2932  more details.  more details.
2933    
# Line 458  Line 3042 
3042     (specified in the .cm file at each instance where the tool's class is     (specified in the .cm file at each instance where the tool's class is
3043     used).     used).
3044    
3045     This was done to accomodate the new "make" and "shell" tools which     This was done to accommodate the new "make" and "shell" tools which
3046     facilitate fairly seemless hookup to portions of code managed using     facilitate fairly seamless hookup to portions of code managed using
3047     Makefiles or Shell scripts.     Makefiles or Shell scripts.
3048    
3049     There are no classes "shared" or "private" anymore.  Instead, the     There are no classes "shared" or "private" anymore.  Instead, the
# Line 471  Line 3055 
3055    
3056     All existing tools are described in the CM manual.     All existing tools are described in the CM manual.
3057    
3058     - Slightly better error handling.  (CM now surpresses many followup     - Slightly better error handling.  (CM now suppresses many followup
3059     error messages that tended to be more annoying than helpful.)     error messages that tended to be more annoying than helpful.)
3060    
3061  2. Major changes to the compiler's static environment data structures.  2. Major changes to the compiler's static environment data structures.
# Line 502  Line 3086 
3086       elaborator). There were a lot of changes during my "linkpath" trials       elaborator). There were a lot of changes during my "linkpath" trials
3087       that could have been reverted to their original state but weren't.       that could have been reverted to their original state but weren't.
3088       Please, don't be too harsh on me for messing with this code a bit more       Please, don't be too harsh on me for messing with this code a bit more
3089       than what was strictly necessary...  (I _did_ resist the tempation       than what was strictly necessary...  (I _did_ resist the temptation
3090       of doing any "global reformatting" to avoid an untimely death at       of doing any "global reformatting" to avoid an untimely death at
3091       Dave's hands. :)       Dave's hands. :)
3092    
# Line 605  Line 3189 
3189    
3190       I've changed andl to testl in the floating point test sequence       I've changed andl to testl in the floating point test sequence
3191       whenever appropriate.  The Intel optimization guide states that       whenever appropriate.  The Intel optimization guide states that
3192       testl is perferable to andl.       testl is preferable to andl.
3193    
3194  7. RA (x86 only)  7. RA (x86 only)
3195    
# Line 787  Line 3371 
3371    
3372  1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an  1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
3373  additional argument called "template" which is an optional string that  additional argument called "template" which is an optional string that
3374  specifiel the layout of the tool command line.  See the CM manual for  specifies the layout of the tool command line.  See the CM manual for
3375  explanation.  explanation.
3376    
3377  2. A special-purpose tool can be "regisitered" by simply dropping the  2. A special-purpose tool can be "registered" by simply dropping the
3378  corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same  corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
3379  directory where the .cm file lives that uses this tool.  (The  directory where the .cm file lives that uses this tool.  (The
3380  behavior/misfeature until now was to look for the tool description  behavior/misfeature until now was to look for the tool description
# Line 834  Line 3418 
3418  rebuild.  Having sets of the form <base><k>.{bin,boot}.<arch>-unix for  rebuild.  Having sets of the form <base><k>.{bin,boot}.<arch>-unix for
3419  <k>=1,2,... is normally not a good idea when invoking fixpt.  However,  <k>=1,2,... is normally not a good idea when invoking fixpt.  However,
3420  they might be the result of an earlier partial run of fixpt (which  they might be the result of an earlier partial run of fixpt (which
3421  perhaps got accidentially killed).  In this case, fixpt will quickly  perhaps got accidentally killed).  In this case, fixpt will quickly
3422  move through what exists before continuing where it left off earlier,  move through what exists before continuing where it left off earlier,
3423  and, thus, saves a lot of time.  and, thus, saves a lot of time.
3424    
# Line 884  Line 3468 
3468    it from that remote directory.    it from that remote directory.
3469    This should simplify installation further:  For machines that have    This should simplify installation further:  For machines that have
3470    access to the internet, just fetch <version>-config.tgz, unpack it,    access to the internet, just fetch <version>-config.tgz, unpack it,
3471    edit config/targets, and go (run config/install.sh).  The scipt will    edit config/targets, and go (run config/install.sh).  The script will
3472    fetch everything else that it might need all by itself.    fetch everything else that it might need all by itself.
3473    
3474    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.634  
changed lines
  Added in v.972

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