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