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

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