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 594, Tue Apr 4 23:41:47 2000 UTC revision 1354, Wed Sep 10 00:27:30 2003 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 (blume@tti-c.org)
17    Date: 2003/09/09 19:20:00 CDT
18    Tag: blume-20030909-installer
19    Description:
20    
21    Rewrote large parts of config/install.sh in SML (config/libinstall.sml).
22    Modified config/install.bat to take advantage of it.  Also modified
23    config/install.sh (and called it config/new-install.sh) to take advantage
24    of it on Unix systems.  (The SML code is (supposed to be) platform-
25    independent.)
26    
27    The installer can now install everything under Win32
28    as well as under *nix as long as it compiles.
29    
30    Other changes:
31    
32      - made CML compile again under Win32
33      - made eXene compile under Win32 (by providing a fake structure UnixSock
34        and by using OS.Process.getEnv instead of Posix.ProcEnv.getenv)
35      - fixed a bug in nowhere: it assumed that type OS.Process.status is the
36        same as type int;  under Win32 it isn't
37      - fixed some slice-related problems in the win32-specific parts of CML
38      - added a functor argument "sameVol" to os-path-fn.sml in the Basis
39        (under Win32, the volume name is case-insensitive, and the
40        OS.Path code compares volume names for equality)
41    
42    ----------------------------------------------------------------------
43    Name: Matthias Blume (blume@tti-c.org)
44    Date: 2003/09/08 11:55:00 CDT
45    Tag: blume-20030908-fullpath
46    Description:
47    
48    Made Win32 version of OS.FileSys.fullPath return current directory
49    when given an empty string.  This is what the spec says, and incidentally,
50    CM depends on it.  (CM otherwise goes into an infinite loop in certain
51    cases when presented with the name of a non-existing .cm file.)
52    
53    ----------------------------------------------------------------------
54    Name: Matthias Blume (blume@tti-c.org)
55    Date: 2003/09/04 16:30:00 CDT
56    Tag: blume-20030905-slices-etc
57    Description:
58    
59      1. Changed interface to vectors and arrays in Basis to match
60         (draft) Basis spec.
61      2. Added signatures and implementations of slices according to
62         Basis spec.
63      3. Edited source code throughout the system to make it compile again
64         under 1. and 2.  (In some cases code had to be added to have it
65         match the new signatures.)
66      4. MLRISC should be backward-compatible: the copies of the originals
67         of files that needed to change under 3. were retained, the .cm files
68         check the compiler version number and use old versions when
69         appropriate.
70      5. Changed type of OS.FileSys.readDir and Posix.FileSys.readdir to
71         dirstream -> string option (in accordance with Basis spec).
72      6. When generating code that counts lines, ml-lex used function
73         CharVector.foldli, taking advantage of its old interface.
74         This has been replaced with the corresponding code from
75         CharVectorSlice.  (html-lex must be re-lexed!)
76      7. BitArray in smlnj-lib/Util has been extended/modified to match the
77         new MONO_ARRAY signature.  (Do we need BitArraySlice?)
78      8. Removed temporary additions (fromInternal, toInternal) from the
79         (now obsolete) IntInf in smlnj-lib/Util.
80      9. Cleaned up structure Byte.
81     10. Added localOffset, scan, and fromString to Date (according to spec).
82         Cleaned/corrected implementation of Date.
83         (Still need to check for correctness; implement better canonicalizeDate.)
84     11. Added "scan" to signature IEEE_REAL.
85     12. Some improvements to IntInf [in particular: efficiency-hack for
86         mod and rem when second operand is 2 (for parity checks).]
87     13. Changed representation of type Time.time, using a single IntInf.int
88         value counting microseconds.  This considerably simplified the
89         implementation of structure Time.  We now support negative time
90         values; scan and fromString handle signs.
91     14. Functor PrimIO now takes two additional arguments (VectorSlice and
92         ArraySlice).
93    
94    ----------------------------------------------------------------------
95    Name: Matthias Blume (blume@tti-c.org)
96    Date: 2003/08/28 17:00:00 CDT
97    Tag: blume-20030828-intinf
98    Description:
99    
100    This is a major update which comes with a version number bump
101    (110.42.99 -- yes, we are really close to 110.43 :-), NEW BOOTFILES,
102    and an implementation of IntInf in the Basis.
103    
104    There are a fairly large number of related changes and updates throughout
105    the system:
106    
107    Basis:
108            - Implemented IntInf.
109            - Made LargeInt a projection of IntInf (by filtering through INTEGER).
110            - Added some missing Real64 operations, most notably Real.toLargeInt.
111            - Added FixedInt as a synonym for Int32.
112    
113    compiler:
114            * Added support for a built-in intinf type.
115              - literals
116              - pattern matching
117              - conversion shortcuts (Int32.fromLarge o Int.toLarge etc.)
118              - overloading on literals and operations
119    
120            This required adding a primitive type intinf, some additional
121            primops, and implementations for several non-trivial intinf
122            operations in Core.  (The intinf type is completely abstract
123            to the compiler; all operations get delegated back to the Core.)
124    
125            * Intinf equality is handled by polyequal.  However, the compiler
126            does not print its usual warning in this case (since polyequal
127            is the right thing to do there).
128    
129            * Improved the organization of structure InlineT.
130    
131            * A word about conversion primops:
132            If conversions involving intinf do not cancel out during
133            CPS contract, then the compiler must insert calls to Core functions.
134            Since all core access must be resolved already during the FLINT
135            translate phase, it would be too late a the time of CPS contract
136            to add new Core calls.  For this reason, conversion primops
137            for intinf carry two arguments:  1. the numeric argument that
138            they are supposed to convert, and 2. the Core function that
139            can help with this conversion if necessary.  If CPS contract
140            eliminates a primop, then the associated Core function becomes
141            dead and goes away.  Intinf conversion primops that do not get
142            eliminated by CPS contract get rewritten into calls of their
143            core functions by a separate, new phase.
144    
145    interactive system:
146            - Control.Print.intinfDepth controls max length of intinf constants
147            being printed. (Analogous to Control.Print.stringDepth.)
148            - Cleanup in printutil and pputil: got rid of unused stuff and
149            duplicates; replaced some of the code with code that makes better
150            use of library functionality.
151    
152    CM:
153            Bugfix: parse-errors in init group (system/smlnj/init/init.cmi)
154            are no longer silent.
155    
156    CKIT:
157            Fixed mismatched uses of Int32 and LargeInt.  I always decided
158            in favor of LargeInt -- which is now the same as IntInf.
159            CKIT-knowledgable people should check whether this is what's
160            intended and otherwise change things back to using Int32 or
161            FixedInt.
162    
163    Throughout the code:
164            Started using IntInf.int literals and built-in operations
165            (e.g., comparison with 0) where this seems appropriate.
166    
167    
168    ----------------------------------------------------------------------
169    Name: Dave MacQueen (dbm@cs.uchicago.edu)
170    Date: 2003/08/13 11:36:00 CDT
171    Tag: dbm-20030813-mcz-merge1
172    Description:
173    
174    Merging changes from the mcz-branch development branch into trunk.
175    These changes involve replacement of the emulated old prettyprinter
176    interface with direct use of the SML/NJ Lib PP library, and fixing
177    of a couple of bugs (895, 1186) relating to error messages.  A new
178    prettyprinter for ast datatypes (Elaborator/print/ppast.{sig,sml})
179    has been added.
180    
181    ----------------------------------------------------------------------
182    Name: Matthias Blume (blume@tti-c.org)
183    Date: 2003/08/11 15:45:00 CDT
184    Tag: blume-20030811-windows
185    Description:
186    
187    Version number bumped to 110.42.9.  NEW BOOTFILES!!!
188    
189        http://smlnj.cs.uchicago.edu/dist/working/110.42.9/
190    
191    This patch restores SML/NJ's ability to run under win32.  There are a
192    number of changes, including fixes for several bugs that had gone
193    unnoticed until now:
194    
195      - uname "CYGWIN_NT*" is recognized as win32 (This is relevant only when
196        trying to run the win32 version from within cygwin.)
197    
198      - There are a number of simple .bat scripts that substitute for their
199        corresponding Unix shell-scripts.  (See below.)
200    
201      - The internals of ml-build have been modified slightly.  The main
202        difference is that instead of calling ".link-sml" (or link-sml.bat)
203        using OS.Process.system, the ML process delegates this task back
204        to the script.  Otherwise problems arise in mixed environments such
205        as Cygwin where scripts look and work like Unix scripts, but
206        where OS.Process.system cannot run them.
207    
208      - In CM, the srcpath pickler used native pathname syntax -- which
209        is incorrect in the case of cross-compilation.  The new pickle format
210        is independent of platform-specific naming conventions.
211    
212      - Path configuration files (such as lib/pathconfig) can now choose
213        between native and standard syntax.  Placing a line of the form
214    
215            standard!
216    
217        into the file causes all subsequent paths to be interpreted using
218        CM standard pathname syntax (= Unix conventions); a line
219    
220            native!
221    
222        switches back to native style.  This was needed so that
223        path config files can be written portably, see src/system/pathconfig.
224    
225      - Runtime system:
226    
227          - win32-filesys.c:  get_file_time and set_file_time now
228            access modification time, not creation time.
229    
230          - I/O code made aware of new array representation.
231    
232          - Bug fixes in X86.prim.masm.
233    
234       - src/system/makeml made aware of win32. (For use under cygwin
235            and other Unix-environments for windows.)
236    
237       - In Basis, fixed off-by-one error in win32-io.sml (function vecF)
238         which caused BinIO.inputAll to fail consistently.
239    
240    .bat scripts:
241    
242       Windows .bat scripts assume that SMLNJ_HOME is defined.
243    
244       - sml.bat, ml-yacc.bat, ml-lex.bat:  Driver scripts for standalone
245         applications (sml, ml-yacc, ml-lex).
246       - ml-build.bat: analogous to ml-build.
247       - config\install.bat:  Analogous to config/install.sh.  This requires
248         that SMLNJ_HOME is set and that Microsoft Visual C is ready to use.
249         (nmake etc. must be on the path, and vcvars32 must have been run.)
250         Moreover, sources for ml-lex and ml-yacc need to exist under src,
251         and the bootfile hierarchy must have been unpacked under
252         sml.boot.x86-win32.
253         The script is very primitive and does a poor job at error checking.
254         It only installs the base system, ml-lex, and ml-yacc.  No other
255         libraries are being installed (i.e., you get only those that
256         are part of the compiler.)
257       - link-sml.bat:  analogous to .link-sml, but not currently used
258    
259    Unrelated bug fixes:
260    
261      - ml-nlffigen now exports structures ST_* corresponding to incomplete
262        types.
263      - Added getDevice to PP/src/pp-debug-fn.sml.  (Would not compile
264        otherwise.)
265    
266    ----------------------------------------------------------------------
267    Name: Dave MacQueen (macqueen@cs.uchicago.edu)
268    Date: 2003/06/17
269    Tag: macqueen-20030617-bug895
270    Description:
271    
272    Modified compiler/Elaborator/print/pptype.sml to fix bug 895.
273    Tag will be used for new development branch (mcz-branch) for
274    use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago.
275    
276    ----------------------------------------------------------------------
277    Name: Matthias Blume (blume@tti-c.org)
278    Date: 2003/05/27 16:55:00 CDT
279    Tag: blume-20030527-polyeq
280    Description:
281    
282    Tried to eliminated most cases of polymorphic equality.
283    
284    ----------------------------------------------------------------------
285    Name: Matthias Blume (blume@tti-c.org)
286    Date: 2003/05/21 17:45:00 CDT
287    Tag: blume-20030517-complete
288    Description:
289    
290    Two changes:
291    
292      1. Added a flag for controlling whether non-exhaustive bindings will
293         be treated as errors (default is false).
294      2. Cleaned up the *entire* source tree so that CMB.make goes through
295         without a single non-exhaustive match- or bind warning.
296    
297    ----------------------------------------------------------------------
298    Name: Matthias Blume (blume@tti-c.org)
299    Date: 2003/05/17 10:20:00 CDT
300    Tag: blume-20030517-absyn
301    Description:
302    
303    1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
304    
305       This mainly affects the quality of error messages.  However, some
306       of the code is now more straightforward than before. (Treatment of
307       the above four constructs in translate.sml is much simpler than
308       the "macro-expansion" that was going on before.  Plus, the mach-
309       compiler no longer gets invoked just to be able to compile an
310       if-expression.)
311    
312    2. The ErrorMsg.Error exception is now caught and absorbed by the
313       interactive loop.
314    
315    ----------------------------------------------------------------------
316    Name: Allen Leung
317    Date: 2003/05/16 13:05:00 CDT
318    Tag: leunga-20030516-cygwin-runtime
319    Description:
320    
321        Ported the runtime system to cygwin, which uses the unix
322    x86-unix bin files.  Missing/buggy features:
323    
324       o getnetbyname, getnetbyaddr: these functions seem to be missing in
325         the Cygwin library.
326       o Ctrl-C handling may be flaky.
327       o Windows system calls and Windows I/O are not supported.
328    
329       A new set of binfiles is located at:
330    
331         http://www.dorsai.org/~leunga/boot.x86-unix.tgz
332    
333       This is only needed for bootstrapping the cygwin version of smlnj.
334       Other x86 versions can use the existing binfiles.
335    
336    ----------------------------------------------------------------------
337    Name: Matthias Blume
338    Date: 2003/04/08 15:42:00 CDT
339    Tag: blume-20030408-listpair
340    Description:
341    
342    1. Added a target 'mlrisc' to installer.
343    
344    2. Added missing elements to structure ListPair.
345    
346    ----------------------------------------------------------------------
347    Name: Allen Leung
348    Date: 2003/01/07 10:40:00 EST
349    Tag: leunga-20030107-int-rem
350    Description:
351    
352    Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86.
353    The arguments to the SUBL instruction were swapped.
354    
355    ----------------------------------------------------------------------
356    Name: Matthias Blume
357    Date: 2002/12/12 16:25:00 EST
358    Tag: blume-20021212-risc-ra
359    Description:
360    
361    Fixed a serious bug in the rewrite code for FP spilling/reloading that
362    sent the RA into an infinite loop when floating point registers get
363    spilled.  (Because of this bug, e.g., nucleic stopped compiling between
364    110.37 and 110.38.)
365    There was another set of potential problems related to the handling of
366    MLRISC annotations (but those did not yet cause real problems, apparently).
367    
368    ----------------------------------------------------------------------
369    Name: Matthias Blume
370    Date: 2002/12/06 22:40:00 EST
371    Tag: blume-20021206-cm-fileid
372    Description:
373    
374    Added a call of SrcPath.sync at the beginning of Parse.parse (in CM).
375    This fixes the problem of CM getting confused by files that suddenly
376    change their identity (e.g., by getting unlinked and recreated by some
377    text editor such as vi).  There might be a better/cheaper/cleaner way
378    of doing this, but for now this will have to do.
379    
380    ----------------------------------------------------------------------
381    Name: Matthias Blume
382    Date: 2002/10/28 09:50:00 EST
383    Tag: blume-20021028-typecheck
384    Description:
385    
386    Exported structure Typecheck from $smlnj/viscomp/core.cm.
387    
388    ----------------------------------------------------------------------
389    Name: Matthias Blume
390    Date: 2002/10/17 09:10:00 EDT
391    Tag: Release_110_42
392    Description:
393    
394    In good old tradition, there has been a slight hiccup so that we have
395    to patch 110.42 after the fact.   The old release tag has been replaced
396    (see below).
397    
398    The change solves a problem with two competing approaches the
399    configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in
400    each other's way.
401    
402    This change only affects the runtime system code and the installer script.
403    (No new bootfiles.)
404    
405    ----------------------------------------------------------------------
406    Name: Matthias Blume
407    Date: 2002/10/16 12:00:00 EDT
408    Tag: Release_110_42_removed
409    Description:
410    
411    New working release.  New bootfiles.
412    
413    ----------------------------------------------------------------------
414    Name: Matthias Blume
415    Date: 2002/10/10 13:10:00 EDT
416    Tag: blume-20021010-ppc-divs
417    Description:
418    
419    The mltree operator DIVS must be implemented with an overflow check on
420    the PPC because the hardware indicates divide-by-zero using "overflow" as
421    well.
422    
423    ----------------------------------------------------------------------
424    Name: Matthias Blume
425    Date: 2002/07/23 11:45:00
426    Tag: blume-20020723-smlnj-home
427    Description:
428    
429    Sml now senses the SMLNJ_HOME environment variable.  If this is set,
430    then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless
431    CM_PATHCONFIG is also set), the path configuration file is assumed
432    to be in $SMLNJ_HOME/lib/pathconfig.  This way one can easily move
433    the entire tree to some other place and everything will "just work".
434    
435    (Companion commands such as ml-build and ml-makedepend also sense this
436    variable.)
437    
438    ----------------------------------------------------------------------
439    Name: Matthias Blume
440    Date: 2002/07/12 21:19:00 EDT
441    Tag: blume-20020712-liveness
442    Description:
443    
444    Exported two useful "step" functions from liveness module (MLRISC).
445    
446    ----------------------------------------------------------------------
447    Name: Matthias Blume
448    Date: 2002/07/05 16:00 EDT
449    Tag: Release_110_41
450    Description:
451    
452    New working release.  New bootfiles.
453    
454    ----------------------------------------------------------------------
455    Name: Matthias Blume
456    Date: 2002/07/05 10:25:00 EDT
457    Tag: blume-20020705-btimp
458    Description:
459    
460    Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that
461    other clients can set up backtracing support.
462    
463    ----------------------------------------------------------------------
464    Name: Matthias Blume
465    Date: 2002/06/25 17:23:00 EDT
466    Tag: blume-20020625-fpmax
467    Description:
468    
469    Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point
470    case.  (The sense of the isNaN test was reversed -- which made min and
471    max always return their first argument.)
472    
473    ----------------------------------------------------------------------
474    Name: Matthias Blume
475    Date: 2002/06/11
476    Tag: blume-20020611-unixpath
477    Description:
478    
479    Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
480    
481    ----------------------------------------------------------------------
482    Name: Matthias Blume
483    Date: 2002/06/10 16:35:00 EDT
484    Tag: blume-20020610-ieeereal
485    Description:
486    
487    I back-ported my implementation of IEEEReal.fromString from the
488    idlbasis-devel branch so that we can test it.
489    
490    Another small change is that ppDec tries to give more information
491    than just "<sig>" in the case of functors.  However, this code is
492    broken in some mysterious way if the functor's body's signature
493    has not been declared by ascription but gets inferred from the
494    implementation.  This needs fixing...
495    
496    ----------------------------------------------------------------------
497    Name: Matthias Blume
498    Date: 2002/05/31
499    Tag: blume-20020531-btrace-mode
500    Description:
501    
502    Resurrected SMLofNJ.Internals.BTrace.mode.  (It accidentally fell by
503    the wayside when I switched over to using Controls everywhere.)
504    
505    ----------------------------------------------------------------------
506    Name: Lal George
507    Date: 2002/05/23 12:21:40 EDT
508    Tag: george-20020523-visual-labels
509    Description:
510    
511    Labels are now displayed in the graphical output to make
512    the fall-through and target blocks obvious.
513    
514    ----------------------------------------------------------------------
515    Name: Matthias Blume
516    Date: 2002/05/22 11:03:00 EDT
517    Tag: blume-20020522-shrink
518    Description:
519    
520    John tweaked yesterday's fix for 1131 to handle an out-of-memory
521    situation that comes up when allocating huge arrays.
522    
523    ----------------------------------------------------------------------
524    Name: Matthias Blume
525    Date: 2002/05/21 16:00:00 EDT
526    Tag: Release_110_40
527    Description:
528    
529    New working release (110.40).  New bootfiles.
530    
531    [Also: John Reppy fixed GC bug 1131.]
532    
533    ----------------------------------------------------------------------
534    Name: Matthias Blume
535    Date: 2002/05/21 12:35:00 EDT
536    Tag: blume-20020521-cmdoc
537    Description:
538    
539    CM documentation update.
540    
541    ----------------------------------------------------------------------
542    Name: Matthias Blume
543    Date: 2002/05/21 10:55:00 EDT
544    Tag: blume-20020521-misc
545    Description:
546    
547    - John tweaked runtime to be silent on heap export (except when
548      GC messages are on).
549    - I added a few more things (cross-compiling versions of CMB) to
550      config/preloads (as suggestions).
551    
552    ----------------------------------------------------------------------
553    Name: Matthias Blume
554    Date: 2002/05/20 22:25:00 EDT
555    Tag: blume-20020520-controls
556    Description:
557    
558    - Added ControlUtil structure to control-lib.cm.
559    - Use it throughout.
560    - Used Controls facility to define MLRISC controls (as opposed to
561      registering MLRISC control ref cells with Controls after the fact)
562    - Fixed messed-up controls priorities.
563    
564    * Removed again all the stuff from config/preloads that one wouldn't
565      be able to preload at the time the initial heap image is built.
566      (Many libraries, e.g., CML, do not exist yet at this time.  The
567       only libraries that can be preloaded via config/preloads are those
568       that come bundled with the bootfiles.)
569    
570    ----------------------------------------------------------------------
571    Name: Matthias Blume
572    Date: 2002/05/20 10:59:00 EDT
573    Tag: blume-20020520-preloads
574    Description:
575    
576    Added a lot of commented-out suggestions for things to be included
577    in config/preloads.
578    
579    ----------------------------------------------------------------------
580    Name: Allen Leung
581    Date: 2002/05/18 14:20:00 EDT
582    Tag: leunga-20020518-mdl
583    Description:
584    
585    o Made the mdl tool stuff compile and run again.
586    o I've disabled all the stuff that depends on RTL specifications; they
587      are all badly broken anyway.
588    
589    ----------------------------------------------------------------------
590    Name: Matthias Blume
591    Date: 2002/05/17 16:49:00 EDT
592    Tag: blume-20020517-controls
593    Description:
594    
595    0. John Reppy made several modifications to the SML/NJ library.
596       In particular, there is a shiny new controls-lib.cm.
597    
598    1. Pushed new controls interface through compiler so that everything
599       compiles again.
600    
601    2. Added FormatComb and FORMAT_COMB to the CML version of the
602       SML/NJ library (so that CML compiles again).
603    
604    3. Modified init scripts because XXX_DEFAULT environment variables
605       are no longer with us.  (Boot-time initialization is now done
606       using the same environment variables that are also used for
607       startup-time initialization of controls.)
608    
609    ----------------------------------------------------------------------
610    Name: Lal George
611    Date: 2002/05/15 09:20:10 EDT
612    Tag: george-20020515-pseudo-op-decls
613    Description:
614    
615            All pseudo-ops emitted before the first segment declaration
616    such as TEXT, DATA, and BSS directives are assumed to be global
617    declarations and are emitted first in the assembly file. This is
618    useful in a number of situations where one has pseudo-ops that are not
619    specific to any segment, and also works around the constraint that one
620    cannot have client pseudo-ops in the TEXT segment.
621    
622            Because no segment is associated with these declarations it is
623    an error to allocate any space or objects before the first segment
624    directive and an exception will be raised. However, we cannot make
625    this check for client pseudo-ops.
626    
627            These top level declarations are a field in the CFG graph_info.
628    In theory you can continue to add to this field after the CFG has been
629    built -- provided you know what you are doing;-)
630    
631    ----------------------------------------------------------------------
632    Name: Matthias Blume
633    Date: 2002/05/13 16:40:00 EDT
634    Tag: blume-20020513-pp-etc
635    Description:
636    
637    A few minor bugfixes:
638    
639      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
640        (Bogus printouts for redefined bindings still occur.  Compiler
641        bug should no longer occur now.  We need to redo the prettyprinter
642        from scratch.)
643    
644      - CM pathname printer now also adds escape sequences for ( and )
645    
646      - commend and docu fixes for ml-nlffi
647    
648    ----------------------------------------------------------------------
649    Name: Matthias Blume
650    Date: 2002/05/10 16:40:00 EDT
651    Tag: blume-20020510-erg-textio
652    Description:
653    
654    Applied the following bugfix provided by Emden Gansner:
655    
656        Output is corrupted when outputSubstr is used rather than output.
657    
658        The problem occurs when a substring
659    
660            ss = (s, dataStart, dataLen)
661    
662        where dataStart > 0, fills a stream buffer with avail bytes left.
663        avail bytes of s, starting at index dataStart, are copied into the
664        buffer, the buffer is flushed, and then the remaining dataLen-avail
665        bytes of ss are copied into the beginning of the buffer. Instead of
666        starting this copy at index dataStart+avail in s, the current code
667        starts the copy at index avail.
668    
669        Fix:
670        In text-io-fn.sml, change line 695 from
671             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
672        to
673             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
674    
675    ----------------------------------------------------------------------
676    Name: Matthias Blume
677    Date: 2002/04/12 13:55:00 EDT
678    Tag: blume-20020412-assyntax
679    Description:
680    
681    1. Grabbed newer assyntax.h from the XFree86 project.
682    2. Fiddled with how to compile X86.prim.asm without warnings.
683    3. (Very) Minor cleanup in CM.
684    
685    ----------------------------------------------------------------------
686    Name: Matthias Blume
687    Date: 2002/04/01 (no joke!) 17:07:00 EST
688    Tag: blume-20020401-x86div
689    Description:
690    
691    Added full support for div/mod/rem/quot on the x86, using the machine
692    instruction's two results (without clumsily recomputing the remainder)
693    directly where appropriate.
694    
695    Some more extensive power-of-two support was added to the x86 instruction
696    selector (avoiding expensive divs, mods, and muls where they can be
697    replaced with cheaper shifts and masks).  However, this sort of thing
698    ought to be done earlier, e.g., within the CPS optimizer so that
699    all architectures benefit from it.
700    
701    The compiler compiles to a fixed point, but changes might be somewhat
702    fragile nevertheless.  Please, report any strange things that you might
703    see wrt. div/mod/quot/rem...
704    
705    ----------------------------------------------------------------------
706    Name: Matthias Blume
707    Date: 2002/03/29 17:22:00
708    Tag: blume-20020329-div
709    Description:
710    
711    Fixed my broken div/mod logic.  Unfortunately, this means that the
712    inline code for div/mod now has one more comparison than before.
713    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
714    The problem was with quotient = 0, because that alone does not tell
715    us which way the rounding went.  One then has to look at whether
716    remainder and divisor have the same sign...  :(
717    
718    Anyway, I replaced the bootfiles with fresh ones...
719    
720    ----------------------------------------------------------------------
721    Name: Matthias Blume
722    Date: 2002/03/29 14:10:00 EST
723    Tag: blume-20020329-inlprims
724    Description:
725    
726    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
727    
728    Primops have changed. This means that the bin/boot-file formats have
729    changed as well.
730    
731    To make sure that there is no confusion, I made a new version.
732    
733    
734    CHANGES:
735    
736    * removed REMT from mltree (remainder should never overflow).
737    
738    * added primops to deal with divisions of all flavors to the frontend
739    
740    * handled these primops all the way through so they map to their respective
741      MLRISC support
742    
743    * used these primops in the implementation of Int, Int32, Word, Word32
744    
745    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
746    
747    * parameterized INLMIN, INLMAX, and INLABS by a numkind
748    
749    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
750      floating point
751    
752    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
753      and Real (but Real.abs maps to a separate floating-point-only primop)
754    
755    
756    TODO items:
757    
758    * Hacked Alpha32 instruction selection, disabling the selection of REMx
759      instructions because the machine instruction encoder cannot handle
760      them.  (Hppa, PPC, and Sparc instruction selection did not handle
761      REM in the first place, and REM is supported by the x86 machine coder.)
762    
763    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
764      selection phase.  (The two can be streamlined because the hardware
765      delivers both quotient and remainder at the same time anyway.)
766    
767    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
768      (Currently the behavior is inconsistent both across architectures and
769      wrt. the draft Basis spec.)
770    
771    * Word8 should eventually be handled natively, too.
772    
773    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
774      as if there currently is no execution path that could trigger it in
775      SML/NJ.  (The assumptions underlying functions arith and promotable do not
776      hold for things like multiplication and division.)
777    
778    ----------------------------------------------------------------------
779    Name: Matthias Blume
780    Date: 2002/03/27 16:27:00 EST
781    Tag: blume-20020327-mlrisc-divisions
782    Description:
783    
784    Added support for all four division operations (ML's div, mod, quot,
785    and rem) to MLRISC.  In the course of doing so, I also rationalized
786    the naming (no more annoying switch-around of DIV and QUOT), by
787    parameterizing the operation by div_rounding_mode (which can be either
788    DIV_TO_ZERO or DIV_TO_NEGINF).
789    
790    The generic MLTreeGen functor takes care of compiling all four
791    operations down to only round-to-zero div.
792    
793    Missing pieces:
794    
795      * Doing something smarter than relying on MLTreeGen on architectures
796        like, e.g., the x86 where hardware division delivers both quotient and
797        remainder at the same time.  With this, the implementation of the
798        round-to-neginf operations could be further streamlined.
799    
800      * Remove inlining support for div/mod/rem from the frontend and replace it
801        with primops that get carried through to the backend.  Do this for all
802        int and word types.
803    
804    ----------------------------------------------------------------------
805    Name: Matthias Blume
806    Date: 2002/03/25 17:25:00 EST
807    Tag: blume-20020325-divmod
808    Description:
809    
810    I improved (hopefully without breaking them) the implementation of Int.div,
811    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
812    advantage of the following observations:
813    
814      Let  q = x quot y      r = x rem y
815           d = x div  y      m = x mod y
816    
817    where "quot" is the round-to-zero version of integer division that
818    hardware usually provides.  Then we have:
819    
820         r = x - q * y        where neither the * nor the - will overflow
821         d = if q >= 0 orelse x = q * y then q else q - 1
822                              where neither the * nor the - will overflow
823         m = if q >= 0 orelse r = 0 then r else r + y
824                              where the + will not overflow
825    
826    This results in substantial simplification of the generated code.
827    The following table shows the number of CFG nodes and edges generated
828    for
829            fun f (x, y) = x OPER y
830            (* with OPER \in div, mod, quot, rem *)
831    
832    
833        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
834        --------------------------------------------------------
835         div |         24 |         39 |         12 |         16
836         mod |         41 |         71 |         12 |         16
837        quot |          8 |         10 |          8 |         10
838         rem |         10 |         14 |          8 |         10
839    
840    
841    ----------------------------------------------------------------------
842    Name: Matthias Blume
843    Date: 2002/03/25 22:06:00 EST
844    Tag: blume-20020325-cprotobug
845    Description:
846    
847    Fixed a bug in cproto (c prototype decoder).
848    
849    ----------------------------------------------------------------------
850    Name: Matthias Blume
851    Date: 2002/03/25 16:00:00 EST
852    Tag: blume-20020325-raw-primops
853    Description:
854    
855    I did some cleanup to Allen's new primop code and
856    replaced yesterday's bootfiles with new ones.
857    (But they are stored in the same place.)
858    
859    ----------------------------------------------------------------------
860    Name: Matthias Blume
861    Date: 2002/03/24 22:40:00 EST
862    Tag: blume-20020324-bootfiles
863    Description:
864    
865    Made the bootfiles that Allen asked for.
866    
867    ----------------------------------------------------------------------
868    Name: Allen Leung
869    Date: 2002/03/23 15:50:00 EST
870    Tag: leunga-20020323-flint-cps-rcc-primops
871    Description:
872    
873      1. Changes to FLINT primops:
874    
875        (* make a call to a C-function;
876         * The primop carries C function prototype information and specifies
877         * which of its (ML-) arguments are floating point. C prototype
878         * information is for use by the backend, ML information is for
879         * use by the CPS converter. *)
880      | RAW_CCALL of { c_proto: CTypes.c_proto,
881                       ml_args: ccall_type list,
882                       ml_res_opt: ccall_type option,
883                       reentrant : bool
884                     } option
885       (* Allocate uninitialized storage on the heap.
886        * The record is meant to hold short-lived C objects, i.e., they
887        * are not ML pointers.  With the tag, the representation is
888        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
889        *)
890      | RAW_RECORD of {tag:bool,sz:int}
891      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
892    
893      2.  These CPS primops are now overloaded:
894    
895           rawload of {kind:numkind}
896           rawstore of {kind:numkind}
897    
898          The one argument form is:
899    
900             rawload {kind} address
901    
902          The two argument form is:
903    
904             rawload {kind} [ml object, byte-offset]
905    
906      3. RAW_CCALL/RCC now takes two extra arguments:
907    
908         a. The first is whether the C call is reentrant, i.e., whether
909            ML state should be saved and restored.
910         b. The second argument is a string argument specifying the name of
911            library and the C function.
912    
913         These things are currently not handled in the code generator, yet.
914    
915      4. In CProto,
916    
917         An encoding type of "bool" means "ml object" and is mapped into
918         C prototype of PTR.  Note that "bool" is different than "string",
919         even though "string" is also mapped into PTR, because "bool"
920         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
921    
922      5. Pickler/unpicker
923    
924         Changed to handle RAW_RECORD and newest RAW_CCALL
925    
926      6. MLRiscGen,
927    
928         1. Changed to handle the new rawload/rawstore/rawrecord operators.
929         2. Code for handling C Calls has been moved to a new module CPSCCalls,
930            in the file CodeGen/cpscompile/cps-c-calls.sml
931    
932      7. Added the conditional move operator
933    
934             condmove of branch
935    
936         to cps.  Generation of this is still buggy so it is currently
937         disabled.
938    
939    ----------------------------------------------------------------------
940    Name: Lal George
941    Date: 2002/03/22 14:18:25 EST
942    Tag: george-20020322-cps-branch-prob
943    Description:
944    
945    Implemented the Ball-Larus branch prediction-heuristics, and
946    incorporated graphical viewers for control flow graphs.
947    
948    Ball-Larus Heuristics:
949    ---------------------
950    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
951    
952    By design it uses the Dempster-Shafer theory for combining
953    probabilities.  For example, in the function:
954    
955        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
956    
957    the ball-larus heuristics predicts that the n=0 is unlikely
958    (OH-heuristic), and the 'then' branch is unlikely because of the
959    RH-heuristic -- giving the 'then' branch an even lower combined
960    probability using the Dempster-Shafer theory.
961    
962    Finally, John Reppy's loop analysis in MLRISC, further lowers the
963    probability of the 'then' branch because of the loop in the else
964    branch.
965    
966    
967    Graphical Viewing:
968    ------------------
969    I merely plugged in Allen's graphical viewers into the compiler. The
970    additional code is not much. At the top level, saying:
971    
972            Control.MLRISC.getFlag "cfg-graphical-view" := true;
973    
974    will display the graphical view of the control flow graph just before
975    back-patching.  daVinci must be in your path for this to work. If
976    daVinci is not available, then the default viewer can be changed
977    using:
978    
979            Control.MLRISC.getString "viewer"
980    
981    which can be set to "dot" or "vcg" for the corresponding viewers. Of
982    course, these viewers must be in your path.
983    
984    The above will display the compilation unit at the level of clusters,
985    many of which are small, boring, and un-interesting. Also setting:
986    
987            Control.MLRISC.getInt "cfg-graphical-view_size"
988    
989    will display clusters that are larger than the value set by the above.
990    
991    
992    ----------------------------------------------------------------------
993    Name: Matthias Blume
994    Date: 2002/03/21 22:20:00 EST
995    Tag: blume-20020321-kmp-bugfix
996    Description:
997    
998    Changed the interface to the KMP routine in PreString and fixed
999    a minor bug in one place where it was used.
1000    
1001    ----------------------------------------------------------------------
1002    Name: Allen Leung
1003    Date: 2002/03/21 20:30:00 EST
1004    Tag: leunga-20020321-cfg
1005    Description:
1006    
1007      Fixed a potential problem in cfg edge splitting.
1008    
1009    ----------------------------------------------------------------------
1010    Name: Allen Leung
1011    Date: 2002/03/21 17:15:00 EST
1012    Tag: leunga-20020321-x86-fp-cfg
1013    Description:
1014    
1015      1. Recoded the buggy parts of x86-fp.
1016    
1017         a. All the block reordering code has been removed.
1018            We now depend on the block placement phases to do this work.
1019    
1020         b. Critical edge splitting code has been simplified and moved into the
1021            CFG modules, as where they belong.
1022    
1023         Both of these were quite buggy and complex.  The code is now much, much
1024         simpler.
1025    
1026      2. X86 backend.
1027    
1028         a. Added instructions for 64-bit support.  Instruction selection for
1029            64-bit has not been committed, however, since that
1030            requires changes to MLTREE which haven't been approved by
1031            Lal and John.
1032    
1033         b. Added support for FUCOMI and FUCOMIP when generating code for
1034            PentiumPro and above.  We only generate these instructions in
1035            the fast-fp mode.
1036    
1037         c. Added cases for JP and JNP in X86FreqProps.
1038    
1039      3. CFG
1040    
1041         CFG now has a bunch of methods for edge splitting and merging.
1042    
1043      4. Machine description.
1044    
1045         John's simplification of MLTREE_BASIS.fcond broke a few machine
1046         description things:
1047    
1048         rtl-build.{sig,sml} and hppa.mdl fixed.
1049    
1050         NOTE: the machine description stuff in the repository is still broken.
1051               Again, I can't put my fixes in because that involves
1052               changes to MLTREE.
1053    
1054    ----------------------------------------------------------------------
1055    Name: Matthias Blume
1056    Date: 2002/03/20 15:55:00 EST
1057    Tag: blume-20020320-kmp
1058    Description:
1059    
1060    Implemented Knuth-Morris-Pratt string matching in PreString and used
1061    it for String.isSubstring, Substring.isSubstring, and
1062    Substring.position.
1063    
1064    (Might need some stress-testing.  Simple examples worked fine.)
1065    
1066    ----------------------------------------------------------------------
1067    Name: Matthias Blume
1068    Date: 2002/03/19 16:37:00 EST
1069    Tag: blume-20020319-witnesses
1070    Description:
1071    
1072    Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib.
1073    
1074    This implements a generic mechanism for changing constness qualifiers
1075    anywhere within big C types without resorting to outright "casts".
1076    (So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you
1077    modify the constness at the outermost level.)
1078    The implementation of "convert" is based on the idea of "witness"
1079    values -- values that are not used by the operation but whose types
1080    "testify" to their applicability.  On the implementation side, "convert"
1081    is simply a projection (returning its second curried argument).  With
1082    cross-module inlining, it should not result in any machine code being
1083    generated.
1084    
1085    ----------------------------------------------------------------------
1086    Name: Matthias Blume
1087    Date: 2002/03/15 16:40:00 EST
1088    Tag: blume-20020315-basis
1089    Description:
1090    
1091    Provided (preliminary?) implementations for
1092    
1093      {String,Substring}.{concatWith,isSuffix,isSubstring}
1094    
1095    and
1096    
1097      Substring.full
1098    
1099    Those are in the Basis spec but they were missing in SML/NJ.
1100    
1101    ----------------------------------------------------------------------
1102    Name: Matthias Blume
1103    Date: 2002/03/14 21:30:00 EST
1104    Tag: blume-20020314-controls
1105    Description:
1106    
1107    Controls:
1108    ---------
1109    
1110    1. Factored out the recently-added Controls : CONTROLS stuff and put
1111       it into its own library $/controls-lib.cm.  The source tree for
1112       this is under src/smlnj-lib/Controls.
1113    
1114    2. Changed the names of types and functions in this interface, so they
1115       make a bit more "sense":
1116    
1117          module -> registry
1118          'a registry -> 'a group
1119    
1120    3. The interface now deals in ref cells only.  The getter/setter interface
1121       is (mostly) gone.
1122    
1123    4. Added a function that lets one register an already-existing ref cell.
1124    
1125    5. Made the corresponding modifications to the rest of the code so that
1126       everything compiles again.
1127    
1128    6. Changed the implementation of Controls.MLRISC back to something closer
1129       to the original.  In particular, this module (and therefore MLRISC)
1130       does not depend on Controls.  There now is some link-time code in
1131       int-sys.sml that registers the MLRISC controls with the Controls
1132       module.
1133    
1134    CM:
1135    ---
1136    
1137      * One can now specify the lambda-split aggressiveness in init.cmi.
1138    
1139    ----------------------------------------------------------------------
1140    Name: Allen Leung
1141    Date: 2002/03/13 17:30:00 EST
1142    Tag: leunga-20020313-x86-fp-unary
1143    Description:
1144    
1145    Bug fix for:
1146    
1147    > leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml
1148    > Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002
1149    > - fun f(x,(y,z)) = Real.~ y;
1150    > [autoloading]
1151    > [autoloading done]
1152    >       fchsl   (%eax), 184(%esp)
1153    > Error: MLRisc bug: X86MCEmitter.emitInstr
1154    >
1155    > uncaught exception Error
1156    >   raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19
1157    
1158    The problem was that the code generator did not generate any fp registers
1159    in this case, and the ra didn't know that it needed to run the X86FP phase to
1160    translate the pseudo fp instruction.   This only happened with unary fp
1161    operators in certain situations.
1162    
1163    ----------------------------------------------------------------------
1164    Name: Matthias Blume
1165    Date: 2002/03/13 14:00:00 EST
1166    Tag: blume-20020313-overload-etc
1167    Description:
1168    
1169    1. Added _overload as a synonym for overload for backward compatibility.
1170       (Control.overloadKW must be true for either version to be accepted.)
1171    
1172    2. Fixed bug in install script that caused more things to be installed
1173       than what was requested in config/targets.
1174    
1175    3. Made CM aware of the (_)overload construct so that autoloading
1176       works.
1177    
1178    ----------------------------------------------------------------------
1179    Name: Matthias Blume
1180    Date: 2002/03/12 22:03:00 EST
1181    Tag: blume-20020312-url
1182    Description:
1183    
1184    Forgot to update BOOT and srcarchiveurl.
1185    
1186    ----------------------------------------------------------------------
1187    Name: Matthias Blume
1188    Date: 2002/03/12 17:30:00 EST
1189    Tag: blume-20020312-version110392
1190    Description:
1191    
1192    Yet another version number bump (because of small changes to the
1193    binfile format).  Version number is now 110.39.2.  NEW BOOTFILES!
1194    
1195    Changes:
1196    
1197      The new pid generation scheme described a few weeks ago was overly
1198      complicated.  I implemented a new mechanism that is simpler and
1199      provides a bit more "stability":  Once CM has seen a compilation
1200      unit, it keeps its identity constant (as long as you do not delete
1201      those crucial CM/GUID/* files).  This means that when you change
1202      an interface, compile, then go back to the old interface, and
1203      compile again, you arrive at the original pid.
1204    
1205      There now also is a mechanism that instructs CM to use the plain
1206      environment hash as a module's pid (effectively making its GUID
1207      the empty string).  For this, "noguid" must be specified as an
1208      option to the .sml file in question within its .cm file.
1209      This is most useful for code that is being generated by tools such
1210      as ml-nlffigen (because during development programmers tend to
1211      erase the tool's entire output directory tree including CM's cached
1212      GUIDs).  "noguid" is somewhat dangerous (since it can be used to locally
1213      revert to the old, broken behavior of SML/NJ, but in specific cases
1214      where there is no danger of interface confusion, its use is ok
1215      (I think).
1216    
1217      ml-nlffigen by default generates "noguid" annotations.  They can be
1218      turned off by specifying -guid in its command line.
1219    
1220    ----------------------------------------------------------------------
1221    Name: Lal George
1222    Date: 2002/03/12 12 14:42:36 EST
1223    Tag: george-20020312-frequency-computation
1224    Description:
1225    
1226    Integrated jump chaining and static block frequency into the
1227    compiler. More details and numbers later.
1228    
1229    ----------------------------------------------------------------------
1230    Name: Lal George
1231    Date: 2002/03/11 11 22:38:53 EST
1232    Tag: george-20020311-jump-chain-elim
1233    Description:
1234    
1235    Tested the jump chain elimination on all architectures (except the
1236    hppa).  This is on by default right now and is profitable for the
1237    alpha and x86, however, it may not be profitable for the sparc and ppc
1238    when compiling the compiler.
1239    
1240    The gc test will typically jump to a label at the end of the cluster,
1241    where there is another jump to an external cluster containing the actual
1242    code to invoke gc. This is to allow factoring of common gc invocation
1243    sequences. That is to say, we generate:
1244    
1245            f:
1246               testgc
1247               ja   L1      % jump if above to L1
1248    
1249            L1:
1250               jmp L2
1251    
1252    
1253    After jump chain elimination the 'ja L1' instructions is converted to
1254    'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end
1255    up being implemented in their long form (if L2 is far away) using:
1256    
1257            jbe     L3      % jump if below or equal to L3
1258            jmp     L2
1259         L3:
1260            ...
1261    
1262    
1263    For large compilation units L2  may be far away.
1264    
1265    
1266    ----------------------------------------------------------------------
1267    Name: Matthias Blume
1268    Date: 2002/03/11 13:30:00 EST
1269    Tag: blume-20020311-mltreeeval
1270    Description:
1271    
1272    A functor parameter was missing.
1273    
1274    ----------------------------------------------------------------------
1275    Name: Allen Leung
1276    Date: 2002/03/11 10:30:00 EST
1277    Tag: leunga-20020311-runtime-string0
1278    Description:
1279    
1280       The representation of the empty string now points to a
1281    legal null terminated C string instead of unit.  It is now possible
1282    to convert an ML string into C string with InlineT.CharVector.getData.
1283    This compiles into one single machine instruction.
1284    
1285    ----------------------------------------------------------------------
1286    Name: Allen Leung
1287    Date: 2002/03/10 23:55:00 EST
1288    Tag: leunga-20020310-x86-call
1289    Description:
1290    
1291       Added machine generation for CALL instruction (relative displacement mode)
1292    
1293    ----------------------------------------------------------------------
1294    Name: Matthias Blume
1295    Date: 2002/03/08 16:05:00
1296    Tag: blume-20020308-entrypoints
1297    Description:
1298    
1299    Version number bumped to 110.39.1.  NEW BOOTFILES!
1300    
1301    Entrypoints: non-zero offset into a code object where execution should begin.
1302    
1303    - Added the notion of an entrypoint to CodeObj.
1304    - Added reading/writing of entrypoint info to Binfile.
1305    - Made runtime system bootloader aware of entrypoints.
1306    - Use the address of the label of the first function given to mlriscGen
1307      as the entrypoint.  This address is currently always 0, but it will
1308      not be 0 once we turn on block placement.
1309    - Removed the linkage cluster code (which was The Other Way(tm) of dealing
1310      with entry points) from mlriscGen.
1311    
1312    ----------------------------------------------------------------------
1313    Name: Allen Leung
1314    Date: 2002/03/07 20:45:00 EST
1315    Tag: leunga-20020307-x86-cmov
1316    Description:
1317    
1318       Bug fixes for CMOVcc on x86.
1319    
1320       1. Added machine code generation for CMOVcc
1321       2. CMOVcc is now generated in preference over SETcc on PentiumPro or above.
1322       3. CMOVcc cannot have an immediate operand as argument.
1323    
1324    ----------------------------------------------------------------------
1325    Name: Matthias Blume
1326    Date: 2002/03/07 16:15:00 EST
1327    Tag: blume-20020307-controls
1328    Description:
1329    
1330    This is a very large but mostly boring patch which makes (almost)
1331    every tuneable compiler knob (i.e., pretty much everything under
1332    Control.* plus a few other things) configurable via both the command
1333    line and environment variables in the style CM did its configuration
1334    until now.
1335    
1336    Try starting sml with '-h' (or, if you are brave, '-H')
1337    
1338    To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which
1339    implements the underlying generic mechanism.
1340    
1341    The interface to some of the existing such facilities has changed somewhat.
1342    For example, the MLRiscControl module now provides mkFoo instead of getFoo.
1343    (The getFoo interface is still there for backward-compatibility, but its
1344    use is deprecated.)
1345    
1346    The ml-build script passes -Cxxx=yyy command-line arguments through so
1347    that one can now twiddle the compiler settings when using this "batch"
1348    compiler.
1349    
1350    TODO items:
1351    
1352    We should go through and throw out all controls that are no longer
1353    connected to anything.  Moreover, we should go through and provide
1354    meaningful (and correct!) documentation strings for those controls
1355    that still are connected.
1356    
1357    Currently, multiple calls to Controls.new are accepted (only the first
1358    has any effect).  Eventually we should make sure that every control
1359    is being made (via Controls.new) exactly once.  Future access can then
1360    be done using Controls.acc.
1361    
1362    Finally, it would probably be a good idea to use the getter-setter
1363    interface to controls rather than ref cells.  For the time being, both
1364    styles are provided by the Controls module, but getter-setter pairs are
1365    better if thread-safety is of any concern because they can be wrapped.
1366    
1367    *****************************************
1368    
1369    One bug fix: The function blockPlacement in three of the MLRISC
1370    backpatch files used to be hard-wired to one of two possibilities at
1371    link time (according to the value of the placementFlag).  But (I
1372    think) it should rather sense the flag every time.
1373    
1374    *****************************************
1375    
1376    Other assorted changes (by other people who did not supply a HISTORY entry):
1377    
1378    1. the cross-module inliner now works much better (Monnier)
1379    2. representation of weights, frequencies, and probabilities in MLRISC
1380       changed in preparation of using those for weighted block placement
1381       (Reppy, George)
1382    
1383    ----------------------------------------------------------------------
1384    Name: Lal George
1385    Date: 2002/03/07 14:44:24 EST 2002
1386    Tag: george-20020307-weighted-block-placement
1387    
1388    Tested the weighted block placement optimization on all architectures
1389    (except the hppa) using AMPL to generate the block and edge frequencies.
1390    Changes were required in the machine properties to correctly
1391    categorize trap instructions. There is an MLRISC flag
1392    "weighted-block-placement" that can be used to enable weighted block
1393    placement, but this will be ineffective without block/edge
1394    frequencies (coming soon).
1395    
1396    
1397    ----------------------------------------------------------------------
1398    Name: Lal George
1399    Date: 2002/03/05 17:24:48 EST
1400    Tag: george-20020305-linkage-cluster
1401    
1402    In order to support the block placement optimization, a new cluster
1403    is generated as the very first cluster (called the linkage cluster).
1404    It contains a single jump to the 'real' entry point for the compilation
1405    unit. Block placement has no effect on the linkage cluster itself, but
1406    all the other clusters  have full freedom in the manner in which they
1407    reorder blocks or functions.
1408    
1409    On the x86 the typical linkage code that is generated is:
1410       ----------------------
1411            .align 2
1412       L0:
1413            addl    $L1-L0, 72(%esp)
1414            jmp     L1
1415    
1416    
1417            .align  2
1418       L1:
1419       ----------------------
1420    
1421    72(%esp) is the memory location for the stdlink register. This
1422    must contain the address of the CPS function being called. In the
1423    above example, it contains the address of  L0; before
1424    calling L1 (the real entry point for the compilation unit), it
1425    must contain the address for L1, and hence
1426    
1427            addl $L1-L0, 72(%esp)
1428    
1429    I have tested this on all architectures except the hppa.The increase
1430    in code size is of course negligible
1431    
1432    ----------------------------------------------------------------------
1433    Name: Allen Leung
1434    Date: 2002/03/03 13:20:00 EST
1435    Tag: leunga-20020303-mlrisc-tools
1436    
1437      Added #[ ... ] expressions to mlrisc tools
1438    
1439    ----------------------------------------------------------------------
1440    Name: Matthias Blume
1441    Date: 2002/02/27 12:29:00 EST
1442    Tag: blume-20020227-cdebug
1443    Description:
1444    
1445    - made types in structure C and C_Debug to be equal
1446    - got rid of code duplication (c-int.sml vs. c-int-debug.sml)
1447    - there no longer is a C_Int_Debug (C_Debug is directly derived from C)
1448    
1449    ----------------------------------------------------------------------
1450    Name: Matthias Blume
1451    Date: 2002/02/26 12:00:00 EST
1452    Tag: blume-20020226-ffi
1453    Description:
1454    
1455    1. Fixed a minor bug in CM's "noweb" tool:
1456       If numbering is turned off, then truly don't number (i.e., do not
1457       supply the -L option to noweb).  The previous behavior was to supply
1458       -L'' -- which caused noweb to use the "default" line numbering scheme.
1459       Thanks to Chris Richards for pointing this out (and supplying the fix).
1460    
1461    2. Once again, I reworked some aspects of the FFI:
1462    
1463       A. The incomplete/complete type business:
1464    
1465       - Signatures POINTER_TO_INCOMPLETE_TYPE and accompanying functors are
1466         gone!
1467       - ML types representing an incomplete type are now *equal* to
1468         ML types representing their corresponding complete types (just like
1469         in C).  This is still safe because ml-nlffigen will not generate
1470         RTTI for incomplete types, nor will it generate functions that
1471         require access to such RTTI.   But when ML code generated from both
1472         incomplete and complete versions of the C type meet, the ML types
1473         are trivially interoperable.
1474    
1475         NOTE:  These changes restore the full generality of the translation
1476         (which was previously lost when I eliminated functorization)!
1477    
1478       B. Enum types:
1479    
1480       - Structure C now has a type constructor "enum" that is similar to
1481         how the "su" constructor works.  However, "enum" is not a phantom
1482         type because each "T enum" has values (and is isomorphic to
1483         MLRep.Signed.int).
1484       - There are generic access operations for enum objects (using
1485         MLRep.Signed.int).
1486       - ml-nlffigen will generate a structure E_foo for each "enum foo".
1487         * The structure contains the definition of type "mlrep" (the ML-side
1488         representation type of the enum).  Normally, mlrep is the same
1489         as "MLRep.Signed.int", but if ml-nlffigen was invoked with "-ec",
1490         then mlrep will be defined as a datatype -- thus facilitating
1491         pattern matching on mlrep values.
1492         ("-ec" will be suppressed if there are duplicate values in an
1493          enumeration.)
1494         * Constructors ("-ec") or values (no "-ec") e_xxx of type mlrep
1495         will be generated for each C enum constant xxx.
1496         * Conversion functions m2i and i2m convert between mlrep and
1497         MLRep.Signed.int.  (Without "-ec", these functions are identities.)
1498         * Coversion functions c and ml convert between mlrep and "tag enum".
1499         * Access functions (get/set) fetch and store mlrep values.
1500       - By default (unless ml-nlffigen was invoked with "-nocollect"), unnamed
1501         enumerations are merged into one single enumeration represented by
1502         structure E_'.
1503    
1504    ----------------------------------------------------------------------
1505    Name: Allen Leung
1506    Date: 2002/02/25 04:45:00 EST
1507    Tag: leunga-20020225-cps-spill
1508    
1509    This is a new implementation of the CPS spill phase.
1510    The new phase is in the new file compiler/CodeGen/cpscompile/spill-new.sml
1511    In case of problems, replace it with the old file spill.sml
1512    
1513    The current compiler runs into some serious performance problems when
1514    constructing a large record.  This can happen when we try to compile a
1515    structure with many items.  Even a very simple structure like the following
1516    makes the compiler slow down.
1517    
1518        structure Foo = struct
1519           val x_1 = 0w1 : Word32.int
1520           val x_2 = 0w2 : Word32.int
1521           val x_3 = 0w3 : Word32.int
1522           ...
1523           val x_N = 0wN : Word32.int
1524        end
1525    
1526    The following table shows the compile time, from N=1000 to N=4000,
1527    with the old compiler:
1528    
1529    N
1530    1000   CPS 100 spill                           0.04u  0.00s  0.00g
1531           MLRISC ra                               0.06u  0.00s  0.05g
1532              (spills = 0 reloads = 0)
1533           TOTAL                                   0.63u  0.07s  0.21g
1534    
1535    1100   CPS 100 spill                           8.25u  0.32s  0.64g
1536           MLRISC ra                               5.68u  0.59s  3.93g
1537              (spills = 0 reloads = 0)
1538           TOTAL                                   14.71u  0.99s  4.81g
1539    
1540    1500   CPS 100 spill                           58.55u  2.34s  1.74g
1541           MLRISC ra                               5.54u  0.65s  3.91g
1542              (spills = 543 reloads = 1082)
1543           TOTAL                                   65.40u  3.13s  6.00g
1544    
1545    2000   CPS 100 spill                           126.69u  4.84s  3.08g
1546           MLRISC ra                               0.80u  0.10s  0.55g
1547              (spills = 42 reloads = 84)
1548           TOTAL                                   129.42u  5.10s  4.13g
1549    
1550    3000   CPS 100 spill                           675.59u  19.03s  11.64g
1551           MLRISC ra                               2.69u  0.27s  1.38g
1552              (spills = 62 reloads = 124)
1553           TOTAL                                   682.48u  19.61s  13.99g
1554    
1555    4000   CPS 100 spill                           2362.82u  56.28s  43.60g
1556           MLRISC ra                               4.96u  0.27s  2.72g
1557              (spills = 85 reloads = 170)
1558           TOTAL                                   2375.26u  57.21s  48.00g
1559    
1560    As you can see the old cps spill module suffers from some serious
1561    performance problem.  But since I cannot decipher the old code fully,
1562    instead of patching the problems up, I'm reimplementing it
1563    with a different algorithm.  The new code is more modular,
1564    smaller when compiled, and substantially faster
1565    (O(n log n) time and O(n) space).  Timing of the new spill module:
1566    
1567    4000  CPS 100 spill                           0.02u  0.00s  0.00g
1568          MLRISC ra                               0.25u  0.02s  0.15g
1569             (spills=1 reloads=3)
1570          TOTAL                                   7.74u  0.34s  1.62g
1571    
1572    Implementation details:
1573    
1574    As far as I can tell, the purpose of the CPS spill module is to make sure the
1575    number of live variables at any program point (the bandwidth)
1576    does not exceed a certain limit, which is determined by the
1577    size of the spill area.
1578    
1579    When the bandwidth is too large, we decrease the register pressure by
1580    packing live variables into spill records.  How we achieve this is
1581    completely different than what we did in the old code.
1582    
1583    First, there is something about the MLRiscGen code generator
1584    that we should be aware of:
1585    
1586    o MLRiscGen performs code motion!
1587    
1588       In particular, it will move floating point computations and
1589       address computations involving only the heap pointer to
1590       their use sites (if there is only a single use).
1591       What this means is that if we have a CPS record construction
1592       statement
1593    
1594           RECORD(k,vl,w,e)
1595    
1596       we should never count the new record address w as live if w
1597       has only one use (which is often the case).
1598    
1599       We should do something similar to floating point, but the transformation
1600       there is much more complex, so I won't deal with that.
1601    
1602    Secondly, there are now two new cps primops at our disposal:
1603    
1604     1. rawrecord of record_kind option
1605        This pure operator allocates some uninitialized storage from the heap.
1606        There are two forms:
1607    
1608         rawrecord NONE [INT n]  allocates a tagless record of length n
1609         rawrecord (SOME rk) [INT n] allocates a tagged record of length n
1610                                     and initializes the tag.
1611    
1612     2. rawupdate of cty
1613          rawupdate cty (v,i,x)
1614          Assigns to x to the ith component of record v.
1615          The storelist is not updated.
1616    
1617    We use these new primops for both spilling and increment record construction.
1618    
1619     1. Spilling.
1620    
1621        This is implemented with a linear scan algorithm (but generalized
1622        to trees).  The algorithm will create a single spill record at the
1623        beginning of the cps function and use rawupdate to spill to it,
1624        and SELECT or SELp to reload from it.  So both spills and reloads
1625        are fine-grain operations.  In contrast, in the old algorithm
1626        "spills" have to be bundled together in records.
1627    
1628        Ideally, we should sink the spill record construction to where
1629        it is needed.  We can even split the spill record into multiple ones
1630        at the places where they are needed.  But CPS is not a good
1631        representation for global code motion, so I'll keep it simple and
1632        am not attempting this.
1633    
1634     2. Incremental record construction (aka record splitting).
1635    
1636        Long records with many component values which are simulatenously live
1637        (recall that single use record addresses are not considered to
1638         be live) are constructed with rawrecord and rawupdate.
1639        We allocate space on the heap with rawrecord first, then gradually
1640        fill it in with rawupdate.  This is the technique suggested to me
1641        by Matthias.
1642    
1643        Some restrictions on when this is applicable:
1644        1. It is not a VECTOR record.  The code generator currently does not handle
1645           this case. VECTOR record uses double indirection like arrays.
1646        2. All the record component values are defined in the same "basic block"
1647           as the record constructor.  This is to prevent speculative
1648           record construction.
1649    
1650    ----------------------------------------------------------------------
1651    Name: Allen Leung
1652    Date: 2002/02/22 01:02:00 EST
1653    Tag: leunga-20020222-mlrisc-tools
1654    
1655    Minor bug fixes in the parser and rewriter
1656    
1657    ----------------------------------------------------------------------
1658    Name: Allen Leung
1659    Date: 2002/02/21 20:20:00 EST
1660    Tag: leunga-20020221-peephole
1661    
1662    Regenerated the peephole files.  Some contained typos in the specification
1663    and some didn't compile because of pretty printing bugs in the old version
1664    of 'nowhere'.
1665    
1666    ----------------------------------------------------------------------
1667    Name: Allen Leung
1668    Date: 2002/02/19 20:20:00 EST
1669    Tag: leunga-20020219-mlrisc-tools
1670    Description:
1671    
1672       Minor bug fixes to the mlrisc-tools library:
1673    
1674       1.  Fixed up parsing colon suffixed keywords
1675       2.  Added the ability to shut the error messages up
1676       3.  Reimplemented the pretty printer and fixed up/improved
1677           the pretty printing of handle and -> types.
1678       4.  Fixed up generation of literal symbols in the nowhere tool.
1679       5.  Added some SML keywords to to sml.sty
1680    
1681    ----------------------------------------------------------------------
1682    Name: Matthias Blume
1683    Date: 2002/02/19 16:20:00 EST
1684    Tag: blume-20020219-cmffi
1685    Description:
1686    
1687    A wild mix of changes, some minor, some major:
1688    
1689    * All C FFI-related libraries are now anchored under $c:
1690        $/c.cm      --> $c/c.cm
1691        $/c-int.cm  --> $c/internals/c-int.cm
1692        $/memory.cm --> $c/memory/memory.cm
1693    
1694    * "make" tool (in CM) now treats its argument pathname slightly
1695      differently:
1696        1. If the native expansion is an absolute name, then before invoking
1697           the "make" command on it, CM will apply OS.Path.mkRelative
1698           (with relativeTo = OS.FileSys.getDir()) to it.
1699        2. The argument will be passed through to subsequent phases of CM
1700           processing without "going native".  In particular, if the argument
1701           was an anchored path, then "make" will not lose track of that anchor.
1702    
1703    * Compiler backends now "know" their respective C calling conventions
1704      instead of having to be told about it by ml-nlffigen.  This relieves
1705      ml-nlffigen from one of its burdens.
1706    
1707    * The X86Backend has been split into X86CCallBackend and X86StdCallBackend.
1708    
1709    * Export C_DEBUG and C_Debug from $c/c.cm.
1710    
1711    * C type encoding in ml-nlffi-lib has been improved to model the conceptual
1712      subtyping relationship between incomplete pointers and their complete
1713      counterparts.  For this, ('t, 'c) ptr has been changed to 'o ptr --
1714      with the convention of instantiating 'o with ('t, 'c) obj whenever
1715      the pointer target type is complete.  In the incomplete case, 'o
1716      will be instantiated with some "'c iobj" -- a type obtained by
1717      using one of the functors PointerToIncompleteType or PointerToCompleteType.
1718    
1719      Operations that work on both incomplete and complete pointer types are
1720      typed as taking an 'o ptr while operations that require the target to
1721      be known are typed as taking some ('t, 'c) obj ptr.
1722    
1723      voidptr is now a bit "more concrete", namely "type voidptr = void ptr'"
1724      where void is an eqtype without any values.  This makes it possible
1725      to work on voidptr values using functions meant to operate on light
1726      incomplete pointers.
1727    
1728    * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has
1729      been vastly simplified.
1730    
1731    ----------------------------------------------------------------------
1732    Name: Matthias Blume
1733    Date: 2002/02/19 10:48:00 EST
1734    Tag: blume-20020219-pqfix
1735    Description:
1736    
1737    Applied Chris Okasaki's bug fix for priority queues.
1738    
1739    ----------------------------------------------------------------------
1740    Name: Matthias Blume
1741    Date: 2002/02/15 17:05:00
1742    Tag: Release_110_39
1743    Description:
1744    
1745    Last-minute retagging is becoming a tradition... :-(
1746    
1747    This is the working release 110.39.
1748    
1749    ----------------------------------------------------------------------
1750    Name: Matthias Blume
1751    Date: 2002/02/15 16:00:00 EST
1752    Tag: Release_110_39-orig
1753    Description:
1754    
1755    Working release 110.39.  New bootfiles.
1756    
1757    (Update: There was a small bug in the installer so it wouldn't work
1758    with all shells.  So I retagged. -Matthias)
1759    
1760    ----------------------------------------------------------------------
1761    Name: Matthias Blume
1762    Date: 2002/02/15 14:17:00 EST
1763    Tag: blume-20020215-showbindings
1764    Description:
1765    
1766    Added EnvRef.listBoundSymbols and CM.State.showBindings.  Especially
1767    the latter can be useful for exploring what bindings are available at
1768    the interactive prompt.  (The first function returns only the list
1769    of symbols that are really bound, the second prints those but also the
1770    ones that CM's autoloading mechanism knows about.)
1771    
1772    ----------------------------------------------------------------------
1773    Name: Matthias Blume
1774    Date: 2002/02/15 12:08:00 EST
1775    Tag: blume-20020215-iptrs
1776    Description:
1777    
1778    Two improvements to ml-nlffigen:
1779    
1780      1. Write files only if they do not exist or if their current contents
1781         do not coincide with what's being written.  (That is, avoid messing
1782         with the time stamps unless absolutely necessary.)
1783    
1784      2. Implement a "repository" mechanism for generated files related
1785         to "incomplete pointer types".   See the README file for details.
1786    
1787    ----------------------------------------------------------------------
1788    Name: Matthias Blume
1789    Date: 2002/02/14 11:50:00 EST
1790    Tag: blume-20020214-quote
1791    Description:
1792    
1793    Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm).  This is required
1794    because of the new and improved tag generation scheme.  (Thanks to Allen
1795    Leung for pointing it out.)
1796    
1797    ----------------------------------------------------------------------
1798    Name: Lal George
1799    Date: 2002/02/14 09:55:27 EST 2002
1800    Tag: george-20020214-isabelle-bug
1801    Description:
1802    
1803    Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation
1804    of Isabelle on the x86.
1805    
1806    From Allen:
1807    -----------
1808     I've found the problem:
1809    
1810         in ra-core.sml, I use the counter "blocked" to keep track of the
1811         true number of elements in the freeze queue.  When the counter goes
1812         to zero, I skip examining the queue.  But I've messed up the
1813         bookkeeping in combine():
1814    
1815             else ();
1816             case !ucol of
1817               PSEUDO => (if !cntv > 0 then
1818                     (if !cntu > 0 then blocked := !blocked - 1 else ();
1819                                        ^^^^^^^^^^^^^^^^^^^^^^^
1820                      moveu := mergeMoveList(!movev, !moveu)
1821                     )
1822                  else ();
1823    
1824         combine() is called to coalesce two nodes u and v.
1825         I think I was thinking that if the move counts of u and v are both
1826         greater than zero then after they are coalesced then one node is
1827         removed from the freeze queue.  Apparently I was thinking that
1828         both u and v are of low degree, but that's clearly not necessarily true.
1829    
1830    
1831    02/12/2002:
1832        Here's the patch.  HOL now compiles.
1833    
1834        I don't know how this impact on performance (compile
1835        time or runtime).  This bug caused the RA (especially on the x86)
1836        to go thru the potential spill phase when there are still nodes on the
1837        freeze queue.
1838    
1839    
1840    
1841    
1842    ----------------------------------------------------------------------
1843    Name: Matthias Blume
1844    Date: 2002/02/13 22:40:00 EST
1845    Tag: blume-20020213-fptr-rtti
1846    Description:
1847    
1848    Fixed a bug in ml-nlffigen that was introduced with one of the previous
1849    updates.
1850    
1851    ----------------------------------------------------------------------
1852    Name: Matthias Blume
1853    Date: 2002/02/13 16:41:00 EST
1854    Tag: blume-20020213-cmlpq
1855    Description:
1856    
1857    Added new priority queue export symbols (which have just been added to
1858    smlnj-lib.cm) to CML's version of smlnj-lib.cm.  (Otherwise CML would
1859    not compile and the installer would choke.)
1860    
1861    ----------------------------------------------------------------------
1862    Name: Matthias Blume
1863    Date: 2002/02/13 16:15:00 EST
1864    Tag: blume-20020213-various
1865    Description:
1866    
1867    1. More tweaks to ml-nlffigen:
1868    
1869       - better internal datastructures (resulting in slight speedup)
1870       - "-match" option requires exact match
1871       - "localized" gensym counters (untagged structs/unions nested within
1872         other structs/unions or within typedefs get a fresh counter; their
1873         tag will be prefixed by a concatenation of their parents' tags)
1874       - bug fixes (related to calculation of transitive closure of types
1875         to be included in the output)
1876    
1877    2. Minor Basis updates:
1878    
1879       - added implementations for List.collate and Option.app
1880    
1881    ----------------------------------------------------------------------
1882    Name: Matthias Blume
1883    Date: 2002/02/11 15:55:00 EST
1884    Tag: blume-20020211-gensym
1885    Description:
1886    
1887    Added a "-gensym" option to command line of ml-nlffigen.  This can be
1888    used to specify a "stem" -- a string that is inserted in all "gensym'd"
1889    names (ML structure names that correspond to unnamed C structs, unions,
1890    and enums), so that separate runs of ml-nlffigen do not clash.
1891    
1892    ----------------------------------------------------------------------
1893    Name: Matthias Blume
1894    Date: 2002/02/11 12:05:00 EST
1895    Tag: blume-20020211-gensml
1896    Description:
1897    
1898    A quick fix for a problem with GenSML (in the pgraph-util library):
1899    Make generation of toplevel "local" optional.  (Strictly speaking,
1900    signature definitions within "local" are not legal SML.)
1901    
1902    Other than that: updates to INSTALL and cm/TODO.
1903    
1904    ----------------------------------------------------------------------
1905    Name: Matthias Blume
1906    Date: 2002/02/08 15:00:00 EST
1907    Tag: blume-20020208-uniquepid
1908    Description:
1909    
1910    0. Version number has been bumped to 110.38.1.  NEW BOOTFILES!!!
1911    
1912    1. The installer (config/install.sh) has gotten smarter:
1913    
1914         - Configuration options are a bit easier to specify now
1915           (in config/targets).
1916         - Bug in recognizing .tar.bz2 files fixed.
1917         - Installer automatically resolves dependencies between
1918           configuration options (e.g., if you ask for eXene, you will
1919           also get cml -- regardless whether you asked for it or not).
1920         - Installer can run in "quieter mode" by setting the environment
1921           variable INSTALL_QUIETLY to "true".  "Quieter" does not mean
1922           "completely silent", though.
1923         - Build HashCons library as part of smlnj-lib.
1924    
1925    2. A new scheme for assigning persistent identifiers to compilation
1926       units (and, by extension, to types etc.) has been put into place.
1927       This fixes a long-standing bug where types and even dynamic values
1928       can get internally confused, thereby compromising type safety
1929       (abstraction) and dynamic correctness.  See
1930    
1931         http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz
1932    
1933       for an example of how things could go wrong until now.
1934    
1935       The downside of the new scheme is that pids are not quite as
1936       persistent as they used to be: CM will generate a fresh pid
1937       for every compilation unit that it thinks it sees for the first
1938       time.  That means that if you compile starting from a clean, fresh
1939       source tree at two different times, you end up with different
1940       binaries.
1941    
1942       Cutoff recompilation, however, has not been compromised because
1943       CM keeps pid information in special caches between runs.
1944    
1945    ----------------------------------------------------------------------
1946    Name: Lal George
1947    Date: 2002/02/07 15:34:13 EST 2002
1948    Tag: <none>
1949    Description:
1950    
1951    Compilers that generate assembly code may produce  global labels
1952    whose value is resolved at link time. The various peephole optimization
1953    modules did not take this in account.
1954    
1955    TODO. The Labels.addrOf function should really return an option
1956    type so that clients are forced to deal with this issue, rather
1957    than an exception being raised.
1958    
1959    ----------------------------------------------------------------------
1960    Name: Lal George
1961    Date: 2002/02/06 13:55:02 EST
1962    Tag: george-20020206-ra-breakup
1963    Description:
1964    
1965    1. A bug fix from Allen.
1966    
1967        A typo causes extra fstp %st(0)'s to be generated at compensation
1968        edges, which might cause stack underflow traps at runtime.  This
1969        occurs in fft where there are extraneous fstps right before the 'into'
1970        trap instruction (in this case they are harmless since none of the
1971        integers overflow.)
1972    
1973    2. Pulled out various utility modules that were embedded in the modules
1974       of the register allocator. I need these modules for other purposes, but
1975       they are not complete enough to put into a library (just yet).
1976    ----------------------------------------------------------------------
1977    Name: Matthias Blume
1978    Date: 2002/01/31 16:05:00 EST
1979    Tag: blume-20020131-sparc-ccalls
1980    Description:
1981    
1982    1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes)
1983       of extra stack space by mistake.  Fixed.
1984    
1985    2. Bug in logic of handling of command-line options in ml-nlffigen fixed.
1986    
1987    ----------------------------------------------------------------------
1988    Name: Allen Leung
1989    Date: 2002/01/30
1990    Tag: leunga-20020130-nowhere-bug-fix
1991    Description:
1992    
1993       MLRISC bug fixes:
1994       1. Fixed a bindings computation bug in the 'nowhere' program generator tool.
1995       2. MachineInt.fromString was negating its value.
1996    
1997    ----------------------------------------------------------------------
1998    Name: Matthias Blume
1999    Date: 2002/01/29
2000    Tag: blume-20020129-INSTALL
2001    Description:
2002    
2003    - Added somewhat detailed installation instructions (file INSTALL).
2004    - Fixed curl-detection bug in config/install.sh.
2005    - It is now possible to select the URL getter using the URLGETTER
2006      environment variable:
2007    
2008          not set / "unknown"      --> automatic detection (script tries wget,
2009                                       curl, and lynx)
2010          "wget" / "curl" / "lynx" --> use the specified program (script "knows"
2011                                       how to properly invoke them)
2012          other                    --> use $URLGETTER directly, it must take
2013                                       precisely two command-line arguments
2014                                       (source URL and destination file name)
2015    
2016    ----------------------------------------------------------------------
2017    Name: Matthias Blume
2018    Date: 2002/01/28
2019    Tag: blume-20020128-sparc-ccalls
2020    Description:
2021    
2022    - Fixed problem with calculation of "used" registers in sparc-c-calls.
2023    - Make use of the allocParam argument in sparc-c-calls.
2024    
2025    ----------------------------------------------------------------------
2026    Name: Matthias Blume
2027    Date: 2002/01/28
2028    Tag: blume-20020128-allocParam
2029    Description:
2030    
2031    John Reppy:  Changes c-calls API to accept client-callback for
2032    allocating extra stack space.
2033    me: Corresponding changes to mlriscGen (using a dummy argument that
2034        does not change the current behavior).
2035    
2036    ----------------------------------------------------------------------
2037    Name: Matthias Blume
2038    Date: 2002/01/28 12:00:00
2039    Tag: Release_110_38
2040    Description:
2041    
2042    This time for real!!!
2043    
2044    ----------------------------------------------------------------------
2045    Name: Matthias Blume
2046    Date: 2002/01/28 10:56:00 EST
2047    Tag: blume-20020128-retraction
2048    Description:
2049    
2050    0. Retracted earlier 110.38.  (The Release_110_38 tag has been replaced
2051       with blume-Release_110_38-retracted.)
2052    
2053    1. Fixed a problem with incorrect rounding modes in real64.sml.
2054       (Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.)
2055    
2056    2. A bug in ml-nlffigen related to the handling of unnamed structs, unions,
2057       and enums fixed.  The naming of corresponding ML identifiers should
2058       now be consistent again.
2059    
2060    ----------------------------------------------------------------------
2061    Name: Allen Leung
2062    Date: 2002/01/27
2063    Tag: leunga-20020127-nowhere
2064    Description:
2065    
2066       Added a target called nowhere in the configuration scripts.
2067       Enabling this will build the MLRISC 'nowhere' tool (for translating
2068       programs with where-clauses into legal SML code) during installation.
2069    
2070    ----------------------------------------------------------------------
2071    Name: Matthias Blume
2072    Date: 2002/01/25 21:27:00 EST
2073    Tag: blume-Release_110_38-retracted
2074    Description:
2075    
2076    Call it a (working) release!  Version is 110.38. Bootfiles are ready.
2077    
2078    README will be added later.
2079    
2080    !!! NOTE:  Re-tagged as blume-Release_110_38-retracted. Original tag
2081    (Release_110_38) removed.  Reason: Last-minute bug fixes.
2082    
2083    ----------------------------------------------------------------------
2084    Name: Matthias Blume
2085    Date: 2002/01/25
2086    Tag: blume-20020125-ffi
2087    Description:
2088    
2089    A large number of tweaks and improvements to ml-nlffi-lib and
2090    ml-nlffigen:
2091    
2092       - ML represenation types have been streamlined
2093       - getter and setter functions work with concrete values, not abstract
2094         ones where possible
2095       - ml-nlffigen command line more flexible (see README file there)
2096       - some bugs have been fixed (hopefully)
2097    
2098    ----------------------------------------------------------------------
2099    Name: Lal George
2100    Date: 2002/01/24
2101    Tag: george-20020124-risc-ra-interface
2102    Description:
2103    
2104       There is a dramatic simplification in the interface to the
2105       register allocator for RISC architectures as a result of making
2106       parallel copy instructions explicit.
2107    
2108    ----------------------------------------------------------------------
2109    Name: Matthias Blume
2110    Date: 2002/01/22
2111    Tag: blume-20020122-x86-ccalls
2112    Description:
2113    
2114    Bug fix for c-calls on x86 (having to do with how char- and
2115    short-arguments are being handled).
2116    
2117    ----------------------------------------------------------------------
2118    Name: Matthias Blume
2119    Date: 2002/01/21
2120    Tag: blume-20020121-ff
2121    Description:
2122    
2123    Another day of fiddling with the FFI...
2124    
2125    1. Bug fix/workaround:  CKIT does not complain about negative array
2126       dimensions, so ml-nlffigen has to guard itself against this possibility.
2127       (Otherwise a negative dimension would send it into an infinite loop.)
2128    
2129    2. Some of the abstract types (light objects, light pointers, most "base"
2130       types) in structure C are now eqtypes.
2131    
2132    3. Added constructors and test functions for NULL function pointers.
2133    
2134    ----------------------------------------------------------------------
2135    Name: Matthias Blume
2136    Date: 2002/01/18
2137    Tag: blume-20020118-ready-for-new-release
2138    Description:
2139    
2140    Made config/srcarchiveurl point to a new place.  (Will provide boot
2141    files shortly.)
2142    
2143    Maybe we christen this to be 110.38?
2144    
2145    ----------------------------------------------------------------------
2146    Name: Matthias Blume
2147    Date: 2002/01/18
2148    Tag: blume-20020118-more-ffifiddle
2149    Description:
2150    
2151    Today's FFI fiddling:
2152    
2153      - Provided a structure CGetSet with "convenient" versions of C.Get.* and
2154        C.Set.* that use concrete (MLRep.*) arguments and results instead
2155        of abstract ones.
2156    
2157      - Provided word-style bit operations etc. for "int" representation
2158        types in MLRep.S<Foo>Bitops where <Foo> ranges over Char, Int, Short,
2159        and Long.
2160    
2161    ----------------------------------------------------------------------
2162    Name: Matthias Blume
2163    Date: 2002/01/18
2164    Tag: blume-20020118-use-x86-fp
2165    Description:
2166    
2167    Now that x86-fast-fp seems to be working, I turned it back on again
2168    by default.  (Seems to work fine now, even with the FFI.)
2169    
2170    Other than that, I added some documentation about the FFI to
2171    src/ml-nlffigen/README and updated the FFI test examples in
2172    src/ml-nlffi-lib/Tests/*.
2173    
2174    ----------------------------------------------------------------------
2175    Name: Allen Leung
2176    Date: 2002/01/17
2177    Tag: leunga-20020117-x86-fast-fp-call
2178    Description:
2179    
2180       1. Fixed a problem with handling return fp values when x86's fast fp
2181          mode is turned on.
2182    
2183       2. Minor pretty printing fix for cellset.  Print %st(0) as %st(0) instead
2184          of %f32.
2185    
2186       3. Added a constructor INT32lit to the ast of MLRISC tools.
2187    
2188    ----------------------------------------------------------------------
2189    Name: Matthias Blume
2190    Date: 2002/01/16
2191    Tag: blume-20020116-ffifiddle
2192    Description:
2193    
2194    More fiddling with the FFI interface:
2195    
2196     - Make constness 'c instead of rw wherever possible.  This eliminates
2197       the need for certain explicit coercions.  (However, due to ML's
2198       value polymorphism, there will still be many cases where explicit
2199       coercions are necessary.  Phantom types are not the whole answer
2200       to modeling a subtyping relationship in ML.)
2201    
2202     - ro/rw coersions for pointers added.  (Avoids the detour through */&.)
2203    
2204     - "printf" test example added to src/ml-nlffi-lib/Tests.  (Demonstrates
2205       clumsy workaround for varargs problem.)
2206    
2207    ----------------------------------------------------------------------
2208    Name: Lal George
2209    Date: 2002/01/15
2210    Tag: <none>
2211    Description:
2212    
2213    1. Since COPY instructions are no longer native to the architecture,
2214       a generic functor can be used to implement the expandCopies function.
2215    
2216    2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a
2217       TEXT segment.
2218    
2219    ----------------------------------------------------------------------
2220    Name: Matthias Blume
2221    Date: 2002/01/15
2222    Tag: blume-20020115-ffiupdates
2223    Description:
2224    
2225    1. Fix for bug resulting in single-precision float values being returned
2226       incorrectly from FFI calls.
2227    
2228    2. Small modifications to C FFI API:
2229    
2230        - memory-allocation routines return straight objects (no options)
2231          and raise an exception in out-of-memory situations
2232        - unsafe extensions to cast between function pointers and pointers
2233          from/to ints
2234        - added structure C_Debug as an alternative to structure C where
2235          pointer-dereferencing (|*| and |*!) always check for null-pointers
2236        - added open_lib' to DynLinkage;  open_lib' works like open_lib
2237          but also takes a (possibly empty) list of existing library handles
2238          that the current library depends on
2239    
2240    ----------------------------------------------------------------------
2241    Name: Matthias Blume
2242    Date: 2002/01/10
2243    Tag: blume-20020110-newffigen
2244    Description:
2245    
2246    1. Updates to portable graph code.
2247    
2248    2. Major update to ml-nlffigen and ml-nlffi-lib.  Things are much
2249       more scalable now so that even huge interfaces such as the one
2250       for GTK compile in finite time and space. :-)
2251       See src/ml-nlffigen/README for details on what's new.
2252    
2253    ----------------------------------------------------------------------
2254    Name: Lal George
2255    Date: 2001/01/09 14:31:35 EST 2002
2256    Tag: george-20011206-rm-native-copy
2257    Description:
2258    
2259            Removed the native COPY and FCOPY instructions
2260            from all the architectures and replaced it with the
2261            explicit COPY instruction from the previous commit.
2262    
2263            It is now possible to simplify many of the optimizations
2264            modules that manipulate copies. This has not been
2265            done in this change.
2266    
2267    ----------------------------------------------------------------------
2268    Name: Lal George
2269    Date: 2001/12/06 16:50:13 EST 2001
2270    Tag: george-20011206-mlrisc-instruction
2271    Description:
2272    
2273    Changed the representation of instructions from being fully abstract
2274    to being partially concrete. That is to say:
2275    
2276      from
2277            type instruction
2278    
2279      to
2280            type instr                              (* machine instruction *)
2281    
2282            datatype instruction =
2283                LIVE of {regs: C.cellset, spilled: C.cellset}
2284              | KILL of {regs: C.cellset, spilled: C.cellset}
2285              | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
2286              | ANNOTATION of {i: instruction, a: Annotations.annotation}
2287              | INSTR of instr
2288    
2289    This makes the handling of certain special instructions that appear on
2290    all architectures easier and uniform.
2291    
2292    LIVE and KILL say that a list of registers are live or killed at the
2293    program point where they appear. No spill code is generated when an
2294    element of the 'regs' field is spilled, but the register is moved to
2295    the 'spilled' (which is present, more for debugging than anything else).
2296    
2297    LIVE replaces the (now deprecated) DEFFREG instruction on the alpha.
2298    We used to generate:
2299    
2300            DEFFREG f1
2301            f1 := f2 + f3
2302            trapb
2303    
2304    but now generate:
2305    
2306            f1 := f2 + f3
2307            trapb
2308            LIVE {regs=[f1,f2,f3], spilled=[]}
2309    
2310    Furthermore, the DEFFREG (hack) required that all floating point instruction
2311    use all registers mentioned in the instruction. Therefore f1 := f2 + f3,
2312    defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting
2313    in a cleaner alpha implementation. (Hopefully, intel will not get rid of
2314    this architecture).
2315    
2316    COPYXXX is intended to replace the parallel COPY and FCOPY  available on
2317    all the architectures. This will result in further simplification of the
2318    register allocator that must be aware of them for coalescing purposes, and
2319    will also simplify certain aspects of the machine description that provides
2320    callbacks related to parallel copies.
2321    
2322    ANNOTATION should be obvious, and now INSTR represents the honest to God
2323    machine instruction set!
2324    
2325    The <arch>/instructions/<arch>Instr.sml files define certain utility
2326    functions for making porting easier -- essentially converting upper case
2327    to lower case. All machine instructions (of type instr) are in upper case,
2328    and the lower case form generates an MLRISC instruction. For example on
2329    the alpha we have:
2330    
2331      datatype instr =
2332         LDA of {r:cell, b:cell, d:operand}
2333       | ...
2334    
2335      val lda : {r:cell, b:cell, d:operand} -> instruction
2336        ...
2337    
2338    where lda is just (INSTR o LDA), etc.
2339    
2340    ----------------------------------------------------------------------
2341    Name: Matthias Blume
2342    Date: 2001/11/22 21:40:00 EST
2343    Tag: Release_110_37
2344    Description:
2345    
2346    Release 110.37.  This time for real.
2347    
2348    ----------------------------------------------------------------------
2349    Name: Matthias Blume
2350    Date: 2001/11/21 16:35:00 EST
2351    Tag: blume-20011121-foot-in-mouth
2352    Description:
2353    
2354    Removed the "Release_110_37" tag because of a serious bug.
2355    This will be re-tagged once the bug is fixed.
2356    
2357    ----------------------------------------------------------------------
2358    Name: Matthias Blume
2359    Date: 2001/11/21 16:14:00 EST
2360    Tag: blume-20011121-forgottenfile
2361    Description:
2362    
2363    Forgot to add a file.  (Just a .tex-file -- part of
2364    the CM manual source.)
2365    
2366    ----------------------------------------------------------------------
2367    Name: Matthias Blume
2368    Date: 2001/11/21 16:10:00 EST
2369    Tag: blume-20011121-invalid_110_37
2370    Description:
2371    
2372    Note: I removed the original tag "Release_110_37" from this commit
2373          because we found a serious bug in all non-x86 backends.
2374          - Matthias
2375    
2376    1. Modifications to the SML/NJ code generator and to the runtime system
2377       so that code object name strings are directly inserted into code
2378       objects at code generation time.  The only business the runtime system
2379       has with this is now to read the name strings on occasions.
2380       (The encoding of the name string has also changed somewhat.)
2381    
2382    2. CM now implements a simple "set calculus" for specifying export lists.
2383       In particular, it is now possible to refer to the export lists of
2384       other libraries/groups/sources and form unions as well as differences.
2385       See the latest CM manual for details.
2386    
2387    3. An separate notion of "proxy" libraries has again be eliminated from
2388       CM's model.  (Proxy libraries are now simply a special case of using
2389       the export list calculus.)
2390    
2391    4. Some of the existing libraries now take advantage of the new set
2392       calculus.
2393       (Notice that not all libraries have been converted because some
2394       of the existing .cm-files are supposed to be backward compatible
2395       with 110.0.x.)
2396    
2397    5. Some cleanup in stand-alone programs.  (Don't use "exnMessage" -- use
2398       "General.exnMessage"!  The former relies on a certain hook to be
2399       initialized, and that often does not happen in the stand-alone case.)
2400    
2401    ----------------------------------------------------------------------
2402    Name: Lal George
2403    Date: 2001/11/21  13:56:18 EST
2404    Tag: george-2001121-pseudo-ops
2405    Description:
2406    
2407      Implemented a complete redesign of MLRISC pseudo-ops. Now there
2408      ought to never be any question of incompatabilities with
2409      pseudo-op syntax expected by host assemblers.
2410    
2411      For now, only modules supporting GAS syntax are implemented
2412      but more should follow, such as MASM, and vendor assembler
2413      syntax, e.g. IBM as, Sun as, etc.
2414    
2415    ----------------------------------------------------------------------
2416    Name: Matthias Blume
2417    Date: 2001/11/14 11:52:00 EST
2418    Tag: blume-20011114-srcname
2419    Description:
2420    
2421    1. Routed the name of the current source file to mlriscgen where it
2422       should be directly emitted into the code object.  (This last part
2423       is yet to be done.)
2424    
2425    2. Some cleanup of the pgraph code to make it match the proposal that
2426       I put out the other day.  (The proposal notwithstanding, things are
2427       still in flux here.)
2428    
2429    ----------------------------------------------------------------------
2430    Name: Lal George
2431    Date: 2001/11/14 09:44:04 EST
2432    Tag:
2433    Description:
2434    
2435      Fix for a backpatching bug reported by Allen.
2436    
2437      Because the boundary between short and long span-dependent
2438      instructions is +/- 128, there are an astounding number of
2439      span-dependent instructions whose size is over estimated.
2440    
2441      Allen came up with the idea of letting the size of span
2442      dependent instructions be non-monotonic, for a maxIter
2443      number of times, after which the size must be monotonically
2444      increasing.
2445    
2446      This table shows the number of span-dependent instructions
2447      whose size was over-estimated as a function of maxIter, for the
2448      file Parse/parse/ml.grm.sml:
2449    
2450         maxIter            # of instructions:
2451            10                      687
2452            20                      438
2453            30                      198
2454            40                        0
2455    
2456      In compiling the compiler, there is no significant difference in
2457      compilation speed between maxIter=10 and maxIter=40. Actually,
2458      my measurements showed that maxIter=40 was a tad faster than
2459      maxIter=10! Also 96% of the  files in the compiler reach a fix
2460      point within 13 iterations, so fixing maxIter at 40, while high,
2461      is okay.
2462    
2463    ----------------------------------------------------------------------
2464    Name: Matthias Blume
2465    Date: 2001/10/31 15:25:00 EST
2466    Tag: blume-20011031-pgraph
2467    Description:
2468    
2469    CKIT:
2470    * Changed the "Function" constructor of type Ast.ctype to carry optional
2471      argument identifiers.
2472    * Changed the return type of TypeUtil.getFunction accordingly.
2473    * Type equality ignores the argument names.
2474    * TypeUtil.composite tries to preserve argument names but gives up quickly
2475      if there is a mismatch.
2476    
2477    installation script:
2478    * attempts to use "curl" if available (unless "wget" is available as well)
2479    
2480    CM:
2481    * has an experimental implementation of "portable graphs" which I will
2482      soon propose as an implementation-independent library format
2483    * there are also new libraries $/pgraph.cm and $/pgraph-util.cm
2484    
2485    NLFFI-LIB:
2486    * some cleanup (all cosmetic)
2487    
2488    NLFFIGEN:
2489    * temporarily disabled the mechanism that suppresses ML output for
2490      C definitions whose identifiers start with an underscore character
2491    * generate val bindings for enum constants
2492    * user can request that only one style (light or heavy) is being used;
2493      default is to use both (command-line arguments: -heavy and -light)
2494    * fixed bug in handling of function types involving incomplete pointers
2495    * generate ML entry points that take record arguments (i.e., using
2496      named arguments) for C functions that have a prototype with named
2497      arguments
2498      (see changes to CKIT)
2499    
2500    ----------------------------------------------------------------------
2501    Name: Allen Leung
2502    Date: 2001/10/27 20:34:00 EDT
2503    Tag: leunga-20011027-x86-fast-fp-call
2504    Description:
2505    
2506       Fixed the bug described in blume-20010920-slowfp.
2507    
2508       The fix involves
2509          1. generating FCOPYs in FSTP in ia32-svid
2510          2. marking a CALL with the appropriate annotation
2511    
2512    ----------------------------------------------------------------------
2513    Name: Matthias Blume
2514    Date: 2001/10/16 11:32:00 EDT
2515    Tag: blume-20011016-netbsd
2516    Description:
2517    
2518    Underscore patch from Chris Richards (fixing problem with compiling
2519    runtime system under recent NetBSD).
2520    
2521    ----------------------------------------------------------------------
2522    Name: Allen Leung
2523    Date: 2001/10/12 17:18:32 EDT 2001
2524    Tag: leung-20011012-x86-printflowgraph
2525    Description:
2526    
2527    X86RA now uses a valid (instead of dummy) PrintFlowgraph module.
2528    
2529    ----------------------------------------------------------------------
2530    Name: Lal George
2531    Date: 2001/10/11 23:51:34 EDT
2532    Tag: george-20011011-too-many-instrs
2533    Description:
2534    
2535    The representation of a program point never expected to see more
2536    than 65536 instructions in a basic block!
2537    
2538    ----------------------------------------------------------------------
2539    Name: Lal George
2540    Date: 2001/10/09 09:41:37 EDT
2541    Tag: george-20011008-mlrisc-labels
2542    Description:
2543    
2544    Changed the machine description files to support printing of
2545    local and global labels in assembly code, based on host assembler
2546    conventions.
2547    
2548    ----------------------------------------------------------------------
2549    Name: Matthias Blume
2550    Date: 2001/09/25 15:25:00 EDT
2551    Tag: blume-20010925-exninfo
2552    Description:
2553    
2554    I provided a non-hook implementation of exnName (at the toplevel) and
2555    made the "dummy" implementation of exnMessage (at the toplevel) more
2556    useful: if nothing gets "hooked in", then at least you are going to
2557    see the exception name and a message indicating why you don't see more.
2558    
2559    [For the time being, programs that need exnMessage and want to use
2560    ml-build should either use General.exnMessage (strongly recommended) or
2561    refer to structure General at some other point so that CM sees a
2562    static dependency.]
2563    
2564    [Similar remarks go for "print" and "use":  If you want to use their
2565    functionality in stand-alone programs generated by ml-build, then use
2566    TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).]
2567    
2568    ----------------------------------------------------------------------
2569    Name: Matthias Blume
2570    Date: 2001/09/20 17:28:00 EDT
2571    Tag: blume-20010920-slowfp
2572    Description:
2573    
2574    Allen says that x86-fast-fp is not safe yet, so I turned it off again...
2575    
2576    ----------------------------------------------------------------------
2577    Name: Matthias Blume
2578    Date: 2001/09/20 17:20:00 EDT
2579    Tag: blume-20010920-canonicalpaths
2580    Description:
2581    
2582    0. Updated the BOOT file (something that I forgot to do earlier).
2583    
2584    1. Small internal change to CM so that it avoids "/../" in filenames
2585       as much as possible (but only where it is safe).
2586    
2587    2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so
2588       that arguments that contain delimiters are passed through correctly.
2589       This change also means that all "special" arguments of the form
2590       @SMLxxx... must come first.
2591    
2592    3. Changed install script to put relative anchor names for tool commands
2593       into pathconfig.
2594    
2595    ----------------------------------------------------------------------
2596    Name: Matthias Blume
2597    Date: 2001/09/18 15:35:00 EDT
2598    Tag: blume-20010918-readme11036
2599    Description:
2600    
2601    Added README files.
2602    
2603    ----------------------------------------------------------------------
2604    Name: Matthias Blume
2605    Date: 2001/09/18 11:45:00 EDT
2606    Tag: Release_110_36 (retag)
2607    Description:
2608    
2609    Fixed mistake in config/preloads. Retagged as 110.36.
2610    
2611    ----------------------------------------------------------------------
2612    Name: Matthias Blume
2613    Date: 2001/09/18 09:40:00 EDT
2614    Tag: Release_110_36_orig (tag changed)
2615    Description:
2616    
2617    New version (110.36).  New bootfiles.
2618    
2619    ----------------------------------------------------------------------
2620    Name: Matthias Blume
2621    Date: 2001/09/14 16:15:00 EDT
2622    Tag: blume-20010914-x86fastfp
2623    Description:
2624    
2625    John committed some changes that Allen made, in particular a (hopefully)
2626    correctly working version of the x86-fp module.
2627    
2628    I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp"
2629    flag to "true".  Everything seems to compile to a fixpoint ok, and
2630    "mandelbrot" speeds up by about 15%.
2631    
2632    ----------------------------------------------------------------------
2633    Name: Matthias Blume
2634    Date: 2001/09/13 11:20:00 EDT
2635    Tag: blume-20010913-minimal
2636    Description:
2637    
2638    1. Stefan Monnier's patch to fix a miscompilation problem that
2639       was brought to light by John Reppy's work on Moby.
2640    
2641    2. Implemented a minimal "structure Compiler" that contains just
2642       "version" and "architecture".  The minimal version will be
2643       available when the full version is not.  This is for backward-
2644       compatibility with code that wants to test Compiler.version.
2645    
2646    ----------------------------------------------------------------------
2647    Name: Matthias Blume
2648    Date: 2001/08/28 14:03:00 EDT
2649    Tag: blume-20010828-ml-lex
2650    Description:
2651    
2652    Fix for bug 1581, received from Neophytos Michael.
2653    
2654    ----------------------------------------------------------------------
2655    Name: Matthias Blume
2656    Date: 2001/08/27 11:20:00 EDT
2657    Tag: blume-20010827-readme11035
2658    Description:
2659    
2660    Fleshed out the README file for 110.35.
2661    
2662    ----------------------------------------------------------------------
2663    Name: Matthias Blume
2664    Date: 2001/08/24 17:10:00 EDT
2665    Tag: Release_110_35
2666    Description:
2667    
2668    New version number (110.35).  New bootfiles.
2669    
2670    ----------------------------------------------------------------------
2671    Name: Lal George
2672    Date: 2001/08/24 13:47:18 EDT 2001
2673    Tag: george-20010824-MLRISC-graphs
2674    Description:
2675    
2676     removed clusters from MLRISC completely and replaced with graphs.
2677    
2678    ----------------------------------------------------------------------
2679    Name: Matthias Blume
2680    Date: 2001/08/23 17:50:00 EDT
2681    Tag: blume-20010823-toplevel
2682    Description:
2683    
2684    - some reorganization of the code that implements various kinds of
2685      environments in the compiler (static, dynamic, symbolic, combined)
2686    - re-implemented the EnvRef module so that evalStream works properly
2687      (if the stream contains references to "use", "CM.make", etc.)
2688    - cleaned up evalloop.sml and interact.sml (but they need more cleaning)
2689    
2690    ----------------------------------------------------------------------
2691    Name: Matthias Blume
2692    Date: 2001/08/20 15:50 EDT
2693    Tag: blume20010820-slipup
2694    Description:
2695    
2696    I forgot to commit a few files.  Here they are...
2697    
2698    ----------------------------------------------------------------------
2699    Name: Matthias Blume
2700    Date: 2001/08/20 15:35:00 EDT
2701    Tag: blume-20010820-debugprof
2702    Description:
2703    
2704    !!!! NEW BOOTFILES !!!!
2705    
2706    This is another round of reorganizing the compiler sources.  This
2707    time the main goal was to factor out all the "instrumentation"
2708    passes (for profiling and backtracing) into their own library.
2709    The difficulty was to do it in such a way that it does not depend
2710    on elaborate.cm but only on elabdata.cm.
2711    
2712    Therefore there have been further changes to both elaborate.cm and
2713    elabdata.cm -- more "generic" things have been moved from the former
2714    to the latter.  As a result, I was forced to split the assignment
2715    of numbers indicating "primtyc"s into two portions: SML-generic and
2716    SML/NJ-specific.  Since it would have been awkward to maintain,
2717    I bit the bullet and actually _changed_ the mapping between these
2718    numbers and primtycs.  The bottom line of this is that you need
2719    a new set of bin- and bootfiles.
2720    
2721    I have built new bootfiles for all architectures, so doing a fresh
2722    checkout and config/install.sh should be all you need.
2723    
2724    The newly created library's name is
2725    
2726        $smlnj/viscomp/debugprof.cm
2727    
2728    and its sources live under
2729    
2730        src/compiler/DebugProf
2731    
2732    ----------------------------------------------------------------------
2733    Name: Matthias Blume
2734    Date: 2001/08/15 17:15:00 EDT
2735    Tag: blume-20010815-compreorg
2736    Description:
2737    
2738    This is a first cut at reorganizing the CM libraries that make up the
2739    core of the compiler.  The idea is to separate out pieces that could
2740    be used independently by tools, e.g., the parser, the typechecker, etc.
2741    
2742    The current status is a step in this direction, but it is not quite
2743    satisfactory yet.  Expect more changes in the future.
2744    
2745    Here is the current (new) organization...
2746    
2747        What used to be $smlnj/viscomp/core.cm is now divided into
2748        six CM libraries:
2749    
2750             $smlnj/viscomp/basics.cm
2751                           /parser.cm
2752                           /elabdata.cm
2753                           /elaborate.cm
2754                           /execute.cm
2755                           /core.cm
2756    
2757        The CM files for these libraries live under src/system/smlnj/viscomp.
2758        All these libraries are proxy libraries that contain precisely
2759        one CM library component.  Here are the locations of the components
2760        (all within the src/compiler tree):
2761    
2762             Basics/basics.cm
2763             Parse/parser.cm
2764             ElabData/elabdata.cm
2765             Elaborator/elaborate.cm
2766             Execution/execute.cm
2767             core.cm
2768    
2769         [This organization is the same that has been used already
2770         for a while for the architecture-specific parts of the visible
2771         compiler and for the old version of core.cm.]
2772    
2773         As you will notice, many source files have been moved from their
2774         respective original locations to a new home in one of the above
2775         subtrees.
2776    
2777         The division of labor between the new libraries is the following:
2778    
2779             basics.cm:
2780                - Simple, basic definitions that pertain to many (or all) of
2781                  the other libraries.
2782             parser.cm:
2783                - The SML parser, producing output of type Ast.dec.
2784                - The type family for Ast is also defined and exported here.
2785             elabdata.cm:
2786                - The datatypes that describe input and output of the elaborator.
2787                  This includes types, absyn, and static environments.
2788             elaborator.cm:
2789                - The SML/NJ type checker and elaborator.
2790                  This maps an Ast.dec (with a given static environment) to
2791                  an Absyn.dec (with a new static environment).
2792                - This libraries implements certain modules that used to be
2793                  structures as functors (to remove dependencies on FLINT).
2794             execute.cm:
2795                - Everything having to do with executing binary code objects.
2796                - Dynamic environments.
2797             core.cm:
2798                - SML/NJ-specific instantiations of the elaborator and MLRISC.
2799                - Top-level modules.
2800                - FLINT (this should eventually become its own library)
2801    
2802    Notes:
2803    
2804    I am not 100% happy with the way I separated the elaborator (and its
2805    data structures) from FLINT.  Two instances of the same problem:
2806    
2807        1. Data structures contain certain fields that carry FLINT-specific
2808           information.  I hacked around this using exn and the property list
2809           module from smlnj-lib.  But the fact that there are middle-end
2810           specific fields around at all is a bit annoying.
2811    
2812        2. The elaborator calculates certain FLINT-related information.  I tried
2813           to make this as abstract as I could using functorization, but, again,
2814           the fact that the elaborator has to perform calculations on behalf
2815           of the middle-end at all is not nice.
2816    
2817        3. Having to used exn and property lists is unfortunate because it
2818           weakens type checking.  The other alternative (parameterizing
2819           nearly *everything*) is not appealing, though.
2820    
2821    I removed the "rebinding =" warning hack because due to the new organization
2822    it was awkward to maintain it.  As a result, the compiler now issues some of
2823    these warnings when compiling init.cmi during bootstrap compilation. On
2824    the plus side, you also get a warning when you do, for example:
2825       val op = = Int32.+
2826    which was not the case up to now.
2827    
2828    I placed "assign" and "deref" into the _Core structure so that the
2829    code that deals with the "lazy" keyword can find them there.  This
2830    removes the need for having access to the primitive environment
2831    during elaboration.
2832    
2833    ----------------------------------------------------------------------
2834    Name: Matthias Blume
2835    Date: 2001/08/13
2836    Tag: blume-20010813-closures
2837    Description:
2838    
2839    This fix was sent to us by Zhong Shao.  It is supposed to improve the
2840    performance of certain loops by avoiding needless closure allocation.
2841    
2842    ----------------------------------------------------------------------
2843    Name: Lal George
2844    Date: 2001/07/31 10:03:23 EDT 2001
2845    Tag: george-20010731-x86-fmalloc
2846    Description: Fixed bug in x86 calls
2847    
2848        There was a bug where call instructions would mysteriously
2849        vanish. The call instruction had to be one that returned
2850        a floating point value.
2851    
2852    ----------------------------------------------------------------------
2853    Name: Lal George
2854    Date: 2001/07/19 16:36:29 EDT 2001
2855    Tag: george-20010719-simple-cells
2856    Description:
2857    
2858    I have dramatically simplified the interface for CELLS in MLRISC.
2859    
2860    In summary, the cells interface is broken up into three parts:
2861    
2862      1. CellsBasis : CELLS_BASIS
2863    
2864            CellsBasis is a top level structure and common for all
2865            architectures.  it contains the definitions of basic datatypes
2866            and utility  functions over these types.
2867    
2868      2. functor Cells() : CELLS
2869    
2870            Cells generates an interface for CELLS that incorporates the
2871            specific resources on the target architecture, such as the
2872            presence of special register classes, their number and size,
2873            and various useful substructures.
2874    
2875      3. <ARCH>CELLS
2876    
2877            e.g. SparcCells: SPARCCELLS
2878    
2879            <ARCH>CELLS usually contains additional bindings for special
2880            registers  on the architecture, such as:
2881    
2882                    val r0 : cell           (* register zero *)
2883                    val y : cell            (* Y register *)
2884                    val psr : cell          (* processor status register *)
2885                    ...
2886    
2887            The structure returned by applying the Cells functor is opened
2888            in this interface.
2889    
2890    The main implication of all this is that the datatypes for cells is
2891    split between CellsBasis and CELLS -- a fairly simple change for user
2892    code.
2893    
2894    In the old scheme the CELLS interface had a definitional binding of
2895    the form:
2896    
2897            signature CELLS = sig
2898    
2899               structure CellsBasis = CellsBasis
2900    
2901               ...
2902    
2903            end
2904    
2905    With all the sharing constraints that goes on in MLRISC, this old
2906    design  quickly leads to errors such as:
2907    
2908            "structure definition spec inside of sharing ... "
2909    
2910    
2911    and appears to require an unacceptable amount of sharing and where
2912    constraint hackery.
2913    
2914    I think this error message (the interaction of definitional specs and
2915    sharing) requires more explanation on our web page.
2916    
2917    ----------------------------------------------------------------------
2918    Name: Matthias Blume
2919    Date: 2001/07/19 15:00:00 EDT
2920    Tag: blume-20010719-libreorg
2921    Description:
2922    
2923    This update puts together a fairly extensive but straightforward change
2924    to the way the libraries that implement the interactive system are
2925    organized:
2926    
2927       The biggest change is the elimination of structure Compiler.  As a
2928       replacement for this structure, there is now a CM library
2929       (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm)
2930       that exports all the substructures of the original structure Compiler
2931       directly.  So instead of saying Compiler.Foo.bar one now simply
2932       says Foo.bar.  (The CM libraries actually export a collection of
2933       structures that is richer than the collection of substructures of
2934       structure Compiler.)
2935    
2936       To make the transition smooth, there is a separate library called
2937       $smlnj/compiler/compiler.cm which puts together and exports the
2938       original structure Compiler (or at least something very close to it).
2939    
2940       There are five members of the original structure Compiler
2941       that are not exported directly but which instead became members
2942       of a new structure Backend (described by signature BACKEND).  These are:
2943       structure Profile (: PROFILE), structure Compile (: COMPILE), structure
2944       Interact (: INTERACT), structure Machine (: MACHINE), and val
2945       architecture (: string).
2946    
2947       Structure Compiler.Version has become structure CompilerVersion.
2948    
2949       Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided
2950       by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc,
2951       or x86, respectively.
2952       Each of these exports the same frontend structures that
2953       $smlnj/compiler.cm exports.  But they do not have a structure Backend
2954       and instead export some structure <Arch>Backend where <Arch> is Alpha32,
2955       Hppa, PPC, Sparc, or X86, respectively.
2956    
2957       Library $smlnj/compiler/all.cm exports the union of the exports of
2958       $smlnj/compiler/<arch>.cm
2959    
2960       There are no structures <Arch>Compiler anymore, use
2961       $smlnj/compiler/<arch>.cm instead.
2962    
2963       Library host-compiler-0.cm is gone.  Instead, the internal library
2964       that instantiates CM is now called cm0.cm.  Selection of the host
2965       compiler (backend) is no longer done here but. (Responsibility for it
2966       now lies with $smlnj/compiler/current.cm.  This seems to be more
2967       logical.)
2968    
2969       Many individual files have been moved or renamed.  Some files have
2970       been split into multiple files, and some "dead" files have been deleted.
2971    
2972    Aside from these changes to library organization, there are also changes
2973    to the way the code itself is organized:
2974    
2975       Structure Binfile has been re-implemented in such a way that it no
2976       longer needs any knowledge of the compiler.  It exclusively deals
2977       with the details of binfile layout.  It no longer invokes the
2978       compiler (for the purpose of creating new prospective binfile
2979       content), and it no longer has any knowledge of how to interpret
2980       pickles.
2981    
2982       Structure Compile (: COMPILE) has been stripped down to the bare
2983       essentials of compilation.  It no longer deals with linking/execution.
2984       The interface has been cleaned up considerably.
2985    
2986       Utility routines for dealing with linking and execution have been
2987       moved into their own substructures.
2988    
2989       (The ultimate goal of these changes is to provide a light-weight
2990       binfile loader/linker (at least for, e.g., stable libraries) that
2991       does not require CM or the compiler to be present.)
2992    
2993    CM documentation has been updated to reflect the changes to library
2994    organization.
2995    
2996    ----------------------------------------------------------------------
2997    Name: Matthias Blume
2998    Date: 2001/07/10 17:30:00 EDT
2999    Tag: Release_110_34
3000    Description:
3001    
3002    Minor tweak to 110.34 (re-tagged):
3003    
3004      - README.html file added to CVS repository
3005      - runtime compiles properly under FreeBSD 3.X and 4.X
3006    
3007    ----------------------------------------------------------------------
3008    Name: Matthias Blume
3009    Date: 2001/07/10 17:30:00 EDT
3010    Tag: Release_110_34
3011    Description:
3012    
3013    New version number (110.34). New bootfiles.
3014    
3015    ----------------------------------------------------------------------
3016    Name: Matthias Blume
3017    Date: 2001/07/09 16:00:00 EDT
3018    Tag: blume-20010709-more-varargs
3019    Description:
3020    
3021    I changed the handling of varargs in ml-nlffigen again:
3022    The ellipsis ... will now simply be ignored (with an accompanying warning).
3023    
3024    The immediate effect is that you can actually call a varargs function
3025    from ML -- but you can't actually supply any arguments beyond the ones
3026    specified explicitly.  (For example, you can call printf with its format
3027    string, but you cannot pass additional arguments.)
3028    
3029    This behavior is only marginally more useful than the one before, but
3030    it has the advantage that a function or, more importantly, a function
3031    type never gets dropped on the floor, thus avoiding follow-up problems with
3032    other types that refer to the offending one.
3033    
3034    ----------------------------------------------------------------------
3035    Name: Matthias Blume
3036    Date: 2001/07/09 11:25:00 EDT
3037    Tag: blume-20010709-varargs
3038    Description:
3039    
3040    1. ckit-lib.cm now exports structure Error
3041    2. ml-nlffigen reports occurences of "..." (i.e., varargs function types)
3042       with a warning accompanied by a source location.  Moreover, it
3043       merely skips the offending function or type and proceeds with the
3044       rest of its work.u  As a result, one can safely feed C code containing
3045       "..." to ml-nlffigen.
3046    3. There are some internal improvements to CM, providing slightly
3047       more general string substitutions in the tools subsystem.
3048    
3049    ----------------------------------------------------------------------
3050    Name: Matthias Blume
3051    Date: 2001/06/27 15:10:00 EDT
3052    Tag: blume-20010627-concur
3053    Description:
3054    
3055    Fixed a small bug in CM's handling of parallel compilation.
3056    (You could observe the bug by Control-C-interrupting an ordinary
3057    CMB.make or CM.stabilize and then attaching some compile servers.
3058    The result was that all of a sudden the previously interrupted
3059    compilation would continue on its own.  This was because of
3060    an over-optimization: CM did not bother to clean out certain queues
3061    when no servers were attached "anyway", resulting in the contents
3062    of these queues to grab control when new servers did get attached.)
3063    
3064    There is also another minor update to the CM manual.
3065    
3066    ----------------------------------------------------------------------
3067    Name: Matthias Blume
3068    Date: 2001/06/26 16:15:00 EDT
3069    Tag: blume-20010626-cmdoc
3070    Description:
3071    
3072    Minor typo fixed in CM manual (syntax diagram for libraries).
3073    
3074    ----------------------------------------------------------------------
3075    Name: Matthias Blume
3076    Date: 2001/06/25 22:55:00 EDT
3077    Tag: blume-20010625-x86pc
3078    Description:
3079    
3080    Fixed a nasty bug in the X86 assembly code that caused signal
3081    handlers to fail (crash) randomly.
3082    
3083    ----------------------------------------------------------------------
3084    Name: Matthias Blume
3085    Date: 2001/06/25 12:05:00 EDT
3086    Tag: blume-20010625-nlffigen
3087    Description:
3088    
3089    This update fixes a number of minor bugs in ml-nlffigen as reported by
3090    Nick Carter <nbc@andrew.cmu.edu>.
3091    
3092      1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted.
3093      2. Default names for generated files are now derived from the name of
3094         the C file *without its directory*.  In particular, this causes generated
3095         files to be placed locally even if the C file is in some system directory.
3096      3. Default names for generated signatures and structures are also derived
3097         from the C file name without its directory.  This avoids silly things
3098         like "structure GL/GL".
3099         (Other silly names are still possible because ml-nlffigen does not do
3100          a thorough check of whether generated names are legal ML identifiers.
3101          When in doubt, use command line arguments to force particular names.)
3102    
3103    ----------------------------------------------------------------------
3104    Name: Matthias Blume
3105    Date: 2001/06/21 12:25:00 EDT
3106    Tag: blume-20010621-eXene
3107    Description:
3108    
3109    eXene now compiles and (sort of) works again.
3110    
3111    The library name (for version > 110.33) is $/eXene.cm.
3112    
3113    I also added an new example in src/eXene/examples/nbody.  See the
3114    README file there for details.
3115    
3116    ----------------------------------------------------------------------
3117    Name: Matthias Blume
3118    Date: 2001/06/20 16:40:00 EDT
3119    Tag: blume-20010620-cml
3120    Description:
3121    
3122    CML now compiles and works again.
3123    
3124    Libraries (for version > 110.33):
3125    
3126      $cml/cml.cm            Main CML library.
3127      $cml/basis.cm          CML's version of $/basis.cm.
3128      $cml/cml-internal.cm   Internal helper library.
3129      $cml/core-cml.cm       Internal helper library.
3130      $cml-lib/trace-cml.cm  Tracing facility.
3131      $cml-lib/smlnj-lib.cm  CML's version of $/smlnj-lib.cm
3132    
3133    The installer (config/install.sh) has been taught how to properly
3134    install this stuff.
3135    
3136    ----------------------------------------------------------------------
3137    Name: Matthias Blume
3138    Date: 2001/06/19 17:55:00 EDT
3139    Tag: blume-20010619-instantiate
3140    Description:
3141    
3142    This un-breaks the fix for bug 1432.
3143    (The bug was originally fixed in 110.9 but I broke it again some
3144    time after that.)
3145    
3146    ----------------------------------------------------------------------
3147    Name: Matthias Blume
3148    Date: 2001/06/19 17:25:00 EDT
3149    Tag: blume-20010619-signals
3150    Description:
3151    
3152    This should (hopefully) fix the long-standing signal handling bug.
3153    (The runtime system was constructing a continuation record with an
3154    incorrect descriptor which would cause the GC to drop data on the floor...)
3155    
3156    ----------------------------------------------------------------------
3157    Name: Matthias Blume
3158    Date: 2001/06/15 15:05:00 EDT
3159    Tag: blume-20010615-moresparc
3160    Description:
3161    
3162    Here is a short late-hour update related to Sparc c-calls:
3163    
3164     -- made handling of double-word arguments a bit smarter
3165    
3166     -- instruction selection phase tries to collapse certain clumsily
3167        constructed ML-Trees; typical example:
3168    
3169            ADD(ty,ADD(_,e,LI d1),LI d2)  ->  ADD(ty,e,LI(d1+d2))
3170    
3171        This currently has no further impact on SML/NJ since mlriscGen does
3172        not seem to generate such patterns in the first place, and c-calls
3173        (which did generate them in the beginning) has meanwhile been fixed
3174        so as to avoid them as well.
3175    
3176    ----------------------------------------------------------------------
3177    Name: Matthias Blume
3178    Date: 2001/06/15 15:05:00 EDT
3179    Tag: blume-20010615-sparc
3180    Description:
3181    
3182    The purpose of this update is to provide an implementation of NLFFI
3183    on Sparc machines.
3184    
3185    Here are the changes in detail:
3186    
3187       * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing
3188       the Sparc implementation of the c-calls API.
3189       * The Sparc backend of SML/NJ has been modified to uniformely use %fp
3190       for accessing the ML frame.  Thus, we have a real frame pointer and
3191       can freely modify %sp without need for an omit-frame-ptr phase.
3192       The vfp logic in src/compiler/CodeGen/* has been changed to accomodate
3193       this case.
3194       * ml-nlffigen has been taught to produce code for different architectures
3195       and calling conventions.
3196       * In a way similar to what was done in the x86 case, the Sparc
3197       backend uses its own specific extension to mltree.  (For example,
3198       it needs to be able to generate UNIMP instructions which are part
3199       of the calling convention.)
3200       * ml-nlffi-lib was reorganized to make it more modular (in particular,
3201       to make it easier to plug in new machine- and os-dependent parts).
3202    
3203    There are some other fairly unrelated bug fixes and cleanups as well:
3204    
3205       * I further hacked the .cm files for MLRISC tools (like MDLGen) so
3206       that they properly share their libraries with existing SML/NJ libraries.
3207       * I fixed a minor cosmetic bug in CM, supressing certain spurious
3208       follow-up error messages.
3209       * Updates to CM/CMB documentation.
3210    
3211    TODO items:
3212    
3213       * MLRISC should use a different register as its asmTemp on the Sparc.
3214         (The current %o2 is a really bad choice because it is part of the
3215         calling conventions, so things might interfere in unexpected ways.)
3216    
3217    ----------------------------------------------------------------------
3218    Name: Matthias Blume
3219    Date: 2001/06/07
3220    Tag: blume-20010607-calls
3221    Description:
3222    
3223    A number of internal changes related to C calls and calling conventions:
3224    
3225    1. ML-Tree CALL statements now carry a "pops" field.  It indicates the
3226       number of bytes popped implicitly (by the callee).  In most cases
3227       this field is 0 but on x86/win32 it is some non-zero value.  This
3228       is information provided for the benefit of the "omit-frameptr" pass.
3229    2. The CALL instruction on the x86 carries a similar "pops" field.
3230       The instruction selection phase copies its value from the ML-Tree
3231       CALL statement.
3232    3. On all other architectures, the instruction selection phase checks
3233       whether "pops=0" and complains if not.
3234    4. The c-calls implementation for x86 now accepts two calling conventions:
3235       "ccall" and "stdcall".  When "ccall" is selected, the caller cleans
3236       up after the call and pops is set to 0.  For "stdcall", the caller
3237       does nothing, leaving the cleanup to the callee; pops is set to
3238       the number of bytes that were pushed onto the stack.
3239    5. The cproto decoder (compiler/Semant/types/cproto.sml) now can
3240       distinguish between "ccall" and "stdcall".
3241    6. The UNIMP instruction has been added to the supported Sparc instruction
3242       set. (This is needed for implementing the official C calling convention
3243       on this architecture.)
3244    7. I fixed some of the .cm files under src/MLRISC/Tools to make them
3245       work with the latest CM.
3246    
3247    ----------------------------------------------------------------------
3248    Name: Matthias Blume
3249    Date: 2001/06/05 15:10:00 EDT
3250    Tag: blume-20010605-cm-index
3251    Description:
3252    
3253    0. The "lambdasplit" parameter for class "sml" in CM has been documented.
3254    
3255    1. CM can now generate "index files".  These are human-readable files
3256       that list on a per-.cm-file basis each toplevel symbol defined or
3257       imported.  The location of the index file for
3258       <p>/<d>.cm is <p>/CM/INDEX/<d>.cm.
3259       To enable index-file generation, set CM.Control.generate_index to true
3260       or export an environment-symbol: export CM_GENERATE_INDEX=true.
3261    
3262       The CM manual has been updated accordingly.
3263    
3264    2. I made some slight modifications to the c-calls API in MLRISC.
3265    
3266         a) There is now a callback to support saving/restoring of
3267            dedicated but caller-save registers around the actual call
3268            instruction.
3269         b) One can optionally specify a comment-annotation for the
3270            call instruction.
3271    
3272    3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop.
3273       (For example, the comment annotation shows the C prototype of
3274        the function being called.)
3275    
3276    ----------------------------------------------------------------------
3277    Name: Matthias Blume
3278    Date: 2001/06/01 13:30:00 EDT
3279    Tag: blume-20010601-nlffi-cleanup
3280    Description:
3281    
3282    This is mostly a cleanup of MLFFI stuff:
3283    
3284       - some signature files have been put into a more exposed place
3285       - the ugly 'f type parameter is gone (simplifies types tremendously!)
3286       - ml-nlffigen changed accordingly
3287       - tutorial updated
3288    
3289    Other changes:
3290    
3291       - author's affiliation in CM manual(s) updated
3292       - some more recognized keywords added to Allen's sml.sty
3293    
3294    ----------------------------------------------------------------------
3295    Name: Matthias Blume
3296    Date: 2001/05/25 15:30:00 EDT
3297    Tag: blume-20010525-iptr
3298    Description:
3299    
3300      - put the official 110.33-README (as it appears on the ftp server) under
3301        CVS
3302      - fixed a small bug related to incomplete pointer types in
3303        ml-nlffigen
3304      - small cosmetic change to the ml-nlffi-lib's "arr" type constructor
3305        (it does not need the 'f type parameter)
3306    
3307    ----------------------------------------------------------------------
3308    Name: Matthias Blume
3309    Date: 2001/05/23 14:30:00 EDT
3310    Tag: Release_110_33
3311    Description:
3312    
3313    New version number (110.33).  New bootfiles.
3314    
3315    ----------------------------------------------------------------------
3316    Name: Matthias Blume
3317    Date: 2001/05/22 18:06:00 EDT
3318    Tag: blume-20010522-targets
3319    Description:
3320    
3321    Made install.sh use file config/targets.customized if it exists, falling
3322    back to config/targets if it doesn't.  This way one can have a customized
3323    version of the targets file without touching the "real thing", thus
3324    eliminating the constant fear of accidentally checking something bogus
3325    back into the CVS repository...  (File config/targets.customized must
3326    not be added to the repository!)
3327    
3328    ----------------------------------------------------------------------
3329    Name: Matthias Blume
3330    Date: 2001/05/22 16:30:00 EDT
3331    Tag: blume-20010522-minitut
3332    Description:
3333    
3334    1. Bug fix in ml-nlffigen; now (hopefully) correctly handling
3335       struct returns.
3336    2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt.  This is some very
3337       incomplete, preliminary documentation for NLFFI.
3338    
3339    ----------------------------------------------------------------------
3340    Name: Matthias Blume
3341    Date: 2001/05/14 11:30:00 EDT
3342    Tag: blume-20010514-script
3343    Description:
3344    
3345    Some bugs in install script fixed.
3346    
3347    In addition to that I also made a slight change to the NLFFI API:
3348    Functors generated by ml-nlffigen now take the dynamic library as a
3349    straight functor argument, not as a suspended one.  (The original
3350    functor code used to force the suspension right away anyway, so there
3351    was nothing gained by this complication of the interface.)
3352    
3353    ----------------------------------------------------------------------
3354    Name: Matthias Blume
3355    Date: 2001/05/11 14:35:00 EDT
3356    Tag: blume-20010511-ml-nlffi
3357    Description:
3358    
3359    I finally took the plunge and added my new FFI code to the main
3360    repository.  For x86-linux it is now ready for prime-time.
3361    
3362    There are two new subdirectories of "src":
3363    
3364      - ml-nlffi-lib:
3365           The utility library for programs using the FFI interface.
3366           Here is the implementation of $/c.cm and its associated low-level
3367           partners $/c-int.cm and $/memory.cm.
3368      - ml-nlffigen:
3369           A stand-alone program for generating ML glue code from C source
3370           code.
3371    
3372    Building ml-nlffigen requires $/ckit-lib.cm.
3373    
3374    The config/install.sh script has been updates to do the Right Thing
3375    (hopefully).
3376    
3377    Notice that the source tree for the C-Kit will not be put under "src"
3378    but directly under the installation root directory.  (This is the
3379    structure that currently exists on the CVS server when you check out
3380    module "sml".)  Fortunately, config/install.sh knows about this oddity.
3381    
3382    Bugs: No documentation yet.
3383    
3384    ----------------------------------------------------------------------
3385    Name: Matthias Blume
3386    Date: 2001/05/09 16:35:00 EDT
3387    Tag: blume-20010509-cpscontract
3388    Description:
3389    
3390    Fixed a bug in the accounting code in cpsopt/contract.sml.  (The
3391    wrapper/unwrapper elimination did not decrement usage counts and some
3392    dead variables got overlooked by the dead-up logic.)
3393    
3394    ----------------------------------------------------------------------
3395    Name: Lal George
3396    Date: 2001/05/08  17:26:09 EDT
3397    Tag: george-20010508-omit-frameptr
3398    Description:
3399    
3400    Changes to implement the omit-frame-pointer optimization to support
3401    raw C calls. For now, there is only support on the Intel x86, but
3402    other architectures will follow as more experience is gained with this.
3403    
3404    
3405    ----------------------------------------------------------------------
3406    Name: Matthias Blume
3407    Date: 2001/05/07 14:40:00 EDT
3408    Tag: blume-20010507-proxies
3409    Description:
3410    
3411    I made into "proxy libraries" all libraries that qualify for such a
3412    change.  (A qualifying library is a library that has another library or
3413    groups as its sole member and repeats that member's export list
3414    verbatim.  A proxy library avoids this repetition by omitting its export
3415    list, effectively inheriting the list that its (only) member exports.
3416    See the CM manual for more explanation.)
3417    The main effect is that explicit export lists for these libraries
3418    do not have to be kepts in sync, making maintenance a bit easier.
3419    
3420    I also added copyright notices to many .cm-files.
3421    
3422    Last but not least, I made a new set of bootfiles.
3423    
3424    ----------------------------------------------------------------------
3425    Name: Matthias Blume
3426    Date: 2001/05/04 17:00:00 EDT
3427    Tag: blume-20010504-cm-lsplit
3428    Description:
3429    
3430    0. John merged pending changes to $/smlnj-lib.cm
3431    
3432    1. Allen's previous change accidentally backed out of one of Lal's
3433       earlier changes.  I undid this mistake (re-introducing Lal's change).
3434    
3435    2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm)
3436       within the compiler where applicable.  There is some code simplification
3437       because of that.
3438    
3439    3. The "split" phase (in FLINT) is now part of the default list of phases.
3440       Compiler.Control.LambdaSplitting.* can be used to globally control the
3441       lambda-splitting (cross-module-inlining) engine.  In addition to that,
3442       it can now also be controlled on a per-source basis: CM has been taught
3443       a new tool parameter applicable to ML source files.
3444    
3445       - To turn lambda-splitting off completely:
3446            local open Compiler.Control.LambdaSplitting in
3447                val _ = set Off
3448            end
3449       - To make "no lambda-splitting" the global default (but allow per-source
3450         overriding); this is the initial setting:
3451            local open Compiler.Control.LambdaSplitting in
3452                val _ = set (Default NONE)
3453            end
3454       - To make "lambda-splitting with aggressiveness a" the global default
3455         (and allow per-source overriding):
3456            local open Compiler.Control.LambdaSplitting in
3457                val _ = set (Default (SOME a))
3458            end
3459    
3460       - To turn lambda-splitting off for a given ML souce file (say: a.sml)
3461         write (in the respective .cm-file):
3462            a.sml (lambdasplitting:off)
3463       - To turn lambda-splitting for a.sml on with minimal aggressiveness:
3464            a.sml (lambdasplitting:on)
3465       - To turn lambda-splitting for a.sml on with aggressiveness <a> (where
3466         <a> is a decimal non-negative integer):
3467            a.sml (lambdasplitting:<a>)
3468       - To turn lambda-splitting for a.sml on with maximal aggressiveness:
3469            a.sml (lambdasplitting:infinity)
3470       - To use the global default for a.sml:
3471            a.sml (lambdasplitting:default)
3472         or simply
3473            a.sml
3474    
3475    ----------------------------------------------------------------------
3476    Name: Allen Leung
3477    Date: 2001/05/04 01:57:00 EDT
3478    Tag: leunga-20010504-sync
3479    Description:
3480    
3481      MLRISC features.
3482    
3483      1. Fix to CMPXCHG instructions.
3484      2. Changed RA interface to allow annotations in callbacks.
3485      3. Added a new method to the stream interface to allow annotations updates.
3486    
3487    ----------------------------------------------------------------------
3488    Name: Matthias Blume
3489    Date: 2001/05/01 11:45:00 EDT
3490    Tag: blume-20010501-pcedittmp
3491    Description:
3492    
3493    Changed install.sh to use the current working directory instead of
3494    /usr/tmp for a temporary file (pcedittmp).  The previous choice
3495    of /usr/tmp caused trouble with MacOS X because of file premission
3496    problems.
3497    
3498    ----------------------------------------------------------------------
3499    Name: Matthias Blume
3500    Date: 2001/04/20 11:10:00 EDT
3501    Tag: blume-20010420-inMLflag
3502    Description:
3503    
3504     - added vp_limitPtrMask to vproc-state.h
3505       (for use by the raw-C-calls mechanism to implement proper interrupt
3506        handling)
3507     - made the ML compiler aware of various data-structure offsets so it
3508       can generate code for accessing the vp_inML flag and vp_limitPtrMask
3509     - tweaked mlriscGen.sml to have it emit interrupt-handling code for
3510       raw C-calls
3511    
3512    ----------------------------------------------------------------------
3513    Name: Lal George
3514    Date: 2001/04/20 09:15:28 EDT
3515    Tag: george-20010420-macosX
3516    Description:
3517    
3518     - Changes to port to Mac OS X; Darwin.
3519    
3520     - In the process I found that sqrt was broken on the PPC, because the
3521       fsqrt instruction is not implemented.
3522    
3523    ----------------------------------------------------------------------
3524    Name: Matthias Blume
3525    Date: 2001/04/18 12:45:00 EDT
3526    Tag: blume-20010418-ccalls
3527    Description:
3528    
3529     - fixed two off-by-4 errors in the x86-specific c-calls implementation
3530       (this bug prevented structure arguments containing pointers from being
3531        passed correctly)
3532     - changed the raw-C-call code in mlriscGen.sml in such a way that
3533       structure arguments are represented as a pointer to the beginning
3534       of the structure (instead of having a series of synthesized arguments,
3535       one for each structure member)
3536    
3537     - made makeml script's verbosity level configurable via environment
3538       variable (MAKEML_VERBOSITY)
3539    
3540     - eliminated placeholder implementations for f32l, w16s, i16s, and f32s
3541       in rawmem-x86.sml; we are now using the real thing
3542    
3543    ----------------------------------------------------------------------
3544    Name: Matthias Blume
3545    Date: 2001/03/22 16:25:00 EST
3546    Tag: blume-20010322-bootfiles
3547    Description:
3548    
3549    Created a new set of bootfiles (for your automatic installation convenience).
3550    
3551    ----------------------------------------------------------------------
3552    Name: Matthias Blume
3553    Date: 2001/03/22 15:10:00 EST
3554    Tag: blume-20010322-rawmem-parcm
3555    Description:
3556    
3557    1. All "raw memory access" primitives for the new FFI are implemented now
3558       (at least on the x86).
3559    2. Some further cleanup of CM's parallel make mechanism.
3560    
3561    ----------------------------------------------------------------------
3562    Name: Matthias Blume
3563    Date: 2001/03/19 17:53:00 EST
3564    Tag: blume-20010319-parallel
3565    Description:
3566    
3567    Parallel make (using compile servers) now works again.
3568    
3569    To this end, CM.stabilize and CMB.make have been modified to work in
3570    two passes when compile servers are attached:
3571       1. Compile everything, do not perform stabilization; this pass
3572          uses compile servers
3573       2. Stabilize everything; this pass does not use compile servers
3574    If there are no compile servers, the two passes are combined into one
3575    (as before).  Splitting the passes increases the inherent parallelism
3576    in the dependency graph because the entire graph including all
3577    libraries is available at the same time.  This, in turn, improves
3578    server utilization.  The downside is that the master process will
3579    have to do some extra work after compilation is done (because for
3580    technical reasons it must re-read all the binfiles during stabilization).
3581    
3582    ----------------------------------------------------------------------
3583    Name: Matthias Blume
3584    Date: 2001/03/16 12:22:00 EST
3585    Tag: blume-20010316-bootfiles
3586    Description:
3587    
3588    Created a new set of bootfiles (for your automatic installation convenience).
3589    
3590    ----------------------------------------------------------------------
3591    Name: Matthias Blume
3592    Date: 2001/03/16 11:00:00 EST
3593    Tag: blume-20010316-MLTREE-fixup
3594    Description:
3595    
3596    This is a minor fixup for an (untagged) earlier commit by Allen.
3597    (A file was missing).
3598    
3599    ----------------------------------------------------------------------
3600    Name: Allen Leung
3601    Date: Mon Mar  5 18:54:57 EST 2001
3602    Tag: leunga-20010305-cut-support
3603    
3604    1. New support for alternative control-flow in MLTREE.
3605       Currently we support
3606    
3607          FLOW_TO(CALL ...., [k1,...,kn])