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