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

SCM Repository

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

Diff of /sml/trunk/NOTES/HISTORY

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

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

Legend:
Removed from v.1133  
changed lines
  Added in v.1792

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