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