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/HISTORY
ViewVC logotype

Diff of /sml/trunk/HISTORY

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

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

Legend:
Removed from v.1078  
changed lines
  Added in v.1712

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0