Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/NOTES/HISTORY
ViewVC logotype

Diff of /sml/trunk/NOTES/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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