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 1115, Sun Mar 3 18:16:31 2002 UTC revision 1468, Fri Mar 19 18:54:52 2004 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Allen Leung (leunga (at) reservoir (dot) com)
17    Date: 2004/03/19 14:40:00 EST
18    Tag: leunga-20040319-cygwin-nlffi
19    Description:
20    
21    Fixed the runtime so that ml-nlffi-lib runs on the cygwin version
22    of SML/NJ.  The problem is that
23    
24       lib = dlopen(NULL, ...)
25       f   = dlsym(lib, "malloc");
26    
27    does not work on Windows unless we explicitly export symbols
28    such as 'malloc' during linking.  We fixed this by explicitly
29    exporting the required symbols with the magic gcc incantation:
30    
31        -Wl,--export-all cygwin.def
32    
33    where cygwin.def is a file containing all the symbols that
34    we wish to export.
35    
36    I suspect this is a Windows problem and we'll have to
37    do the same (somehow with windows compilers) when
38    we build the native win32 version with the system
39    calls LoadLibrary/GetProcAddress.
40    
41    ----------------------------------------------------------------------
42    Name: Matthias Blume (blume (at) tti - c (dot) org)
43    Date: 2004/03/04 16:35:00 CST
44    Tag: blume-20040304-intinf-fmt
45    Description:
46    
47    Fixed problem with IntInf.fmt (sign would show up on the right instead
48    of on the left for BIN, OCT, and HEX).
49    
50    ----------------------------------------------------------------------
51    Name: Matthias Blume (blume (at) tti - c (dot) org)
52    Date: 2004/03/04 11:25:00 CST
53    Tag: blume-20040304-symlinks
54    Description:
55    
56    Fixed problem with installer script (unix only) where bin/ml-yacc and
57    friends pointed (via symlinks) to absolute locations instead of just
58    .run-sml.  This was reported by Vesa A Norrman.
59    
60    ----------------------------------------------------------------------
61    Name: Matthias Blume (blume (at) tti - c (dot) org)
62    Date: 2004/02/13 14:50:00 CST
63    Tag: Release_110_45
64    Description:
65    
66    New working version (110.45). New bootfiles.
67    
68    ----------------------------------------------------------------------
69    Name: Matthias Blume (blume (at) tti - c (dot) org)
70    Date: 2004/01/26 15:15:15 CST
71    Tag: blume-20040126-toplevel
72    Description:
73    
74    Improved handling of exceptions at the interactive toplevel.
75    
76    ----------------------------------------------------------------------
77    Name: Matthias Blume (blume (at) tti - c (dot) org)
78    Date: 2004/01/26 11:25:00
79    Tag: blume-20040126-app
80    Description:
81    
82    Type of top-level "app" corrected.
83    Added code for setting vp_limitPtrMask to Win32-specific runtime.
84    
85    ----------------------------------------------------------------------
86    Name: Matthias Blume (blume (at) tti - c (dot) org)
87    Date: 2003/11/18 17:10 CST
88    Tag: blume-20031118-basis-fiddle
89    Description:
90    
91    - changed Timer interface to what might become the spec
92    - POSIX_FLAGS -> BIT_FLAGS according to spec
93    - some other minor discrepancies wrt. spec eliminated
94    
95    ----------------------------------------------------------------------
96    Name: Matthias Blume (blume (at) tti - c (dot) org)
97    Date: 2003/11/06 12:00:00 CST
98    Tag: Release_110_44
99    Description:
100    
101    New working version (110.44). New bootfiles.
102    
103    ----------------------------------------------------------------------
104    Name: Matthias Blume (blume (at) tti - c (dot) org)
105    Date: 2003/11/04 11:50:00 CST
106    Tag: blume-20031104-move-libraries
107    Description:
108    
109    Eliminated the "dont_move_libraries" directive in config/targets.
110    (The mechanism was broken and could not be fixed easily.  Moreover,
111    there does not seem to be any reason not to move all libraries into
112    lib during installation.  I originally implemented this directive as a
113    backward-compatibility feature when I first introduced the new CM.
114    Now that things have been stable for a long time and going back to the
115    old CM is not an option, there is no reason to keep it around.)
116    
117    ----------------------------------------------------------------------
118    Name: Matthias Blume (blume (at) tti - c (dot) org)
119    Date: 2003/11/03 16:00:00 CST
120    Tag: blume-20031103-installdir
121    Description:
122    
123    Made installer honor INSTALLDIR variable again.  (Thanks to Chris
124    Richards for pointing out the problem and providing the solution.)
125    
126    ----------------------------------------------------------------------
127    Name: Matthias Blume (blume (at) tti - c (dot) org)
128    Date: 2003/10/01 17:05:00 CDT
129    Tag: blume-20031001-lal-mlrisc
130    Description:
131    
132    MLRISC bug fix from Lal.
133    
134    ----------------------------------------------------------------------
135    Name: Matthias Blume (blume (at) tti - c (dot) org)
136    Date: 2003/09/30 16:10:00 CDT
137    Tag: blume-20030930-primio-bat
138    Description:
139    
140    1. Added openVector, nullRd, and nullWr to PRIM_IO.
141    2. Improved .bat files (for Win32 port) to make things work under Win95.
142       (thanks to Aaron S. Hawley for this one)
143    
144    ----------------------------------------------------------------------
145    Name: Matthias Blume (blume (at) tti - c (dot) org)
146    Date: 2003/09/26 16:05:00 CDT
147    Tag: blume-20030926-wrappriv
148    Description:
149    
150    Added missing wrapper for privilege "primitive" in $smlnj/viscomp/core.cm.
151    
152    ----------------------------------------------------------------------
153    Name: Matthias Blume (blume (at) tti - c (dot) org)
154    Date: 2003/09/26 15:00:00 CDT
155    Tag: blume-20030926-110_43_3
156    Description:
157    
158    - additional cleanup
159    - version number bump, NEW BOOTFILES
160    
161    ----------------------------------------------------------------------
162    Name: Matthias Blume (blume (at) tti - c (dot) org)
163    Date: 2003/09/26 12:00:00 CDT
164    Tag: blume-20030926-ppautoload
165    Description:
166    
167    I modified the read-eval-print loop so that the autoloader gets
168    invoked whenever the prettyprinter tries to look up a symbol that
169    is not currently defined in the toplevel environment but which
170    appears in CM's autoload registry.  As a result, we see far fewer of
171    those ?.Foo.Bar.xxx names in the prettyprinter's output.
172    
173    In addition to this I tried to clean up some pieces of the Basis
174    implementation (e.g., Socket, Word8Array) in order to prevent other
175    instances of these ?.Foo.Bar.xxx names from being printed.
176    
177    The mechanism that picks names for types still needs some work, though.
178    (Right now it seems that if there is a type A.t which is defined to
179    be B.u, but B is unavailable at toplevel, then A.t gets printed as
180    "?.B.u" although the perhaps more sensible solution would be to use
181    "A.t" in this case.  In other words, the prettyprinter should follow
182    a chain of DEFtycs not farther than there are corresponding toplevel
183    names in the current environment.)
184    
185    ----------------------------------------------------------------------
186    Name: Matthias Blume (blume (at) tti - c (dot) org)
187    Date: 2003/09/24 16:31:00 CDT
188    Tag: blume-20030924-installer
189    Description:
190    
191    Another installer tweak:  All the ML code for the installer is now
192    compiled during CMB.make and put into a little library called
193    $smlnj/installer.cm.  The installation then simply invokes
194    
195       sml -m $smlnj/installer.cm
196    
197    and everything happens automagically.
198    
199    Win32:  ML code senses value of environment variable SMLNJ_HOME.
200    Unix:   ML code senses values of environment variables ROOT, CONFIGDIR,
201            and BINDIR.
202    
203    The new scheme guarantees that the ML code responsible for the installation
204    is in sync with the APIs of the main system.  Also, the installer is
205    somewhat faster because the installer script is precompiled.
206    
207    ----------------------------------------------------------------------
208    Name: Matthias Blume (blume (at) tti - c (dot) org)
209    Date: 2003/09/24 15:35:00 CDT
210    Tag: blume-20030924-synsock
211    Description:
212    
213    Added a signature SYNCHRONOUS_SOCKET to basis.cm.  This is like SOCKET
214    but excludes all non-blocking operations.  Defined SOCKET (in Basis)
215    and CML_SOCKET in terms of SYNCHRONOUS_SOCKET.  Removed superfluous
216    implementations of non-blocking operations from CML's Socket
217    structure.
218    
219    ----------------------------------------------------------------------
220    Name: Matthias Blume (blume (at) tti - c (dot) org)
221    Date: 2003/09/24 15:10:05 CDT
222    Tag: blume-20030924-sockets
223    Description:
224    
225    1. Fixed SOCKET API and implementation to match Basis spec.
226       This required changing the internal representation of sockets to one
227       that remembers (for each socket file descriptor) whether it is currently
228       blocking or non-blocking.  This state is maintained lazily (i.e., a system
229       call is made only if the state actually needs to change).
230    
231    2. OS-specific details of sockets were moved into separate files, thus
232       making it possible to unify the bulk of the socket implementations
233       between Unix and Win32.
234    
235    3. CML's socket API changed accordingly.
236       (Note that we need to remove non-blocking functions from this API
237       since they are redundant in the case of CML!)
238    
239    4. CML's socket implementation now makes use of non-blocking functions
240       provided by Basis, thus removing all OS-dependent code from this part
241       of CML.
242    
243    5. Changed Real64.precision from 52 to 53.  Minor cleanup in Real64 code.
244    
245    ----------------------------------------------------------------------
246    Name: Matthias Blume (blume (at) tti - c (dot) org)
247    Date: 2003/09/22 12:10:00 CDT
248    Tag: blume-20030922-110_43_2
249    Description:
250    
251    Made a new interim version and bootfiles for developer's bootstrapping
252    convenience.
253    
254       110.43.2 -- NEW BOOTFILES
255    
256    ----------------------------------------------------------------------
257    Name: Matthias Blume (blume (at) tti - c (dot) org)
258    Date: 2003/09/19 15:55:00 CDT
259    Tag: blume-20030919-cmdir
260    Description:
261    
262    1. new-install.sh -> install.sh
263    2. changed default CM "metadata" directory name to ".cm" (instead of "CM")
264    3. tweaked installer so that another name instead of .cm can be chosen
265       at install time (by setting the CM_DIR_ARC environment variable
266       during installation); once installation is complete, the name is
267       fixed
268    
269    ----------------------------------------------------------------------
270    Name: Matthias Blume (blume (at) tti - c (dot) org)
271    Date: 2003/09/18 16:00:00 CDT
272    Tag: blume-20030918-110_43_1
273    Description:
274    
275    Made a new interim version and bootfiles for developer's bootstrapping
276    convenience.
277    
278       110.43.1 -- NEW BOOTFILES
279    
280    ----------------------------------------------------------------------
281    Name: Matthias Blume (blume (at) tti - c (dot) org)
282    Date: 2003/09/18 15:20:00 CDT
283    Tag: blume-20030918-misc
284    Description:
285    
286    1. Exported fractionsPerSecond etc. from TimeImp (but not from Time as
287       this seems to be controversial at the moment) and used those in
288       Posix.ProcEnv.times.
289    
290    2. Added Time.{from,to}Nanoseconds to Time.
291    
292    3. Improved Real.{from,to}LargeInt by avoiding needless calculations.
293       For example, fromLargeInt never needs to look at more than 3 "big
294       digits" to get its 53 bits of precision.
295    
296    ----------------------------------------------------------------------
297    Name: Matthias Blume (blume (at) tti - c (dot) org)
298    Date: 2003/09/17 16:30:00 CDT
299    Tag: blume-20030917-real32-slices
300    Description:
301    
302    Added an entry to the primitive environment
303    (compiler/Semant/statenv/prim.sml) for int32->real64 conversion and
304    added code to compiler/CodeGen/main/mlriscGen.sml to implement it.
305    
306    Removed some of the "magic" constants in real64.sml and replaced them
307    with code that generates these values from their corresponding
308    integer counterparts.
309    
310    Made all(?) the slice-related changes to the Basis and made everything
311    compile again...
312    
313    ----------------------------------------------------------------------
314    Name: Matthias Blume (blume (at) tti - c (dot) org)
315    Date: 2003/09/15 17:45:00 CDT
316    Tag: blume-20030915-rbase
317    Description:
318    
319    Fixed bug in Real.fromLargeInt.
320    
321    ----------------------------------------------------------------------
322    Name: Matthias Blume (blume (at) tti - c (dot) org)
323    Date: 2003/09/13 18:11:00 CDT
324    Tag: blume-20030913-libinstall
325    Description:
326    
327    Minor bugfix in config/libinstall (set anchor with path to
328    standalone tool after installing it, otherwise libraries that
329    need ml-lex or ml-yacc won't compile the first time the installer
330    runs).
331    
332    ----------------------------------------------------------------------
333    Name: Matthias Blume (blume (at) tti - c (dot) org)
334    Date: 2003/09/12 11:45:00 CDT
335    Tag: blume-20030912-various
336    Description:
337    
338     - fixed bug in Real.toLargeInt
339     - fixed bug in Posix.ProcEnv.times
340     - changed inputLine functions to return an option
341     - minor installer improvements / bugfixes
342     - changed default @SMLalloc parameter for x86/celeron to 64k
343    
344    ----------------------------------------------------------------------
345    Name: Matthias Blume (blume (at) tti - c (dot) org)
346    Date: 2003/09/09 22:00:00 CDT
347    Tag: Release_110_43
348    Description:
349    
350        New working release 110.43.  New bootfiles.
351    
352    ----------------------------------------------------------------------
353    Name: Matthias Blume (blume (at) tti - c (dot) org)
354    Date: 2003/09/09 19:20:00 CDT
355    Tag: blume-20030909-installer
356    Description:
357    
358    Rewrote large parts of config/install.sh in SML (config/libinstall.sml).
359    Modified config/install.bat to take advantage of it.  Also modified
360    config/install.sh (and called it config/new-install.sh) to take advantage
361    of it on Unix systems.  (The SML code is (supposed to be) platform-
362    independent.)
363    
364    The installer can now install everything under Win32
365    as well as under *nix as long as it compiles.
366    
367    Other changes:
368    
369      - made CML compile again under Win32
370      - made eXene compile under Win32 (by providing a fake structure UnixSock
371        and by using OS.Process.getEnv instead of Posix.ProcEnv.getenv)
372      - fixed a bug in nowhere: it assumed that type OS.Process.status is the
373        same as type int;  under Win32 it isn't
374      - fixed some slice-related problems in the win32-specific parts of CML
375      - added a functor argument "sameVol" to os-path-fn.sml in the Basis
376        (under Win32, the volume name is case-insensitive, and the
377        OS.Path code compares volume names for equality)
378    
379    ----------------------------------------------------------------------
380    Name: Matthias Blume (blume (at) tti - c (dot) org)
381    Date: 2003/09/08 11:55:00 CDT
382    Tag: blume-20030908-fullpath
383    Description:
384    
385    Made Win32 version of OS.FileSys.fullPath return current directory
386    when given an empty string.  This is what the spec says, and incidentally,
387    CM depends on it.  (CM otherwise goes into an infinite loop in certain
388    cases when presented with the name of a non-existing .cm file.)
389    
390    ----------------------------------------------------------------------
391    Name: Matthias Blume (blume (at) tti - c (dot) org)
392    Date: 2003/09/04 16:30:00 CDT
393    Tag: blume-20030905-slices-etc
394    Description:
395    
396      1. Changed interface to vectors and arrays in Basis to match
397         (draft) Basis spec.
398      2. Added signatures and implementations of slices according to
399         Basis spec.
400      3. Edited source code throughout the system to make it compile again
401         under 1. and 2.  (In some cases code had to be added to have it
402         match the new signatures.)
403      4. MLRISC should be backward-compatible: the copies of the originals
404         of files that needed to change under 3. were retained, the .cm files
405         check the compiler version number and use old versions when
406         appropriate.
407      5. Changed type of OS.FileSys.readDir and Posix.FileSys.readdir to
408         dirstream -> string option (in accordance with Basis spec).
409      6. When generating code that counts lines, ml-lex used function
410         CharVector.foldli, taking advantage of its old interface.
411         This has been replaced with the corresponding code from
412         CharVectorSlice.  (html-lex must be re-lexed!)
413      7. BitArray in smlnj-lib/Util has been extended/modified to match the
414         new MONO_ARRAY signature.  (Do we need BitArraySlice?)
415      8. Removed temporary additions (fromInternal, toInternal) from the
416         (now obsolete) IntInf in smlnj-lib/Util.
417      9. Cleaned up structure Byte.
418     10. Added localOffset, scan, and fromString to Date (according to spec).
419         Cleaned/corrected implementation of Date.
420         (Still need to check for correctness; implement better canonicalizeDate.)
421     11. Added "scan" to signature IEEE_REAL.
422     12. Some improvements to IntInf [in particular: efficiency-hack for
423         mod and rem when second operand is 2 (for parity checks).]
424     13. Changed representation of type Time.time, using a single IntInf.int
425         value counting microseconds.  This considerably simplified the
426         implementation of structure Time.  We now support negative time
427         values; scan and fromString handle signs.
428     14. Functor PrimIO now takes two additional arguments (VectorSlice and
429         ArraySlice).
430    
431    ----------------------------------------------------------------------
432    Name: Matthias Blume (blume (at) tti - c (dot) org)
433    Date: 2003/08/28 17:00:00 CDT
434    Tag: blume-20030828-intinf
435    Description:
436    
437    This is a major update which comes with a version number bump
438    (110.42.99 -- yes, we are really close to 110.43 :-), NEW BOOTFILES,
439    and an implementation of IntInf in the Basis.
440    
441    There are a fairly large number of related changes and updates throughout
442    the system:
443    
444    Basis:
445            - Implemented IntInf.
446            - Made LargeInt a projection of IntInf (by filtering through INTEGER).
447            - Added some missing Real64 operations, most notably Real.toLargeInt.
448            - Added FixedInt as a synonym for Int32.
449    
450    compiler:
451            * Added support for a built-in intinf type.
452              - literals
453              - pattern matching
454              - conversion shortcuts (Int32.fromLarge o Int.toLarge etc.)
455              - overloading on literals and operations
456    
457            This required adding a primitive type intinf, some additional
458            primops, and implementations for several non-trivial intinf
459            operations in Core.  (The intinf type is completely abstract
460            to the compiler; all operations get delegated back to the Core.)
461    
462            * Intinf equality is handled by polyequal.  However, the compiler
463            does not print its usual warning in this case (since polyequal
464            is the right thing to do there).
465    
466            * Improved the organization of structure InlineT.
467    
468            * A word about conversion primops:
469            If conversions involving intinf do not cancel out during
470            CPS contract, then the compiler must insert calls to Core functions.
471            Since all core access must be resolved already during the FLINT
472            translate phase, it would be too late a the time of CPS contract
473            to add new Core calls.  For this reason, conversion primops
474            for intinf carry two arguments:  1. the numeric argument that
475            they are supposed to convert, and 2. the Core function that
476            can help with this conversion if necessary.  If CPS contract
477            eliminates a primop, then the associated Core function becomes
478            dead and goes away.  Intinf conversion primops that do not get
479            eliminated by CPS contract get rewritten into calls of their
480            core functions by a separate, new phase.
481    
482    interactive system:
483            - Control.Print.intinfDepth controls max length of intinf constants
484            being printed. (Analogous to Control.Print.stringDepth.)
485            - Cleanup in printutil and pputil: got rid of unused stuff and
486            duplicates; replaced some of the code with code that makes better
487            use of library functionality.
488    
489    CM:
490            Bugfix: parse-errors in init group (system/smlnj/init/init.cmi)
491            are no longer silent.
492    
493    CKIT:
494            Fixed mismatched uses of Int32 and LargeInt.  I always decided
495            in favor of LargeInt -- which is now the same as IntInf.
496            CKIT-knowledgable people should check whether this is what's
497            intended and otherwise change things back to using Int32 or
498            FixedInt.
499    
500    Throughout the code:
501            Started using IntInf.int literals and built-in operations
502            (e.g., comparison with 0) where this seems appropriate.
503    
504    
505    ----------------------------------------------------------------------
506    Name: Dave MacQueen (dbm@cs.uchicago.edu)
507    Date: 2003/08/13 11:36:00 CDT
508    Tag: dbm-20030813-mcz-merge1
509    Description:
510    
511    Merging changes from the mcz-branch development branch into trunk.
512    These changes involve replacement of the emulated old prettyprinter
513    interface with direct use of the SML/NJ Lib PP library, and fixing
514    of a couple of bugs (895, 1186) relating to error messages.  A new
515    prettyprinter for ast datatypes (Elaborator/print/ppast.{sig,sml})
516    has been added.
517    
518    ----------------------------------------------------------------------
519    Name: Matthias Blume (blume (at) tti - c (dot) org)
520    Date: 2003/08/11 15:45:00 CDT
521    Tag: blume-20030811-windows
522    Description:
523    
524    Version number bumped to 110.42.9.  NEW BOOTFILES!!!
525    
526        http://smlnj.cs.uchicago.edu/dist/working/110.42.9/
527    
528    This patch restores SML/NJ's ability to run under win32.  There are a
529    number of changes, including fixes for several bugs that had gone
530    unnoticed until now:
531    
532      - uname "CYGWIN_NT*" is recognized as win32 (This is relevant only when
533        trying to run the win32 version from within cygwin.)
534    
535      - There are a number of simple .bat scripts that substitute for their
536        corresponding Unix shell-scripts.  (See below.)
537    
538      - The internals of ml-build have been modified slightly.  The main
539        difference is that instead of calling ".link-sml" (or link-sml.bat)
540        using OS.Process.system, the ML process delegates this task back
541        to the script.  Otherwise problems arise in mixed environments such
542        as Cygwin where scripts look and work like Unix scripts, but
543        where OS.Process.system cannot run them.
544    
545      - In CM, the srcpath pickler used native pathname syntax -- which
546        is incorrect in the case of cross-compilation.  The new pickle format
547        is independent of platform-specific naming conventions.
548    
549      - Path configuration files (such as lib/pathconfig) can now choose
550        between native and standard syntax.  Placing a line of the form
551    
552            standard!
553    
554        into the file causes all subsequent paths to be interpreted using
555        CM standard pathname syntax (= Unix conventions); a line
556    
557            native!
558    
559        switches back to native style.  This was needed so that
560        path config files can be written portably, see src/system/pathconfig.
561    
562      - Runtime system:
563    
564          - win32-filesys.c:  get_file_time and set_file_time now
565            access modification time, not creation time.
566    
567          - I/O code made aware of new array representation.
568    
569          - Bug fixes in X86.prim.masm.
570    
571       - src/system/makeml made aware of win32. (For use under cygwin
572            and other Unix-environments for windows.)
573    
574       - In Basis, fixed off-by-one error in win32-io.sml (function vecF)
575         which caused BinIO.inputAll to fail consistently.
576    
577    .bat scripts:
578    
579       Windows .bat scripts assume that SMLNJ_HOME is defined.
580    
581       - sml.bat, ml-yacc.bat, ml-lex.bat:  Driver scripts for standalone
582         applications (sml, ml-yacc, ml-lex).
583       - ml-build.bat: analogous to ml-build.
584       - config\install.bat:  Analogous to config/install.sh.  This requires
585         that SMLNJ_HOME is set and that Microsoft Visual C is ready to use.
586         (nmake etc. must be on the path, and vcvars32 must have been run.)
587         Moreover, sources for ml-lex and ml-yacc need to exist under src,
588         and the bootfile hierarchy must have been unpacked under
589         sml.boot.x86-win32.
590         The script is very primitive and does a poor job at error checking.
591         It only installs the base system, ml-lex, and ml-yacc.  No other
592         libraries are being installed (i.e., you get only those that
593         are part of the compiler.)
594       - link-sml.bat:  analogous to .link-sml, but not currently used
595    
596    Unrelated bug fixes:
597    
598      - ml-nlffigen now exports structures ST_* corresponding to incomplete
599        types.
600      - Added getDevice to PP/src/pp-debug-fn.sml.  (Would not compile
601        otherwise.)
602    
603    ----------------------------------------------------------------------
604    Name: Dave MacQueen (macqueen@cs.uchicago.edu)
605    Date: 2003/06/17
606    Tag: macqueen-20030617-bug895
607    Description:
608    
609    Modified compiler/Elaborator/print/pptype.sml to fix bug 895.
610    Tag will be used for new development branch (mcz-branch) for
611    use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago.
612    
613    ----------------------------------------------------------------------
614    Name: Matthias Blume (blume (at) tti - c (dot) org)
615    Date: 2003/05/27 16:55:00 CDT
616    Tag: blume-20030527-polyeq
617    Description:
618    
619    Tried to eliminated most cases of polymorphic equality.
620    
621    ----------------------------------------------------------------------
622    Name: Matthias Blume (blume (at) tti - c (dot) org)
623    Date: 2003/05/21 17:45:00 CDT
624    Tag: blume-20030517-complete
625    Description:
626    
627    Two changes:
628    
629      1. Added a flag for controlling whether non-exhaustive bindings will
630         be treated as errors (default is false).
631      2. Cleaned up the *entire* source tree so that CMB.make goes through
632         without a single non-exhaustive match- or bind warning.
633    
634    ----------------------------------------------------------------------
635    Name: Matthias Blume (blume (at) tti - c (dot) org)
636    Date: 2003/05/17 10:20:00 CDT
637    Tag: blume-20030517-absyn
638    Description:
639    
640    1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
641    
642       This mainly affects the quality of error messages.  However, some
643       of the code is now more straightforward than before. (Treatment of
644       the above four constructs in translate.sml is much simpler than
645       the "macro-expansion" that was going on before.  Plus, the mach-
646       compiler no longer gets invoked just to be able to compile an
647       if-expression.)
648    
649    2. The ErrorMsg.Error exception is now caught and absorbed by the
650       interactive loop.
651    
652    ----------------------------------------------------------------------
653    Name: Allen Leung
654    Date: 2003/05/16 13:05:00 CDT
655    Tag: leunga-20030516-cygwin-runtime
656    Description:
657    
658        Ported the runtime system to cygwin, which uses the unix
659    x86-unix bin files.  Missing/buggy features:
660    
661       o getnetbyname, getnetbyaddr: these functions seem to be missing in
662         the Cygwin library.
663       o Ctrl-C handling may be flaky.
664       o Windows system calls and Windows I/O are not supported.
665    
666       A new set of binfiles is located at:
667    
668         http://www.dorsai.org/~leunga/boot.x86-unix.tgz
669    
670       This is only needed for bootstrapping the cygwin version of smlnj.
671       Other x86 versions can use the existing binfiles.
672    
673    ----------------------------------------------------------------------
674    Name: Matthias Blume
675    Date: 2003/04/08 15:42:00 CDT
676    Tag: blume-20030408-listpair
677    Description:
678    
679    1. Added a target 'mlrisc' to installer.
680    
681    2. Added missing elements to structure ListPair.
682    
683    ----------------------------------------------------------------------
684    Name: Allen Leung
685    Date: 2003/01/07 10:40:00 EST
686    Tag: leunga-20030107-int-rem
687    Description:
688    
689    Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86.
690    The arguments to the SUBL instruction were swapped.
691    
692    ----------------------------------------------------------------------
693    Name: Matthias Blume
694    Date: 2002/12/12 16:25:00 EST
695    Tag: blume-20021212-risc-ra
696    Description:
697    
698    Fixed a serious bug in the rewrite code for FP spilling/reloading that
699    sent the RA into an infinite loop when floating point registers get
700    spilled.  (Because of this bug, e.g., nucleic stopped compiling between
701    110.37 and 110.38.)
702    There was another set of potential problems related to the handling of
703    MLRISC annotations (but those did not yet cause real problems, apparently).
704    
705    ----------------------------------------------------------------------
706    Name: Matthias Blume
707    Date: 2002/12/06 22:40:00 EST
708    Tag: blume-20021206-cm-fileid
709    Description:
710    
711    Added a call of SrcPath.sync at the beginning of Parse.parse (in CM).
712    This fixes the problem of CM getting confused by files that suddenly
713    change their identity (e.g., by getting unlinked and recreated by some
714    text editor such as vi).  There might be a better/cheaper/cleaner way
715    of doing this, but for now this will have to do.
716    
717    ----------------------------------------------------------------------
718    Name: Matthias Blume
719    Date: 2002/10/28 09:50:00 EST
720    Tag: blume-20021028-typecheck
721    Description:
722    
723    Exported structure Typecheck from $smlnj/viscomp/core.cm.
724    
725    ----------------------------------------------------------------------
726    Name: Matthias Blume
727    Date: 2002/10/17 09:10:00 EDT
728    Tag: Release_110_42
729    Description:
730    
731    In good old tradition, there has been a slight hiccup so that we have
732    to patch 110.42 after the fact.   The old release tag has been replaced
733    (see below).
734    
735    The change solves a problem with two competing approaches the
736    configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in
737    each other's way.
738    
739    This change only affects the runtime system code and the installer script.
740    (No new bootfiles.)
741    
742    ----------------------------------------------------------------------
743    Name: Matthias Blume
744    Date: 2002/10/16 12:00:00 EDT
745    Tag: Release_110_42_removed
746    Description:
747    
748    New working release.  New bootfiles.
749    
750    ----------------------------------------------------------------------
751    Name: Matthias Blume
752    Date: 2002/10/10 13:10:00 EDT
753    Tag: blume-20021010-ppc-divs
754    Description:
755    
756    The mltree operator DIVS must be implemented with an overflow check on
757    the PPC because the hardware indicates divide-by-zero using "overflow" as
758    well.
759    
760    ----------------------------------------------------------------------
761    Name: Matthias Blume
762    Date: 2002/07/23 11:45:00
763    Tag: blume-20020723-smlnj-home
764    Description:
765    
766    Sml now senses the SMLNJ_HOME environment variable.  If this is set,
767    then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless
768    CM_PATHCONFIG is also set), the path configuration file is assumed
769    to be in $SMLNJ_HOME/lib/pathconfig.  This way one can easily move
770    the entire tree to some other place and everything will "just work".
771    
772    (Companion commands such as ml-build and ml-makedepend also sense this
773    variable.)
774    
775    ----------------------------------------------------------------------
776    Name: Matthias Blume
777    Date: 2002/07/12 21:19:00 EDT
778    Tag: blume-20020712-liveness
779    Description:
780    
781    Exported two useful "step" functions from liveness module (MLRISC).
782    
783    ----------------------------------------------------------------------
784    Name: Matthias Blume
785    Date: 2002/07/05 16:00 EDT
786    Tag: Release_110_41
787    Description:
788    
789    New working release.  New bootfiles.
790    
791    ----------------------------------------------------------------------
792    Name: Matthias Blume
793    Date: 2002/07/05 10:25:00 EDT
794    Tag: blume-20020705-btimp
795    Description:
796    
797    Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that
798    other clients can set up backtracing support.
799    
800    ----------------------------------------------------------------------
801    Name: Matthias Blume
802    Date: 2002/06/25 17:23:00 EDT
803    Tag: blume-20020625-fpmax
804    Description:
805    
806    Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point
807    case.  (The sense of the isNaN test was reversed -- which made min and
808    max always return their first argument.)
809    
810    ----------------------------------------------------------------------
811    Name: Matthias Blume
812    Date: 2002/06/11
813    Tag: blume-20020611-unixpath
814    Description:
815    
816    Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
817    
818    ----------------------------------------------------------------------
819    Name: Matthias Blume
820    Date: 2002/06/10 16:35:00 EDT
821    Tag: blume-20020610-ieeereal
822    Description:
823    
824    I back-ported my implementation of IEEEReal.fromString from the
825    idlbasis-devel branch so that we can test it.
826    
827    Another small change is that ppDec tries to give more information
828    than just "<sig>" in the case of functors.  However, this code is
829    broken in some mysterious way if the functor's body's signature
830    has not been declared by ascription but gets inferred from the
831    implementation.  This needs fixing...
832    
833    ----------------------------------------------------------------------
834    Name: Matthias Blume
835    Date: 2002/05/31
836    Tag: blume-20020531-btrace-mode
837    Description:
838    
839    Resurrected SMLofNJ.Internals.BTrace.mode.  (It accidentally fell by
840    the wayside when I switched over to using Controls everywhere.)
841    
842    ----------------------------------------------------------------------
843    Name: Lal George
844    Date: 2002/05/23 12:21:40 EDT
845    Tag: george-20020523-visual-labels
846    Description:
847    
848    Labels are now displayed in the graphical output to make
849    the fall-through and target blocks obvious.
850    
851    ----------------------------------------------------------------------
852    Name: Matthias Blume
853    Date: 2002/05/22 11:03:00 EDT
854    Tag: blume-20020522-shrink
855    Description:
856    
857    John tweaked yesterday's fix for 1131 to handle an out-of-memory
858    situation that comes up when allocating huge arrays.
859    
860    ----------------------------------------------------------------------
861    Name: Matthias Blume
862    Date: 2002/05/21 16:00:00 EDT
863    Tag: Release_110_40
864    Description:
865    
866    New working release (110.40).  New bootfiles.
867    
868    [Also: John Reppy fixed GC bug 1131.]
869    
870    ----------------------------------------------------------------------
871    Name: Matthias Blume
872    Date: 2002/05/21 12:35:00 EDT
873    Tag: blume-20020521-cmdoc
874    Description:
875    
876    CM documentation update.
877    
878    ----------------------------------------------------------------------
879    Name: Matthias Blume
880    Date: 2002/05/21 10:55:00 EDT
881    Tag: blume-20020521-misc
882    Description:
883    
884    - John tweaked runtime to be silent on heap export (except when
885      GC messages are on).
886    - I added a few more things (cross-compiling versions of CMB) to
887      config/preloads (as suggestions).
888    
889    ----------------------------------------------------------------------
890    Name: Matthias Blume
891    Date: 2002/05/20 22:25:00 EDT
892    Tag: blume-20020520-controls
893    Description:
894    
895    - Added ControlUtil structure to control-lib.cm.
896    - Use it throughout.
897    - Used Controls facility to define MLRISC controls (as opposed to
898      registering MLRISC control ref cells with Controls after the fact)
899    - Fixed messed-up controls priorities.
900    
901    * Removed again all the stuff from config/preloads that one wouldn't
902      be able to preload at the time the initial heap image is built.
903      (Many libraries, e.g., CML, do not exist yet at this time.  The
904       only libraries that can be preloaded via config/preloads are those
905       that come bundled with the bootfiles.)
906    
907    ----------------------------------------------------------------------
908    Name: Matthias Blume
909    Date: 2002/05/20 10:59:00 EDT
910    Tag: blume-20020520-preloads
911    Description:
912    
913    Added a lot of commented-out suggestions for things to be included
914    in config/preloads.
915    
916    ----------------------------------------------------------------------
917    Name: Allen Leung
918    Date: 2002/05/18 14:20:00 EDT
919    Tag: leunga-20020518-mdl
920    Description:
921    
922    o Made the mdl tool stuff compile and run again.
923    o I've disabled all the stuff that depends on RTL specifications; they
924      are all badly broken anyway.
925    
926    ----------------------------------------------------------------------
927    Name: Matthias Blume
928    Date: 2002/05/17 16:49:00 EDT
929    Tag: blume-20020517-controls
930    Description:
931    
932    0. John Reppy made several modifications to the SML/NJ library.
933       In particular, there is a shiny new controls-lib.cm.
934    
935    1. Pushed new controls interface through compiler so that everything
936       compiles again.
937    
938    2. Added FormatComb and FORMAT_COMB to the CML version of the
939       SML/NJ library (so that CML compiles again).
940    
941    3. Modified init scripts because XXX_DEFAULT environment variables
942       are no longer with us.  (Boot-time initialization is now done
943       using the same environment variables that are also used for
944       startup-time initialization of controls.)
945    
946    ----------------------------------------------------------------------
947    Name: Lal George
948    Date: 2002/05/15 09:20:10 EDT
949    Tag: george-20020515-pseudo-op-decls
950    Description:
951    
952            All pseudo-ops emitted before the first segment declaration
953    such as TEXT, DATA, and BSS directives are assumed to be global
954    declarations and are emitted first in the assembly file. This is
955    useful in a number of situations where one has pseudo-ops that are not
956    specific to any segment, and also works around the constraint that one
957    cannot have client pseudo-ops in the TEXT segment.
958    
959            Because no segment is associated with these declarations it is
960    an error to allocate any space or objects before the first segment
961    directive and an exception will be raised. However, we cannot make
962    this check for client pseudo-ops.
963    
964            These top level declarations are a field in the CFG graph_info.
965    In theory you can continue to add to this field after the CFG has been
966    built -- provided you know what you are doing;-)
967    
968    ----------------------------------------------------------------------
969    Name: Matthias Blume
970    Date: 2002/05/13 16:40:00 EDT
971    Tag: blume-20020513-pp-etc
972    Description:
973    
974    A few minor bugfixes:
975    
976      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
977        (Bogus printouts for redefined bindings still occur.  Compiler
978        bug should no longer occur now.  We need to redo the prettyprinter
979        from scratch.)
980    
981      - CM pathname printer now also adds escape sequences for ( and )
982    
983      - commend and docu fixes for ml-nlffi
984    
985    ----------------------------------------------------------------------
986    Name: Matthias Blume
987    Date: 2002/05/10 16:40:00 EDT
988    Tag: blume-20020510-erg-textio
989    Description:
990    
991    Applied the following bugfix provided by Emden Gansner:
992    
993        Output is corrupted when outputSubstr is used rather than output.
994    
995        The problem occurs when a substring
996    
997            ss = (s, dataStart, dataLen)
998    
999        where dataStart > 0, fills a stream buffer with avail bytes left.
1000        avail bytes of s, starting at index dataStart, are copied into the
1001        buffer, the buffer is flushed, and then the remaining dataLen-avail
1002        bytes of ss are copied into the beginning of the buffer. Instead of
1003        starting this copy at index dataStart+avail in s, the current code
1004        starts the copy at index avail.
1005    
1006        Fix:
1007        In text-io-fn.sml, change line 695 from
1008             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
1009        to
1010             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
1011    
1012    ----------------------------------------------------------------------
1013    Name: Matthias Blume
1014    Date: 2002/04/12 13:55:00 EDT
1015    Tag: blume-20020412-assyntax
1016    Description:
1017    
1018    1. Grabbed newer assyntax.h from the XFree86 project.
1019    2. Fiddled with how to compile X86.prim.asm without warnings.
1020    3. (Very) Minor cleanup in CM.
1021    
1022    ----------------------------------------------------------------------
1023    Name: Matthias Blume
1024    Date: 2002/04/01 (no joke!) 17:07:00 EST
1025    Tag: blume-20020401-x86div
1026    Description:
1027    
1028    Added full support for div/mod/rem/quot on the x86, using the machine
1029    instruction's two results (without clumsily recomputing the remainder)
1030    directly where appropriate.
1031    
1032    Some more extensive power-of-two support was added to the x86 instruction
1033    selector (avoiding expensive divs, mods, and muls where they can be
1034    replaced with cheaper shifts and masks).  However, this sort of thing
1035    ought to be done earlier, e.g., within the CPS optimizer so that
1036    all architectures benefit from it.
1037    
1038    The compiler compiles to a fixed point, but changes might be somewhat
1039    fragile nevertheless.  Please, report any strange things that you might
1040    see wrt. div/mod/quot/rem...
1041    
1042    ----------------------------------------------------------------------
1043    Name: Matthias Blume
1044    Date: 2002/03/29 17:22:00
1045    Tag: blume-20020329-div
1046    Description:
1047    
1048    Fixed my broken div/mod logic.  Unfortunately, this means that the
1049    inline code for div/mod now has one more comparison than before.
1050    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
1051    The problem was with quotient = 0, because that alone does not tell
1052    us which way the rounding went.  One then has to look at whether
1053    remainder and divisor have the same sign...  :(
1054    
1055    Anyway, I replaced the bootfiles with fresh ones...
1056    
1057    ----------------------------------------------------------------------
1058    Name: Matthias Blume
1059    Date: 2002/03/29 14:10:00 EST
1060    Tag: blume-20020329-inlprims
1061    Description:
1062    
1063    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
1064    
1065    Primops have changed. This means that the bin/boot-file formats have
1066    changed as well.
1067    
1068    To make sure that there is no confusion, I made a new version.
1069    
1070    
1071    CHANGES:
1072    
1073    * removed REMT from mltree (remainder should never overflow).
1074    
1075    * added primops to deal with divisions of all flavors to the frontend
1076    
1077    * handled these primops all the way through so they map to their respective
1078      MLRISC support
1079    
1080    * used these primops in the implementation of Int, Int32, Word, Word32
1081    
1082    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
1083    
1084    * parameterized INLMIN, INLMAX, and INLABS by a numkind
1085    
1086    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
1087      floating point
1088    
1089    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
1090      and Real (but Real.abs maps to a separate floating-point-only primop)
1091    
1092    
1093    TODO items:
1094    
1095    * Hacked Alpha32 instruction selection, disabling the selection of REMx
1096      instructions because the machine instruction encoder cannot handle
1097      them.  (Hppa, PPC, and Sparc instruction selection did not handle
1098      REM in the first place, and REM is supported by the x86 machine coder.)
1099    
1100    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
1101      selection phase.  (The two can be streamlined because the hardware
1102      delivers both quotient and remainder at the same time anyway.)
1103    
1104    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
1105      (Currently the behavior is inconsistent both across architectures and
1106      wrt. the draft Basis spec.)
1107    
1108    * Word8 should eventually be handled natively, too.
1109    
1110    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
1111      as if there currently is no execution path that could trigger it in
1112      SML/NJ.  (The assumptions underlying functions arith and promotable do not
1113      hold for things like multiplication and division.)
1114    
1115    ----------------------------------------------------------------------
1116    Name: Matthias Blume
1117    Date: 2002/03/27 16:27:00 EST
1118    Tag: blume-20020327-mlrisc-divisions
1119    Description:
1120    
1121    Added support for all four division operations (ML's div, mod, quot,
1122    and rem) to MLRISC.  In the course of doing so, I also rationalized
1123    the naming (no more annoying switch-around of DIV and QUOT), by
1124    parameterizing the operation by div_rounding_mode (which can be either
1125    DIV_TO_ZERO or DIV_TO_NEGINF).
1126    
1127    The generic MLTreeGen functor takes care of compiling all four
1128    operations down to only round-to-zero div.
1129    
1130    Missing pieces:
1131    
1132      * Doing something smarter than relying on MLTreeGen on architectures
1133        like, e.g., the x86 where hardware division delivers both quotient and
1134        remainder at the same time.  With this, the implementation of the
1135        round-to-neginf operations could be further streamlined.
1136    
1137      * Remove inlining support for div/mod/rem from the frontend and replace it
1138        with primops that get carried through to the backend.  Do this for all
1139        int and word types.
1140    
1141    ----------------------------------------------------------------------
1142    Name: Matthias Blume
1143    Date: 2002/03/25 17:25:00 EST
1144    Tag: blume-20020325-divmod
1145    Description:
1146    
1147    I improved (hopefully without breaking them) the implementation of Int.div,
1148    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
1149    advantage of the following observations:
1150    
1151      Let  q = x quot y      r = x rem y
1152           d = x div  y      m = x mod y
1153    
1154    where "quot" is the round-to-zero version of integer division that
1155    hardware usually provides.  Then we have:
1156    
1157         r = x - q * y        where neither the * nor the - will overflow
1158         d = if q >= 0 orelse x = q * y then q else q - 1
1159                              where neither the * nor the - will overflow
1160         m = if q >= 0 orelse r = 0 then r else r + y
1161                              where the + will not overflow
1162    
1163    This results in substantial simplification of the generated code.
1164    The following table shows the number of CFG nodes and edges generated
1165    for
1166            fun f (x, y) = x OPER y
1167            (* with OPER \in div, mod, quot, rem *)
1168    
1169    
1170        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
1171        --------------------------------------------------------
1172         div |         24 |         39 |         12 |         16
1173         mod |         41 |         71 |         12 |         16
1174        quot |          8 |         10 |          8 |         10
1175         rem |         10 |         14 |          8 |         10
1176    
1177    
1178    ----------------------------------------------------------------------
1179    Name: Matthias Blume
1180    Date: 2002/03/25 22:06:00 EST
1181    Tag: blume-20020325-cprotobug
1182    Description:
1183    
1184    Fixed a bug in cproto (c prototype decoder).
1185    
1186    ----------------------------------------------------------------------
1187    Name: Matthias Blume
1188    Date: 2002/03/25 16:00:00 EST
1189    Tag: blume-20020325-raw-primops
1190    Description:
1191    
1192    I did some cleanup to Allen's new primop code and
1193    replaced yesterday's bootfiles with new ones.
1194    (But they are stored in the same place.)
1195    
1196    ----------------------------------------------------------------------
1197    Name: Matthias Blume
1198    Date: 2002/03/24 22:40:00 EST
1199    Tag: blume-20020324-bootfiles
1200    Description:
1201    
1202    Made the bootfiles that Allen asked for.
1203    
1204    ----------------------------------------------------------------------
1205    Name: Allen Leung
1206    Date: 2002/03/23 15:50:00 EST
1207    Tag: leunga-20020323-flint-cps-rcc-primops
1208    Description:
1209    
1210      1. Changes to FLINT primops:
1211    
1212        (* make a call to a C-function;
1213         * The primop carries C function prototype information and specifies
1214         * which of its (ML-) arguments are floating point. C prototype
1215         * information is for use by the backend, ML information is for
1216         * use by the CPS converter. *)
1217      | RAW_CCALL of { c_proto: CTypes.c_proto,
1218                       ml_args: ccall_type list,
1219                       ml_res_opt: ccall_type option,
1220                       reentrant : bool
1221                     } option
1222       (* Allocate uninitialized storage on the heap.
1223        * The record is meant to hold short-lived C objects, i.e., they
1224        * are not ML pointers.  With the tag, the representation is
1225        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
1226        *)
1227      | RAW_RECORD of {tag:bool,sz:int}
1228      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
1229    
1230      2.  These CPS primops are now overloaded:
1231    
1232           rawload of {kind:numkind}
1233           rawstore of {kind:numkind}
1234    
1235          The one argument form is:
1236    
1237             rawload {kind} address
1238    
1239          The two argument form is:
1240    
1241             rawload {kind} [ml object, byte-offset]
1242    
1243      3. RAW_CCALL/RCC now takes two extra arguments:
1244    
1245         a. The first is whether the C call is reentrant, i.e., whether
1246            ML state should be saved and restored.
1247         b. The second argument is a string argument specifying the name of
1248            library and the C function.
1249    
1250         These things are currently not handled in the code generator, yet.
1251    
1252      4. In CProto,
1253    
1254         An encoding type of "bool" means "ml object" and is mapped into
1255         C prototype of PTR.  Note that "bool" is different than "string",
1256         even though "string" is also mapped into PTR, because "bool"
1257         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
1258    
1259      5. Pickler/unpicker
1260    
1261         Changed to handle RAW_RECORD and newest RAW_CCALL
1262    
1263      6. MLRiscGen,
1264    
1265         1. Changed to handle the new rawload/rawstore/rawrecord operators.
1266         2. Code for handling C Calls has been moved to a new module CPSCCalls,
1267            in the file CodeGen/cpscompile/cps-c-calls.sml
1268    
1269      7. Added the conditional move operator
1270    
1271             condmove of branch
1272    
1273         to cps.  Generation of this is still buggy so it is currently
1274         disabled.
1275    
1276    ----------------------------------------------------------------------
1277    Name: Lal George
1278    Date: 2002/03/22 14:18:25 EST
1279    Tag: george-20020322-cps-branch-prob
1280    Description:
1281    
1282    Implemented the Ball-Larus branch prediction-heuristics, and
1283    incorporated graphical viewers for control flow graphs.
1284    
1285    Ball-Larus Heuristics:
1286    ---------------------
1287    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
1288    
1289    By design it uses the Dempster-Shafer theory for combining
1290    probabilities.  For example, in the function:
1291    
1292        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
1293    
1294    the ball-larus heuristics predicts that the n=0 is unlikely
1295    (OH-heuristic), and the 'then' branch is unlikely because of the
1296    RH-heuristic -- giving the 'then' branch an even lower combined
1297    probability using the Dempster-Shafer theory.
1298    
1299    Finally, John Reppy's loop analysis in MLRISC, further lowers the
1300    probability of the 'then' branch because of the loop in the else
1301    branch.
1302    
1303    
1304    Graphical Viewing:
1305    ------------------
1306    I merely plugged in Allen's graphical viewers into the compiler. The
1307    additional code is not much. At the top level, saying:
1308    
1309            Control.MLRISC.getFlag "cfg-graphical-view" := true;
1310    
1311    will display the graphical view of the control flow graph just before
1312    back-patching.  daVinci must be in your path for this to work. If
1313    daVinci is not available, then the default viewer can be changed
1314    using:
1315    
1316            Control.MLRISC.getString "viewer"
1317    
1318    which can be set to "dot" or "vcg" for the corresponding viewers. Of
1319    course, these viewers must be in your path.
1320    
1321    The above will display the compilation unit at the level of clusters,
1322    many of which are small, boring, and un-interesting. Also setting:
1323    
1324            Control.MLRISC.getInt "cfg-graphical-view_size"
1325    
1326    will display clusters that are larger than the value set by the above.
1327    
1328    
1329    ----------------------------------------------------------------------
1330    Name: Matthias Blume
1331    Date: 2002/03/21 22:20:00 EST
1332    Tag: blume-20020321-kmp-bugfix
1333    Description:
1334    
1335    Changed the interface to the KMP routine in PreString and fixed
1336    a minor bug in one place where it was used.
1337    
1338    ----------------------------------------------------------------------
1339    Name: Allen Leung
1340    Date: 2002/03/21 20:30:00 EST
1341    Tag: leunga-20020321-cfg
1342    Description:
1343    
1344      Fixed a potential problem in cfg edge splitting.
1345    
1346    ----------------------------------------------------------------------
1347    Name: Allen Leung
1348    Date: 2002/03/21 17:15:00 EST
1349    Tag: leunga-20020321-x86-fp-cfg
1350    Description:
1351    
1352      1. Recoded the buggy parts of x86-fp.
1353    
1354         a. All the block reordering code has been removed.
1355            We now depend on the block placement phases to do this work.
1356    
1357         b. Critical edge splitting code has been simplified and moved into the
1358            CFG modules, as where they belong.
1359    
1360         Both of these were quite buggy and complex.  The code is now much, much
1361         simpler.
1362    
1363      2. X86 backend.
1364    
1365         a. Added instructions for 64-bit support.  Instruction selection for
1366            64-bit has not been committed, however, since that
1367            requires changes to MLTREE which haven't been approved by
1368            Lal and John.
1369    
1370         b. Added support for FUCOMI and FUCOMIP when generating code for
1371            PentiumPro and above.  We only generate these instructions in
1372            the fast-fp mode.
1373    
1374         c. Added cases for JP and JNP in X86FreqProps.
1375    
1376      3. CFG
1377    
1378         CFG now has a bunch of methods for edge splitting and merging.
1379    
1380      4. Machine description.
1381    
1382         John's simplification of MLTREE_BASIS.fcond broke a few machine
1383         description things:
1384    
1385         rtl-build.{sig,sml} and hppa.mdl fixed.
1386    
1387         NOTE: the machine description stuff in the repository is still broken.
1388               Again, I can't put my fixes in because that involves
1389               changes to MLTREE.
1390    
1391    ----------------------------------------------------------------------
1392    Name: Matthias Blume
1393    Date: 2002/03/20 15:55:00 EST
1394    Tag: blume-20020320-kmp
1395    Description:
1396    
1397    Implemented Knuth-Morris-Pratt string matching in PreString and used
1398    it for String.isSubstring, Substring.isSubstring, and
1399    Substring.position.
1400    
1401    (Might need some stress-testing.  Simple examples worked fine.)
1402    
1403    ----------------------------------------------------------------------
1404    Name: Matthias Blume
1405    Date: 2002/03/19 16:37:00 EST
1406    Tag: blume-20020319-witnesses
1407    Description:
1408    
1409    Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib.
1410    
1411    This implements a generic mechanism for changing constness qualifiers
1412    anywhere within big C types without resorting to outright "casts".
1413    (So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you
1414    modify the constness at the outermost level.)
1415    The implementation of "convert" is based on the idea of "witness"
1416    values -- values that are not used by the operation but whose types
1417    "testify" to their applicability.  On the implementation side, "convert"
1418    is simply a projection (returning its second curried argument).  With
1419    cross-module inlining, it should not result in any machine code being
1420    generated.
1421    
1422    ----------------------------------------------------------------------
1423    Name: Matthias Blume
1424    Date: 2002/03/15 16:40:00 EST
1425    Tag: blume-20020315-basis
1426    Description:
1427    
1428    Provided (preliminary?) implementations for
1429    
1430      {String,Substring}.{concatWith,isSuffix,isSubstring}
1431    
1432    and
1433    
1434      Substring.full
1435    
1436    Those are in the Basis spec but they were missing in SML/NJ.
1437    
1438    ----------------------------------------------------------------------
1439    Name: Matthias Blume
1440    Date: 2002/03/14 21:30:00 EST
1441    Tag: blume-20020314-controls
1442    Description:
1443    
1444    Controls:
1445    ---------
1446    
1447    1. Factored out the recently-added Controls : CONTROLS stuff and put
1448       it into its own library $/controls-lib.cm.  The source tree for
1449       this is under src/smlnj-lib/Controls.
1450    
1451    2. Changed the names of types and functions in this interface, so they
1452       make a bit more "sense":
1453    
1454          module -> registry
1455          'a registry -> 'a group
1456    
1457    3. The interface now deals in ref cells only.  The getter/setter interface
1458       is (mostly) gone.
1459    
1460    4. Added a function that lets one register an already-existing ref cell.
1461    
1462    5. Made the corresponding modifications to the rest of the code so that
1463       everything compiles again.
1464    
1465    6. Changed the implementation of Controls.MLRISC back to something closer
1466       to the original.  In particular, this module (and therefore MLRISC)
1467       does not depend on Controls.  There now is some link-time code in
1468       int-sys.sml that registers the MLRISC controls with the Controls
1469       module.
1470    
1471    CM:
1472    ---
1473    
1474      * One can now specify the lambda-split aggressiveness in init.cmi.
1475    
1476    ----------------------------------------------------------------------
1477    Name: Allen Leung
1478    Date: 2002/03/13 17:30:00 EST
1479    Tag: leunga-20020313-x86-fp-unary
1480    Description:
1481    
1482    Bug fix for:
1483    
1484    > leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml
1485    > Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002
1486    > - fun f(x,(y,z)) = Real.~ y;
1487    > [autoloading]
1488    > [autoloading done]
1489    >       fchsl   (%eax), 184(%esp)
1490    > Error: MLRisc bug: X86MCEmitter.emitInstr
1491    >
1492    > uncaught exception Error
1493    >   raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19
1494    
1495    The problem was that the code generator did not generate any fp registers
1496    in this case, and the ra didn't know that it needed to run the X86FP phase to
1497    translate the pseudo fp instruction.   This only happened with unary fp
1498    operators in certain situations.
1499    
1500    ----------------------------------------------------------------------
1501    Name: Matthias Blume
1502    Date: 2002/03/13 14:00:00 EST
1503    Tag: blume-20020313-overload-etc
1504    Description:
1505    
1506    1. Added _overload as a synonym for overload for backward compatibility.
1507       (Control.overloadKW must be true for either version to be accepted.)
1508    
1509    2. Fixed bug in install script that caused more things to be installed
1510       than what was requested in config/targets.
1511    
1512    3. Made CM aware of the (_)overload construct so that autoloading
1513       works.
1514    
1515    ----------------------------------------------------------------------
1516    Name: Matthias Blume
1517    Date: 2002/03/12 22:03:00 EST
1518    Tag: blume-20020312-url
1519    Description:
1520    
1521    Forgot to update BOOT and srcarchiveurl.
1522    
1523    ----------------------------------------------------------------------
1524    Name: Matthias Blume
1525    Date: 2002/03/12 17:30:00 EST
1526    Tag: blume-20020312-version110392
1527    Description:
1528    
1529    Yet another version number bump (because of small changes to the
1530    binfile format).  Version number is now 110.39.2.  NEW BOOTFILES!
1531    
1532    Changes:
1533    
1534      The new pid generation scheme described a few weeks ago was overly
1535      complicated.  I implemented a new mechanism that is simpler and
1536      provides a bit more "stability":  Once CM has seen a compilation
1537      unit, it keeps its identity constant (as long as you do not delete
1538      those crucial CM/GUID/* files).  This means that when you change
1539      an interface, compile, then go back to the old interface, and
1540      compile again, you arrive at the original pid.
1541    
1542      There now also is a mechanism that instructs CM to use the plain
1543      environment hash as a module's pid (effectively making its GUID
1544      the empty string).  For this, "noguid" must be specified as an
1545      option to the .sml file in question within its .cm file.
1546      This is most useful for code that is being generated by tools such
1547      as ml-nlffigen (because during development programmers tend to
1548      erase the tool's entire output directory tree including CM's cached
1549      GUIDs).  "noguid" is somewhat dangerous (since it can be used to locally
1550      revert to the old, broken behavior of SML/NJ, but in specific cases
1551      where there is no danger of interface confusion, its use is ok
1552      (I think).
1553    
1554      ml-nlffigen by default generates "noguid" annotations.  They can be
1555      turned off by specifying -guid in its command line.
1556    
1557    ----------------------------------------------------------------------
1558    Name: Lal George
1559    Date: 2002/03/12 12 14:42:36 EST
1560    Tag: george-20020312-frequency-computation
1561    Description:
1562    
1563    Integrated jump chaining and static block frequency into the
1564    compiler. More details and numbers later.
1565    
1566    ----------------------------------------------------------------------
1567    Name: Lal George
1568    Date: 2002/03/11 11 22:38:53 EST
1569    Tag: george-20020311-jump-chain-elim
1570    Description:
1571    
1572    Tested the jump chain elimination on all architectures (except the
1573    hppa).  This is on by default right now and is profitable for the
1574    alpha and x86, however, it may not be profitable for the sparc and ppc
1575    when compiling the compiler.
1576    
1577    The gc test will typically jump to a label at the end of the cluster,
1578    where there is another jump to an external cluster containing the actual
1579    code to invoke gc. This is to allow factoring of common gc invocation
1580    sequences. That is to say, we generate:
1581    
1582            f:
1583               testgc
1584               ja   L1      % jump if above to L1
1585    
1586            L1:
1587               jmp L2
1588    
1589    
1590    After jump chain elimination the 'ja L1' instructions is converted to
1591    'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end
1592    up being implemented in their long form (if L2 is far away) using:
1593    
1594            jbe     L3      % jump if below or equal to L3
1595            jmp     L2
1596         L3:
1597            ...
1598    
1599    
1600    For large compilation units L2  may be far away.
1601    
1602    
1603    ----------------------------------------------------------------------
1604    Name: Matthias Blume
1605    Date: 2002/03/11 13:30:00 EST
1606    Tag: blume-20020311-mltreeeval
1607    Description:
1608    
1609    A functor parameter was missing.
1610    
1611    ----------------------------------------------------------------------
1612    Name: Allen Leung
1613    Date: 2002/03/11 10:30:00 EST
1614    Tag: leunga-20020311-runtime-string0
1615    Description:
1616    
1617       The representation of the empty string now points to a
1618    legal null terminated C string instead of unit.  It is now possible
1619    to convert an ML string into C string with InlineT.CharVector.getData.
1620    This compiles into one single machine instruction.
1621    
1622    ----------------------------------------------------------------------
1623    Name: Allen Leung
1624    Date: 2002/03/10 23:55:00 EST
1625    Tag: leunga-20020310-x86-call
1626    Description:
1627    
1628       Added machine generation for CALL instruction (relative displacement mode)
1629    
1630    ----------------------------------------------------------------------
1631    Name: Matthias Blume
1632    Date: 2002/03/08 16:05:00
1633    Tag: blume-20020308-entrypoints
1634    Description:
1635    
1636    Version number bumped to 110.39.1.  NEW BOOTFILES!
1637    
1638    Entrypoints: non-zero offset into a code object where execution should begin.
1639    
1640    - Added the notion of an entrypoint to CodeObj.
1641    - Added reading/writing of entrypoint info to Binfile.
1642    - Made runtime system bootloader aware of entrypoints.
1643    - Use the address of the label of the first function given to mlriscGen
1644      as the entrypoint.  This address is currently always 0, but it will
1645      not be 0 once we turn on block placement.
1646    - Removed the linkage cluster code (which was The Other Way(tm) of dealing
1647      with entry points) from mlriscGen.
1648    
1649    ----------------------------------------------------------------------
1650    Name: Allen Leung
1651    Date: 2002/03/07 20:45:00 EST
1652    Tag: leunga-20020307-x86-cmov
1653    Description:
1654    
1655       Bug fixes for CMOVcc on x86.
1656    
1657       1. Added machine code generation for CMOVcc
1658       2. CMOVcc is now generated in preference over SETcc on PentiumPro or above.
1659       3. CMOVcc cannot have an immediate operand as argument.
1660    
1661    ----------------------------------------------------------------------
1662    Name: Matthias Blume
1663    Date: 2002/03/07 16:15:00 EST
1664    Tag: blume-20020307-controls
1665    Description:
1666    
1667    This is a very large but mostly boring patch which makes (almost)
1668    every tuneable compiler knob (i.e., pretty much everything under
1669    Control.* plus a few other things) configurable via both the command
1670    line and environment variables in the style CM did its configuration
1671    until now.
1672    
1673    Try starting sml with '-h' (or, if you are brave, '-H')
1674    
1675    To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which
1676    implements the underlying generic mechanism.
1677    
1678    The interface to some of the existing such facilities has changed somewhat.
1679    For example, the MLRiscControl module now provides mkFoo instead of getFoo.
1680    (The getFoo interface is still there for backward-compatibility, but its
1681    use is deprecated.)
1682    
1683    The ml-build script passes -Cxxx=yyy command-line arguments through so
1684    that one can now twiddle the compiler settings when using this "batch"
1685    compiler.
1686    
1687    TODO items:
1688    
1689    We should go through and throw out all controls that are no longer
1690    connected to anything.  Moreover, we should go through and provide
1691    meaningful (and correct!) documentation strings for those controls
1692    that still are connected.
1693    
1694    Currently, multiple calls to Controls.new are accepted (only the first
1695    has any effect).  Eventually we should make sure that every control
1696    is being made (via Controls.new) exactly once.  Future access can then
1697    be done using Controls.acc.
1698    
1699    Finally, it would probably be a good idea to use the getter-setter
1700    interface to controls rather than ref cells.  For the time being, both
1701    styles are provided by the Controls module, but getter-setter pairs are
1702    better if thread-safety is of any concern because they can be wrapped.
1703    
1704    *****************************************
1705    
1706    One bug fix: The function blockPlacement in three of the MLRISC
1707    backpatch files used to be hard-wired to one of two possibilities at
1708    link time (according to the value of the placementFlag).  But (I
1709    think) it should rather sense the flag every time.
1710    
1711    *****************************************
1712    
1713    Other assorted changes (by other people who did not supply a HISTORY entry):
1714    
1715    1. the cross-module inliner now works much better (Monnier)
1716    2. representation of weights, frequencies, and probabilities in MLRISC
1717       changed in preparation of using those for weighted block placement
1718       (Reppy, George)
1719    
1720    ----------------------------------------------------------------------
1721    Name: Lal George
1722    Date: 2002/03/07 14:44:24 EST 2002
1723    Tag: george-20020307-weighted-block-placement
1724    
1725    Tested the weighted block placement optimization on all architectures
1726    (except the hppa) using AMPL to generate the block and edge frequencies.
1727    Changes were required in the machine properties to correctly
1728    categorize trap instructions. There is an MLRISC flag
1729    "weighted-block-placement" that can be used to enable weighted block
1730    placement, but this will be ineffective without block/edge
1731    frequencies (coming soon).
1732    
1733    
1734    ----------------------------------------------------------------------
1735    Name: Lal George
1736    Date: 2002/03/05 17:24:48 EST
1737    Tag: george-20020305-linkage-cluster
1738    
1739    In order to support the block placement optimization, a new cluster
1740    is generated as the very first cluster (called the linkage cluster).
1741    It contains a single jump to the 'real' entry point for the compilation
1742    unit. Block placement has no effect on the linkage cluster itself, but
1743    all the other clusters  have full freedom in the manner in which they
1744    reorder blocks or functions.
1745    
1746    On the x86 the typical linkage code that is generated is:
1747       ----------------------
1748            .align 2
1749       L0:
1750            addl    $L1-L0, 72(%esp)
1751            jmp     L1
1752    
1753    
1754            .align  2
1755       L1:
1756       ----------------------
1757    
1758    72(%esp) is the memory location for the stdlink register. This
1759    must contain the address of the CPS function being called. In the
1760    above example, it contains the address of  L0; before
1761    calling L1 (the real entry point for the compilation unit), it
1762    must contain the address for L1, and hence
1763    
1764            addl $L1-L0, 72(%esp)
1765    
1766    I have tested this on all architectures except the hppa.The increase
1767    in code size is of course negligible
1768    
1769    ----------------------------------------------------------------------
1770  Name: Allen Leung  Name: Allen Leung
1771  Date: 2002/03/03 13:20:00 EST  Date: 2002/03/03 13:20:00 EST
1772  Tag: leunga-20020303-mlrisc-tools  Tag: leunga-20020303-mlrisc-tools

Legend:
Removed from v.1115  
changed lines
  Added in v.1468

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