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