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

Legend:
Removed from v.904  
changed lines
  Added in v.1447

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