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