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/branches/primop-branch-3/NOTES/HISTORY
ViewVC logotype

Diff of /sml/branches/primop-branch-3/NOTES/HISTORY

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

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

Legend:
Removed from v.1171  
changed lines
  Added in v.1784

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