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

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

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