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