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/NOTES/HISTORY
ViewVC logotype

Diff of /sml/trunk/NOTES/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

sml/trunk/HISTORY revision 594, Tue Apr 4 23:41:47 2000 UTC sml/trunk/NOTES/HISTORY revision 2224, Wed Nov 29 15:57:46 2006 UTC
# Line 7  Line 7 
7    
8  The form of an entry should be:  The form of an entry should be:
9    
10  Name:  
11  Date:  Name: Your Name (web page or e-mail)
12  Tag: <post-commit CVS tag>  Date: yyyy/mm/dd hh:mm:ss
13    Tag: cvs-tag-for-this-change
14    Description:
15    
16    ----------------------------------------------------------------------
17    Name: Matthias Blume (http://www.tti-c.org/blume/)
18    Date: 2006/11/29 10:00:00 CST
19    Description:
20    
21    Use Say.vsay for printing the "[autoloading]" message, so
22    #set CM.Control.verbose false (or -Ccm.verbose=false) can be used
23    to suppress them.
24    
25    ----------------------------------------------------------------------
26    Name: Matthias Blume (http://www.tti-c.org/blume/)
27    Date: 2006/11/10 11:00:00 CST
28    Description:
29    
30    Fixed bug in CM where "with:" specifications that affect compilation
31    (as opposed to parsing) were ignored.
32    
33    ----------------------------------------------------------------------
34    Name: Matthias Blume (http://www.tti-c.org/blume/)
35    Date: 2006/11/09 14:30:00 CST
36    Tag: release-110.60
37    Description:
38    
39    New working release (110.60).  NEW BOOTFILES!
40    
41    This is the first subversion-hosted release.  There are also changes
42    to the directory layout.  Here is a table:
43    
44    (All pathnames are relative to the SML/NJ "root" directory.)
45    
46      config -> config
47    
48      src/cm -> base/cm
49      src/compiler -> base/compiler
50      src/runtime -> base/runtime
51      src/system -> base/system
52    
53      src/cm/pgraph -> pgraph
54    
55      src/READMES -> base/READMES
56      src/$notefile -> base/NOTES/$notefile
57         for <notefile> in BOOT CVSNOTES CYGWININSTALL HISTORY INSTALL
58                           MACOSXINSTALL WININSTALL
59    
60      src/smlnj-lib -> smlnj-lib
61      src/MLRISC -> MLRISC
62      ckit -> ckit
63      src/cml -> cml
64      src/eXene -> eXene
65      src/heap2asm -> heap2asm
66      src/lexgen -> lexgen
67      src/ml-burg -> ml-burg
68      src/ml-lex -> ml-lex
69      src/ml-yacc -> ml-yacc
70      src/ml-nlffi-lib -> nlffi/lib
71      src/ml-nlffigen -> nlffi/gen
72      src/smlnj-c -> smlnj-c
73      src/tools/TraceDebugProf -> trace-debug-profile
74    
75    In addition, there is also a new
76    
77      ml-lpt
78    
79    directory containing two new program generator tools: ml-ulex and
80    ml-antlr (a lexer generator that handles unicode and an ANTRL-inspired
81    LL(k) parser generator). These tools are currently "beta-quality"
82    
83    The latest versios of the sources can now be obtained anonymously
84    via subversion.  For this, it is useful to first check out
85    
86       svn://smlnj-gforge.cs.uchicago.edu/smlnj/admin
87    
88    and put the resulting directory on your shell's PATH.  This provides
89    access to three shell scripts: checkout-all.sh, stat-all.sh,
90    and refresh-all.sh.
91    
92    To create a freshly checked-out copy of the sources, do
93    
94       checkout-all.sh [dir]
95    
96    where dir is the optional SML/NJ root directory (default is ".").
97    
98    This creates the above directory layout.  Each subdirectory of
99    the root is under individual subversion control.  The stat-all.sh
100    and refresh-al.sh scripts apply "svn stat" or "svn update" to
101    each of these subtrees.
102    
103    ----------------------------------------------------------------------
104    Name: Matthias Blume (http://www.tti-c.org/blume/)
105    Date: 2006/11/02 12:20:00 CST
106    Description:
107    
108    Reorganized directory layout.
109    
110    This is a temporary solution, more reorganization is to come.
111    
112    The basic idea is to have a number of toplevel trees, each corresponding
113    to a well-defined part of the overall system.  Each part can be
114    maintained individually, even in separate source repositories,
115    although currently we still serve everything out of the main
116    smlnj-gforge tree.
117    
118    Installer and and scripts have been updated to reflect the new
119    layout.  The installer (base/src/system/smlnj/installer) is now
120    "scriptable" to avoid burning too much knowledge about the
121    layout into SML source code.  The main script used by the installer
122    is in config/actions.
123    
124    The main change is that many of the subdirectories of what used to
125    be known as "src" have moved to the toplevel.  The "src" directory
126    itself has moved down into a subtree called "base".  (We may eventually
127    get rid of the extra level of indirection represented by "src".)
128    
129    The layout is now as follows:
130    
131      toplevel tree name | default repository
132                         | (using gf=svn://smlnj-gforge.cs.uchicago.edu/smlnj)
133      -------------------+----------------------------------------------------
134      config             | $gf/config/trunk
135                         |
136      base               | $gf/sml/trunk
137                         |
138      smlnj-lib          | $gf/smlnj-lib/trunk
139      MLRISC             | $gf/MLRISC/trunk
140                         |
141      ml-yacc            | $gf/ml-yacc/trunk
142      ml-lex             | $gf/ml-lex/trunk
143      ml-burg            | $gf/ml-burg/trunk
144      lexgen             | $gf/lexgen/trunk
145      heap2asm           | $gf/heap2asm/trunk
146                         |
147      cml                | $gf/cml/trunk
148      eXene              | $gf/eXene/trunk
149      ckit               | $gf/ckit/trunk
150      nlffi              | $gf/nlffi/trunk
151                         |
152      smlnj-c            | $gf/smlnj-c/trunk
153    
154    In $gf/admin there are a few useful shell scripts for checking out
155    and maintaining the entire collection of trees:
156    
157       admin/checkout-all.sh [dir]
158          -- optionally creates dir and checks out all trees from their
159             default repositories; if dir is missing, checkout into .
160       admin/refresh-all.sh [dir]
161          -- looks at all trees (from the above list) in dir (default: .)
162             and runs "svn update" if the tree exists and is under
163             subversion control;
164             non-existing or non-subversion trees are skipped
165       admin/stat-all.sh [dir]
166          -- like refresh-all.sh, but runs "svn stat" instead
167    
168    ----------------------------------------------------------------------
169    Name: Matthias Blume (http://www.tti-c.org/blume/)
170    Date: 2006/10/05 11:30:00 CDT
171    Tag: blume-20061005-merge-amd64
172    Description:
173    
174    Merged code for AMD64 backend (Mike Rainey's work).
175    Everything is hooked up but untested.
176    
177    ----------------------------------------------------------------------
178    Name: Matthias Blume (http://www.tti-c.org/blume/)
179    Date: 2006/05/17 14:00:00 CST
180    Tag: Release_110_59
181    Description:
182    
183    New working version (110.59).  NEW BOOTFILES!
184    
185    I am freezing 110.59.  Changes other than the version-number increase:
186    
187      eXene:
188    
189         * committed changes to eXene from Alley Stoughton:
190             "fixed bugs in X authorization and resource handling, as well
191              as in the pile and viewport widgets"
192    
193      Runtime:
194        * fixed linking problem with NetBSD 3.x.
195    
196      Lexgen:
197        * lexgen tool handles non-ascii characters in 7-bit mode the same
198          way that ml-lex does
199    
200        * lexgen propagates exceptions the same way that ml-lex does
201    
202      CML:
203        * Fixed a bug in the SyncVar polling functions (iGetPoll,
204          mTakePoll, and mGetPoll) that could lead to livelock.
205    
206    ----------------------------------------------------------------------
207    Name: Matthias Blume (http://www.tti-c.org/blume/)
208    Date: 2006/05/12 15:20:00 CST
209    Tag: blume-20060515-makedepend
210    Description:
211    
212    Implemented ml-makedepend (i.e., CM.sources) in a better (more robust)
213    way.  This should hopefully fix the ml-makedepend problem permanently.
214    
215    ----------------------------------------------------------------------
216    Name: Matthias Blume (http://www.tti-c.org/blume/)
217    Date: 2006/05/12 15:15:00 CST
218    Tag: blume-20060512-makedepend
219    Description:
220    
221    Fixed long-standing bug with ml-makedepend where it would output a
222    spurious dependency to a non-existing file.  (This is a simple fix.
223    It might need further looking into.)
224    
225    ----------------------------------------------------------------------
226    Name: Matthias Blume (http://www.tti-c.org/blume/)
227    Date: 2006/04/20 10:30:00 CDT
228    Tag: blume-20060420-heap2exec
229    Description:
230    
231    Committed patches received from Johannes 5 Joemann (joemann@befree.free.de)
232    that enable heap2exec under Linux and FreeBSD.
233    
234    ----------------------------------------------------------------------
235    Name: John Reppy
236    Date: 2006/04/14
237    Tag:
238    Description:
239    
240    MLRISC changes:
241      1) renamed GAS_PSEUDO_OPS to AS_PSEUDO_OPS and put it in its own file.
242      2) added support for NOTB and XORB operators in pseudo-op expressions
243      3) added DarwinPseudoOp functor that supports Darwin's assembler syntax.
244      4) added support for 64-bit integer literals
245    
246    ----------------------------------------------------------------------
247    Name: Matthias Blume (http://www.tti-c.org/blume/)
248    Date: yyyy/mm/dd
249    Tag: Release_110_58
250    Description:
251    
252    New working version (110.58).  NEW BOOTFILES!
253    
254    ----------------------------------------------------------------------
255    Name: Matthias Blume (http://www.tti-c.org/blume/)
256    Date: 2006/03/01 22:15:00 CST
257    Tag: blume-20060301-lexgen
258    Description:
259    
260    Incorporated several bugfixes to lexgen.  Compiler now compiles to
261    fixpoint when using lexgen instead of ml-lex.
262    
263    ----------------------------------------------------------------------
264    Name: Matthias Blume (http://www.tti-c.org/blume/)
265    Date: 2006/02/28 22:45:00 CST
266    Tag: blume-20060228-lexgen
267    Description:
268    
269    Removed ml-flex and added lexgen instead, using Aaron Turon's newly
270    provided tarball.  The generated lexers still have problems.
271    
272    ----------------------------------------------------------------------
273    Name: Matthias Blume (http://www.tti-c.org/blume/)
274    Date: 2006/02/26 23:30:00 CST
275    Tag: blume-20060226-ml-flex
276    Description:
277    
278    Removed ml-flex' dependency on regexp-lib.cm.  Turned installation
279    of ml-flex on by default.
280    
281    ----------------------------------------------------------------------
282    Name: Matthias Blume (http://www.tti-c.org/blume/)
283    Date: 2006/02/24 16:30:00 CST
284    Tag: blume-20060224-ml-flex
285    Description:
286    
287    Added ml-flex sources.  Partially integrated, but should not be
288    turned on yet!  (Read: leave it commented-out in config/targets!)
289    
290    ----------------------------------------------------------------------
291    Name: John Reppy (http://www.cs.uchicago.edu/~jhr)
292    Date: 2006/02/23
293    Tag: jhr-20060223-x86-64
294    Description:
295    Changes to support building on x86-64 systems (using the 32-bit mode).
296    Also cleaned up signal handling on Linux.  Support for pre-2.2 Linux
297    kernels dropped.
298    
299    ----------------------------------------------------------------------
300    Name: Allen Leung (leunga (at) reservoir (dot) com)
301    Date: 2006/02/22 15:07:00 EST
302    Tag: leunga-20060222-mdl-gen
303    Description:
304    
305      CM has changed.  Updated the script for rebuilding the MLRISC generated
306    files.
307    
308    ----------------------------------------------------------------------
309    Name: Matthias Blume (http://www.tti-c.org/blume/)
310    Date: 2006/02/14 17:30:00 CST
311    Tag: blume-20060214-intel-mac
312    Description:
313    
314    Hooked code for Darwin-specific Intel ABI into main compiler.
315    (This is a temporary solution which relies on the fact that the
316    compiler itself does not use NLFFI.  Eventually we need to divorce
317    intel mac from generic x86 unix code and make separate sets of binaries.)
318    
319    ----------------------------------------------------------------------
320    Name: John Reppy (http://www.cs.uchicago.edu/~jhr)
321    Date: 2006/02/13
322    Tag: jhr-20060213-intel-mac
323    Description:
324    Changed MLRISC x86 CCalls for partial support of MacOS X ABI.
325    
326    ----------------------------------------------------------------------
327    Name: John Reppy (http://www.cs.uchicago.edu/~jhr)
328    Date: 2006/02/06
329    Tag: jhr-20060206-intel-mac
330    Description:
331    Changes to support MacOS X on Intel hardware.  The C-calls support in
332    MLRISC must also be updated to support the MacOS X ABI.
333    
334    ----------------------------------------------------------------------
335    Name: Matthias Blume (http://www.tti-c.org/blume/)
336    Date: 2005/12/16 00:15:00 CST
337    Tag: blume-20051216-cm
338    Description:
339    
340    Improved error reporting and handling in CM.
341    
342    ----------------------------------------------------------------------
343    Name: Matthias Blume (http://www.tti-c.org/blume/)
344    Date: 2005/11/21 14:00:00 CST
345    Tag: blume-20051121-html-lib
346    Description:
347    
348    Enabling $/html-lib.cm in config/preloads did not work.  This is fixed
349    now.  (Since the anchor mapping for html-lib.cm is not yet in effect
350    at the time when config/preloads is processed, the library has to
351    be referred to by another name.  In 110.57 this would be
352    $SMLNJ-LIB/HTML/html-lib.cm.  I arranged for $smlnj/smlnj-lib/html-lib.cm
353    to be valid as well.)
354    
355    Thanks to Todd Wilson (Fresno) for alerting me to this issue.
356    
357    ----------------------------------------------------------------------
358    Name: Matthias Blume (http://www.tti-c.org/blume/)
359    Date: 2005/11/19 13:45:00 CST
360    Tag: Release_110_57
361    Description:
362    
363    Moved release tag for 110.57.
364    
365    ----------------------------------------------------------------------
366    Name: Matthias Blume (http://www.tti-c.org/blume/)
367    Date: 2005/11/19 23:35:00 CST
368    Tag: blume-20051119-fish
369    Description:
370    
371    Fixed a problem in config/install.sh where it tries to "fish" the
372    name of the CM metadata directory from the wrong place (because
373    the physical location of basis.cm has changed).  Also, corrected the
374    path anchor for $/html-lib.cm.  (Thanks to M. Fluet for pointing out
375    these problems.)
376    
377    ----------------------------------------------------------------------
378    Name: Matthias Blume (http://www.tti-c.org/blume/)
379    Date: 2005/11/16 14:30:00 CST
380    Tag: blume-orig-110_57
381    Description:
382    
383    New working version (110.57).  NEW BOOTFILES!
384    
385    UPDATE: The release tag has been moved to include a fix for a brown-paper-
386            bag glitch (see above).
387    
388    ----------------------------------------------------------------------
389    Name: Matthias Blume (http://www.tti-c.org/blume/)
390    Date: 2005/11/16 10:25:00 CST
391    Tag: blume-22051116-btrace
392    Description:
393    
394    Fixed problem with bogus exception message when using back-trace
395    facility.
396    
397    ----------------------------------------------------------------------
398    Name: Matthias Blume (http://www.tti-c.org/blume/)
399    Date: 2005/11/15 22:35:00 CST
400    Tag: blume-22051115-array2copy
401    Description:
402    
403    Added simple implementation of Array2.copy.  (Warning: mostly untested.)
404    
405    ----------------------------------------------------------------------
406    Name: Matthias Blume (http://www.tti-c.org/blume/)
407    Date: 2005/11/15 21:35:00 CST
408    Tag: blume-22051115-versiontool
409    Description:
410    
411    Reversed change to src/system/smlnj/internals/versiontool.cm.  This
412    file gets loaded as a tool -- by the equivalent of CM.make during the
413    run of CMB.make.  Thus, CMB's path configuration is meaningless for
414    it.  Instead, it has the status of "user code", so it should use
415    $/basis.cm to refer to the Basis library.  (At least that's true for
416    the purpose of bootstrapping the previous change.  In the future it
417    might make sense to have versiontool.cm refer to
418    $smlnj/basis/basis.cm, i.e., the version of the Basis that the
419    compiler itself uses.)
420    
421    Also patched src/system/testml to have it activate those extra anchor
422    bindings in config/extrapathconfig.
423    
424    ----------------------------------------------------------------------
425    Name: Matthias Blume (http://www.tti-c.org/blume/)
426    Date: 2005/11/15 16:35:00 CST
427    Tag: blume-22051115-libraries
428    Description:
429    
430    This change affects the way the following libraries are tied into
431    the system:
432    
433       $/basis.cm
434       $/smlnj-lib.cm
435       $/pp-lib.cm
436       $/controls-lib.cm
437       $/html-lib.cm
438       $/ml-yacc-lib.cm
439    
440    These libraries are now internally (as seen from the source code
441    of the implementation itself) known by the following names:
442    
443       $smlnj/basis/basis.cm
444       $smlnj/smlnj-lib/smlnj-lib.cm
445       $smlnj/smlnj-lib/pp-lib.cm
446       $smlnj/smlnj-lib/controls-lib.cm
447       $smlnj/smlnj-lib/html-lib.cm
448       $smlnj/ml-yacc/ml-yacc-lib.cm
449    
450    This makes it possible to work with code that requires different
451    versions of these libraries, and which refers to these libraries using
452    their "default" names (i.e., the first set of names above).  In other
453    words, one can un-define or re-define those default names without
454    compromising the proper functioning of the compiler itself.
455    
456    A similar procedure had already been performed for several of the
457    MLRISC libraries that are linked into the compiler.  I did some
458    cleanup on this code.
459    
460    A new file in the config directory (named extrapathconfig) is
461    responsible for setting up path anchors that the compiler itself does
462    not need, but that are typically required by user code.
463    
464    ----------------------------------------------------------------------
465    Name: Matthias Blume
466    Date: 2005/11/07 17:05:00 CST
467    Tag: blume-20051107-slice
468    Description:
469    
470    Fixed erroneous out-of-bounds test in the "update" function of
471    various *ArraySlice modules.  (Thanks to Vesa A. Norrman for pointing
472    out the problem.)
473    
474    Pushed some Basis changes through ML-Lex, CML, and eXene.
475    
476    ----------------------------------------------------------------------
477    Name: John Reppy (http://www.cs.uchicago.edu/~jhr)
478    Date: 2005/11/07
479    Description:
480    Fixed a Basis incompatibility: The depreciated function Substring.all
481    was removed (use Substring.full instead).
482    
483    ----------------------------------------------------------------------
484    Name: John Reppy (http://www.cs.uchicago.edu/~jhr)
485    Date: 2005/11/05
486    Description:
487    Tweaked interval set API in SML/NJ library; see the CHANGES file for details.
488    
489    ----------------------------------------------------------------------
490    Name: Matthias Blume (http://www.tti-c.org/blume/)
491    Date: 2005/11/02 16:25:00 CST
492    Tag: blume-20051102-hex
493    Description:
494    
495    * Runtime system bootstrap code now accepts hex digits in BOOTLIST
496      in either upper case or lower case format.
497    * Pushed changes to names of Pack<N>{Big,Little} structures through
498      CML and eXene.
499    
500    ----------------------------------------------------------------------
501    Name: John Reppy (http://www.cs.uchicago.edu/~jhr)
502    Date: 2005/11/02
503    Description:
504    Fixed a Basis incompatibility: Pack<N>{Big,Little} structures should
505    be called PackWord<N>{Big,Little}.
506    
507    ----------------------------------------------------------------------
508    Name: John Reppy (http://www.cs.uchicago.edu/~jhr)
509    Date: 2005/10/28
510    Description:
511    Fixed a minor Basis incompatibility: hex digits should be upper case.
512    
513    ----------------------------------------------------------------------
514    Name: Matthias Blume (blume (at) tti - c (dot) org)
515    Date: 2005/10/25 16:00:00 CDT
516    Tag: Release_110_56
517    Description:
518    
519    New working version (110.56).  NEW BOOTFILES!
520    
521    ----------------------------------------------------------------------
522    Name: John Reppy (http://www.cs.uchicago.edu/~jhr)
523    Date: 2005/10/25
524    Description:
525    Added interval sets to utility library (signatures INTERVAL_DOMAIN
526    and INTERVAL_SET, and functor IntervalSetFn).
527    
528    ----------------------------------------------------------------------
529    Name: John Reppy (http://www.cs.uchicago.edu/~jhr)
530    Date: 2005/10/14
531    Description:
532    Add Zhong Shao's fix for datatype equality functions.
533    
534    ----------------------------------------------------------------------
535    Name: Allen Leung (leunga (at) reservoir (dot) com)
536    Date: 2005/10/14 12:30:00 EST
537    Tag: leunga-20051014-x86-spill
538    Description:
539    
540    Bug fix a bug found by Carl Hauser.
541    There was a typo in the reload code for FCMP in x86SpillInstr.sml.
542    
543    ----------------------------------------------------------------------
544    Name: Allen Leung (leunga (at) reservoir (dot) com)
545    Date: 2005/10/14 11:15:00 EST
546    Tag: leunga-20051014-x86-asm
547    Description:
548    
549    Removed some debugging code in file x86Asm.sml.
550    The function emit_operand was printing out debugging output.
551    
552    ----------------------------------------------------------------------
553    Name: John Reppy
554    Date: 2005/07/27
555    Tag:
556    Description:
557    
558    Fixed ml-lex to recognize "\r" as representing carriage return.
559    
560    ----------------------------------------------------------------------
561    Name: John Reppy
562    Date: 2005/07/27
563    Tag:
564    Description:
565    
566    Fixed ml-yacc to work on files with non-native end-of-line
567    encodings (e.g., Windows text file on a Unix system).
568    
569    ----------------------------------------------------------------------
570    Name: John Reppy
571    Date: 2005/07/20
572    Tag:
573    Description:
574    
575    Added changes from Dominic Evans (oldmanuk (at) gmail (dot) com)
576    to support HPUX 11.
577    
578    ----------------------------------------------------------------------
579    Name: John Reppy
580    Date: 2005/07/06
581    Tag:
582    Description:
583    
584    Changes to the SML/NJ library.  See smlnj-lib/CHANGES for details.
585    
586    ----------------------------------------------------------------------
587    Name: Matthias Blume (blume (at) tti - c (dot) org)
588    Date: 2005/07/06 00:45:00 CDT
589    Tag: blume-20050706-slice-copy
590    Description:
591    
592    Fixed reversed logic for deciding whether to "copy up" or "copy down"
593    in *-array-slice.sml.
594    
595    ----------------------------------------------------------------------
596    Name: Allen Leung (leunga (at) reservoir (dot) com)
597    Date: 2005/05/31 17:00:00 EST
598    Tag: leunga-20050531-cygwin-fault-2
599    Description:
600    
601    A typo in the cygwin code fixed.
602    
603    ----------------------------------------------------------------------
604    Name: Allen Leung (leunga (at) reservoir (dot) com)
605    Date: 2005/05/31 16:47:00 EST
606    Tag: leunga-20050531-cygwin-fault
607    Description:
608    
609    Updated Cygwin's fault/signal handling to match the Windows version.
610    Updated the export list.
611    
612    ----------------------------------------------------------------------
613    Name: Matthias Blume (blume (at) tti - c (dot) org)
614    Date: 2005/05/18 13:35:00 CDT
615    Tag: Release_110_54
616    Description:
617    
618    New working version (110.54).  NEW BOOTFILES!
619    
620    ----------------------------------------------------------------------
621    Name: Matthias Blume (blume (at) tti - c (dot) org)
622    Date: 2005/05/18 11:58:00 CDT
623    Tag: blume-20050518-installer
624    Description:
625    
626    Added support scripts for Mac OS X PackageMaker and modified
627    config/install.sh so that it supports re-dumping a heap image
628    after customization.
629    
630    ----------------------------------------------------------------------
631    Name: Matthias Blume (blume (at) tti - c (dot) org)
632    Date: 2005/05/18 10:55:00 CDT
633    Tag: blume-20050518-realdiv-noovld
634    Description:
635    
636    Un-overloaded / to work around bug in overloading resolution code.
637    
638    ----------------------------------------------------------------------
639    Name: Matthias Blume (blume (at) tti - c (dot) org)
640    Date: 2005/05/16 23:50:00 CDT
641    Tag: blume-20050516-redump-heap
642    Description:
643    
644    Added mechanism for re-creating a heap file for the interactive system
645    after configuration variables have been changed.
646    
647       CM.redump_heap : string -> unit
648    
649    This is much like SMLofNJ.exportML, but starting from the resulting
650    heap does not return to the caller of CM.redump_heap but
651    restarts the interactive system from scratch.  The original call of
652    CM.redump_heap does not return but ends the interactive session.
653    Thus, CM.redump_heap is a lot like SMLofNJ.exportFn.
654    
655    Internally, redump_heap winds the dynamic execution context back to
656    the point where the original heap image was created and re-executes
657    the heap image generation code in the boot code.
658    
659    ----------------------------------------------------------------------
660    Name: Matthias Blume (blume (at) tti - c (dot) org)
661    Date: 2005/05/09 21:55:00 CDT
662    Tag: blume-20050509-word64
663    Description:
664    
665    Added a hack to the existing hack known as Word64 to make fromString
666    behave correctly.  I am still not sure whether Word64.scan will work
667    as specified with respect to the interaction of radix and prefix.
668    
669    ----------------------------------------------------------------------
670    Name: Allen Leung (leunga (at) reservoir (dot) com)
671    Date: 2005/05/04 11:50:00 EST
672    Tag: leunga-20050504-checkgc
673    Description:
674    
675    Added a gc protocol checking phase.  This phase is enabled with
676    the flag "check-gc".  "debug-check-gc" turns on the verbose mode.
677    
678    ----------------------------------------------------------------------
679    Name: Matthias Blume (blume (at) tti - c (dot) org)
680    Date: 2005/05/04 10:45:00 CDT
681    Tag: blume-20050504-intinf
682    Description:
683    
684    Fixed a bug in the implementation of div and mod for IntInf.
685    Thanks to Neophytos Michael for reporting the problem.
686    
687    ----------------------------------------------------------------------
688    Name: Matthias Blume (blume (at) tti - c (dot) org)
689    Date: 2005/05/04 10:35:00 CDT
690    Tag: blume-20050504-join
691    Description:
692    
693    Added a "join" combinator to the ParserComb module in smlnj-lib.cm.
694    
695    ----------------------------------------------------------------------
696    Name: Matthias Blume (blume (at) tti - c (dot) org)
697    Date: 2005/02/28 23:40:00 CST
698    Tag: blume-20050228-mVar
699    Description:
700    
701    Fixed serious bug (brown paper bag variety) in new implementation of
702    structure Atom in CML.  (I had accidentally used a mailbox instead of
703    an mvar, leaving the door open for races.)
704    
705    ----------------------------------------------------------------------
706    Name: Matthias Blume (blume (at) tti - c (dot) org)
707    Date: 2005/02/25 15:00:00 CST
708    Tag: Release_110_53
709    Description:
710    
711    New working version (110.53).  NEW BOOTFILES!
712    
713    ----------------------------------------------------------------------
714    Name: Matthias Blume (blume (at) tti - c (dot) org)
715    Date: 2005/02/25 14:50:00 CST
716    Tag: blume-20050225-susp
717    Description:
718    
719    Brought back SMLofNJ.Susp.  The underlying suspension type is the one
720    implemented in Core -- which means that it is the same as the one used
721    by the lazy extension.
722    
723    ----------------------------------------------------------------------
724    Name: Matthias Blume (blume (at) tti - c (dot) org)
725    Date: 2005/02/24 16:50:00 CST
726    Tag: blume-20050224-cml-atom
727    Description:
728    
729    Simpler and at the same time more general implementation of structure
730    Atom in CML.
731    
732    ----------------------------------------------------------------------
733    Name: Matthias Blume (blume (at) tti - c (dot) org)
734    Date: 2005/02/15 17:35:00 CST
735    Tag: blume-20050215-tools
736    Description:
737    
738    Created new "tools" directory under "src" and moved "TraceDebugProf"
739    there.
740    
741    ----------------------------------------------------------------------
742    Name: Matthias Blume (blume (at) tti - c (dot) org)
743    Date: 2005/02/10 17:55:00 CST
744    Tag: blume-20050210-longlong
745    Description:
746    
747    Implemented "long long" arguments and results for NLFFI.  (Only the
748    PPC/MacOS implementation is complete, the other backends still need to
749    be updated.)
750    
751    ----------------------------------------------------------------------
752    Name: Matthias Blume (blume (at) tti - c (dot) org)
753    Date: 2005/01/24 17:40:00 CST
754    Tag: blume-20050124-mlyacc
755    Description:
756    
757    Minor cleanup in ML-Yacc rule printing mechanism.  This should fix a
758    problem with certain "as" patterns which previously got rendered
759    using incorrect syntax.
760    
761    ----------------------------------------------------------------------
762    Name: Matthias Blume (blume (at) tti - c (dot) org)
763    Date: 2005/01/18 12:00:00 CST
764    Tag: blume-20050118-profile
765    Description:
766    
767    Made time profiling code (interrupt handler) in runtime system aware
768    of new array representation.
769    
770    ----------------------------------------------------------------------
771    Name: Matthias Blume (blume (at) tti - c (dot) org)
772    Date: 2005/01/14 18:00:00 CST
773    Tag: blume-20050114-heap2exec
774    Description:
775    
776    Implemented new (but still experimental) heap2exec facility.  This is
777    tested under Mac OS X and should work under Linux (will test shortly).
778    It will probably also work on the Sparc (will test some time later).
779    
780      - removed old "HACKED_STANDALONE" hack from runtime
781    
782    To be able to test this, uncomment the request for "heap2asm" in
783    config/targets prior to installation.  (Notice that this is different
784    from "heap2exec" mentioned below.  Not a typo.)
785    
786    To perform an actual test, run the command
787    
788       $ bin/heap2exec heapfile execfile
789    
790    (You can put heap2exec on your shell's path.)
791    
792    For example, run
793    
794      $ bin/heap2exec bin/.heap/ml-yacc.ppc-darwin mly
795    
796    This will create a standalone executable called "mly" which you can
797    then invoke directly as a command.
798    
799    ----------------------------------------------------------------------
800    Name: Matthias Blume (blume (at) tti - c (dot) org)
801    Date: 2005/01/07 11:44:00 CST
802    Tag: blume-20050107-mlstring
803    Description:
804    
805    fixed off-by-one error in ML_STRING macro (globals.c)
806    
807    ----------------------------------------------------------------------
808    Name: Matthias Blume (blume (at) tti - c (dot) org)
809    Date: 2004/12/23 18:00:00 CST
810    Tag: blume-20041223-santa
811    Description:
812    
813    Made ml-build script "smarter" (but only very little).
814    
815    ----------------------------------------------------------------------
816    Name: Matthias Blume (blume (at) tti - c (dot) org)
817    Date: 2004/12/21 15:05:00 CST
818    Tag: blume-20041221-longlong
819    Description:
820    
821    * Implemented access to signed and unsigned long long data in NLFFI.
822    (The parameter-passing part of the picture has not complete. But
823    data structure access seems to work.)
824    
825    * Fixed CM's incorrect assumption that the PPC is little-endian.
826      (On the Mac, it is big-endian.  And that's currently our only
827      PPC platform.)
828    
829    ----------------------------------------------------------------------
830    Name: Matthias Blume (blume (at) tti - c (dot) org)
831    Date: 2004/12/21 12:50:00 CST
832    Tag: blume-20041221-memory
833    Description:
834    
835    Some cleanup in the $c/memory.cm library: separated some concerns by
836    moving allocation code and memory access code each into their own
837    files.
838    
839    ----------------------------------------------------------------------
840    Name: Allen Leung (leunga (at) reservoir (dot) com)
841    Date: 2004/12/17 16:12:00 EST
842    Tag: leunga-20041217-cygwin-smlnj-home
843    Description:
844    
845        The Unix I/O library of SML/NJ on cygwin does not understand
846    Windows style pathname, so problems arise when SMLNJ_HOME is set
847    to a Windows style pathname.  _run-sml now converts SMLNJ_HOME
848    to a POSIX pathname on cygwin.
849    
850    ----------------------------------------------------------------------
851    Name: Matthias Blume (blume (at) tti - c (dot) org)
852    Date: 2004/12/16 13:35:00 CST
853    Tag: Release_110_52
854    Description:
855    
856    Last-minute changes incorporated into 110.52.  Release tag moved.
857    
858    The changes:
859       - HashString.hashString' -> HashString.hashSubstring
860       - bug fix in UnivariateStats
861    
862    ----------------------------------------------------------------------
863    Name: Matthias Blume (blume (at) tti - c (dot) org)
864    Date: 2004/12/15 23:40:00 CST
865    Tag: blume-20041215-hashSubstring
866    Description:
867    
868    - HashString.hashString' -> HashString.hashSubstring
869    - corresponding changes in atom.sml
870    - "de-compressed" (aka. un-obfuscated) code for UnivariateStats and
871      added some comments
872    
873    ----------------------------------------------------------------------
874    Name: Matthias Blume (blume (at) tti - c (dot) org)
875    Date: 2004/12/15 15:30:00 CST
876    Tag: (Release_110_52)
877    Description:
878    
879    New working version (110.52).  NEW BOOTFILES!
880    
881    ----------------------------------------------------------------------
882    Name: Matthias Blume (blume (at) tti - c (dot) org)
883    Date: 2004/12/15 12:45:00 CST
884    Tag: blume-20041215-spaces
885    Description:
886    
887    More on the space problem (this time for Win32).
888    
889    ----------------------------------------------------------------------
890    Name: Matthias Blume (blume (at) tti - c (dot) org)
891    Date: 2004/12/14 17:30:00 CST
892    Tag: blume-20041214-spaces
893    Description:
894    
895    Hacked some of the scripts (in particular: the installer) to cope with
896    spaces in filenames a bit better.  But beware: the current "solution"
897    is likely still full of bugs and inherently incomplete.  (We need to
898    do away with those shell scripts for a comprehensive solution.)
899    
900    ----------------------------------------------------------------------
901    Name: Matthias Blume (blume (at) tti - c (dot) org)
902    Date: 2004/12/13 14:45:00 CST
903    Tag: blume-20041213-ml-makedepend
904    Description:
905    
906    Fixed bug in code for ml-makedepend.
907    
908    ----------------------------------------------------------------------
909    Name: Matthias Blume (blume (at) tti - c (dot) org)
910    Date: 2004/12/09 16:30:00 CST
911    Tag: blume-20041209-statistics
912    Description:
913    
914    Added two simple but potentially useful statistics modules to SML/NJ Library.
915    (See CHANGES file there.)
916    
917    ----------------------------------------------------------------------
918    Name: Matthias Blume (blume (at) tti - c (dot) org)
919    Date: 2004/12/01 16:50:00 CST
920    Tag: blume-20041201-atom
921    Description:
922    
923    smlnj-lib:
924    
925      Added function HashString.hashString' for substrings.
926      Hand-inlined CharVector.foldl into HashString (for speed).
927      Modified implementation of structure Atom to avoid extracting
928      strings from substrings unless necessary.
929      (Also see CHANGES file for smlnj-lib.)
930    
931    ----------------------------------------------------------------------
932    Name: Matthias Blume (blume (at) tti - c (dot) org)
933    Date: 2004/11/24 22:15:00 CST
934    Tag: blume-20041124-cml
935    Description:
936    
937    Made sure CML compiles when Position = Int64.
938    
939    ----------------------------------------------------------------------
940    Name: Matthias Blume (blume (at) tti - c (dot) org)
941    Date: 2004/11/24 14:30:00 CST
942    Tag: blume-20041124-position
943    Description:
944    
945    The compiler can now be compiled in a mode that makes structure Position
946    equal to Int64.  The default, however, is unchanged (Position = Int31)
947    for the time being.
948    
949    To enable 64-bit positions, use the following procedure:
950    
951    1. Start sml
952    2. Autoload $smlnj/cmb.cm (if not already autoloaded)
953    3. Type
954          #set (CMB.symval "USE_64_BIT_POSITIONS") (SOME 1);
955    4. Run CMB.make() as usual.
956    
957    This is barely tested.  The only test so far was a little SML program
958    counting the number of characters in an 8-gigabyte file by
959    reading it character-by-character.  That test was successful.
960    
961    In support of 64-bit positions, a number of new functions have been
962    added to the runtime system.
963    
964    ----------------------------------------------------------------------
965    Name: Matthias Blume (blume (at) tti - c (dot) org)
966    Date: 2004/11/23 14:45:00 CST
967    Tag: blume-20041123-useFile
968    Description:
969    
970    Fixed a problem with unhelpful error messages related to problems with
971    .cm- or .sml files that appear as part of the sml command line.
972    
973    ----------------------------------------------------------------------
974    Name: Matthias Blume (blume (at) tti - c (dot) org)
975    Date: 2004/11/18 15:40:00 CST
976    Tag: Release_110_51
977    Description:
978    
979    New working version (110.51).  NEW BOOTFILES!
980    
981    ----------------------------------------------------------------------
982    Name: Matthias Blume (blume (at) tti - c (dot) org)
983    Date: 2004/11/18 15:35:00 CST
984    Tag: <none>
985    Description:
986    
987    Enabled dlopen and friends for FreeBSD (as recommended by Johannes 5
988    Joemann).
989    
990    ----------------------------------------------------------------------
991    Name: Allen Leung (leunga (at) reservoir (dot) com)
992    Date: 2004/11/17 16:05:21 EST 2004
993    Tag: leunga-20041117-mlrisc-live-kill
994    Description:
995    
996       Added support for MLTree constructs LIVE and KILL
997    to all the architectures.
998    
999    ----------------------------------------------------------------------
1000    Name: Matthias Blume (blume (at) tti - c (dot) org)
1001    Date: 2004/11/13 00:20:00 CST
1002    Tag: blume-20041113-versiontool
1003    Description:
1004    
1005    - Stripped down the versiontool: It now only handles the version number.
1006      The date string is generated at bootstrap time (during makeml).
1007    
1008    - In a previous commit, fixed a minor issue with how polyequal is being
1009      translated.  In particular, the code now "looks through" abstractions.
1010      This results in slightly fewer polyEqual warnings and hopefully slightly
1011      more efficient code.  Important examples for where this matters are
1012      the new int64 and word64 types.
1013    
1014    ----------------------------------------------------------------------
1015    Name: Matthias Blume (blume (at) tti - c (dot) org)
1016    Date: 2004/11/12 00:30:00 CST
1017    Tag: blume-20041112-int64
1018    Description:
1019    
1020    Structure Int64 fully hooked in.  (The implementation is not very
1021    efficient, though.)
1022    
1023    ----------------------------------------------------------------------
1024    Name: Matthias Blume (blume (at) tti - c (dot) org)
1025    Date: 2004/11/11 17:30:00 CST
1026    Tag: blume-20041111-more64
1027    Description:
1028    
1029    All the pieces of Word64 are now there, with the exception of the
1030    conversions from and to LargeWord. (Eventually these need to be identities,
1031    but for the time being they don't even make sense because LargeWord is
1032    32-bit wide.)
1033    
1034    Also started to add similar support for Int64, but major pieces of that
1035    are still missing.
1036    
1037    ----------------------------------------------------------------------
1038    Name: Matthias Blume (blume (at) tti - c (dot) org)
1039    Date: 2004/11/11 00:15:00 CST
1040    Tag: blume-20041111-word64
1041    Description:
1042    
1043    Structure Word64 is now (almost) complete, word literals and patterns
1044    seem to work.  There are a few odd pieces missing.  In particular,
1045    I didn't do the {from,to}LargeWord parts because LargeWord is still Word32
1046    at the moment.
1047    
1048    Making Word64 official would mean that LargeWord becomes Word64.  But
1049    this requires extreme care because most word-word conversions have to
1050    go through LargeWord, so making a mistake means loss of efficiency or
1051    worse.  Eventually there will be a solution similar to (but actually
1052    simpler than) what I did with IntInf.
1053    
1054    ----------------------------------------------------------------------
1055    Name: Matthias Blume (blume (at) tti - c (dot) org)
1056    Date: 2004/11/10 18:12:00 CST
1057    Tag: blume-20041110-64bit
1058    Description:
1059    
1060    More 64-bit hacking (but still not even half-way there yet).
1061    Also, some assorted improvements to the handling of 8-bit words.
1062    
1063    ----------------------------------------------------------------------
1064    Name: Matthias Blume (blume (at) tti - c (dot) org)
1065    Date: 2004/11/09 17:50:00 CST
1066    Tag: <none>
1067    Description:
1068    
1069    Started adding some infrastructure for supporting 64-bit int- and
1070    word-types.  (Still in its very early stages.)
1071    
1072    ----------------------------------------------------------------------
1073    Name: Matthias Blume (blume (at) tti - c (dot) org)
1074    Date: 2004/10/28 10:45:00 CDT
1075    Tag: Release_110_50
1076    Description:
1077    
1078    New working version (110.50).  NEW BOOTFILES!
1079    
1080                 =====================
1081    
1082    Also:
1083    
1084      - Changend config/srcarchiveurl from a file just
1085        containing the URL string into a file containing
1086        shell script code.  The code has access to the $VERSION variable.
1087      - Made corresponding changes to config/install.sh and config/unpack.
1088      - Default contents of config/srcarchiveurl uses $VERSION and
1089        normally does not have to be edited to reflect a version change.
1090    
1091      (As a result, a version change can be done by just editing
1092       config/version, the rest is now automatic.)
1093    
1094    ----------------------------------------------------------------------
1095    Name: Matthias Blume (blume (at) tti - c (dot) org)
1096    Date: 2004/10/27 17:50:00 CDT
1097    Tag: blume-20041027-btrace-msg
1098    Description:
1099    
1100    BackTrace.monitor now also reports the source of the exception that
1101    triggered the trace.
1102    
1103    ----------------------------------------------------------------------
1104    Name: Matthias Blume (blume (at) tti - c (dot) org)
1105    Date: 2004/10/27 17:20:00 CDT
1106    Tag: blume-20041027-x86-c-calls
1107    Description:
1108    
1109    This is the HISTORY entry for two earlier commits, both concerning
1110    the x86 c-calls code in MLRISC:
1111    
1112      - added a missing LOAD in the code that deals with struct arguments
1113      - made sure the caller does not add the wrong number of bytes to the
1114        stack pointer after a call of a function returning a struct
1115        (the callee already pops the implicit argument which points to
1116         the space reserved for the result)
1117    
1118    ----------------------------------------------------------------------
1119    Name: Allen Leung (leunga (at) reservoir (dot) com)
1120    Date: 2004/10/24 14:00:00 EST
1121    Tag: leunga-20041024-x86-gas-fucomip
1122    Description:
1123    
1124       John discovered a bug in the syntax of fucomip.
1125       The opcodes FU?COMIP? have been changed to
1126    
1127           fu?comip? %st(i), %st
1128    
1129    ----------------------------------------------------------------------
1130    Name: Matthias Blume (blume (at) tti - c (dot) org)
1131    Date: 2004/10/20 15:06:00 CDT
1132    Tag: blume-20041020-standalone-backtrace
1133    Description:
1134    
1135    Added a mechanism for getting back-trace information from standalone
1136    programs.  Here is how it works:
1137    
1138       1. The part of the program from which you want to get backtrace
1139          information (usually the whole program) should be wrapped with
1140          BackTrace.monitor.  This is a (unit->'a)->'a function, and your
1141          main program could be modified from something like
1142    
1143             fun main (pgm, args) = ...
1144    
1145         to
1146    
1147            fun main (pgm, args) = BackTrace.monitor (fn () => ...)
1148    
1149       2. To be able to access BackTrace.monitor, you have to add
1150          library $smlnj-tdp/plugins.cm to the .cm file that contains your
1151          main function.
1152    
1153       3. Remove all compiled code (i.e., all the .cm/ subdirectories that
1154          CM might have created in the past for your project).
1155    
1156       4. Build the system using this command line:
1157    
1158             ml-build -Ctdp.instrument=true \$smlnj-tdp/back-trace.cm \
1159                      myprog.cm MyProg.main myprog
1160    
1161          instead of the usual
1162    
1163             ml-build myprog.cm MyProg.main myprog
1164    
1165    I changed a library name:
1166    
1167       $/trace-debug-profile.cm --> $smlnj-tdp/plugins.cm
1168    
1169    New libraries:
1170    
1171       $smlnj-tdp/back-trace.cm
1172          -- when loaded causes the back-trace plugin to be installed
1173       $smlnj-tdp/coverage.cm
1174          -- when loaded causes the coverage plugin to be installed
1175    
1176    ----------------------------------------------------------------------
1177    Name: Matthias Blume (blume (at) tti - c (dot) org)
1178    Date: 2004/10/18 16:45:00 CDT
1179    Tag: blume-20041018-groupowner
1180    Description:
1181    
1182    Added an "obsolete" warning for the "group owner" syntax to CM's parser.
1183    
1184    Eliminated group owner specs from .cm files throughout the source tree.
1185    
1186    ----------------------------------------------------------------------
1187    Name: Matthias Blume (blume (at) tti - c (dot) org)
1188    Date: 2004/10/15 15:45:00 CDT
1189    Tag: blume-20041015-coverage
1190    Description:
1191    
1192    * Test coverage tool added!
1193    * Further reorganization of tracing-, debugging-, and profiling support:
1194    
1195        - moved original BTImp -- now called BackTrace -- into a separate
1196          library called $/trace-debug-profile.cm
1197        - eliminated all mentions of BTrace from SMLofNJ.Internals
1198        - only the instrumentation mechanism is now left in the compiler proper
1199        - BackTrace module is a plugin which is NOT plugged in by default
1200        - Coverage module is another such plugin
1201    
1202    To get the benefits of any of these plugin modules, the code in
1203    question must be compiled with tdp instrumentation turned on.  This
1204    can be done by setting SMLofNJ.Internals.TDP.mode to true.
1205    (The ref cell is also controlled via the -Ctdp.instrument=... switch.)
1206    
1207    Plugins are selected at link time.  (Pre-compiled instrumented code
1208    can be re-loaded with different plugins in effect.)  When an
1209    instrumented module is linked, whatever plugins are at that time
1210    enabled will come into effect for that module.
1211    
1212    To enable the back-trace plugin, load library $/trace-debug-profile.cm
1213    and invoke BackTrace.install() (e.g., from the interactive prompt).
1214    To enable the coverage plugin, load the same library and invoke
1215    Coverage.install().
1216    
1217    Back-traces are generated automatically on uncaught exceptions and
1218    when the code in question explicitly invokes BackTrace.trigger().
1219    
1220    Coverage (and execution frequency-) information must be queried
1221    explicitly by calling Coverage.not_covered and Coverage.hot_spots.
1222    
1223    ----------------------------------------------------------------------
1224    Name: Matthias Blume (blume (at) tti - c (dot) org)
1225    Date: 2004/10/14 17:40:00 CDT
1226    Tag: blume-20041014-tdp-core
1227    Description:
1228    
1229    Snapshot of a significant overhaul of how the trace/debug/profile support
1230    is hooked into the system (specifically: Core and SMLofNJ.Internals).
1231    
1232    ----------------------------------------------------------------------
1233    Name: Matthias Blume (blume (at) tti - c (dot) org)
1234    Date: 2004/10/13 16:34:00 CDT
1235    Tag: blume-20041013-tdp
1236    Description:
1237    
1238    Some rationalization of names:
1239    
1240       structure BTrace -> structure TDPInstrument
1241       etc.
1242    
1243    This is is preparation of using the original back-trace
1244    instrumentation for other purposes.  "TDP" stands for
1245    Trace/Debug/Profile.
1246    
1247    The control flag controlling whether instrumentation is on or off is now
1248    registered under a different name, so instead of running sml as
1249    
1250     sml -Cinstrument.btrace-mode=true
1251    
1252    one has to say
1253    
1254     sml -Ctdp.instrument=true
1255    
1256    ----------------------------------------------------------------------
1257    Name: Matthias Blume (blume (at) tti - c (dot) org)
1258    Date: 2004/10/11 16:37:00 CDT
1259    Tag: blume-20041011-regions
1260    Description:
1261    
1262    Made some minor modifications to elabcore.sml to have source regions
1263    be propagated more tightly -- resulting in better (i.e., smaller)
1264    regions being reported in error- and debug messages.
1265    
1266    ----------------------------------------------------------------------
1267    Name: Matthias Blume (blume (at) tti - c (dot) org)
1268    Date: 2004/10/08 22:50:00 CDT
1269    Tag: blume-20041008-cmkw
1270    Description:
1271    
1272    Fixed handling of keywords in .cm files: After seeing "is" the lexer
1273    treats subsequent occurrences of "group", "library", "source", "is",
1274    "*", and "-" as ordinary identifiers rather than keywords.
1275    
1276    Most seriously, this fixes a problem with CM's "shell" tool.  The tool
1277    is supposed to accept a tool argument called "source", but this did
1278    not work because of the clash with the keyword.
1279    
1280    ----------------------------------------------------------------------
1281    Name: Matthias Blume (blume (at) tti - c (dot) org)
1282    Date: 2004/10/07 16:00:00 CDT
1283    Tag: blume-20041007-cleanup
1284    Description:
1285    
1286    Assorted cleanup work:
1287    
1288      - got rid of intstrmap in favor of using the library's
1289        hash table implementation
1290      - threw out most of the pathnames stuff, as it was not used anyway
1291      - simplified tokentable implementation
1292      - fixed some minor spelling errors
1293    
1294    ----------------------------------------------------------------------
1295    Name: Matthias Blume (blume (at) tti - c (dot) org)
1296    Date: 2004/10/06 15:15:15 CDT
1297    Tag: blume-20041006-handler
1298    Description:
1299    
1300    Cleaned up the absyn to reflect the invariant that HANDLE always
1301    carries a FNexp as part of the type definition.  This eliminates some
1302    superfluous sanity checks at runtime down the road.
1303    
1304    Some minor cleanup of the btrace code.
1305    
1306    ----------------------------------------------------------------------
1307    Name: Matthias Blume (blume (at) tti - c (dot) org)
1308    Date: 2004/10/01 10:20:30 CDT
1309    Tag: blume-20041001-slave
1310    Description:
1311    
1312    Added hack to make slave mode work in the presence of the version
1313    tool.  (Still, since the master does two passes over the code for
1314    CMB.make, the release number gets bumped twice when slaves are
1315    attached.  I don't know if this is worth fixing...)
1316    
1317    ----------------------------------------------------------------------
1318    Name: Matthias Blume (blume (at) tti - c (dot) org)
1319    Date: 2004/09/30 10:55:00 CDT
1320    Tag: blume-20040930-version
1321    Description:
1322    
1323    * Moved the "version" magic into its own little library under
1324      src/system/smlnj/internal.  This avoids expensive reconstruction of
1325      a stable src/compiler/core.cm.
1326    
1327    * At the same time, structure CompilerVersion is now known as
1328      structure SMLNJVersion.
1329    
1330    * Arranged for the version tool to NOT kick in when rebuilding the system
1331      (makeml -rebuild, fixpt).  Otherwise one would never reach a fixpoint.
1332      Also, loading the versiontool does not work when rebuilding the system
1333      because CM is not properly initialized at that time.
1334    
1335    ----------------------------------------------------------------------
1336    Name: Matthias Blume (blume (at) tti - c (dot) org)
1337    Date: 2004/09/29 14:00:00 CDT
1338    Tag: blume-20040929-autoversion
1339    Description:
1340    
1341    Implemented some CM magic to have
1342        file src/compiler/TopLevel/main/version.sml
1343    generated automagically.
1344    The version is taken from two files: config/version and config/release.
1345    The first is expected to contain a two-part version number such as 110.49.
1346    The second should contain a single number, but it may be missing.
1347    
1348    If the environment variable VERSIONTOOL_BUMP_RELEASE is defined at the
1349    time the version tool is loaded (which is the first time you say CMB.make),
1350    then the tool will increment the value stored in config/release every
1351    time CMB.make is invoked.
1352    
1353    The binfile format is now insensitive to anything beyond the first
1354    two components of a version number, so bumping the release does not render
1355    binfiles incompatible.  Auto-bumping can be used to keep track of versions
1356    during development without invalidating existing binfiles.
1357    
1358    In any case, every CMB.make updates the date information in version.sml.
1359    (This is the date that is printed in the banner.)
1360    
1361    ----------------------------------------------------------------------
1362    Name: Matthias Blume (blume (at) tti - c (dot) org)
1363    Date: 2004/09/28 10:53:00 CDT
1364    Tag: blume-20040928-controls
1365    Description:
1366    
1367    Some cleanup of the controls code.
1368    
1369    ----------------------------------------------------------------------
1370    Name: Matthias Blume (blume (at) tti - c (dot) org)
1371    Date: 2004/09/27 22:08:00 CDT
1372    Tag: blume-20040927-controls
1373    Description:
1374    
1375    Added two pieces of functionality to the Controls interface:
1376    
1377    1.   val save'restore: 'a control -> unit -> unit
1378    
1379       grabs the current value of the control in stage 1 and restores it
1380       in stage 2.
1381    
1382    2.   val set' : 'a control * 'a -> unit -> unit
1383    
1384       stores the given value into the control in stage 2 (i.e., delayed)
1385       but does all error checking in stage 1.
1386       (This is for string controls that need to do parse their argument --
1387        something that might fail.  In some cases, notably in CM, one
1388        already knows the intended argument but wants to delay the actual
1389        assignment until a time when error recovery would be more difficult.)
1390    
1391    Changed the handling of controls in tool arguments to classes "sml" and
1392    "lazysml":
1393       - use Controls.save'restore as a more robust way of restoring the
1394         old value (in particular: without having to re-parse the string)
1395       - use controls to handle the "overload" keyword in the init group
1396         (I believe this change actually fixes a long-standing obscure bug.)
1397    
1398    ----------------------------------------------------------------------
1399    Name: Matthias Blume (blume (at) tti - c (dot) org)
1400    Date: 2004/09/27 17:00:00 CDT
1401    Tag: blume-20040927-lazysml
1402    Description:
1403    
1404    Added a new tool class called "lazysml" to CM's tool chest.  The only
1405    difference to "sml" is that compilation is done with Control.lazysml
1406    set to true.  A source of class "lazysml" is automatically recognized
1407    by a file name suffix of ".lml".
1408    
1409    In addition to the above feature, the original class "sml" now also
1410    supports a tool argument "lazy" which has the same effect.  As a
1411    result, the following three lines are equivalent:
1412    
1413        foo.sml : lazysml
1414        foo.sml : sml (lazy)
1415        foo.sml (lazy)
1416    
1417    The setting goes into effect both during parsing and during
1418    compilation.  The original setting is restored right after parsing and
1419    after compilation, respectively.
1420    
1421    In addition to all the above, there is also a general mechanism to set
1422    ANY of the "controls" that are available at the command line via
1423    "-C..." on a per-sml-file basis.  The same rules that apply for "lazy"
1424    apply as well. (In fact, "lazy" is implemented as a special case of
1425    the general mechanism.)
1426    
1427    The .cm file syntax uses a new keyword tool argument called "with".
1428    There are several ways of indicating the desired settings:
1429    
1430        foo.sml (with:parser.quotations=true)
1431        foo.sml (with:(name:parser.quotations value:true))
1432        foo.sml (with:(name:name1 value:value1 name:name2 value:value2 ...))
1433        foo.sml (with:(name1=value1 name2=value2 ...))
1434        foo.sml (with:(name1=value1 name:name2 value:value2 name3=value3 ...))
1435    
1436        etc.
1437    
1438    Another possible abbreviation is to leave out the =v or value:v part
1439    if the name refers to a boolean control (in which case the value is
1440    taken to be true).  Thus, one could get lazy sml also by saying:
1441    
1442        foo.sml (with:parser.lazy-keyword=true)
1443        foo.sml (with:parser.lazy-keyword)
1444        foo.sml (with:(name:parser.lazy-keyword value:true))
1445        foo.sml (with:(name:parser.lazy-keyword))
1446    
1447    ----------------------------------------------------------------------
1448    Name: Matthias Blume (blume (at) tti - c (dot) org)
1449    Date: 2004/09/24 16:22:00 CDT
1450    Tag: blume-20040924-ppc-long-branch
1451    Description:
1452    
1453    Turned message about "emiting long form of branch" off by default.
1454    Added a control flag to turn it back on when desired.
1455    
1456    ----------------------------------------------------------------------
1457    Name: Matthias Blume (blume (at) tti - c (dot) org)
1458    Date: 2004/09/24 16:05:00 CDT
1459    Tag: blume-20040924-rounding
1460    Description:
1461    
1462    Applied patch for setting rounding modes under Mac OS X.  Thanks to
1463    Melissa O'Neill for providing the code!
1464    
1465    ----------------------------------------------------------------------
1466    Name: Matthias Blume (blume (at) tti - c (dot) org)
1467    Date: 2004/09/23 17:30:00 CDT
1468    Tag: blume-20040923-envvars
1469    Description:
1470    
1471    1. Changed definition of type ControlRegistry.registry_tree to
1472       include control_info (i.e., the name of the controlling environment
1473       variable).
1474    
1475    2. Added command-line flags -e and -E to print the names of environment
1476       variables that can be used to control internal settings.
1477       (This uses the new API mentioned in 1.)
1478    
1479    ----------------------------------------------------------------------
1480    Name: Matthias Blume (blume (at) tti - c (dot) org)
1481    Date: 2004/09/13 16:50:00 CDT
1482    Tag: Release_110_49
1483    Description:
1484    
1485    New working version (110.49).  NEW BOOTFILES!
1486    
1487    ----------------------------------------------------------------------
1488    Name: Matthias Blume
1489    Date: 2004/09/13 16:20:00 CDT
1490    Tag: blume-20040913-config-mlrisc
1491    Description:
1492    
1493    Put target "mlrisc" back into the default list.
1494    (There is no harm in having it, and some users have expressed their
1495    wish to have "mlrisc" included by default.)
1496    
1497    ----------------------------------------------------------------------
1498    Name: John Reppy
1499    Date: 2004/09/13
1500    Tag: jhr-20040913-signals
1501    Description:
1502    
1503    Fixed the signal masking code to properly nest mask/unmask operations
1504    on a per-signal basis.
1505    
1506    ----------------------------------------------------------------------
1507    Name: Matthias Blume (blume (at) tti - c (dot) org)
1508    Date: 2004/09/08 13:20:00 CDT
1509    Tag: blume-20040908-heap-magic
1510    Description:
1511    
1512    Bumped the heap macig number to 0x09082004 to account for the changed
1513    layout of the ML frame under MacOS X.
1514    
1515    ----------------------------------------------------------------------
1516    Name: Allen Leung (leunga (at) reservoir (dot) com)
1517    Date: 2004/09/03 11:26:00 EST
1518    Tag: leunga-20040903-cygwin-install
1519    Description:
1520    
1521       Added a patch to _arch-n-opsys to enable the Cygwin runtime.
1522    The Cygwin runtime is turned on by setting the environment
1523    variable SMLNJ_CYGWIN_RUNTIME to 1.
1524    
1525    ----------------------------------------------------------------------
1526    Name: Matthias Blume (blume (at) tti - c (dot) org)
1527    Date: 2004/08/31 17:15:00 CDT
1528    Tag: blume-20040831-core
1529    Description:
1530    
1531    Added some exports to src/compiler/core.cm upon request by J. Joemann.
1532    
1533    ----------------------------------------------------------------------
1534    Name: Matthias Blume (blume (at) tti - c (dot) org)
1535    Date: 2004/08/30 17:55:00 CDT
1536    Tag: blume-20040830-installer
1537    Description:
1538    
1539    Upon request by Johannes Joemann:
1540    
1541    - improved ML code of installer to fall back to coping when renaming
1542      fails (i.e., when source and target are on different file systems);
1543      the code compiles but has yet to be tested in anger
1544    - removed mlrisc from list of default targets (config/targets)
1545    
1546    ----------------------------------------------------------------------
1547    Name: Matthias Blume (blume (at) tti - c (dot) org)
1548    Date: 2004/08/27 17:20:00 CDT
1549    Tag: blume-20040827-ptreql
1550    Description:
1551    
1552    Added ptreql primop to structure InlineT (upon request from Larry
1553    Paulson).
1554    
1555    ----------------------------------------------------------------------
1556    Name: Allen Leung (leunga (at) reservoir (dot) com)
1557    Date: 2004/08/15 21:21:00 EST
1558    Tag: leunga-110_48-udgraph
1559    Description:
1560    
1561    Another bug fix from Carl Hauser:
1562    
1563    diff /net/niflab/smlnj48/src/MLRISC/graphs/udgraph.sml udgraph.sml
1564    > 48c48
1565    > <              | rmv((e as (k,_))::es,L) = rmv(es,if k = i then es else
1566    > e::L)
1567    > ---
1568    > >              | rmv((e as (k,_))::es,L) = rmv(es,if k = i then L else e::L)
1569    > Without this, any deletion of an edge in an undirected graph does severe
1570    > violence to the graph.
1571    
1572    ----------------------------------------------------------------------
1573    Name: Allen Leung (leunga (at) reservoir (dot) com)
1574    Date: 2004/08/10 23:35:00 EST
1575    Tag: leunga-110_48-ppc
1576    Description:
1577    
1578       The IBM/MacOS syntax switch on PPC was incorrectly swapped.
1579    
1580    ----------------------------------------------------------------------
1581    Name: Matthias Blume (blume (at) tti - c (dot) org)
1582    Date: 2004/08/10 12:00:00 CDT
1583    Tag: Release_110_48
1584    Description:
1585    
1586    New working version (110.48).  NEW BOOTFILES!
1587    
1588    ----------------------------------------------------------------------
1589    Name: Allen Leung (leunga (at) reservoir (dot) com)
1590    Date: 2004/08/09 12:21:00 EST
1591    Tag: leunga-110_47-dijsktra
1592    Description:
1593    
1594    Bug fix from Carl Hauser:
1595    
1596    single_source_shortest_paths in dijkstra.sml was observed to get wrong
1597    answers (by comparing to single_source_shortest_paths in bellman-ford.sml).
1598    
1599    The problem is that following the expression A.update(dist,s,Num.zero)
1600    it is necessary to update the priority queue using Q.decreaseWeight(Q,s).
1601    
1602    ----------------------------------------------------------------------
1603    Name: Matthias Blume (blume (at) tti - c (dot) org)
1604    Date: 2004/08/06 18:10:00 CDT
1605    Tag: blume-20040806-cmdline
1606    Description:
1607    
1608    Fiddled with handling of command-line options:
1609    
1610      * sml now quits after processing the command line
1611        if -H, -S, -h<n>, or -s<n> appears as the last
1612        command-line argument
1613      * a new option -q terminates the session when encountered on
1614        the command line; subsequent arguments will be ignored
1615      * bug fixes: short (erroneous) arguments are no longer ignored
1616        completely
1617    
1618    ----------------------------------------------------------------------
1619    Name: Allen Leung (leunga (at) reservoir (dot) com)
1620    Date: 2004/08/04 18:17:00 EST
1621    Tag: leunga-110_47-ppc-ibm-asm
1622    Description:
1623    
1624      - Added minimal IBM assembly syntax support for PowerPC.
1625    
1626      - Cygwin: manually changed the file cygwin.def.  Some exported symbols have
1627        been altered in the runtime.  We need an automatic way to keep the file
1628        in sync.
1629    
1630    ----------------------------------------------------------------------
1631    Name: Matthias Blume (blume (at) tti - c (dot) org)
1632    Date: 2004/08/04 14:00:00 CDT
1633    Tag: Release_110_47
1634    Description:
1635    
1636    New working version (110.47).  NEW BOOTFILES!
1637    
1638    ----------------------------------------------------------------------
1639    Name: Matthias Blume (blume (at) tti - c (dot) org)
1640    Date: 2004/08/03 14:25:00 CDT
1641    Tag: blume-20040803-callingconv
1642    Description:
1643    
1644    Added low-level support for choosing C calling conventions by
1645    twiddling the type of rawccall.  (See
1646    src/compiler/Semant/types/cproto.sml for details.)
1647    
1648    ----------------------------------------------------------------------
1649    Name: Matthias Blume (blume (at) tti - c (dot) org)
1650    Date: 2004/08/02 15:55:00 CDT
1651    Tag: blume-20040802-backout
1652    Description:
1653    
1654    Backed out of change to win32-filesys.c.  The earlier patch to
1655    get_file_time caused CM to produce files with the wrong time stamp.
1656    
1657    ----------------------------------------------------------------------
1658    Name: Matthias Blume (blume (at) tti - c (dot) org)
1659    Date: 2004/08/02 14:45:00 CDT
1660    Tag: blume-20040802-nlffi-win32
1661    Description:
1662    
1663    Added NLFFI support for Win32, adapted from a patch provided by David
1664    Hansel.  This is currently completely untested.  Also, the issue
1665    concerning stdcall vs. ccall is still unresolved.
1666    
1667    ----------------------------------------------------------------------
1668    Name: Matthias Blume (blume (at) tti - c (dot) org)
1669    Date: 2004/07/30 17:55:00 CDT
1670    Tag: blume-20040730-various
1671    Description:
1672    
1673    Gearing up towards 110.47...
1674    
1675    - various minor bugfixes to ml-nlffigen
1676    - a beginning of a manual for nlffi
1677    
1678    - eliminated 'export name=value' in config/install.sh as this does
1679      not work with certain versions of /bin/sh
1680      (Thanks to David King at Motorola for catching this.)
1681    
1682    - several bugfixes provided or suggested by David Hansel at Reactive Systems:
1683      - added a test for tm==NULL to gmtime.c and localtime.c
1684      - applied patch for incorrect GetFileTime under win32
1685      - toSeconds -> toMilliseconds in Win32/win32-process.sml
1686    
1687    ----------------------------------------------------------------------
1688    Name: Matthias Blume (blume (at) tti - c (dot) org)
1689    Date: 2004/07/21 18:20:00 CDT
1690    Tag: blume-20040721-nlffigen
1691    Description:
1692    
1693    - Fixed minor issue in ml-nlffigen: Now generate structure T_foo
1694      for a typedef to an incomplete type, but leave out the "typ" member.
1695      (This is just for consistency.)
1696    - Started to produce what is supposed to become better (i.e., comprehensive)
1697      documentation of what ml-nlffigen does and produces.
1698    
1699    ----------------------------------------------------------------------
1700    Name: Matthias Blume (blume (at) tti - c (dot) org)
1701    Date: 2004/07/14 16:25:00 CDT
1702    Tag: blume-20040714-union
1703    Description:
1704    
1705    Added C_UNION to c-calls/c-types.sml and updated the machinery
1706    (ml-nlffigen, cproto.sml) that conveys C function interface
1707    information to the code generator.
1708    
1709    However, the actual architecture-specific implementation of function
1710    arguments and results that are C unions is still not implemented.
1711    
1712    ----------------------------------------------------------------------
1713    Name: Allen Leung (leunga (at) reservoir (dot) com)
1714    Date: 2004/07/14 14:38:00 EST
1715    Tag: leunga-110_46_1-ppc-lwzu
1716    Description:
1717    
1718        Added these instructions to the PowerPC architecture:
1719        LBZU(X), LHZU(X), LWZU(X),
1720        STWU(X), STFDU, STFSU
1721    
1722        etc...
1723    
1724        Note: I haven't added their instruction encoding into the description.
1725    
1726    ----------------------------------------------------------------------
1727    Name: Allen Leung (leunga (at) reservoir (dot) com)
1728    Date: 2004/07/13 15:04:00 EST
1729    Tag: leunga-110_46_1-ppc-lwarx
1730    Description:
1731    
1732       Added the two instructions LWARX and STWCX to the PowerPC
1733    instruction set.
1734    
1735       A (untested) rewrite of loop-structure.sml.  The old version
1736    is completely broken.
1737    
1738    ----------------------------------------------------------------------
1739    Name: Matthias Blume (blume (at) tti - c (dot) org)
1740    Date: 2004/07/13 13:50:00 CDT
1741    Tag: blume-20040713-nlffi
1742    Description:
1743    
1744    - use paramAlloc to report c-calls with too many arguments
1745      (for PPC version where parameter area is pre-allocated)
1746    - added ccall_maxargspace to machspec (to implement the above)
1747    - made "make" commend in CM's "make" tool configurable
1748    - added option (default: on) for passing the name of the SML/NJ's "bin"
1749      directory to "make"; the call looks like this:
1750    
1751         make <options> SMLNJ_BINDIR=<dir> <target>
1752    
1753      This can be used by the Makefile to, e.g., pick the "right" version
1754      of ml-nlffigen.
1755    - minor code tweaks
1756    
1757    ----------------------------------------------------------------------
1758    Name: Matthias Blume (blume (at) tti - c (dot) org)
1759    Date: 2004/07/12 22:50:00 CDT
1760    Tag: blume-110_46_1-macosx-nlffi
1761    Description:
1762    
1763    NLFFI under Mac OS X now working (sort of).  This is largely untested,
1764    though.
1765    
1766    Note:  1. You have to make a new, clean build of the runtime system.
1767           2. There are new BOOTFILES, you have to use them!
1768              (Doing the bootstrap process yourself would be *very* painful!
1769               If you absolutely have to do it, build the system under
1770               a different architecture and then cross-compile.)
1771    
1772    Version bumped to 110.46.1 to account for runtime data format changes.
1773    
1774    ----------------------------------------------------------------------
1775    Name: Matthias Blume (blume (at) tti - c (dot) org)
1776    Date: 2004/06/18 14:30:00 CDT
1777    Tag: blume-20040618-unix
1778    Description:
1779    
1780    Changed the implementation of structure Unix so that the same stream
1781    is returned every time one of the {text,bin}{In,Out}streamOf functions
1782    is invoked on the same proc.  This is not what the spec currently
1783    says -- although IMO it arguably should.  (See discussion below.)
1784    
1785    ----------------------------------------------------------------------
1786    Name: Matthias Blume (blume (at) tti - c (dot) org)
1787    Date: 2004/06/17 18:15:00 CDT
1788    Tag: Release_110_46
1789    Description:
1790    
1791    New working version (110.46).  NEW BOOTFILES!
1792    
1793    ----------------------------------------------------------------------
1794    Name: Matthias Blume (blume (at) tti - c (dot) org)
1795    Date: 2004/06/17 17:20:00 CDT
1796    Tag: blume-20040617-timer-unix
1797    Description:
1798    
1799    Changed the interface of structures Timer and Unix to match the most
1800    recent Basis spec.
1801    
1802    In the case of Unix there still seems to be an open/weird issue:
1803    
1804       The {text,bin}{In,Out}streamOf functions are supposed to create
1805       fresh streams whenever they are called -- as opposed to have them
1806       return the same stream every time.  This design is supposed to
1807       prevent space leaks caused by proc values hanging on to streams.
1808    
1809       The reap function, on the other hand, is supposed to close the
1810       streams.  This cannot be done without having a handle on the
1811       stream in proc after all...
1812    
1813    I took the liberty to implement the following stopgap solution:
1814    
1815      The proc value hangs on to the most recently created stream(s).
1816      Reap closes those.  If either or both of the two streams hadn't
1817      been created at all yet, then reap will close the corresponding
1818      file descriptors directly.
1819    
1820    PS: I don't understand the original space leak argument anymore.  If
1821    a proc hangs on to the imperative stream, then I/O operations on those
1822    will advance the state of the cached stream and avoid the space leak.
1823    
1824    ----------------------------------------------------------------------
1825    Name: Matthias Blume (blume (at) tti - c (dot) org)
1826    Date: 2004/05/28 16:45:00 CDT
1827    Tag: blume-20040528-basis
1828    Description:
1829    
1830    Added signature PACK_REAL and exported functor PrimIO.
1831    
1832    ----------------------------------------------------------------------
1833    Name: Matthias Blume (blume (at) tti - c (dot) org)
1834    Date: 2004/05/25 16:00:00 CDT
1835    Tag: blume-20040525-group-owner
1836    Description:
1837    
1838    CM now ignores (but still accepts) the "owner" information in group
1839    descriptions.  The owner of a group is its next enclosing
1840    library. Each group must have a unique owner.  (There is a virtual
1841    "toplevel" library that owns groups which are not nested within a real
1842    library.)  Previously, each group had to explicitly declare its owner,
1843    and CM would check that such a declaration is correct.  The new scheme
1844    is to have CM check that for each group there is precisely one owning
1845    library.
1846    
1847    The advantage of the new scheme is that the programmer no longer needs
1848    to maintain the somewhat annoying owner information.  The downside is
1849    that CM cannot enforce the ownership rule across multiple runs of
1850    CM.make.  Fortunately, enclosing the same group in two different
1851    libraries A and B which are not part of the same program does not
1852    cause real problems.
1853    
1854    ----------------------------------------------------------------------
1855    Name: Matthias Blume (blume (at) tti - c (dot) org)
1856    Date: 2004/05/20 16:00:00 CDT
1857    Tag: blume-20040520-win32
1858    Description:
1859    
1860    Made the win32 version work again.  (Strangely, a misplaced comma had
1861    slipped into win32-process.c which prevented the runtime from being
1862    compiled correctly.)
1863    
1864    Also, included a minor addition to ml-build.bat analogous to what was
1865    done in blume-20040519-ml-build.
1866    
1867    ----------------------------------------------------------------------
1868    Name: Matthias Blume (blume (at) tti - c (dot) org)
1869    Date: 2004/05/19 22:10:00 CDT
1870    Tag: blume-20040519-ml-build
1871    Description:
1872    
1873    Arranged for ml-build to clean up after itself a little bit better.
1874    The script generates a temporary SML source file and compiles it using
1875    CM, so CM generates metadata (GUID, SKEL, objectfile) for it.  It now
1876    gets rid of those at the end, so they don't accumulate under .cm.
1877    
1878    This required a minor change to install.sh because the name of the
1879    metadata directory (default: .cm) is actually configurable at
1880    installation time.
1881    
1882    ----------------------------------------------------------------------
1883    Name: Matthias Blume (blume (at) tti - c (dot) org)
1884    Date: 2004/05/18 15:50:00 CDT
1885    Tag: blume-20040518-mkreader
1886    Description:
1887    
1888    Added Posix.IO.mk{Bin,Text}{Reader,Writer} by lifting their respective
1889    implementations from internal modules PosixBinPrimIO and PosixTextPrimIO.
1890    
1891    ----------------------------------------------------------------------
1892    Name: Matthias Blume (blume (at) tti - c (dot) org)
1893    Date: 2004/05/11 14:35:00 CDT
1894    Tag: blume-20040511-win32sock
1895    Description:
1896    
1897    Added previously missing support for many socket-related functions
1898    under win32.  Thanks to David Hansel <hansel@reactive-systems.com>
1899    for the voluminous patch!
1900    
1901    (I have not tested this patch under win32 yet.)
1902    
1903    Here is David's e-mail:
1904    
1905    Hi,
1906    
1907    Attached to this email you find a diff against sml/nj 110.45
1908    that will enable socket support under Windows.
1909    
1910    To apply the patch (using unix or cygwin)
1911    1) gunzip runtime.diff.gz
1912    2) "cd" into "src/runtime" in the source tree of a fresh
1913       110.45 installation.
1914    3) patch -p 1 < [your/path/to]runtime.diff
1915    
1916    The code compiles fine but has NOT yet been extensively tested.
1917    I only ran a few tests for basic socket client functionality
1918    (which worked fine).  Especially the functions that use ioctl
1919    are not tested at all and might not work (see below).
1920    
1921    I implemented this since we want to move to a newer version of sml/nj
1922    but need socket support in order to use it.  This is the first time I
1923    even had a look at the sml/nj source,  so please review my changes
1924    before making this part of the distribution!  Here are a few issues
1925    that I think might be better for someone to solve who is more
1926    familiar with the sml/nj source (and socket programming):
1927    
1928    - getnetbyaddr.c and getnetbyname.c will raise a "not implemented"
1929      exception since I could not figure out what the windows equivalent
1930      of these functions is
1931    
1932    - In sockets-osdep.h there are a some #include statements that are
1933      only used in a few files that include sockets-osdep.h
1934    
1935    - In smlnj-sock-lib.c, function init_fn() calls WSAStartup() but
1936      does not process its return value since I don't know how to
1937      report an error upwards.
1938    
1939    - It would probably be good to have a call to WSACleanup() when
1940      the library is unloaded (if there is such a possibility).
1941      Otherwise I think Windows will take care of this automatically
1942      when the process finishes.
1943    
1944    - I used ioctlsocket() as a replacement for ioctl() but I have
1945      no idea if that is actually the proper replacement on Windows.
1946    
1947    - All these issues are marked in the code by "FIXME" comments.
1948    
1949    We use sml/nj extensively in our products and are quite happy
1950    with it.  I hope this contribution will help you.
1951    
1952    Keep up the good work!
1953    
1954    David
1955    
1956    ----------------------------------------------------------------------
1957    Name: Matthias Blume (blume (at) tti - c (dot) org)
1958    Date: 2004/05/11 14:20:00 CDT
1959    Tag: blume-20040511-installml
1960    Description:
1961    
1962    Fixed two bugs in installml script.  (Thanks to Vesa A. Norrman for
1963    the patch.)
1964    
1965    ----------------------------------------------------------------------
1966    Name: Matthias Blume (blume (at) tti - c (dot) org)
1967    Date: 2004/05/11 14:05:00 CDT
1968    Tag: blume-20040511-nlffi-netbsd
1969    Description:
1970    
1971    Added support for nlffi under netbsd.  (Thanks to Vesa A. Norrman for
1972    the patch.)
1973    
1974    ----------------------------------------------------------------------
1975    Name: Matthias Blume (blume (at) tti - c (dot) org)
1976    Date: 2004/05/11 12:05:00 CDT
1977    Tag: blume-20040511-exports
1978    Description:
1979    
1980    As per request by Adam Chlipala <adam@hcoop.net>, extended various
1981    export lists in compiler-related .cm-files.
1982    
1983    ----------------------------------------------------------------------
1984    Name: Matthias Blume (blume (at) tti - c (dot) org)
1985    Date: 2004/05/11 11:35:00 CDT
1986    Tag: blume-20040511-allsource
1987    Description:
1988    
1989    The installer now honors the "src-smlnj" target again, although its meaning
1990    has changed from "all sources required for the compiler" to "all sources
1991    the installer knows about".  In other words, if you enable "src-smlnj"
1992    in the "targets" file, then the installer will pull in sources for
1993    everything.  (Notice that this refers to source code only.  Compiled
1994    code is still only installed for modules that were requested explicitly
1995    or which are required for other modules that were requested explicitly.)
1996    
1997    ----------------------------------------------------------------------
1998    Name: Matthias Blume (blume (at) tti - c (dot) org)
1999    Date: 2004/04/23 17:40:00 CDT
2000    Tag: blume-20040423-ieee-scan
2001    Description:
2002    
2003    Fixed IEEEReal.scan (and .fromString) so that if there is an overflow
2004    in the exponent calculation we get INF or ZERO (depending on the mantissa
2005    and the sign of the exponent).
2006    
2007    ----------------------------------------------------------------------
2008    Name: Matthias Blume (blume (at) tti - c (dot) org)
2009    Date: 2004/04/23 10:40:00 CDT
2010    Tag: blume-20040423-ml-build
2011    Description:
2012    
2013    The ml-build script now terminates with a non-0 status when something
2014    goes wrong.
2015    
2016    ----------------------------------------------------------------------
2017    Name: Matthias Blume (blume (at) tti - c (dot) org)
2018    Date: 2004/04/22 16:35:00 CDT
2019    Tag: blume-20040422-Option
2020    Description:
2021    
2022    Made exception Option to be the same as exception Option.Option
2023    (as it should be).
2024    
2025    ----------------------------------------------------------------------
2026    Name: Allen Leung (leunga (at) reservoir (dot) com)
2027    Date: 2004/03/19 14:40:00 EST
2028    Tag: leunga-20040319-cygwin-nlffi
2029    Description:
2030    
2031    Fixed the runtime so that ml-nlffi-lib runs on the cygwin version
2032    of SML/NJ.  The problem is that
2033    
2034       lib = dlopen(NULL, ...)
2035       f   = dlsym(lib, "malloc");
2036    
2037    does not work on Windows unless we explicitly export symbols
2038    such as 'malloc' during linking.  We fixed this by explicitly
2039    exporting the required symbols with the magic gcc incantation:
2040    
2041        -Wl,--export-all cygwin.def
2042    
2043    where cygwin.def is a file containing all the symbols that
2044    we wish to export.
2045    
2046    I suspect this is a Windows problem and we'll have to
2047    do the same (somehow with windows compilers) when
2048    we build the native win32 version with the system
2049    calls LoadLibrary/GetProcAddress.
2050    
2051    ----------------------------------------------------------------------
2052    Name: Matthias Blume (blume (at) tti - c (dot) org)
2053    Date: 2004/03/04 16:35:00 CST
2054    Tag: blume-20040304-intinf-fmt
2055    Description:
2056    
2057    Fixed problem with IntInf.fmt (sign would show up on the right instead
2058    of on the left for BIN, OCT, and HEX).
2059    
2060    ----------------------------------------------------------------------
2061    Name: Matthias Blume (blume (at) tti - c (dot) org)
2062    Date: 2004/03/04 11:25:00 CST
2063    Tag: blume-20040304-symlinks
2064    Description:
2065    
2066    Fixed problem with installer script (unix only) where bin/ml-yacc and
2067    friends pointed (via symlinks) to absolute locations instead of just
2068    .run-sml.  This was reported by Vesa A Norrman.
2069    
2070    ----------------------------------------------------------------------
2071    Name: Matthias Blume (blume (at) tti - c (dot) org)
2072    Date: 2004/02/13 14:50:00 CST
2073    Tag: Release_110_45
2074    Description:
2075    
2076    New working version (110.45). New bootfiles.
2077    
2078    ----------------------------------------------------------------------
2079    Name: Matthias Blume (blume (at) tti - c (dot) org)
2080    Date: 2004/01/26 15:15:15 CST
2081    Tag: blume-20040126-toplevel
2082    Description:
2083    
2084    Improved handling of exceptions at the interactive toplevel.
2085    
2086    ----------------------------------------------------------------------
2087    Name: Matthias Blume (blume (at) tti - c (dot) org)
2088    Date: 2004/01/26 11:25:00
2089    Tag: blume-20040126-app
2090    Description:
2091    
2092    Type of top-level "app" corrected.
2093    Added code for setting vp_limitPtrMask to Win32-specific runtime.
2094    
2095    ----------------------------------------------------------------------
2096    Name: Matthias Blume (blume (at) tti - c (dot) org)
2097    Date: 2003/11/18 17:10 CST
2098    Tag: blume-20031118-basis-fiddle
2099    Description:
2100    
2101    - changed Timer interface to what might become the spec
2102    - POSIX_FLAGS -> BIT_FLAGS according to spec
2103    - some other minor discrepancies wrt. spec eliminated
2104    
2105    ----------------------------------------------------------------------
2106    Name: Matthias Blume (blume (at) tti - c (dot) org)
2107    Date: 2003/11/06 12:00:00 CST
2108    Tag: Release_110_44
2109    Description:
2110    
2111    New working version (110.44). New bootfiles.
2112    
2113    ----------------------------------------------------------------------
2114    Name: Matthias Blume (blume (at) tti - c (dot) org)
2115    Date: 2003/11/04 11:50:00 CST
2116    Tag: blume-20031104-move-libraries
2117    Description:
2118    
2119    Eliminated the "dont_move_libraries" directive in config/targets.
2120    (The mechanism was broken and could not be fixed easily.  Moreover,
2121    there does not seem to be any reason not to move all libraries into
2122    lib during installation.  I originally implemented this directive as a
2123    backward-compatibility feature when I first introduced the new CM.
2124    Now that things have been stable for a long time and going back to the
2125    old CM is not an option, there is no reason to keep it around.)
2126    
2127    ----------------------------------------------------------------------
2128    Name: Matthias Blume (blume (at) tti - c (dot) org)
2129    Date: 2003/11/03 16:00:00 CST
2130    Tag: blume-20031103-installdir
2131    Description:
2132    
2133    Made installer honor INSTALLDIR variable again.  (Thanks to Chris
2134    Richards for pointing out the problem and providing the solution.)
2135    
2136    ----------------------------------------------------------------------
2137    Name: Matthias Blume (blume (at) tti - c (dot) org)
2138    Date: 2003/10/01 17:05:00 CDT
2139    Tag: blume-20031001-lal-mlrisc
2140    Description:
2141    
2142    MLRISC bug fix from Lal.
2143    
2144    ----------------------------------------------------------------------
2145    Name: Matthias Blume (blume (at) tti - c (dot) org)
2146    Date: 2003/09/30 16:10:00 CDT
2147    Tag: blume-20030930-primio-bat
2148    Description:
2149    
2150    1. Added openVector, nullRd, and nullWr to PRIM_IO.
2151    2. Improved .bat files (for Win32 port) to make things work under Win95.
2152       (thanks to Aaron S. Hawley for this one)
2153    
2154    ----------------------------------------------------------------------
2155    Name: Matthias Blume (blume (at) tti - c (dot) org)
2156    Date: 2003/09/26 16:05:00 CDT
2157    Tag: blume-20030926-wrappriv
2158    Description:
2159    
2160    Added missing wrapper for privilege "primitive" in $smlnj/viscomp/core.cm.
2161    
2162    ----------------------------------------------------------------------
2163    Name: Matthias Blume (blume (at) tti - c (dot) org)
2164    Date: 2003/09/26 15:00:00 CDT
2165    Tag: blume-20030926-110_43_3
2166    Description:
2167    
2168    - additional cleanup
2169    - version number bump, NEW BOOTFILES
2170    
2171    ----------------------------------------------------------------------
2172    Name: Matthias Blume (blume (at) tti - c (dot) org)
2173    Date: 2003/09/26 12:00:00 CDT
2174    Tag: blume-20030926-ppautoload
2175    Description:
2176    
2177    I modified the read-eval-print loop so that the autoloader gets
2178    invoked whenever the prettyprinter tries to look up a symbol that
2179    is not currently defined in the toplevel environment but which
2180    appears in CM's autoload registry.  As a result, we see far fewer of
2181    those ?.Foo.Bar.xxx names in the prettyprinter's output.
2182    
2183    In addition to this I tried to clean up some pieces of the Basis
2184    implementation (e.g., Socket, Word8Array) in order to prevent other
2185    instances of these ?.Foo.Bar.xxx names from being printed.
2186    
2187    The mechanism that picks names for types still needs some work, though.
2188    (Right now it seems that if there is a type A.t which is defined to
2189    be B.u, but B is unavailable at toplevel, then A.t gets printed as
2190    "?.B.u" although the perhaps more sensible solution would be to use
2191    "A.t" in this case.  In other words, the prettyprinter should follow
2192    a chain of DEFtycs not farther than there are corresponding toplevel
2193    names in the current environment.)
2194    
2195    ----------------------------------------------------------------------
2196    Name: Matthias Blume (blume (at) tti - c (dot) org)
2197    Date: 2003/09/24 16:31:00 CDT
2198    Tag: blume-20030924-installer
2199    Description:
2200    
2201    Another installer tweak:  All the ML code for the installer is now
2202    compiled during CMB.make and put into a little library called
2203    $smlnj/installer.cm.  The installation then simply invokes
2204    
2205       sml -m $smlnj/installer.cm
2206    
2207    and everything happens automagically.
2208    
2209    Win32:  ML code senses value of environment variable SMLNJ_HOME.
2210    Unix:   ML code senses values of environment variables ROOT, CONFIGDIR,
2211            and BINDIR.
2212    
2213    The new scheme guarantees that the ML code responsible for the installation
2214    is in sync with the APIs of the main system.  Also, the installer is
2215    somewhat faster because the installer script is precompiled.
2216    
2217    ----------------------------------------------------------------------
2218    Name: Matthias Blume (blume (at) tti - c (dot) org)
2219    Date: 2003/09/24 15:35:00 CDT
2220    Tag: blume-20030924-synsock
2221    Description:
2222    
2223    Added a signature SYNCHRONOUS_SOCKET to basis.cm.  This is like SOCKET
2224    but excludes all non-blocking operations.  Defined SOCKET (in Basis)
2225    and CML_SOCKET in terms of SYNCHRONOUS_SOCKET.  Removed superfluous
2226    implementations of non-blocking operations from CML's Socket
2227    structure.
2228    
2229    ----------------------------------------------------------------------
2230    Name: Matthias Blume (blume (at) tti - c (dot) org)
2231    Date: 2003/09/24 15:10:05 CDT
2232    Tag: blume-20030924-sockets
2233    Description:
2234    
2235    1. Fixed SOCKET API and implementation to match Basis spec.
2236       This required changing the internal representation of sockets to one
2237       that remembers (for each socket file descriptor) whether it is currently
2238       blocking or non-blocking.  This state is maintained lazily (i.e., a system
2239       call is made only if the state actually needs to change).
2240    
2241    2. OS-specific details of sockets were moved into separate files, thus
2242       making it possible to unify the bulk of the socket implementations
2243       between Unix and Win32.
2244    
2245    3. CML's socket API changed accordingly.
2246       (Note that we need to remove non-blocking functions from this API
2247       since they are redundant in the case of CML!)
2248    
2249    4. CML's socket implementation now makes use of non-blocking functions
2250       provided by Basis, thus removing all OS-dependent code from this part
2251       of CML.
2252    
2253    5. Changed Real64.precision from 52 to 53.  Minor cleanup in Real64 code.
2254    
2255    ----------------------------------------------------------------------
2256    Name: Matthias Blume (blume (at) tti - c (dot) org)
2257    Date: 2003/09/22 12:10:00 CDT
2258    Tag: blume-20030922-110_43_2
2259    Description:
2260    
2261    Made a new interim version and bootfiles for developer's bootstrapping
2262    convenience.
2263    
2264       110.43.2 -- NEW BOOTFILES
2265    
2266    ----------------------------------------------------------------------
2267    Name: Matthias Blume (blume (at) tti - c (dot) org)
2268    Date: 2003/09/19 15:55:00 CDT
2269    Tag: blume-20030919-cmdir
2270    Description:
2271    
2272    1. new-install.sh -> install.sh
2273    2. changed default CM "metadata" directory name to ".cm" (instead of "CM")
2274    3. tweaked installer so that another name instead of .cm can be chosen
2275       at install time (by setting the CM_DIR_ARC environment variable
2276       during installation); once installation is complete, the name is
2277       fixed
2278    
2279    ----------------------------------------------------------------------
2280    Name: Matthias Blume (blume (at) tti - c (dot) org)
2281    Date: 2003/09/18 16:00:00 CDT
2282    Tag: blume-20030918-110_43_1
2283    Description:
2284    
2285    Made a new interim version and bootfiles for developer's bootstrapping
2286    convenience.
2287    
2288       110.43.1 -- NEW BOOTFILES
2289    
2290    ----------------------------------------------------------------------
2291    Name: Matthias Blume (blume (at) tti - c (dot) org)
2292    Date: 2003/09/18 15:20:00 CDT
2293    Tag: blume-20030918-misc
2294    Description:
2295    
2296    1. Exported fractionsPerSecond etc. from TimeImp (but not from Time as
2297       this seems to be controversial at the moment) and used those in
2298       Posix.ProcEnv.times.
2299    
2300    2. Added Time.{from,to}Nanoseconds to Time.
2301    
2302    3. Improved Real.{from,to}LargeInt by avoiding needless calculations.
2303       For example, fromLargeInt never needs to look at more than 3 "big
2304       digits" to get its 53 bits of precision.
2305    
2306    ----------------------------------------------------------------------
2307    Name: Matthias Blume (blume (at) tti - c (dot) org)
2308    Date: 2003/09/17 16:30:00 CDT
2309    Tag: blume-20030917-real32-slices
2310    Description:
2311    
2312    Added an entry to the primitive environment
2313    (compiler/Semant/statenv/prim.sml) for int32->real64 conversion and
2314    added code to compiler/CodeGen/main/mlriscGen.sml to implement it.
2315    
2316    Removed some of the "magic" constants in real64.sml and replaced them
2317    with code that generates these values from their corresponding
2318    integer counterparts.
2319    
2320    Made all(?) the slice-related changes to the Basis and made everything
2321    compile again...
2322    
2323    ----------------------------------------------------------------------
2324    Name: Matthias Blume (blume (at) tti - c (dot) org)
2325    Date: 2003/09/15 17:45:00 CDT
2326    Tag: blume-20030915-rbase
2327    Description:
2328    
2329    Fixed bug in Real.fromLargeInt.
2330    
2331    ----------------------------------------------------------------------
2332    Name: Matthias Blume (blume (at) tti - c (dot) org)
2333    Date: 2003/09/13 18:11:00 CDT
2334    Tag: blume-20030913-libinstall
2335    Description:
2336    
2337    Minor bugfix in config/libinstall (set anchor with path to
2338    standalone tool after installing it, otherwise libraries that
2339    need ml-lex or ml-yacc won't compile the first time the installer
2340    runs).
2341    
2342    ----------------------------------------------------------------------
2343    Name: Matthias Blume (blume (at) tti - c (dot) org)
2344    Date: 2003/09/12 11:45:00 CDT
2345    Tag: blume-20030912-various
2346    Description:
2347    
2348     - fixed bug in Real.toLargeInt
2349     - fixed bug in Posix.ProcEnv.times
2350     - changed inputLine functions to return an option
2351     - minor installer improvements / bugfixes
2352     - changed default @SMLalloc parameter for x86/celeron to 64k
2353    
2354    ----------------------------------------------------------------------
2355    Name: Matthias Blume (blume (at) tti - c (dot) org)
2356    Date: 2003/09/09 22:00:00 CDT
2357    Tag: Release_110_43
2358    Description:
2359    
2360        New working release 110.43.  New bootfiles.
2361    
2362    ----------------------------------------------------------------------
2363    Name: Matthias Blume (blume (at) tti - c (dot) org)
2364    Date: 2003/09/09 19:20:00 CDT
2365    Tag: blume-20030909-installer
2366    Description:
2367    
2368    Rewrote large parts of config/install.sh in SML (config/libinstall.sml).
2369    Modified config/install.bat to take advantage of it.  Also modified
2370    config/install.sh (and called it config/new-install.sh) to take advantage
2371    of it on Unix systems.  (The SML code is (supposed to be) platform-
2372    independent.)
2373    
2374    The installer can now install everything under Win32
2375    as well as under *nix as long as it compiles.
2376    
2377    Other changes:
2378    
2379      - made CML compile again under Win32
2380      - made eXene compile under Win32 (by providing a fake structure UnixSock
2381        and by using OS.Process.getEnv instead of Posix.ProcEnv.getenv)
2382      - fixed a bug in nowhere: it assumed that type OS.Process.status is the
2383        same as type int;  under Win32 it isn't
2384      - fixed some slice-related problems in the win32-specific parts of CML
2385      - added a functor argument "sameVol" to os-path-fn.sml in the Basis
2386        (under Win32, the volume name is case-insensitive, and the
2387        OS.Path code compares volume names for equality)
2388    
2389    ----------------------------------------------------------------------
2390    Name: Matthias Blume (blume (at) tti - c (dot) org)
2391    Date: 2003/09/08 11:55:00 CDT
2392    Tag: blume-20030908-fullpath
2393    Description:
2394    
2395    Made Win32 version of OS.FileSys.fullPath return current directory
2396    when given an empty string.  This is what the spec says, and incidentally,
2397    CM depends on it.  (CM otherwise goes into an infinite loop in certain
2398    cases when presented with the name of a non-existing .cm file.)
2399    
2400    ----------------------------------------------------------------------
2401    Name: Matthias Blume (blume (at) tti - c (dot) org)
2402    Date: 2003/09/04 16:30:00 CDT
2403    Tag: blume-20030905-slices-etc
2404    Description:
2405    
2406      1. Changed interface to vectors and arrays in Basis to match
2407         (draft) Basis spec.
2408      2. Added signatures and implementations of slices according to
2409         Basis spec.
2410      3. Edited source code throughout the system to make it compile again
2411         under 1. and 2.  (In some cases code had to be added to have it
2412         match the new signatures.)
2413      4. MLRISC should be backward-compatible: the copies of the originals
2414         of files that needed to change under 3. were retained, the .cm files
2415         check the compiler version number and use old versions when
2416         appropriate.
2417      5. Changed type of OS.FileSys.readDir and Posix.FileSys.readdir to
2418         dirstream -> string option (in accordance with Basis spec).
2419      6. When generating code that counts lines, ml-lex used function
2420         CharVector.foldli, taking advantage of its old interface.
2421         This has been replaced with the corresponding code from
2422         CharVectorSlice.  (html-lex must be re-lexed!)
2423      7. BitArray in smlnj-lib/Util has been extended/modified to match the
2424         new MONO_ARRAY signature.  (Do we need BitArraySlice?)
2425      8. Removed temporary additions (fromInternal, toInternal) from the
2426         (now obsolete) IntInf in smlnj-lib/Util.
2427      9. Cleaned up structure Byte.
2428     10. Added localOffset, scan, and fromString to Date (according to spec).
2429         Cleaned/corrected implementation of Date.
2430         (Still need to check for correctness; implement better canonicalizeDate.)
2431     11. Added "scan" to signature IEEE_REAL.
2432     12. Some improvements to IntInf [in particular: efficiency-hack for
2433         mod and rem when second operand is 2 (for parity checks).]
2434     13. Changed representation of type Time.time, using a single IntInf.int
2435         value counting microseconds.  This considerably simplified the
2436         implementation of structure Time.  We now support negative time
2437         values; scan and fromString handle signs.
2438     14. Functor PrimIO now takes two additional arguments (VectorSlice and
2439         ArraySlice).
2440    
2441    ----------------------------------------------------------------------
2442    Name: Matthias Blume (blume (at) tti - c (dot) org)
2443    Date: 2003/08/28 17:00:00 CDT
2444    Tag: blume-20030828-intinf
2445    Description:
2446    
2447    This is a major update which comes with a version number bump
2448    (110.42.99 -- yes, we are really close to 110.43 :-), NEW BOOTFILES,
2449    and an implementation of IntInf in the Basis.
2450    
2451    There are a fairly large number of related changes and updates throughout
2452    the system:
2453    
2454    Basis:
2455            - Implemented IntInf.
2456            - Made LargeInt a projection of IntInf (by filtering through INTEGER).
2457            - Added some missing Real64 operations, most notably Real.toLargeInt.
2458            - Added FixedInt as a synonym for Int32.
2459    
2460    compiler:
2461            * Added support for a built-in intinf type.
2462              - literals
2463              - pattern matching
2464              - conversion shortcuts (Int32.fromLarge o Int.toLarge etc.)
2465              - overloading on literals and operations
2466    
2467            This required adding a primitive type intinf, some additional
2468            primops, and implementations for several non-trivial intinf
2469            operations in Core.  (The intinf type is completely abstract
2470            to the compiler; all operations get delegated back to the Core.)
2471    
2472            * Intinf equality is handled by polyequal.  However, the compiler
2473            does not print its usual warning in this case (since polyequal
2474            is the right thing to do there).
2475    
2476            * Improved the organization of structure InlineT.
2477    
2478            * A word about conversion primops:
2479            If conversions involving intinf do not cancel out during
2480            CPS contract, then the compiler must insert calls to Core functions.
2481            Since all core access must be resolved already during the FLINT
2482            translate phase, it would be too late a the time of CPS contract
2483            to add new Core calls.  For this reason, conversion primops
2484            for intinf carry two arguments:  1. the numeric argument that
2485            they are supposed to convert, and 2. the Core function that
2486            can help with this conversion if necessary.  If CPS contract
2487            eliminates a primop, then the associated Core function becomes
2488            dead and goes away.  Intinf conversion primops that do not get
2489            eliminated by CPS contract get rewritten into calls of their
2490            core functions by a separate, new phase.
2491    
2492    interactive system:
2493            - Control.Print.intinfDepth controls max length of intinf constants
2494            being printed. (Analogous to Control.Print.stringDepth.)
2495            - Cleanup in printutil and pputil: got rid of unused stuff and
2496            duplicates; replaced some of the code with code that makes better
2497            use of library functionality.
2498    
2499    CM:
2500            Bugfix: parse-errors in init group (system/smlnj/init/init.cmi)
2501            are no longer silent.
2502    
2503    CKIT:
2504            Fixed mismatched uses of Int32 and LargeInt.  I always decided
2505            in favor of LargeInt -- which is now the same as IntInf.
2506            CKIT-knowledgable people should check whether this is what's
2507            intended and otherwise change things back to using Int32 or
2508            FixedInt.
2509    
2510    Throughout the code:
2511            Started using IntInf.int literals and built-in operations
2512            (e.g., comparison with 0) where this seems appropriate.
2513    
2514    
2515    ----------------------------------------------------------------------
2516    Name: Dave MacQueen (dbm@cs.uchicago.edu)
2517    Date: 2003/08/13 11:36:00 CDT
2518    Tag: dbm-20030813-mcz-merge1
2519    Description:
2520    
2521    Merging changes from the mcz-branch development branch into trunk.
2522    These changes involve replacement of the emulated old prettyprinter
2523    interface with direct use of the SML/NJ Lib PP library, and fixing
2524    of a couple of bugs (895, 1186) relating to error messages.  A new
2525    prettyprinter for ast datatypes (Elaborator/print/ppast.{sig,sml})
2526    has been added.
2527    
2528    ----------------------------------------------------------------------
2529    Name: Matthias Blume (blume (at) tti - c (dot) org)
2530    Date: 2003/08/11 15:45:00 CDT
2531    Tag: blume-20030811-windows
2532    Description:
2533    
2534    Version number bumped to 110.42.9.  NEW BOOTFILES!!!
2535    
2536        http://smlnj.cs.uchicago.edu/dist/working/110.42.9/
2537    
2538    This patch restores SML/NJ's ability to run under win32.  There are a
2539    number of changes, including fixes for several bugs that had gone
2540    unnoticed until now:
2541    
2542      - uname "CYGWIN_NT*" is recognized as win32 (This is relevant only when
2543        trying to run the win32 version from within cygwin.)
2544    
2545      - There are a number of simple .bat scripts that substitute for their
2546        corresponding Unix shell-scripts.  (See below.)
2547    
2548      - The internals of ml-build have been modified slightly.  The main
2549        difference is that instead of calling ".link-sml" (or link-sml.bat)
2550        using OS.Process.system, the ML process delegates this task back
2551        to the script.  Otherwise problems arise in mixed environments such
2552        as Cygwin where scripts look and work like Unix scripts, but
2553        where OS.Process.system cannot run them.
2554    
2555      - In CM, the srcpath pickler used native pathname syntax -- which
2556        is incorrect in the case of cross-compilation.  The new pickle format
2557        is independent of platform-specific naming conventions.
2558    
2559      - Path configuration files (such as lib/pathconfig) can now choose
2560        between native and standard syntax.  Placing a line of the form
2561    
2562            standard!
2563    
2564        into the file causes all subsequent paths to be interpreted using
2565        CM standard pathname syntax (= Unix conventions); a line
2566    
2567            native!
2568    
2569        switches back to native style.  This was needed so that
2570        path config files can be written portably, see src/system/pathconfig.
2571    
2572      - Runtime system:
2573    
2574          - win32-filesys.c:  get_file_time and set_file_time now
2575            access modification time, not creation time.
2576    
2577          - I/O code made aware of new array representation.
2578    
2579          - Bug fixes in X86.prim.masm.
2580    
2581       - src/system/makeml made aware of win32. (For use under cygwin
2582            and other Unix-environments for windows.)
2583    
2584       - In Basis, fixed off-by-one error in win32-io.sml (function vecF)
2585         which caused BinIO.inputAll to fail consistently.
2586    
2587    .bat scripts:
2588    
2589       Windows .bat scripts assume that SMLNJ_HOME is defined.
2590    
2591       - sml.bat, ml-yacc.bat, ml-lex.bat:  Driver scripts for standalone
2592         applications (sml, ml-yacc, ml-lex).
2593       - ml-build.bat: analogous to ml-build.
2594       - config\install.bat:  Analogous to config/install.sh.  This requires
2595         that SMLNJ_HOME is set and that Microsoft Visual C is ready to use.
2596         (nmake etc. must be on the path, and vcvars32 must have been run.)
2597         Moreover, sources for ml-lex and ml-yacc need to exist under src,
2598         and the bootfile hierarchy must have been unpacked under
2599         sml.boot.x86-win32.
2600         The script is very primitive and does a poor job at error checking.
2601         It only installs the base system, ml-lex, and ml-yacc.  No other
2602         libraries are being installed (i.e., you get only those that
2603         are part of the compiler.)
2604       - link-sml.bat:  analogous to .link-sml, but not currently used
2605    
2606    Unrelated bug fixes:
2607    
2608      - ml-nlffigen now exports structures ST_* corresponding to incomplete
2609        types.
2610      - Added getDevice to PP/src/pp-debug-fn.sml.  (Would not compile
2611        otherwise.)
2612    
2613    ----------------------------------------------------------------------
2614    Name: Dave MacQueen (macqueen@cs.uchicago.edu)
2615    Date: 2003/06/17
2616    Tag: macqueen-20030617-bug895
2617    Description:
2618    
2619    Modified compiler/Elaborator/print/pptype.sml to fix bug 895.
2620    Tag will be used for new development branch (mcz-branch) for
2621    use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago.
2622    
2623    ----------------------------------------------------------------------
2624    Name: Matthias Blume (blume (at) tti - c (dot) org)
2625    Date: 2003/05/27 16:55:00 CDT
2626    Tag: blume-20030527-polyeq
2627    Description:
2628    
2629    Tried to eliminated most cases of polymorphic equality.
2630    
2631    ----------------------------------------------------------------------
2632    Name: Matthias Blume (blume (at) tti - c (dot) org)
2633    Date: 2003/05/21 17:45:00 CDT
2634    Tag: blume-20030517-complete
2635    Description:
2636    
2637    Two changes:
2638    
2639      1. Added a flag for controlling whether non-exhaustive bindings will
2640         be treated as errors (default is false).
2641      2. Cleaned up the *entire* source tree so that CMB.make goes through
2642         without a single non-exhaustive match- or bind warning.
2643    
2644    ----------------------------------------------------------------------
2645    Name: Matthias Blume (blume (at) tti - c (dot) org)
2646    Date: 2003/05/17 10:20:00 CDT
2647    Tag: blume-20030517-absyn
2648    Description:
2649    
2650    1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
2651    
2652       This mainly affects the quality of error messages.  However, some
2653       of the code is now more straightforward than before. (Treatment of
2654       the above four constructs in translate.sml is much simpler than
2655       the "macro-expansion" that was going on before.  Plus, the mach-
2656       compiler no longer gets invoked just to be able to compile an
2657       if-expression.)
2658    
2659    2. The ErrorMsg.Error exception is now caught and absorbed by the
2660       interactive loop.
2661    
2662    ----------------------------------------------------------------------
2663    Name: Allen Leung
2664    Date: 2003/05/16 13:05:00 CDT
2665    Tag: leunga-20030516-cygwin-runtime
2666    Description:
2667    
2668        Ported the runtime system to cygwin, which uses the unix
2669    x86-unix bin files.  Missing/buggy features:
2670    
2671       o getnetbyname, getnetbyaddr: these functions seem to be missing in
2672         the Cygwin library.
2673       o Ctrl-C handling may be flaky.
2674       o Windows system calls and Windows I/O are not supported.
2675    
2676       A new set of binfiles is located at:
2677    
2678         http://www.dorsai.org/~leunga/boot.x86-unix.tgz
2679    
2680       This is only needed for bootstrapping the cygwin version of smlnj.
2681       Other x86 versions can use the existing binfiles.
2682    
2683    ----------------------------------------------------------------------
2684    Name: Matthias Blume
2685    Date: 2003/04/08 15:42:00 CDT
2686    Tag: blume-20030408-listpair
2687    Description:
2688    
2689    1. Added a target 'mlrisc' to installer.
2690    
2691    2. Added missing elements to structure ListPair.
2692    
2693    ----------------------------------------------------------------------
2694    Name: Allen Leung
2695    Date: 2003/01/07 10:40:00 EST
2696    Tag: leunga-20030107-int-rem
2697    Description:
2698    
2699    Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86.
2700    The arguments to the SUBL instruction were swapped.
2701    
2702    ----------------------------------------------------------------------
2703    Name: Matthias Blume
2704    Date: 2002/12/12 16:25:00 EST
2705    Tag: blume-20021212-risc-ra
2706    Description:
2707    
2708    Fixed a serious bug in the rewrite code for FP spilling/reloading that
2709    sent the RA into an infinite loop when floating point registers get
2710    spilled.  (Because of this bug, e.g., nucleic stopped compiling between
2711    110.37 and 110.38.)
2712    There was another set of potential problems related to the handling of
2713    MLRISC annotations (but those did not yet cause real problems, apparently).
2714    
2715    ----------------------------------------------------------------------
2716    Name: Matthias Blume
2717    Date: 2002/12/06 22:40:00 EST
2718    Tag: blume-20021206-cm-fileid
2719    Description:
2720    
2721    Added a call of SrcPath.sync at the beginning of Parse.parse (in CM).
2722    This fixes the problem of CM getting confused by files that suddenly
2723    change their identity (e.g., by getting unlinked and recreated by some
2724    text editor such as vi).  There might be a better/cheaper/cleaner way
2725    of doing this, but for now this will have to do.
2726    
2727    ----------------------------------------------------------------------
2728    Name: Matthias Blume
2729    Date: 2002/10/28 09:50:00 EST
2730    Tag: blume-20021028-typecheck
2731    Description:
2732    
2733    Exported structure Typecheck from $smlnj/viscomp/core.cm.
2734    
2735    ----------------------------------------------------------------------
2736    Name: Matthias Blume
2737    Date: 2002/10/17 09:10:00 EDT
2738    Tag: Release_110_42
2739    Description:
2740    
2741    In good old tradition, there has been a slight hiccup so that we have
2742    to patch 110.42 after the fact.   The old release tag has been replaced
2743    (see below).
2744    
2745    The change solves a problem with two competing approaches the
2746    configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in
2747    each other's way.
2748    
2749    This change only affects the runtime system code and the installer script.
2750    (No new bootfiles.)
2751    
2752    ----------------------------------------------------------------------
2753    Name: Matthias Blume
2754    Date: 2002/10/16 12:00:00 EDT
2755    Tag: Release_110_42_removed
2756    Description:
2757    
2758    New working release.  New bootfiles.
2759    
2760    ----------------------------------------------------------------------
2761    Name: Matthias Blume
2762    Date: 2002/10/10 13:10:00 EDT
2763    Tag: blume-20021010-ppc-divs
2764    Description:
2765    
2766    The mltree operator DIVS must be implemented with an overflow check on
2767    the PPC because the hardware indicates divide-by-zero using "overflow" as
2768    well.
2769    
2770    ----------------------------------------------------------------------
2771    Name: Matthias Blume
2772    Date: 2002/07/23 11:45:00
2773    Tag: blume-20020723-smlnj-home
2774    Description:
2775    
2776    Sml now senses the SMLNJ_HOME environment variable.  If this is set,
2777    then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless
2778    CM_PATHCONFIG is also set), the path configuration file is assumed
2779    to be in $SMLNJ_HOME/lib/pathconfig.  This way one can easily move
2780    the entire tree to some other place and everything will "just work".
2781    
2782    (Companion commands such as ml-build and ml-makedepend also sense this
2783    variable.)
2784    
2785    ----------------------------------------------------------------------
2786    Name: Matthias Blume
2787    Date: 2002/07/12 21:19:00 EDT
2788    Tag: blume-20020712-liveness
2789    Description:
2790    
2791    Exported two useful "step" functions from liveness module (MLRISC).
2792    
2793    ----------------------------------------------------------------------
2794    Name: Matthias Blume
2795    Date: 2002/07/05 16:00 EDT
2796    Tag: Release_110_41
2797    Description:
2798    
2799    New working release.  New bootfiles.
2800    
2801    ----------------------------------------------------------------------
2802    Name: Matthias Blume
2803    Date: 2002/07/05 10:25:00 EDT
2804    Tag: blume-20020705-btimp
2805    Description:
2806    
2807    Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that
2808    other clients can set up backtracing support.
2809    
2810    ----------------------------------------------------------------------
2811    Name: Matthias Blume
2812    Date: 2002/06/25 17:23:00 EDT
2813    Tag: blume-20020625-fpmax
2814    Description:
2815    
2816    Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point
2817    case.  (The sense of the isNaN test was reversed -- which made min and
2818    max always return their first argument.)
2819    
2820    ----------------------------------------------------------------------
2821    Name: Matthias Blume
2822    Date: 2002/06/11
2823    Tag: blume-20020611-unixpath
2824    Description:
2825    
2826    Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
2827    
2828    ----------------------------------------------------------------------
2829    Name: Matthias Blume
2830    Date: 2002/06/10 16:35:00 EDT
2831    Tag: blume-20020610-ieeereal
2832    Description:
2833    
2834    I back-ported my implementation of IEEEReal.fromString from the
2835    idlbasis-devel branch so that we can test it.
2836    
2837    Another small change is that ppDec tries to give more information
2838    than just "<sig>" in the case of functors.  However, this code is
2839    broken in some mysterious way if the functor's body's signature
2840    has not been declared by ascription but gets inferred from the
2841    implementation.  This needs fixing...
2842    
2843    ----------------------------------------------------------------------
2844    Name: Matthias Blume
2845    Date: 2002/05/31
2846    Tag: blume-20020531-btrace-mode
2847    Description:
2848    
2849    Resurrected SMLofNJ.Internals.BTrace.mode.  (It accidentally fell by
2850    the wayside when I switched over to using Controls everywhere.)
2851    
2852    ----------------------------------------------------------------------
2853    Name: Lal George
2854    Date: 2002/05/23 12:21:40 EDT
2855    Tag: george-20020523-visual-labels
2856    Description:
2857    
2858    Labels are now displayed in the graphical output to make
2859    the fall-through and target blocks obvious.
2860    
2861    ----------------------------------------------------------------------
2862    Name: Matthias Blume
2863    Date: 2002/05/22 11:03:00 EDT
2864    Tag: blume-20020522-shrink
2865    Description:
2866    
2867    John tweaked yesterday's fix for 1131 to handle an out-of-memory
2868    situation that comes up when allocating huge arrays.
2869    
2870    ----------------------------------------------------------------------
2871    Name: Matthias Blume
2872    Date: 2002/05/21 16:00:00 EDT
2873    Tag: Release_110_40
2874    Description:
2875    
2876    New working release (110.40).  New bootfiles.
2877    
2878    [Also: John Reppy fixed GC bug 1131.]
2879    
2880    ----------------------------------------------------------------------
2881    Name: Matthias Blume
2882    Date: 2002/05/21 12:35:00 EDT
2883    Tag: blume-20020521-cmdoc
2884    Description:
2885    
2886    CM documentation update.
2887    
2888    ----------------------------------------------------------------------
2889    Name: Matthias Blume
2890    Date: 2002/05/21 10:55:00 EDT
2891    Tag: blume-20020521-misc
2892    Description:
2893    
2894    - John tweaked runtime to be silent on heap export (except when
2895      GC messages are on).
2896    - I added a few more things (cross-compiling versions of CMB) to
2897      config/preloads (as suggestions).
2898    
2899    ----------------------------------------------------------------------
2900    Name: Matthias Blume
2901    Date: 2002/05/20 22:25:00 EDT
2902    Tag: blume-20020520-controls
2903    Description:
2904    
2905    - Added ControlUtil structure to control-lib.cm.
2906    - Use it throughout.
2907    - Used Controls facility to define MLRISC controls (as opposed to
2908      registering MLRISC control ref cells with Controls after the fact)
2909    - Fixed messed-up controls priorities.
2910    
2911    * Removed again all the stuff from config/preloads that one wouldn't
2912      be able to preload at the time the initial heap image is built.
2913      (Many libraries, e.g., CML, do not exist yet at this time.  The
2914       only libraries that can be preloaded via config/preloads are those
2915       that come bundled with the bootfiles.)
2916    
2917    ----------------------------------------------------------------------
2918    Name: Matthias Blume
2919    Date: 2002/05/20 10:59:00 EDT
2920    Tag: blume-20020520-preloads
2921    Description:
2922    
2923    Added a lot of commented-out suggestions for things to be included
2924    in config/preloads.
2925    
2926    ----------------------------------------------------------------------
2927    Name: Allen Leung
2928    Date: 2002/05/18 14:20:00 EDT
2929    Tag: leunga-20020518-mdl
2930    Description:
2931    
2932    o Made the mdl tool stuff compile and run again.
2933    o I've disabled all the stuff that depends on RTL specifications; they
2934      are all badly broken anyway.
2935    
2936    ----------------------------------------------------------------------
2937    Name: Matthias Blume
2938    Date: 2002/05/17 16:49:00 EDT
2939    Tag: blume-20020517-controls
2940    Description:
2941    
2942    0. John Reppy made several modifications to the SML/NJ library.
2943       In particular, there is a shiny new controls-lib.cm.
2944    
2945    1. Pushed new controls interface through compiler so that everything
2946       compiles again.
2947    
2948    2. Added FormatComb and FORMAT_COMB to the CML version of the
2949       SML/NJ library (so that CML compiles again).
2950    
2951    3. Modified init scripts because XXX_DEFAULT environment variables
2952       are no longer with us.  (Boot-time initialization is now done
2953       using the same environment variables that are also used for
2954       startup-time initialization of controls.)
2955    
2956    ----------------------------------------------------------------------
2957    Name: Lal George
2958    Date: 2002/05/15 09:20:10 EDT
2959    Tag: george-20020515-pseudo-op-decls
2960    Description:
2961    
2962            All pseudo-ops emitted before the first segment declaration
2963    such as TEXT, DATA, and BSS directives are assumed to be global
2964    declarations and are emitted first in the assembly file. This is
2965    useful in a number of situations where one has pseudo-ops that are not
2966    specific to any segment, and also works around the constraint that one
2967    cannot have client pseudo-ops in the TEXT segment.
2968    
2969            Because no segment is associated with these declarations it is
2970    an error to allocate any space or objects before the first segment
2971    directive and an exception will be raised. However, we cannot make
2972    this check for client pseudo-ops.
2973    
2974            These top level declarations are a field in the CFG graph_info.
2975    In theory you can continue to add to this field after the CFG has been
2976    built -- provided you know what you are doing;-)
2977    
2978    ----------------------------------------------------------------------
2979    Name: Matthias Blume
2980    Date: 2002/05/13 16:40:00 EDT
2981    Tag: blume-20020513-pp-etc
2982    Description:
2983    
2984    A few minor bugfixes:
2985    
2986      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
2987        (Bogus printouts for redefined bindings still occur.  Compiler
2988        bug should no longer occur now.  We need to redo the prettyprinter
2989        from scratch.)
2990    
2991      - CM pathname printer now also adds escape sequences for ( and )
2992    
2993      - commend and docu fixes for ml-nlffi
2994    
2995    ----------------------------------------------------------------------
2996    Name: Matthias Blume
2997    Date: 2002/05/10 16:40:00 EDT
2998    Tag: blume-20020510-erg-textio
2999    Description:
3000    
3001    Applied the following bugfix provided by Emden Gansner:
3002    
3003        Output is corrupted when outputSubstr is used rather than output.
3004    
3005        The problem occurs when a substring
3006    
3007            ss = (s, dataStart, dataLen)
3008    
3009        where dataStart > 0, fills a stream buffer with avail bytes left.
3010        avail bytes of s, starting at index dataStart, are copied into the
3011        buffer, the buffer is flushed, and then the remaining dataLen-avail
3012        bytes of ss are copied into the beginning of the buffer. Instead of
3013        starting this copy at index dataStart+avail in s, the current code
3014        starts the copy at index avail.
3015    
3016        Fix:
3017        In text-io-fn.sml, change line 695 from
3018             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
3019        to
3020             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
3021    
3022    ----------------------------------------------------------------------
3023    Name: Matthias Blume
3024    Date: 2002/04/12 13:55:00 EDT
3025    Tag: blume-20020412-assyntax
3026    Description:
3027    
3028    1. Grabbed newer assyntax.h from the XFree86 project.
3029    2. Fiddled with how to compile X86.prim.asm without warnings.
3030    3. (Very) Minor cleanup in CM.
3031    
3032    ----------------------------------------------------------------------
3033    Name: Matthias Blume
3034    Date: 2002/04/01 (no joke!) 17:07:00 EST
3035    Tag: blume-20020401-x86div
3036    Description:
3037    
3038    Added full support for div/mod/rem/quot on the x86, using the machine
3039    instruction's two results (without clumsily recomputing the remainder)
3040    directly where appropriate.
3041    
3042    Some more extensive power-of-two support was added to the x86 instruction
3043    selector (avoiding expensive divs, mods, and muls where they can be
3044    replaced with cheaper shifts and masks).  However, this sort of thing
3045    ought to be done earlier, e.g., within the CPS optimizer so that
3046    all architectures benefit from it.
3047    
3048    The compiler compiles to a fixed point, but changes might be somewhat
3049    fragile nevertheless.  Please, report any strange things that you might
3050    see wrt. div/mod/quot/rem...
3051    
3052    ----------------------------------------------------------------------
3053    Name: Matthias Blume
3054    Date: 2002/03/29 17:22:00
3055    Tag: blume-20020329-div
3056    Description:
3057    
3058    Fixed my broken div/mod logic.  Unfortunately, this means that the
3059    inline code for div/mod now has one more comparison than before.
3060    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
3061    The problem was with quotient = 0, because that alone does not tell
3062    us which way the rounding went.  One then has to look at whether
3063    remainder and divisor have the same sign...  :(
3064    
3065    Anyway, I replaced the bootfiles with fresh ones...
3066    
3067    ----------------------------------------------------------------------
3068    Name: Matthias Blume
3069    Date: 2002/03/29 14:10:00 EST
3070    Tag: blume-20020329-inlprims
3071    Description:
3072    
3073    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
3074    
3075    Primops have changed. This means that the bin/boot-file formats have
3076    changed as well.
3077    
3078    To make sure that there is no confusion, I made a new version.
3079    
3080    
3081    CHANGES:
3082    
3083    * removed REMT from mltree (remainder should never overflow).
3084    
3085    * added primops to deal with divisions of all flavors to the frontend
3086    
3087    * handled these primops all the way through so they map to their respective
3088      MLRISC support
3089    
3090    * used these primops in the implementation of Int, Int32, Word, Word32
3091    
3092    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
3093    
3094    * parameterized INLMIN, INLMAX, and INLABS by a numkind
3095    
3096    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
3097      floating point
3098    
3099    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
3100      and Real (but Real.abs maps to a separate floating-point-only primop)
3101    
3102    
3103    TODO items:
3104    
3105    * Hacked Alpha32 instruction selection, disabling the selection of REMx
3106      instructions because the machine instruction encoder cannot handle
3107      them.  (Hppa, PPC, and Sparc instruction selection did not handle
3108      REM in the first place, and REM is supported by the x86 machine coder.)
3109    
3110    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
3111      selection phase.  (The two can be streamlined because the hardware
3112      delivers both quotient and remainder at the same time anyway.)
3113    
3114    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
3115      (Currently the behavior is inconsistent both across architectures and
3116      wrt. the draft Basis spec.)
3117    
3118    * Word8 should eventually be handled natively, too.
3119    
3120    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
3121      as if there currently is no execution path that could trigger it in
3122      SML/NJ.  (The assumptions underlying functions arith and promotable do not
3123      hold for things like multiplication and division.)
3124    
3125    ----------------------------------------------------------------------
3126    Name: Matthias Blume
3127    Date: 2002/03/27 16:27:00 EST
3128    Tag: blume-20020327-mlrisc-divisions
3129    Description:
3130    
3131    Added support for all four division operations (ML's div, mod, quot,
3132    and rem) to MLRISC.  In the course of doing so, I also rationalized
3133    the naming (no more annoying switch-around of DIV and QUOT), by
3134    parameterizing the operation by div_rounding_mode (which can be either
3135    DIV_TO_ZERO or DIV_TO_NEGINF).
3136    
3137    The generic MLTreeGen functor takes care of compiling all four
3138    operations down to only round-to-zero div.
3139    
3140    Missing pieces:
3141    
3142      * Doing something smarter than relying on MLTreeGen on architectures
3143        like, e.g., the x86 where hardware division delivers both quotient and
3144        remainder at the same time.  With this, the implementation of the
3145        round-to-neginf operations could be further streamlined.
3146    
3147      * Remove inlining support for div/mod/rem from the frontend and replace it
3148        with primops that get carried through to the backend.  Do this for all
3149        int and word types.
3150    
3151    ----------------------------------------------------------------------
3152    Name: Matthias Blume
3153    Date: 2002/03/25 17:25:00 EST
3154    Tag: blume-20020325-divmod
3155    Description:
3156    
3157    I improved (hopefully without breaking them) the implementation of Int.div,
3158    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
3159    advantage of the following observations:
3160    
3161      Let  q = x quot y      r = x rem y
3162           d = x div  y      m = x mod y
3163    
3164    where "quot" is the round-to-zero version of integer division that
3165    hardware usually provides.  Then we have:
3166    
3167         r = x - q * y        where neither the * nor the - will overflow
3168         d = if q >= 0 orelse x = q * y then q else q - 1
3169                              where neither the * nor the - will overflow
3170         m = if q >= 0 orelse r = 0 then r else r + y
3171                              where the + will not overflow
3172    
3173    This results in substantial simplification of the generated code.
3174    The following table shows the number of CFG nodes and edges generated
3175    for
3176            fun f (x, y) = x OPER y
3177            (* with OPER \in div, mod, quot, rem *)
3178    
3179    
3180        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
3181        --------------------------------------------------------
3182         div |         24 |         39 |         12 |         16
3183         mod |         41 |         71 |         12 |         16
3184        quot |          8 |         10 |          8 |         10
3185         rem |         10 |         14 |          8 |         10
3186    
3187    
3188    ----------------------------------------------------------------------
3189    Name: Matthias Blume
3190    Date: 2002/03/25 22:06:00 EST
3191    Tag: blume-20020325-cprotobug
3192    Description:
3193    
3194    Fixed a bug in cproto (c prototype decoder).
3195    
3196    ----------------------------------------------------------------------
3197    Name: Matthias Blume
3198    Date: 2002/03/25 16:00:00 EST
3199    Tag: blume-20020325-raw-primops
3200    Description:
3201    
3202    I did some cleanup to Allen's new primop code and
3203    replaced yesterday's bootfiles with new ones.
3204    (But they are stored in the same place.)
3205    
3206    ----------------------------------------------------------------------
3207    Name: Matthias Blume
3208    Date: 2002/03/24 22:40:00 EST
3209    Tag: blume-20020324-bootfiles
3210    Description:
3211    
3212    Made the bootfiles that Allen asked for.
3213    
3214    ----------------------------------------------------------------------
3215    Name: Allen Leung
3216    Date: 2002/03/23 15:50:00 EST
3217    Tag: leunga-20020323-flint-cps-rcc-primops
3218    Description:
3219    
3220      1. Changes to FLINT primops:
3221    
3222        (* make a call to a C-function;
3223         * The primop carries C function prototype information and specifies
3224         * which of its (ML-) arguments are floating point. C prototype
3225         * information is for use by the backend, ML information is for
3226         * use by the CPS converter. *)
3227      | RAW_CCALL of { c_proto: CTypes.c_proto,
3228                       ml_args: ccall_type list,
3229                       ml_res_opt: ccall_type option,
3230                       reentrant : bool
3231                     } option
3232       (* Allocate uninitialized storage on the heap.
3233        * The record is meant to hold short-lived C objects, i.e., they
3234        * are not ML pointers.  With the tag, the representation is
3235        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
3236        *)
3237      | RAW_RECORD of {tag:bool,sz:int}
3238      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
3239    
3240      2.  These CPS primops are now overloaded:
3241    
3242           rawload of {kind:numkind}
3243           rawstore of {kind:numkind}
3244    
3245          The one argument form is:
3246    
3247             rawload {kind} address
3248    
3249          The two argument form is:
3250    
3251             rawload {kind} [ml object, byte-offset]
3252    
3253      3. RAW_CCALL/RCC now takes two extra arguments:
3254    
3255         a. The first is whether the C call is reentrant, i.e., whether
3256            ML state should be saved and restored.
3257         b. The second argument is a string argument specifying the name of
3258            library and the C function.
3259    
3260         These things are currently not handled in the code generator, yet.
3261    
3262      4. In CProto,
3263    
3264         An encoding type of "bool" means "ml object" and is mapped into
3265         C prototype of PTR.  Note that "bool" is different than "string",
3266         even though "string" is also mapped into PTR, because "bool"
3267         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
3268    
3269      5. Pickler/unpicker
3270    
3271         Changed to handle RAW_RECORD and newest RAW_CCALL
3272    
3273      6. MLRiscGen,
3274    
3275         1. Changed to handle the new rawload/rawstore/rawrecord operators.
3276         2. Code for handling C Calls has been moved to a new module CPSCCalls,
3277            in the file CodeGen/cpscompile/cps-c-calls.sml
3278    
3279      7. Added the conditional move operator
3280    
3281             condmove of branch
3282    
3283         to cps.  Generation of this is still buggy so it is currently
3284         disabled.
3285    
3286    ----------------------------------------------------------------------
3287    Name: Lal George
3288    Date: 2002/03/22 14:18:25 EST
3289    Tag: george-20020322-cps-branch-prob
3290    Description:
3291    
3292    Implemented the Ball-Larus branch prediction-heuristics, and
3293    incorporated graphical viewers for control flow graphs.
3294    
3295    Ball-Larus Heuristics:
3296    ---------------------
3297    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
3298    
3299    By design it uses the Dempster-Shafer theory for combining
3300    probabilities.  For example, in the function:
3301    
3302        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
3303    
3304    the ball-larus heuristics predicts that the n=0 is unlikely
3305    (OH-heuristic), and the 'then' branch is unlikely because of the
3306    RH-heuristic -- giving the 'then' branch an even lower combined
3307    probability using the Dempster-Shafer theory.
3308    
3309    Finally, John Reppy's loop analysis in MLRISC, further lowers the
3310    probability of the 'then' branch because of the loop in the else
3311    branch.
3312    
3313    
3314    Graphical Viewing:
3315    ------------------
3316    I merely plugged in Allen's graphical viewers into the compiler. The
3317    additional code is not much. At the top level, saying:
3318    
3319            Control.MLRISC.getFlag "cfg-graphical-view" := true;
3320    
3321    will display the graphical view of the control flow graph just before
3322    back-patching.  daVinci must be in your path for this to work. If
3323    daVinci is not available, then the default viewer can be changed
3324    using:
3325    
3326            Control.MLRISC.getString "viewer"
3327    
3328    which can be set to "dot" or "vcg" for the corresponding viewers. Of
3329    course, these viewers must be in your path.
3330    
3331    The above will display the compilation unit at the level of clusters,
3332    many of which are small, boring, and un-interesting. Also setting:
3333    
3334            Control.MLRISC.getInt "cfg-graphical-view_size"