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

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