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

SCM Repository

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

Diff of /sml/trunk/HISTORY

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

revision 606, Sun Apr 9 23:10:59 2000 UTC revision 1069, Fri Feb 15 21:00:05 2002 UTC
# Line 8  Line 8 
8  The form of an entry should be:  The form of an entry should be:
9    
10  Name:  Name:
11  Date:  Date: yyyy/mm/dd
12  Tag: <post-commit CVS tag>  Tag: <post-commit CVS tag>
13  Description:  Description:
14    
15    ----------------------------------------------------------------------
16    Name: Matthias Blume
17    Date: 2002/02/15 16:00:00 EST
18    Tag: Release_110_39
19    Description:
20    
21    Working release 110.39.  New bootfiles.
22    
23    ----------------------------------------------------------------------
24    Name: Matthias Blume
25    Date: 2002/02/15 14:17:00 EST
26    Tag: blume-20020215-showbindings
27    Description:
28    
29    Added EnvRef.listBoundSymbols and CM.State.showBindings.  Especially
30    the latter can be useful for exploring what bindings are available at
31    the interactive prompt.  (The first function returns only the list
32    of symbols that are really bound, the second prints those but also the
33    ones that CM's autoloading mechanism knows about.)
34    
35    ----------------------------------------------------------------------
36    Name: Matthias Blume
37    Date: 2002/02/15 12:08:00 EST
38    Tag: blume-20020215-iptrs
39    Description:
40    
41    Two improvements to ml-nlffigen:
42    
43      1. Write files only if they do not exist or if their current contents
44         do not coincide with what's being written.  (That is, avoid messing
45         with the time stamps unless absolutely necessary.)
46    
47      2. Implement a "repository" mechanism for generated files related
48         to "incomplete pointer types".   See the README file for details.
49    
50    ----------------------------------------------------------------------
51    Name: Matthias Blume
52    Date: 2002/02/14 11:50:00 EST
53    Tag: blume-20020214-quote
54    Description:
55    
56    Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm).  This is required
57    because of the new and improved tag generation scheme.  (Thanks to Allen
58    Leung for pointing it out.)
59    
60    ----------------------------------------------------------------------
61    Name: Lal George
62    Date: 2002/02/14 09:55:27 EST 2002
63    Tag: george-20020214-isabelle-bug
64    Description:
65    
66    Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation
67    of Isabelle on the x86.
68    
69    From Allen:
70    -----------
71     I've found the problem:
72    
73         in ra-core.sml, I use the counter "blocked" to keep track of the
74         true number of elements in the freeze queue.  When the counter goes
75         to zero, I skip examining the queue.  But I've messed up the
76         bookkeeping in combine():
77    
78             else ();
79             case !ucol of
80               PSEUDO => (if !cntv > 0 then
81                     (if !cntu > 0 then blocked := !blocked - 1 else ();
82                                        ^^^^^^^^^^^^^^^^^^^^^^^
83                      moveu := mergeMoveList(!movev, !moveu)
84                     )
85                  else ();
86    
87         combine() is called to coalesce two nodes u and v.
88         I think I was thinking that if the move counts of u and v are both
89         greater than zero then after they are coalesced then one node is
90         removed from the freeze queue.  Apparently I was thinking that
91         both u and v are of low degree, but that's clearly not necessarily true.
92    
93    
94    02/12/2002:
95        Here's the patch.  HOL now compiles.
96    
97        I don't know how this impact on performance (compile
98        time or runtime).  This bug caused the RA (especially on the x86)
99        to go thru the potential spill phase when there are still nodes on the
100        freeze queue.
101    
102    
103    
104    
105    ----------------------------------------------------------------------
106    Name: Matthias Blume
107    Date: 2002/02/13 22:40:00 EST
108    Tag: blume-20020213-fptr-rtti
109    Description:
110    
111    Fixed a bug in ml-nlffigen that was introduced with one of the previous
112    updates.
113    
114    ----------------------------------------------------------------------
115    Name: Matthias Blume
116    Date: 2002/02/13 16:41:00 EST
117    Tag: blume-20020213-cmlpq
118    Description:
119    
120    Added new priority queue export symbols (which have just been added to
121    smlnj-lib.cm) to CML's version of smlnj-lib.cm.  (Otherwise CML would
122    not compile and the installer would choke.)
123    
124    ----------------------------------------------------------------------
125    Name: Matthias Blume
126    Date: 2002/02/13 16:15:00 EST
127    Tag: blume-20020213-various
128    Description:
129    
130    1. More tweaks to ml-nlffigen:
131    
132       - better internal datastructures (resulting in slight speedup)
133       - "-match" option requires exact match
134       - "localized" gensym counters (untagged structs/unions nested within
135         other structs/unions or within typedefs get a fresh counter; their
136         tag will be prefixed by a concatenation of their parents' tags)
137       - bug fixes (related to calculation of transitive closure of types
138         to be included in the output)
139    
140    2. Minor Basis updates:
141    
142       - added implementations for List.collate and Option.app
143    
144    ----------------------------------------------------------------------
145    Name: Matthias Blume
146    Date: 2002/02/11 15:55:00 EST
147    Tag: blume-20020211-gensym
148    Description:
149    
150    Added a "-gensym" option to command line of ml-nlffigen.  This can be
151    used to specify a "stem" -- a string that is inserted in all "gensym'd"
152    names (ML structure names that correspond to unnamed C structs, unions,
153    and enums), so that separate runs of ml-nlffigen do not clash.
154    
155    ----------------------------------------------------------------------
156    Name: Matthias Blume
157    Date: 2002/02/11 12:05:00 EST
158    Tag: blume-20020211-gensml
159    Description:
160    
161    A quick fix for a problem with GenSML (in the pgraph-util library):
162    Make generation of toplevel "local" optional.  (Strictly speaking,
163    signature definitions within "local" are not legal SML.)
164    
165    Other than that: updates to INSTALL and cm/TODO.
166    
167    ----------------------------------------------------------------------
168    Name: Matthias Blume
169    Date: 2002/02/08 15:00:00 EST
170    Tag: blume-20020208-uniquepid
171    Description:
172    
173    0. Version number has been bumped to 110.38.1.  NEW BOOTFILES!!!
174    
175    1. The installer (config/install.sh) has gotten smarter:
176    
177         - Configuration options are a bit easier to specify now
178           (in config/targets).
179         - Bug in recognizing .tar.bz2 files fixed.
180         - Installer automatically resolves dependencies between
181           configuration options (e.g., if you ask for eXene, you will
182           also get cml -- regardless whether you asked for it or not).
183         - Installer can run in "quieter mode" by setting the environment
184           variable INSTALL_QUIETLY to "true".  "Quieter" does not mean
185           "completely silent", though.
186         - Build HashCons library as part of smlnj-lib.
187    
188    2. A new scheme for assigning persistent identifiers to compilation
189       units (and, by extension, to types etc.) has been put into place.
190       This fixes a long-standing bug where types and even dynamic values
191       can get internally confused, thereby compromising type safety
192       (abstraction) and dynamic correctness.  See
193    
194         http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz
195    
196       for an example of how things could go wrong until now.
197    
198       The downside of the new scheme is that pids are not quite as
199       persistent as they used to be: CM will generate a fresh pid
200       for every compilation unit that it thinks it sees for the first
201       time.  That means that if you compile starting from a clean, fresh
202       source tree at two different times, you end up with different
203       binaries.
204    
205       Cutoff recompilation, however, has not been compromised because
206       CM keeps pid information in special caches between runs.
207    
208    ----------------------------------------------------------------------
209    Name: Lal George
210    Date: 2002/02/07 15:34:13 EST 2002
211    Tag: <none>
212    Description:
213    
214    Compilers that generate assembly code may produce  global labels
215    whose value is resolved at link time. The various peephole optimization
216    modules did not take this in account.
217    
218    TODO. The Labels.addrOf function should really return an option
219    type so that clients are forced to deal with this issue, rather
220    than an exception being raised.
221    
222    ----------------------------------------------------------------------
223    Name: Lal George
224    Date: 2002/02/06 13:55:02 EST
225    Tag: george-20020206-ra-breakup
226    Description:
227    
228    1. A bug fix from Allen.
229    
230        A typo causes extra fstp %st(0)'s to be generated at compensation
231        edges, which might cause stack underflow traps at runtime.  This
232        occurs in fft where there are extraneous fstps right before the 'into'
233        trap instruction (in this case they are harmless since none of the
234        integers overflow.)
235    
236    2. Pulled out various utility modules that were embedded in the modules
237       of the register allocator. I need these modules for other purposes, but
238       they are not complete enough to put into a library (just yet).
239    ----------------------------------------------------------------------
240    Name: Matthias Blume
241    Date: 2002/01/31 16:05:00 EST
242    Tag: blume-20020131-sparc-ccalls
243    Description:
244    
245    1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes)
246       of extra stack space by mistake.  Fixed.
247    
248    2. Bug in logic of handling of command-line options in ml-nlffigen fixed.
249    
250    ----------------------------------------------------------------------
251    Name: Allen Leung
252    Date: 2002/01/30
253    Tag: leunga-20020130-nowhere-bug-fix
254    Description:
255    
256       MLRISC bug fixes:
257       1. Fixed a bindings computation bug in the 'nowhere' program generator tool.
258       2. MachineInt.fromString was negating its value.
259    
260    ----------------------------------------------------------------------
261    Name: Matthias Blume
262    Date: 2002/01/29
263    Tag: blume-20020129-INSTALL
264    Description:
265    
266    - Added somewhat detailed installation instructions (file INSTALL).
267    - Fixed curl-detection bug in config/install.sh.
268    - It is now possible to select the URL getter using the URLGETTER
269      environment variable:
270    
271          not set / "unknown"      --> automatic detection (script tries wget,
272                                       curl, and lynx)
273          "wget" / "curl" / "lynx" --> use the specified program (script "knows"
274                                       how to properly invoke them)
275          other                    --> use $URLGETTER directly, it must take
276                                       precisely two command-line arguments
277                                       (source URL and destination file name)
278    
279    ----------------------------------------------------------------------
280    Name: Matthias Blume
281    Date: 2002/01/28
282    Tag: blume-20020128-sparc-ccalls
283    Description:
284    
285    - Fixed problem with calculation of "used" registers in sparc-c-calls.
286    - Make use of the allocParam argument in sparc-c-calls.
287    
288    ----------------------------------------------------------------------
289    Name: Matthias Blume
290    Date: 2002/01/28
291    Tag: blume-20020128-allocParam
292    Description:
293    
294    John Reppy:  Changes c-calls API to accept client-callback for
295    allocating extra stack space.
296    me: Corresponding changes to mlriscGen (using a dummy argument that
297        does not change the current behavior).
298    
299    ----------------------------------------------------------------------
300    Name: Matthias Blume
301    Date: 2002/01/28 12:00:00
302    Tag: Release_110_38
303    Description:
304    
305    This time for real!!!
306    
307    ----------------------------------------------------------------------
308    Name: Matthias Blume
309    Date: 2002/01/28 10:56:00 EST
310    Tag: blume-20020128-retraction
311    Description:
312    
313    0. Retracted earlier 110.38.  (The Release_110_38 tag has been replaced
314       with blume-Release_110_38-retracted.)
315    
316    1. Fixed a problem with incorrect rounding modes in real64.sml.
317       (Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.)
318    
319    2. A bug in ml-nlffigen related to the handling of unnamed structs, unions,
320       and enums fixed.  The naming of corresponding ML identifiers should
321       now be consistent again.
322    
323    ----------------------------------------------------------------------
324    Name: Allen Leung
325    Date: 2002/01/27
326    Tag: leunga-20020127-nowhere
327    Description:
328    
329       Added a target called nowhere in the configuration scripts.
330       Enabling this will build the MLRISC 'nowhere' tool (for translating
331       programs with where-clauses into legal SML code) during installation.
332    
333    ----------------------------------------------------------------------
334    Name: Matthias Blume
335    Date: 2002/01/25 21:27:00 EST
336    Tag: blume-Release_110_38-retracted
337    Description:
338    
339    Call it a (working) release!  Version is 110.38. Bootfiles are ready.
340    
341    README will be added later.
342    
343    !!! NOTE:  Re-tagged as blume-Release_110_38-retracted. Original tag
344    (Release_110_38) removed.  Reason: Last-minute bug fixes.
345    
346    ----------------------------------------------------------------------
347    Name: Matthias Blume
348    Date: 2002/01/25
349    Tag: blume-20020125-ffi
350    Description:
351    
352    A large number of tweaks and improvements to ml-nlffi-lib and
353    ml-nlffigen:
354    
355       - ML represenation types have been streamlined
356       - getter and setter functions work with concrete values, not abstract
357         ones where possible
358       - ml-nlffigen command line more flexible (see README file there)
359       - some bugs have been fixed (hopefully)
360    
361    ----------------------------------------------------------------------
362    Name: Lal George
363    Date: 2002/01/24
364    Tag: george-20020124-risc-ra-interface
365    Description:
366    
367       There is a dramatic simplification in the interface to the
368       register allocator for RISC architectures as a result of making
369       parallel copy instructions explicit.
370    
371    ----------------------------------------------------------------------
372    Name: Matthias Blume
373    Date: 2002/01/22
374    Tag: blume-20020122-x86-ccalls
375    Description:
376    
377    Bug fix for c-calls on x86 (having to do with how char- and
378    short-arguments are being handled).
379    
380    ----------------------------------------------------------------------
381    Name: Matthias Blume
382    Date: 2002/01/21
383    Tag: blume-20020121-ff
384    Description:
385    
386    Another day of fiddling with the FFI...
387    
388    1. Bug fix/workaround:  CKIT does not complain about negative array
389       dimensions, so ml-nlffigen has to guard itself against this possibility.
390       (Otherwise a negative dimension would send it into an infinite loop.)
391    
392    2. Some of the abstract types (light objects, light pointers, most "base"
393       types) in structure C are now eqtypes.
394    
395    3. Added constructors and test functions for NULL function pointers.
396    
397    ----------------------------------------------------------------------
398    Name: Matthias Blume
399    Date: 2002/01/18
400    Tag: blume-20020118-ready-for-new-release
401    Description:
402    
403    Made config/srcarchiveurl point to a new place.  (Will provide boot
404    files shortly.)
405    
406    Maybe we christen this to be 110.38?
407    
408    ----------------------------------------------------------------------
409    Name: Matthias Blume
410    Date: 2002/01/18
411    Tag: blume-20020118-more-ffifiddle
412    Description:
413    
414    Today's FFI fiddling:
415    
416      - Provided a structure CGetSet with "convenient" versions of C.Get.* and
417        C.Set.* that use concrete (MLRep.*) arguments and results instead
418        of abstract ones.
419    
420      - Provided word-style bit operations etc. for "int" representation
421        types in MLRep.S<Foo>Bitops where <Foo> ranges over Char, Int, Short,
422        and Long.
423    
424    ----------------------------------------------------------------------
425    Name: Matthias Blume
426    Date: 2002/01/18
427    Tag: blume-20020118-use-x86-fp
428    Description:
429    
430    Now that x86-fast-fp seems to be working, I turned it back on again
431    by default.  (Seems to work fine now, even with the FFI.)
432    
433    Other than that, I added some documentation about the FFI to
434    src/ml-nlffigen/README and updated the FFI test examples in
435    src/ml-nlffi-lib/Tests/*.
436    
437    ----------------------------------------------------------------------
438    Name: Allen Leung
439    Date: 2002/01/17
440    Tag: leunga-20020117-x86-fast-fp-call
441    Description:
442    
443       1. Fixed a problem with handling return fp values when x86's fast fp
444          mode is turned on.
445    
446       2. Minor pretty printing fix for cellset.  Print %st(0) as %st(0) instead
447          of %f32.
448    
449       3. Added a constructor INT32lit to the ast of MLRISC tools.
450    
451    ----------------------------------------------------------------------
452    Name: Matthias Blume
453    Date: 2002/01/16
454    Tag: blume-20020116-ffifiddle
455    Description:
456    
457    More fiddling with the FFI interface:
458    
459     - Make constness 'c instead of rw wherever possible.  This eliminates
460       the need for certain explicit coercions.  (However, due to ML's
461       value polymorphism, there will still be many cases where explicit
462       coercions are necessary.  Phantom types are not the whole answer
463       to modeling a subtyping relationship in ML.)
464    
465     - ro/rw coersions for pointers added.  (Avoids the detour through */&.)
466    
467     - "printf" test example added to src/ml-nlffi-lib/Tests.  (Demonstrates
468       clumsy workaround for varargs problem.)
469    
470    ----------------------------------------------------------------------
471    Name: Lal George
472    Date: 2002/01/15
473    Tag: <none>
474    Description:
475    
476    1. Since COPY instructions are no longer native to the architecture,
477       a generic functor can be used to implement the expandCopies function.
478    
479    2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a
480       TEXT segment.
481    
482    ----------------------------------------------------------------------
483    Name: Matthias Blume
484    Date: 2002/01/15
485    Tag: blume-20020115-ffiupdates
486    Description:
487    
488    1. Fix for bug resulting in single-precision float values being returned
489       incorrectly from FFI calls.
490    
491    2. Small modifications to C FFI API:
492    
493        - memory-allocation routines return straight objects (no options)
494          and raise an exception in out-of-memory situations
495        - unsafe extensions to cast between function pointers and pointers
496          from/to ints
497        - added structure C_Debug as an alternative to structure C where
498          pointer-dereferencing (|*| and |*!) always check for null-pointers
499        - added open_lib' to DynLinkage;  open_lib' works like open_lib
500          but also takes a (possibly empty) list of existing library handles
501          that the current library depends on
502    
503    ----------------------------------------------------------------------
504    Name: Matthias Blume
505    Date: 2002/01/10
506    Tag: blume-20020110-newffigen
507    Description:
508    
509    1. Updates to portable graph code.
510    
511    2. Major update to ml-nlffigen and ml-nlffi-lib.  Things are much
512       more scalable now so that even huge interfaces such as the one
513       for GTK compile in finite time and space. :-)
514       See src/ml-nlffigen/README for details on what's new.
515    
516    ----------------------------------------------------------------------
517    Name: Lal George
518    Date: 2001/01/09 14:31:35 EST 2002
519    Tag: george-20011206-rm-native-copy
520    Description:
521    
522            Removed the native COPY and FCOPY instructions
523            from all the architectures and replaced it with the
524            explicit COPY instruction from the previous commit.
525    
526            It is now possible to simplify many of the optimizations
527            modules that manipulate copies. This has not been
528            done in this change.
529    
530    ----------------------------------------------------------------------
531    Name: Lal George
532    Date: 2001/12/06 16:50:13 EST 2001
533    Tag: george-20011206-mlrisc-instruction
534    Description:
535    
536    Changed the representation of instructions from being fully abstract
537    to being partially concrete. That is to say:
538    
539      from
540            type instruction
541    
542      to
543            type instr                              (* machine instruction *)
544    
545            datatype instruction =
546                LIVE of {regs: C.cellset, spilled: C.cellset}
547              | KILL of {regs: C.cellset, spilled: C.cellset}
548              | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
549              | ANNOTATION of {i: instruction, a: Annotations.annotation}
550              | INSTR of instr
551    
552    This makes the handling of certain special instructions that appear on
553    all architectures easier and uniform.
554    
555    LIVE and KILL say that a list of registers are live or killed at the
556    program point where they appear. No spill code is generated when an
557    element of the 'regs' field is spilled, but the register is moved to
558    the 'spilled' (which is present, more for debugging than anything else).
559    
560    LIVE replaces the (now deprecated) DEFFREG instruction on the alpha.
561    We used to generate:
562    
563            DEFFREG f1
564            f1 := f2 + f3
565            trapb
566    
567    but now generate:
568    
569            f1 := f2 + f3
570            trapb
571            LIVE {regs=[f1,f2,f3], spilled=[]}
572    
573    Furthermore, the DEFFREG (hack) required that all floating point instruction
574    use all registers mentioned in the instruction. Therefore f1 := f2 + f3,
575    defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting
576    in a cleaner alpha implementation. (Hopefully, intel will not get rid of
577    this architecture).
578    
579    COPYXXX is intended to replace the parallel COPY and FCOPY  available on
580    all the architectures. This will result in further simplification of the
581    register allocator that must be aware of them for coalescing purposes, and
582    will also simplify certain aspects of the machine description that provides
583    callbacks related to parallel copies.
584    
585    ANNOTATION should be obvious, and now INSTR represents the honest to God
586    machine instruction set!
587    
588    The <arch>/instructions/<arch>Instr.sml files define certain utility
589    functions for making porting easier -- essentially converting upper case
590    to lower case. All machine instructions (of type instr) are in upper case,
591    and the lower case form generates an MLRISC instruction. For example on
592    the alpha we have:
593    
594      datatype instr =
595         LDA of {r:cell, b:cell, d:operand}
596       | ...
597    
598      val lda : {r:cell, b:cell, d:operand} -> instruction
599        ...
600    
601    where lda is just (INSTR o LDA), etc.
602    
603    ----------------------------------------------------------------------
604    Name: Matthias Blume
605    Date: 2001/11/22 21:40:00 EST
606    Tag: Release_110_37
607    Description:
608    
609    Release 110.37.  This time for real.
610    
611    ----------------------------------------------------------------------
612    Name: Matthias Blume
613    Date: 2001/11/21 16:35:00 EST
614    Tag: blume-20011121-foot-in-mouth
615    Description:
616    
617    Removed the "Release_110_37" tag because of a serious bug.
618    This will be re-tagged once the bug is fixed.
619    
620    ----------------------------------------------------------------------
621    Name: Matthias Blume
622    Date: 2001/11/21 16:14:00 EST
623    Tag: blume-20011121-forgottenfile
624    Description:
625    
626    Forgot to add a file.  (Just a .tex-file -- part of
627    the CM manual source.)
628    
629    ----------------------------------------------------------------------
630    Name: Matthias Blume
631    Date: 2001/11/21 16:10:00 EST
632    Tag: blume-20011121-invalid_110_37
633    Description:
634    
635    Note: I removed the original tag "Release_110_37" from this commit
636          because we found a serious bug in all non-x86 backends.
637          - Matthias
638    
639    1. Modifications to the SML/NJ code generator and to the runtime system
640       so that code object name strings are directly inserted into code
641       objects at code generation time.  The only business the runtime system
642       has with this is now to read the name strings on occasions.
643       (The encoding of the name string has also changed somewhat.)
644    
645    2. CM now implements a simple "set calculus" for specifying export lists.
646       In particular, it is now possible to refer to the export lists of
647       other libraries/groups/sources and form unions as well as differences.
648       See the latest CM manual for details.
649    
650    3. An separate notion of "proxy" libraries has again be eliminated from
651       CM's model.  (Proxy libraries are now simply a special case of using
652       the export list calculus.)
653    
654    4. Some of the existing libraries now take advantage of the new set
655       calculus.
656       (Notice that not all libraries have been converted because some
657       of the existing .cm-files are supposed to be backward compatible
658       with 110.0.x.)
659    
660    5. Some cleanup in stand-alone programs.  (Don't use "exnMessage" -- use
661       "General.exnMessage"!  The former relies on a certain hook to be
662       initialized, and that often does not happen in the stand-alone case.)
663    
664    ----------------------------------------------------------------------
665    Name: Lal George
666    Date: 2001/11/21  13:56:18 EST
667    Tag: george-2001121-pseudo-ops
668    Description:
669    
670      Implemented a complete redesign of MLRISC pseudo-ops. Now there
671      ought to never be any question of incompatabilities with
672      pseudo-op syntax expected by host assemblers.
673    
674      For now, only modules supporting GAS syntax are implemented
675      but more should follow, such as MASM, and vendor assembler
676      syntax, e.g. IBM as, Sun as, etc.
677    
678    ----------------------------------------------------------------------
679    Name: Matthias Blume
680    Date: 2001/11/14 11:52:00 EST
681    Tag: blume-20011114-srcname
682    Description:
683    
684    1. Routed the name of the current source file to mlriscgen where it
685       should be directly emitted into the code object.  (This last part
686       is yet to be done.)
687    
688    2. Some cleanup of the pgraph code to make it match the proposal that
689       I put out the other day.  (The proposal notwithstanding, things are
690       still in flux here.)
691    
692    ----------------------------------------------------------------------
693    Name: Lal George
694    Date: 2001/11/14 09:44:04 EST
695    Tag:
696    Description:
697    
698      Fix for a backpatching bug reported by Allen.
699    
700      Because the boundary between short and long span-dependent
701      instructions is +/- 128, there are an astounding number of
702      span-dependent instructions whose size is over estimated.
703    
704      Allen came up with the idea of letting the size of span
705      dependent instructions be non-monotonic, for a maxIter
706      number of times, after which the size must be monotonically
707      increasing.
708    
709      This table shows the number of span-dependent instructions
710      whose size was over-estimated as a function of maxIter, for the
711      file Parse/parse/ml.grm.sml:
712    
713         maxIter            # of instructions:
714            10                      687
715            20                      438
716            30                      198
717            40                        0
718    
719      In compiling the compiler, there is no significant difference in
720      compilation speed between maxIter=10 and maxIter=40. Actually,
721      my measurements showed that maxIter=40 was a tad faster than
722      maxIter=10! Also 96% of the  files in the compiler reach a fix
723      point within 13 iterations, so fixing maxIter at 40, while high,
724      is okay.
725    
726    ----------------------------------------------------------------------
727    Name: Matthias Blume
728    Date: 2001/10/31 15:25:00 EST
729    Tag: blume-20011031-pgraph
730    Description:
731    
732    CKIT:
733    * Changed the "Function" constructor of type Ast.ctype to carry optional
734      argument identifiers.
735    * Changed the return type of TypeUtil.getFunction accordingly.
736    * Type equality ignores the argument names.
737    * TypeUtil.composite tries to preserve argument names but gives up quickly
738      if there is a mismatch.
739    
740    installation script:
741    * attempts to use "curl" if available (unless "wget" is available as well)
742    
743    CM:
744    * has an experimental implementation of "portable graphs" which I will
745      soon propose as an implementation-independent library format
746    * there are also new libraries $/pgraph.cm and $/pgraph-util.cm
747    
748    NLFFI-LIB:
749    * some cleanup (all cosmetic)
750    
751    NLFFIGEN:
752    * temporarily disabled the mechanism that suppresses ML output for
753      C definitions whose identifiers start with an underscore character
754    * generate val bindings for enum constants
755    * user can request that only one style (light or heavy) is being used;
756      default is to use both (command-line arguments: -heavy and -light)
757    * fixed bug in handling of function types involving incomplete pointers
758    * generate ML entry points that take record arguments (i.e., using
759      named arguments) for C functions that have a prototype with named
760      arguments
761      (see changes to CKIT)
762    
763    ----------------------------------------------------------------------
764    Name: Allen Leung
765    Date: 2001/10/27 20:34:00 EDT
766    Tag: leunga-20011027-x86-fast-fp-call
767    Description:
768    
769       Fixed the bug described in blume-20010920-slowfp.
770    
771       The fix involves
772          1. generating FCOPYs in FSTP in ia32-svid
773          2. marking a CALL with the appropriate annotation
774    
775    ----------------------------------------------------------------------
776    Name: Matthias Blume
777    Date: 2001/10/16 11:32:00 EDT
778    Tag: blume-20011016-netbsd
779    Description:
780    
781    Underscore patch from Chris Richards (fixing problem with compiling
782    runtime system under recent NetBSD).
783    
784    ----------------------------------------------------------------------
785    Name: Allen Leung
786    Date: 2001/10/12 17:18:32 EDT 2001
787    Tag: leung-20011012-x86-printflowgraph
788    Description:
789    
790    X86RA now uses a valid (instead of dummy) PrintFlowgraph module.
791    
792    ----------------------------------------------------------------------
793    Name: Lal George
794    Date: 2001/10/11 23:51:34 EDT
795    Tag: george-20011011-too-many-instrs
796    Description:
797    
798    The representation of a program point never expected to see more
799    than 65536 instructions in a basic block!
800    
801    ----------------------------------------------------------------------
802    Name: Lal George
803    Date: 2001/10/09 09:41:37 EDT
804    Tag: george-20011008-mlrisc-labels
805    Description:
806    
807    Changed the machine description files to support printing of
808    local and global labels in assembly code, based on host assembler
809    conventions.
810    
811    ----------------------------------------------------------------------
812    Name: Matthias Blume
813    Date: 2001/09/25 15:25:00 EDT
814    Tag: blume-20010925-exninfo
815    Description:
816    
817    I provided a non-hook implementation of exnName (at the toplevel) and
818    made the "dummy" implementation of exnMessage (at the toplevel) more
819    useful: if nothing gets "hooked in", then at least you are going to
820    see the exception name and a message indicating why you don't see more.
821    
822    [For the time being, programs that need exnMessage and want to use
823    ml-build should either use General.exnMessage (strongly recommended) or
824    refer to structure General at some other point so that CM sees a
825    static dependency.]
826    
827    [Similar remarks go for "print" and "use":  If you want to use their
828    functionality in stand-alone programs generated by ml-build, then use
829    TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).]
830    
831    ----------------------------------------------------------------------
832    Name: Matthias Blume
833    Date: 2001/09/20 17:28:00 EDT
834    Tag: blume-20010920-slowfp
835    Description:
836    
837    Allen says that x86-fast-fp is not safe yet, so I turned it off again...
838    
839    ----------------------------------------------------------------------
840    Name: Matthias Blume
841    Date: 2001/09/20 17:20:00 EDT
842    Tag: blume-20010920-canonicalpaths
843    Description:
844    
845    0. Updated the BOOT file (something that I forgot to do earlier).
846    
847    1. Small internal change to CM so that it avoids "/../" in filenames
848       as much as possible (but only where it is safe).
849    
850    2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so
851       that arguments that contain delimiters are passed through correctly.
852       This change also means that all "special" arguments of the form
853       @SMLxxx... must come first.
854    
855    3. Changed install script to put relative anchor names for tool commands
856       into pathconfig.
857    
858    ----------------------------------------------------------------------
859    Name: Matthias Blume
860    Date: 2001/09/18 15:35:00 EDT
861    Tag: blume-20010918-readme11036
862    Description:
863    
864    Added README files.
865    
866    ----------------------------------------------------------------------
867    Name: Matthias Blume
868    Date: 2001/09/18 11:45:00 EDT
869    Tag: Release_110_36 (retag)
870    Description:
871    
872    Fixed mistake in config/preloads. Retagged as 110.36.
873    
874    ----------------------------------------------------------------------
875    Name: Matthias Blume
876    Date: 2001/09/18 09:40:00 EDT
877    Tag: Release_110_36_orig (tag changed)
878    Description:
879    
880    New version (110.36).  New bootfiles.
881    
882    ----------------------------------------------------------------------
883    Name: Matthias Blume
884    Date: 2001/09/14 16:15:00 EDT
885    Tag: blume-20010914-x86fastfp
886    Description:
887    
888    John committed some changes that Allen made, in particular a (hopefully)
889    correctly working version of the x86-fp module.
890    
891    I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp"
892    flag to "true".  Everything seems to compile to a fixpoint ok, and
893    "mandelbrot" speeds up by about 15%.
894    
895    ----------------------------------------------------------------------
896    Name: Matthias Blume
897    Date: 2001/09/13 11:20:00 EDT
898    Tag: blume-20010913-minimal
899    Description:
900    
901    1. Stefan Monnier's patch to fix a miscompilation problem that
902       was brought to light by John Reppy's work on Moby.
903    
904    2. Implemented a minimal "structure Compiler" that contains just
905       "version" and "architecture".  The minimal version will be
906       available when the full version is not.  This is for backward-
907       compatibility with code that wants to test Compiler.version.
908    
909    ----------------------------------------------------------------------
910    Name: Matthias Blume
911    Date: 2001/08/28 14:03:00 EDT
912    Tag: blume-20010828-ml-lex
913    Description:
914    
915    Fix for bug 1581, received from Neophytos Michael.
916    
917    ----------------------------------------------------------------------
918    Name: Matthias Blume
919    Date: 2001/08/27 11:20:00 EDT
920    Tag: blume-20010827-readme11035
921    Description:
922    
923    Fleshed out the README file for 110.35.
924    
925    ----------------------------------------------------------------------
926    Name: Matthias Blume
927    Date: 2001/08/24 17:10:00 EDT
928    Tag: Release_110_35
929    Description:
930    
931    New version number (110.35).  New bootfiles.
932    
933    ----------------------------------------------------------------------
934    Name: Lal George
935    Date: 2001/08/24 13:47:18 EDT 2001
936    Tag: george-20010824-MLRISC-graphs
937    Description:
938    
939     removed clusters from MLRISC completely and replaced with graphs.
940    
941    ----------------------------------------------------------------------
942    Name: Matthias Blume
943    Date: 2001/08/23 17:50:00 EDT
944    Tag: blume-20010823-toplevel
945    Description:
946    
947    - some reorganization of the code that implements various kinds of
948      environments in the compiler (static, dynamic, symbolic, combined)
949    - re-implemented the EnvRef module so that evalStream works properly
950      (if the stream contains references to "use", "CM.make", etc.)
951    - cleaned up evalloop.sml and interact.sml (but they need more cleaning)
952    
953    ----------------------------------------------------------------------
954    Name: Matthias Blume
955    Date: 2001/08/20 15:50 EDT
956    Tag: blume20010820-slipup
957    Description:
958    
959    I forgot to commit a few files.  Here they are...
960    
961    ----------------------------------------------------------------------
962    Name: Matthias Blume
963    Date: 2001/08/20 15:35:00 EDT
964    Tag: blume-20010820-debugprof
965    Description:
966    
967    !!!! NEW BOOTFILES !!!!
968    
969    This is another round of reorganizing the compiler sources.  This
970    time the main goal was to factor out all the "instrumentation"
971    passes (for profiling and backtracing) into their own library.
972    The difficulty was to do it in such a way that it does not depend
973    on elaborate.cm but only on elabdata.cm.
974    
975    Therefore there have been further changes to both elaborate.cm and
976    elabdata.cm -- more "generic" things have been moved from the former
977    to the latter.  As a result, I was forced to split the assignment
978    of numbers indicating "primtyc"s into two portions: SML-generic and
979    SML/NJ-specific.  Since it would have been awkward to maintain,
980    I bit the bullet and actually _changed_ the mapping between these
981    numbers and primtycs.  The bottom line of this is that you need
982    a new set of bin- and bootfiles.
983    
984    I have built new bootfiles for all architectures, so doing a fresh
985    checkout and config/install.sh should be all you need.
986    
987    The newly created library's name is
988    
989        $smlnj/viscomp/debugprof.cm
990    
991    and its sources live under
992    
993        src/compiler/DebugProf
994    
995    ----------------------------------------------------------------------
996    Name: Matthias Blume
997    Date: 2001/08/15 17:15:00 EDT
998    Tag: blume-20010815-compreorg
999    Description:
1000    
1001    This is a first cut at reorganizing the CM libraries that make up the
1002    core of the compiler.  The idea is to separate out pieces that could
1003    be used independently by tools, e.g., the parser, the typechecker, etc.
1004    
1005    The current status is a step in this direction, but it is not quite
1006    satisfactory yet.  Expect more changes in the future.
1007    
1008    Here is the current (new) organization...
1009    
1010        What used to be $smlnj/viscomp/core.cm is now divided into
1011        six CM libraries:
1012    
1013             $smlnj/viscomp/basics.cm
1014                           /parser.cm
1015                           /elabdata.cm
1016                           /elaborate.cm
1017                           /execute.cm
1018                           /core.cm
1019    
1020        The CM files for these libraries live under src/system/smlnj/viscomp.
1021        All these libraries are proxy libraries that contain precisely
1022        one CM library component.  Here are the locations of the components
1023        (all within the src/compiler tree):
1024    
1025             Basics/basics.cm
1026             Parse/parser.cm
1027             ElabData/elabdata.cm
1028             Elaborator/elaborate.cm
1029             Execution/execute.cm
1030             core.cm
1031    
1032         [This organization is the same that has been used already
1033         for a while for the architecture-specific parts of the visible
1034         compiler and for the old version of core.cm.]
1035    
1036         As you will notice, many source files have been moved from their
1037         respective original locations to a new home in one of the above
1038         subtrees.
1039    
1040         The division of labor between the new libraries is the following:
1041    
1042             basics.cm:
1043                - Simple, basic definitions that pertain to many (or all) of
1044                  the other libraries.
1045             parser.cm:
1046                - The SML parser, producing output of type Ast.dec.
1047                - The type family for Ast is also defined and exported here.
1048             elabdata.cm:
1049                - The datatypes that describe input and output of the elaborator.
1050                  This includes types, absyn, and static environments.
1051             elaborator.cm:
1052                - The SML/NJ type checker and elaborator.
1053                  This maps an Ast.dec (with a given static environment) to
1054                  an Absyn.dec (with a new static environment).
1055                - This libraries implements certain modules that used to be
1056                  structures as functors (to remove dependencies on FLINT).
1057             execute.cm:
1058                - Everything having to do with executing binary code objects.
1059                - Dynamic environments.
1060             core.cm:
1061                - SML/NJ-specific instantiations of the elaborator and MLRISC.
1062                - Top-level modules.
1063                - FLINT (this should eventually become its own library)
1064    
1065    Notes:
1066    
1067    I am not 100% happy with the way I separated the elaborator (and its
1068    data structures) from FLINT.  Two instances of the same problem:
1069    
1070        1. Data structures contain certain fields that carry FLINT-specific
1071           information.  I hacked around this using exn and the property list
1072           module from smlnj-lib.  But the fact that there are middle-end
1073           specific fields around at all is a bit annoying.
1074    
1075        2. The elaborator calculates certain FLINT-related information.  I tried
1076           to make this as abstract as I could using functorization, but, again,
1077           the fact that the elaborator has to perform calculations on behalf
1078           of the middle-end at all is not nice.
1079    
1080        3. Having to used exn and property lists is unfortunate because it
1081           weakens type checking.  The other alternative (parameterizing
1082           nearly *everything*) is not appealing, though.
1083    
1084    I removed the "rebinding =" warning hack because due to the new organization
1085    it was awkward to maintain it.  As a result, the compiler now issues some of
1086    these warnings when compiling init.cmi during bootstrap compilation. On
1087    the plus side, you also get a warning when you do, for example:
1088       val op = = Int32.+
1089    which was not the case up to now.
1090    
1091    I placed "assign" and "deref" into the _Core structure so that the
1092    code that deals with the "lazy" keyword can find them there.  This
1093    removes the need for having access to the primitive environment
1094    during elaboration.
1095    
1096    ----------------------------------------------------------------------
1097    Name: Matthias Blume
1098    Date: 2001/08/13
1099    Tag: blume-20010813-closures
1100    Description:
1101    
1102    This fix was sent to us by Zhong Shao.  It is supposed to improve the
1103    performance of certain loops by avoiding needless closure allocation.
1104    
1105    ----------------------------------------------------------------------
1106    Name: Lal George
1107    Date: 2001/07/31 10:03:23 EDT 2001
1108    Tag: george-20010731-x86-fmalloc
1109    Description: Fixed bug in x86 calls
1110    
1111        There was a bug where call instructions would mysteriously
1112        vanish. The call instruction had to be one that returned
1113        a floating point value.
1114    
1115    ----------------------------------------------------------------------
1116    Name: Lal George
1117    Date: 2001/07/19 16:36:29 EDT 2001
1118    Tag: george-20010719-simple-cells
1119    Description:
1120    
1121    I have dramatically simplified the interface for CELLS in MLRISC.
1122    
1123    In summary, the cells interface is broken up into three parts:
1124    
1125      1. CellsBasis : CELLS_BASIS
1126    
1127            CellsBasis is a top level structure and common for all
1128            architectures.  it contains the definitions of basic datatypes
1129            and utility  functions over these types.
1130    
1131      2. functor Cells() : CELLS
1132    
1133            Cells generates an interface for CELLS that incorporates the
1134            specific resources on the target architecture, such as the
1135            presence of special register classes, their number and size,
1136            and various useful substructures.
1137    
1138      3. <ARCH>CELLS
1139    
1140            e.g. SparcCells: SPARCCELLS
1141    
1142            <ARCH>CELLS usually contains additional bindings for special
1143            registers  on the architecture, such as:
1144    
1145                    val r0 : cell           (* register zero *)
1146                    val y : cell            (* Y register *)
1147                    val psr : cell          (* processor status register *)
1148                    ...
1149    
1150            The structure returned by applying the Cells functor is opened
1151            in this interface.
1152    
1153    The main implication of all this is that the datatypes for cells is
1154    split between CellsBasis and CELLS -- a fairly simple change for user
1155    code.
1156    
1157    In the old scheme the CELLS interface had a definitional binding of
1158    the form:
1159    
1160            signature CELLS = sig
1161    
1162               structure CellsBasis = CellsBasis
1163    
1164               ...
1165    
1166            end
1167    
1168    With all the sharing constraints that goes on in MLRISC, this old
1169    design  quickly leads to errors such as:
1170    
1171            "structure definition spec inside of sharing ... "
1172    
1173    
1174    and appears to require an unacceptable amount of sharing and where
1175    constraint hackery.
1176    
1177    I think this error message (the interaction of definitional specs and
1178    sharing) requires more explanation on our web page.
1179    
1180    ----------------------------------------------------------------------
1181    Name: Matthias Blume
1182    Date: 2001/07/19 15:00:00 EDT
1183    Tag: blume-20010719-libreorg
1184    Description:
1185    
1186    This update puts together a fairly extensive but straightforward change
1187    to the way the libraries that implement the interactive system are
1188    organized:
1189    
1190       The biggest change is the elimination of structure Compiler.  As a
1191       replacement for this structure, there is now a CM library
1192       (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm)
1193       that exports all the substructures of the original structure Compiler
1194       directly.  So instead of saying Compiler.Foo.bar one now simply
1195       says Foo.bar.  (The CM libraries actually export a collection of
1196       structures that is richer than the collection of substructures of
1197       structure Compiler.)
1198    
1199       To make the transition smooth, there is a separate library called
1200       $smlnj/compiler/compiler.cm which puts together and exports the
1201       original structure Compiler (or at least something very close to it).
1202    
1203       There are five members of the original structure Compiler
1204       that are not exported directly but which instead became members
1205       of a new structure Backend (described by signature BACKEND).  These are:
1206       structure Profile (: PROFILE), structure Compile (: COMPILE), structure
1207       Interact (: INTERACT), structure Machine (: MACHINE), and val
1208       architecture (: string).
1209    
1210       Structure Compiler.Version has become structure CompilerVersion.
1211    
1212       Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided
1213       by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc,
1214       or x86, respectively.
1215       Each of these exports the same frontend structures that
1216       $smlnj/compiler.cm exports.  But they do not have a structure Backend
1217       and instead export some structure <Arch>Backend where <Arch> is Alpha32,
1218       Hppa, PPC, Sparc, or X86, respectively.
1219    
1220       Library $smlnj/compiler/all.cm exports the union of the exports of
1221       $smlnj/compiler/<arch>.cm
1222    
1223       There are no structures <Arch>Compiler anymore, use
1224       $smlnj/compiler/<arch>.cm instead.
1225    
1226       Library host-compiler-0.cm is gone.  Instead, the internal library
1227       that instantiates CM is now called cm0.cm.  Selection of the host
1228       compiler (backend) is no longer done here but. (Responsibility for it
1229       now lies with $smlnj/compiler/current.cm.  This seems to be more
1230       logical.)
1231    
1232       Many individual files have been moved or renamed.  Some files have
1233       been split into multiple files, and some "dead" files have been deleted.
1234    
1235    Aside from these changes to library organization, there are also changes
1236    to the way the code itself is organized:
1237    
1238       Structure Binfile has been re-implemented in such a way that it no
1239       longer needs any knowledge of the compiler.  It exclusively deals
1240       with the details of binfile layout.  It no longer invokes the
1241       compiler (for the purpose of creating new prospective binfile
1242       content), and it no longer has any knowledge of how to interpret
1243       pickles.
1244    
1245       Structure Compile (: COMPILE) has been stripped down to the bare
1246       essentials of compilation.  It no longer deals with linking/execution.
1247       The interface has been cleaned up considerably.
1248    
1249       Utility routines for dealing with linking and execution have been
1250       moved into their own substructures.
1251    
1252       (The ultimate goal of these changes is to provide a light-weight
1253       binfile loader/linker (at least for, e.g., stable libraries) that
1254       does not require CM or the compiler to be present.)
1255    
1256    CM documentation has been updated to reflect the changes to library
1257    organization.
1258    
1259    ----------------------------------------------------------------------
1260    Name: Matthias Blume
1261    Date: 2001/07/10 17:30:00 EDT
1262    Tag: Release_110_34
1263    Description:
1264    
1265    Minor tweak to 110.34 (re-tagged):
1266    
1267      - README.html file added to CVS repository
1268      - runtime compiles properly under FreeBSD 3.X and 4.X
1269    
1270    ----------------------------------------------------------------------
1271    Name: Matthias Blume
1272    Date: 2001/07/10 17:30:00 EDT
1273    Tag: Release_110_34
1274    Description:
1275    
1276    New version number (110.34). New bootfiles.
1277    
1278    ----------------------------------------------------------------------
1279    Name: Matthias Blume
1280    Date: 2001/07/09 16:00:00 EDT
1281    Tag: blume-20010709-more-varargs
1282    Description:
1283    
1284    I changed the handling of varargs in ml-nlffigen again:
1285    The ellipsis ... will now simply be ignored (with an accompanying warning).
1286    
1287    The immediate effect is that you can actually call a varargs function
1288    from ML -- but you can't actually supply any arguments beyond the ones
1289    specified explicitly.  (For example, you can call printf with its format
1290    string, but you cannot pass additional arguments.)
1291    
1292    This behavior is only marginally more useful than the one before, but
1293    it has the advantage that a function or, more importantly, a function
1294    type never gets dropped on the floor, thus avoiding follow-up problems with
1295    other types that refer to the offending one.
1296    
1297    ----------------------------------------------------------------------
1298    Name: Matthias Blume
1299    Date: 2001/07/09 11:25:00 EDT
1300    Tag: blume-20010709-varargs
1301    Description:
1302    
1303    1. ckit-lib.cm now exports structure Error
1304    2. ml-nlffigen reports occurences of "..." (i.e., varargs function types)
1305       with a warning accompanied by a source location.  Moreover, it
1306       merely skips the offending function or type and proceeds with the
1307       rest of its work.u  As a result, one can safely feed C code containing
1308       "..." to ml-nlffigen.
1309    3. There are some internal improvements to CM, providing slightly
1310       more general string substitutions in the tools subsystem.
1311    
1312    ----------------------------------------------------------------------
1313    Name: Matthias Blume
1314    Date: 2001/06/27 15:10:00 EDT
1315    Tag: blume-20010627-concur
1316    Description:
1317    
1318    Fixed a small bug in CM's handling of parallel compilation.
1319    (You could observe the bug by Control-C-interrupting an ordinary
1320    CMB.make or CM.stabilize and then attaching some compile servers.
1321    The result was that all of a sudden the previously interrupted
1322    compilation would continue on its own.  This was because of
1323    an over-optimization: CM did not bother to clean out certain queues
1324    when no servers were attached "anyway", resulting in the contents
1325    of these queues to grab control when new servers did get attached.)
1326    
1327    There is also another minor update to the CM manual.
1328    
1329    ----------------------------------------------------------------------
1330    Name: Matthias Blume
1331    Date: 2001/06/26 16:15:00 EDT
1332    Tag: blume-20010626-cmdoc
1333    Description:
1334    
1335    Minor typo fixed in CM manual (syntax diagram for libraries).
1336    
1337    ----------------------------------------------------------------------
1338    Name: Matthias Blume
1339    Date: 2001/06/25 22:55:00 EDT
1340    Tag: blume-20010625-x86pc
1341    Description:
1342    
1343    Fixed a nasty bug in the X86 assembly code that caused signal
1344    handlers to fail (crash) randomly.
1345    
1346    ----------------------------------------------------------------------
1347    Name: Matthias Blume
1348    Date: 2001/06/25 12:05:00 EDT
1349    Tag: blume-20010625-nlffigen
1350    Description:
1351    
1352    This update fixes a number of minor bugs in ml-nlffigen as reported by
1353    Nick Carter <nbc@andrew.cmu.edu>.
1354    
1355      1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted.
1356      2. Default names for generated files are now derived from the name of
1357         the C file *without its directory*.  In particular, this causes generated
1358         files to be placed locally even if the C file is in some system directory.
1359      3. Default names for generated signatures and structures are also derived
1360         from the C file name without its directory.  This avoids silly things
1361         like "structure GL/GL".
1362         (Other silly names are still possible because ml-nlffigen does not do
1363          a thorough check of whether generated names are legal ML identifiers.
1364          When in doubt, use command line arguments to force particular names.)
1365    
1366    ----------------------------------------------------------------------
1367    Name: Matthias Blume
1368    Date: 2001/06/21 12:25:00 EDT
1369    Tag: blume-20010621-eXene
1370    Description:
1371    
1372    eXene now compiles and (sort of) works again.
1373    
1374    The library name (for version > 110.33) is $/eXene.cm.
1375    
1376    I also added an new example in src/eXene/examples/nbody.  See the
1377    README file there for details.
1378    
1379    ----------------------------------------------------------------------
1380    Name: Matthias Blume
1381    Date: 2001/06/20 16:40:00 EDT
1382    Tag: blume-20010620-cml
1383    Description:
1384    
1385    CML now compiles and works again.
1386    
1387    Libraries (for version > 110.33):
1388    
1389      $cml/cml.cm            Main CML library.
1390      $cml/basis.cm          CML's version of $/basis.cm.
1391      $cml/cml-internal.cm   Internal helper library.
1392      $cml/core-cml.cm       Internal helper library.
1393      $cml-lib/trace-cml.cm  Tracing facility.
1394      $cml-lib/smlnj-lib.cm  CML's version of $/smlnj-lib.cm
1395    
1396    The installer (config/install.sh) has been taught how to properly
1397    install this stuff.
1398    
1399    ----------------------------------------------------------------------
1400    Name: Matthias Blume
1401    Date: 2001/06/19 17:55:00 EDT
1402    Tag: blume-20010619-instantiate
1403    Description:
1404    
1405    This un-breaks the fix for bug 1432.
1406    (The bug was originally fixed in 110.9 but I broke it again some
1407    time after that.)
1408    
1409    ----------------------------------------------------------------------
1410    Name: Matthias Blume
1411    Date: 2001/06/19 17:25:00 EDT
1412    Tag: blume-20010619-signals
1413    Description:
1414    
1415    This should (hopefully) fix the long-standing signal handling bug.
1416    (The runtime system was constructing a continuation record with an
1417    incorrect descriptor which would cause the GC to drop data on the floor...)
1418    
1419    ----------------------------------------------------------------------
1420    Name: Matthias Blume
1421    Date: 2001/06/15 15:05:00 EDT
1422    Tag: blume-20010615-moresparc
1423    Description:
1424    
1425    Here is a short late-hour update related to Sparc c-calls:
1426    
1427     -- made handling of double-word arguments a bit smarter
1428    
1429     -- instruction selection phase tries to collapse certain clumsily
1430        constructed ML-Trees; typical example:
1431    
1432            ADD(ty,ADD(_,e,LI d1),LI d2)  ->  ADD(ty,e,LI(d1+d2))
1433    
1434        This currently has no further impact on SML/NJ since mlriscGen does
1435        not seem to generate such patterns in the first place, and c-calls
1436        (which did generate them in the beginning) has meanwhile been fixed
1437        so as to avoid them as well.
1438    
1439    ----------------------------------------------------------------------
1440    Name: Matthias Blume
1441    Date: 2001/06/15 15:05:00 EDT
1442    Tag: blume-20010615-sparc
1443    Description:
1444    
1445    The purpose of this update is to provide an implementation of NLFFI
1446    on Sparc machines.
1447    
1448    Here are the changes in detail:
1449    
1450       * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing
1451       the Sparc implementation of the c-calls API.
1452       * The Sparc backend of SML/NJ has been modified to uniformely use %fp
1453       for accessing the ML frame.  Thus, we have a real frame pointer and
1454       can freely modify %sp without need for an omit-frame-ptr phase.
1455       The vfp logic in src/compiler/CodeGen/* has been changed to accomodate
1456       this case.
1457       * ml-nlffigen has been taught to produce code for different architectures
1458       and calling conventions.
1459       * In a way similar to what was done in the x86 case, the Sparc
1460       backend uses its own specific extension to mltree.  (For example,
1461       it needs to be able to generate UNIMP instructions which are part
1462       of the calling convention.)
1463       * ml-nlffi-lib was reorganized to make it more modular (in particular,
1464       to make it easier to plug in new machine- and os-dependent parts).
1465    
1466    There are some other fairly unrelated bug fixes and cleanups as well:
1467    
1468       * I further hacked the .cm files for MLRISC tools (like MDLGen) so
1469       that they properly share their libraries with existing SML/NJ libraries.
1470       * I fixed a minor cosmetic bug in CM, supressing certain spurious
1471       follow-up error messages.
1472       * Updates to CM/CMB documentation.
1473    
1474    TODO items:
1475    
1476       * MLRISC should use a different register as its asmTemp on the Sparc.
1477         (The current %o2 is a really bad choice because it is part of the
1478         calling conventions, so things might interfere in unexpected ways.)
1479    
1480    ----------------------------------------------------------------------
1481    Name: Matthias Blume
1482    Date: 2001/06/07
1483    Tag: blume-20010607-calls
1484    Description:
1485    
1486    A number of internal changes related to C calls and calling conventions:
1487    
1488    1. ML-Tree CALL statements now carry a "pops" field.  It indicates the
1489       number of bytes popped implicitly (by the callee).  In most cases
1490       this field is 0 but on x86/win32 it is some non-zero value.  This
1491       is information provided for the benefit of the "omit-frameptr" pass.
1492    2. The CALL instruction on the x86 carries a similar "pops" field.
1493       The instruction selection phase copies its value from the ML-Tree
1494       CALL statement.
1495    3. On all other architectures, the instruction selection phase checks
1496       whether "pops=0" and complains if not.
1497    4. The c-calls implementation for x86 now accepts two calling conventions:
1498       "ccall" and "stdcall".  When "ccall" is selected, the caller cleans
1499       up after the call and pops is set to 0.  For "stdcall", the caller
1500       does nothing, leaving the cleanup to the callee; pops is set to
1501       the number of bytes that were pushed onto the stack.
1502    5. The cproto decoder (compiler/Semant/types/cproto.sml) now can
1503       distinguish between "ccall" and "stdcall".
1504    6. The UNIMP instruction has been added to the supported Sparc instruction
1505       set. (This is needed for implementing the official C calling convention
1506       on this architecture.)
1507    7. I fixed some of the .cm files under src/MLRISC/Tools to make them
1508       work with the latest CM.
1509    
1510    ----------------------------------------------------------------------
1511    Name: Matthias Blume
1512    Date: 2001/06/05 15:10:00 EDT
1513    Tag: blume-20010605-cm-index
1514    Description:
1515    
1516    0. The "lambdasplit" parameter for class "sml" in CM has been documented.
1517    
1518    1. CM can now generate "index files".  These are human-readable files
1519       that list on a per-.cm-file basis each toplevel symbol defined or
1520       imported.  The location of the index file for
1521       <p>/<d>.cm is <p>/CM/INDEX/<d>.cm.
1522       To enable index-file generation, set CM.Control.generate_index to true
1523       or export an environment-symbol: export CM_GENERATE_INDEX=true.
1524    
1525       The CM manual has been updated accordingly.
1526    
1527    2. I made some slight modifications to the c-calls API in MLRISC.
1528    
1529         a) There is now a callback to support saving/restoring of
1530            dedicated but caller-save registers around the actual call
1531            instruction.
1532         b) One can optionally specify a comment-annotation for the
1533            call instruction.
1534    
1535    3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop.
1536       (For example, the comment annotation shows the C prototype of
1537        the function being called.)
1538    
1539    ----------------------------------------------------------------------
1540    Name: Matthias Blume
1541    Date: 2001/06/01 13:30:00 EDT
1542    Tag: blume-20010601-nlffi-cleanup
1543    Description:
1544    
1545    This is mostly a cleanup of MLFFI stuff:
1546    
1547       - some signature files have been put into a more exposed place
1548       - the ugly 'f type parameter is gone (simplifies types tremendously!)
1549       - ml-nlffigen changed accordingly
1550       - tutorial updated
1551    
1552    Other changes:
1553    
1554       - author's affiliation in CM manual(s) updated
1555       - some more recognized keywords added to Allen's sml.sty
1556    
1557    ----------------------------------------------------------------------
1558    Name: Matthias Blume
1559    Date: 2001/05/25 15:30:00 EDT
1560    Tag: blume-20010525-iptr
1561    Description:
1562    
1563      - put the official 110.33-README (as it appears on the ftp server) under
1564        CVS
1565      - fixed a small bug related to incomplete pointer types in
1566        ml-nlffigen
1567      - small cosmetic change to the ml-nlffi-lib's "arr" type constructor
1568        (it does not need the 'f type parameter)
1569    
1570    ----------------------------------------------------------------------
1571    Name: Matthias Blume
1572    Date: 2001/05/23 14:30:00 EDT
1573    Tag: Release_110_33
1574    Description:
1575    
1576    New version number (110.33).  New bootfiles.
1577    
1578    ----------------------------------------------------------------------
1579    Name: Matthias Blume
1580    Date: 2001/05/22 18:06:00 EDT
1581    Tag: blume-20010522-targets
1582    Description:
1583    
1584    Made install.sh use file config/targets.customized if it exists, falling
1585    back to config/targets if it doesn't.  This way one can have a customized
1586    version of the targets file without touching the "real thing", thus
1587    eliminating the constant fear of accidentally checking something bogus
1588    back into the CVS repository...  (File config/targets.customized must
1589    not be added to the repository!)
1590    
1591    ----------------------------------------------------------------------
1592    Name: Matthias Blume
1593    Date: 2001/05/22 16:30:00 EDT
1594    Tag: blume-20010522-minitut
1595    Description:
1596    
1597    1. Bug fix in ml-nlffigen; now (hopefully) correctly handling
1598       struct returns.
1599    2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt.  This is some very
1600       incomplete, preliminary documentation for NLFFI.
1601    
1602    ----------------------------------------------------------------------
1603    Name: Matthias Blume
1604    Date: 2001/05/14 11:30:00 EDT
1605    Tag: blume-20010514-script
1606    Description:
1607    
1608    Some bugs in install script fixed.
1609    
1610    In addition to that I also made a slight change to the NLFFI API:
1611    Functors generated by ml-nlffigen now take the dynamic library as a
1612    straight functor argument, not as a suspended one.  (The original
1613    functor code used to force the suspension right away anyway, so there
1614    was nothing gained by this complication of the interface.)
1615    
1616    ----------------------------------------------------------------------
1617    Name: Matthias Blume
1618    Date: 2001/05/11 14:35:00 EDT
1619    Tag: blume-20010511-ml-nlffi
1620    Description:
1621    
1622    I finally took the plunge and added my new FFI code to the main
1623    repository.  For x86-linux it is now ready for prime-time.
1624    
1625    There are two new subdirectories of "src":
1626    
1627      - ml-nlffi-lib:
1628           The utility library for programs using the FFI interface.
1629           Here is the implementation of $/c.cm and its associated low-level
1630           partners $/c-int.cm and $/memory.cm.
1631      - ml-nlffigen:
1632           A stand-alone program for generating ML glue code from C source
1633           code.
1634    
1635    Building ml-nlffigen requires $/ckit-lib.cm.
1636    
1637    The config/install.sh script has been updates to do the Right Thing
1638    (hopefully).
1639    
1640    Notice that the source tree for the C-Kit will not be put under "src"
1641    but directly under the installation root directory.  (This is the
1642    structure that currently exists on the CVS server when you check out
1643    module "sml".)  Fortunately, config/install.sh knows about this oddity.
1644    
1645    Bugs: No documentation yet.
1646    
1647    ----------------------------------------------------------------------
1648    Name: Matthias Blume
1649    Date: 2001/05/09 16:35:00 EDT
1650    Tag: blume-20010509-cpscontract
1651    Description:
1652    
1653    Fixed a bug in the accounting code in cpsopt/contract.sml.  (The
1654    wrapper/unwrapper elimination did not decrement usage counts and some
1655    dead variables got overlooked by the dead-up logic.)
1656    
1657    ----------------------------------------------------------------------
1658    Name: Lal George
1659    Date: 2001/05/08  17:26:09 EDT
1660    Tag: george-20010508-omit-frameptr
1661    Description:
1662    
1663    Changes to implement the omit-frame-pointer optimization to support
1664    raw C calls. For now, there is only support on the Intel x86, but
1665    other architectures will follow as more experience is gained with this.
1666    
1667    
1668    ----------------------------------------------------------------------
1669    Name: Matthias Blume
1670    Date: 2001/05/07 14:40:00 EDT
1671    Tag: blume-20010507-proxies
1672    Description:
1673    
1674    I made into "proxy libraries" all libraries that qualify for such a
1675    change.  (A qualifying library is a library that has another library or
1676    groups as its sole member and repeats that member's export list
1677    verbatim.  A proxy library avoids this repetition by omitting its export
1678    list, effectively inheriting the list that its (only) member exports.
1679    See the CM manual for more explanation.)
1680    The main effect is that explicit export lists for these libraries
1681    do not have to be kepts in sync, making maintenance a bit easier.
1682    
1683    I also added copyright notices to many .cm-files.
1684    
1685    Last but not least, I made a new set of bootfiles.
1686    
1687    ----------------------------------------------------------------------
1688    Name: Matthias Blume
1689    Date: 2001/05/04 17:00:00 EDT
1690    Tag: blume-20010504-cm-lsplit
1691    Description:
1692    
1693    0. John merged pending changes to $/smlnj-lib.cm
1694    
1695    1. Allen's previous change accidentally backed out of one of Lal's
1696       earlier changes.  I undid this mistake (re-introducing Lal's change).
1697    
1698    2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm)
1699       within the compiler where applicable.  There is some code simplification
1700       because of that.
1701    
1702    3. The "split" phase (in FLINT) is now part of the default list of phases.
1703       Compiler.Control.LambdaSplitting.* can be used to globally control the
1704       lambda-splitting (cross-module-inlining) engine.  In addition to that,
1705       it can now also be controlled on a per-source basis: CM has been taught
1706       a new tool parameter applicable to ML source files.
1707    
1708       - To turn lambda-splitting off completely:
1709            local open Compiler.Control.LambdaSplitting in
1710                val _ = set Off
1711            end
1712       - To make "no lambda-splitting" the global default (but allow per-source
1713         overriding); this is the initial setting:
1714            local open Compiler.Control.LambdaSplitting in
1715                val _ = set (Default NONE)
1716            end
1717       - To make "lambda-splitting with aggressiveness a" the global default
1718         (and allow per-source overriding):
1719            local open Compiler.Control.LambdaSplitting in
1720                val _ = set (Default (SOME a))
1721            end
1722    
1723       - To turn lambda-splitting off for a given ML souce file (say: a.sml)
1724         write (in the respective .cm-file):
1725            a.sml (lambdasplitting:off)
1726       - To turn lambda-splitting for a.sml on with minimal aggressiveness:
1727            a.sml (lambdasplitting:on)
1728       - To turn lambda-splitting for a.sml on with aggressiveness <a> (where
1729         <a> is a decimal non-negative integer):
1730            a.sml (lambdasplitting:<a>)
1731       - To turn lambda-splitting for a.sml on with maximal aggressiveness:
1732            a.sml (lambdasplitting:infinity)
1733       - To use the global default for a.sml:
1734            a.sml (lambdasplitting:default)
1735         or simply
1736            a.sml
1737    
1738    ----------------------------------------------------------------------
1739    Name: Allen Leung
1740    Date: 2001/05/04 01:57:00 EDT
1741    Tag: leunga-20010504-sync
1742    Description:
1743    
1744      MLRISC features.
1745    
1746      1. Fix to CMPXCHG instructions.
1747      2. Changed RA interface to allow annotations in callbacks.
1748      3. Added a new method to the stream interface to allow annotations updates.
1749    
1750    ----------------------------------------------------------------------
1751    Name: Matthias Blume
1752    Date: 2001/05/01 11:45:00 EDT
1753    Tag: blume-20010501-pcedittmp
1754    Description:
1755    
1756    Changed install.sh to use the current working directory instead of
1757    /usr/tmp for a temporary file (pcedittmp).  The previous choice
1758    of /usr/tmp caused trouble with MacOS X because of file premission
1759    problems.
1760    
1761    ----------------------------------------------------------------------
1762    Name: Matthias Blume
1763    Date: 2001/04/20 11:10:00 EDT
1764    Tag: blume-20010420-inMLflag
1765    Description:
1766    
1767     - added vp_limitPtrMask to vproc-state.h
1768       (for use by the raw-C-calls mechanism to implement proper interrupt
1769        handling)
1770     - made the ML compiler aware of various data-structure offsets so it
1771       can generate code for accessing the vp_inML flag and vp_limitPtrMask
1772     - tweaked mlriscGen.sml to have it emit interrupt-handling code for
1773       raw C-calls
1774    
1775    ----------------------------------------------------------------------
1776    Name: Lal George
1777    Date: 2001/04/20 09:15:28 EDT
1778    Tag: george-20010420-macosX
1779    Description:
1780    
1781     - Changes to port to Mac OS X; Darwin.
1782    
1783     - In the process I found that sqrt was broken on the PPC, because the
1784       fsqrt instruction is not implemented.
1785    
1786    ----------------------------------------------------------------------
1787    Name: Matthias Blume
1788    Date: 2001/04/18 12:45:00 EDT
1789    Tag: blume-20010418-ccalls
1790    Description:
1791    
1792     - fixed two off-by-4 errors in the x86-specific c-calls implementation
1793       (this bug prevented structure arguments containing pointers from being
1794        passed correctly)
1795     - changed the raw-C-call code in mlriscGen.sml in such a way that
1796       structure arguments are represented as a pointer to the beginning
1797       of the structure (instead of having a series of synthesized arguments,
1798       one for each structure member)
1799    
1800     - made makeml script's verbosity level configurable via environment
1801       variable (MAKEML_VERBOSITY)
1802    
1803     - eliminated placeholder implementations for f32l, w16s, i16s, and f32s
1804       in rawmem-x86.sml; we are now using the real thing
1805    
1806    ----------------------------------------------------------------------
1807    Name: Matthias Blume
1808    Date: 2001/03/22 16:25:00 EST
1809    Tag: blume-20010322-bootfiles
1810    Description:
1811    
1812    Created a new set of bootfiles (for your automatic installation convenience).
1813    
1814    ----------------------------------------------------------------------
1815    Name: Matthias Blume
1816    Date: 2001/03/22 15:10:00 EST
1817    Tag: blume-20010322-rawmem-parcm
1818    Description:
1819    
1820    1. All "raw memory access" primitives for the new FFI are implemented now
1821       (at least on the x86).
1822    2. Some further cleanup of CM's parallel make mechanism.
1823    
1824    ----------------------------------------------------------------------
1825    Name: Matthias Blume
1826    Date: 2001/03/19 17:53:00 EST
1827    Tag: blume-20010319-parallel
1828    Description:
1829    
1830    Parallel make (using compile servers) now works again.
1831    
1832    To this end, CM.stabilize and CMB.make have been modified to work in
1833    two passes when compile servers are attached:
1834       1. Compile everything, do not perform stabilization; this pass
1835          uses compile servers
1836       2. Stabilize everything; this pass does not use compile servers
1837    If there are no compile servers, the two passes are combined into one
1838    (as before).  Splitting the passes increases the inherent parallelism
1839    in the dependency graph because the entire graph including all
1840    libraries is available at the same time.  This, in turn, improves
1841    server utilization.  The downside is that the master process will
1842    have to do some extra work after compilation is done (because for
1843    technical reasons it must re-read all the binfiles during stabilization).
1844    
1845    ----------------------------------------------------------------------
1846    Name: Matthias Blume
1847    Date: 2001/03/16 12:22:00 EST
1848    Tag: blume-20010316-bootfiles
1849    Description:
1850    
1851    Created a new set of bootfiles (for your automatic installation convenience).
1852    
1853    ----------------------------------------------------------------------
1854    Name: Matthias Blume
1855    Date: 2001/03/16 11:00:00 EST
1856    Tag: blume-20010316-MLTREE-fixup
1857    Description:
1858    
1859    This is a minor fixup for an (untagged) earlier commit by Allen.
1860    (A file was missing).
1861    
1862    ----------------------------------------------------------------------
1863    Name: Allen Leung
1864    Date: Mon Mar  5 18:54:57 EST 2001
1865    Tag: leunga-20010305-cut-support
1866    
1867    1. New support for alternative control-flow in MLTREE.
1868       Currently we support
1869    
1870          FLOW_TO(CALL ...., [k1,...,kn])
1871    
1872       This is needed for 'cuts to' in C-- and try/handle-like constructs
1873       in Moby
1874    
1875       New assembler flag "asm-show-cutsto" to turn on control-flow debugging.
1876    
1877    2. Register Allocator
1878    
1879       Changes in interface [from Fermin, John]
1880    
1881    3. Alpha 8-bit SLL support [Fermin]
1882    
1883    4. All architectures
1884    
1885       A new module (ClusterExpandCopies) for expanding parallel copies.
1886    
1887    ----------------------------------------------------------------------
1888    Name: Allen Leung
1889    Date: 2001/02/27 23:07:00 EST
1890    Tag: leunga-20010227-minor-stuff
1891    
1892    1. Alpha bug fix for CMOVNE
1893    2. Handle mltree COND(..,FCMP ...,...)
1894    3. Bug fix in simplifier
1895    
1896    ----------------------------------------------------------------------
1897    Name: Matthias Blume
1898    Date: 2001/01/30 17:50:00 EST
1899    Tag: blume-20010130-sync
1900    Description:
1901    
1902    This is just a minor update to sync my devel branch with the main brach.
1903    The only visible change is the addition of some README files.
1904    
1905    ----------------------------------------------------------------------
1906    Name: Matthias Blume
1907    Date: 2001/01/12 23:30:00 JST
1908    Tag: blume-20010112-bootfiles
1909    Description:
1910    
1911    Made a new set of bootfiles that goes with the current state of the
1912    repository.
1913    
1914    ----------------------------------------------------------------------
1915    Name: Matthias Blume
1916    Date: 2001/01/12 21:20:00 JST
1917    Tag: blume-20010112-sync
1918    Description:
1919    
1920    I am just flushing out some minor changes that had accumulated in
1921    my private branch in order to sync with the main tree.  (This is
1922    mainly because I had CVS trouble when trying to merge _into_ my
1923    private branch.)
1924    
1925    Most people should be completely unaffected by this.
1926    
1927    ----------------------------------------------------------------------
1928    Name: Allen Leung
1929    Date: Thu Jan 11 21:03:00 EST 2001
1930    Tag: leunga-20010111-labexp=mltree
1931    Description:
1932    
1933    1.  Removed the type LabelExp and replace it by MLTree.
1934    2.  Rewritten mltree-simplify with the pattern matcher tool.
1935    3.  There were some bugs in alpha code generator which would break
1936        64-bit code generation.
1937    4.  Redo the tools to generate code with the
1938    5.  The CM files in MLRISC (and in src/system/smlnj/MLRISC)
1939        are now generated by perl scripts.
1940    
1941    ----------------------------------------------------------------------
1942    Name: Matthias Blume
1943    Date: 2001/01/10 21:55:00 JST
1944    Tag: blume-20010110-rcc
1945    Description:
1946    
1947    The RCC stuff now seems to work (but only on the x86).
1948    This required hacking of the c-calls interface (and -implementation) in
1949    MLRISC.
1950    
1951    Normal compiler users should be unaffected.
1952    
1953    ----------------------------------------------------------------------
1954    Name: Matthias Blume
1955    Date: 2001/01/09 01:20:00 JST
1956    Tag: blume-20010109-rcc
1957    Description:
1958    
1959    This is a fairly big patch, flushing out a large number of pending
1960    changes that I made to my development copy over the last couple of days.
1961    
1962    Of practical relevance at this moment is a workaround for a pickling
1963    bug that Allen ran into the other day.  The cause of the bug itself is
1964    still unknown and it might be hard to fix it properly, but the
1965    workaround has some merits of its own (namely somewhat reducing pickling
1966    overhead for certain libraries).  Therefore, I think this solution should
1967    be satisfactory at this time.
1968    
1969    The rest of the changes (i.e., the vast majority) has to do with my
1970    ongoing efforts of providing direct support for C function calls from
1971    ML.  At the moment there is a new primop "RAW_CCALL", typing magic
1972    in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new
1973    case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to
1974    translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to
1975    handle RCC.
1976    
1977    The last part (the changes to mlriscGen.sml) are still known to be
1978    wrong on the x86 and not implemented on all other architectures.  But
1979    the infrastructure is in place. I had to change a few functor
1980    signatures in the backend to be able to route the CCalls interface
1981    from MLRISC there, and I had to specialize the mltree type (on the
1982    x86) to include the necessary extensions. (The extensions themselves
1983    were already there and redy to go in MLRISC/x86).
1984    
1985    Everything should be very happy as soon as someone helps me with
1986    mlriscGen.sml...
1987    
1988    In any case, nothing of this should matter to anyone as long as the
1989    new primop is not being used (which is going to be the case unless you
1990    find it where I hid it :). The rest of the compiler is completely
1991    unaffected.
1992    
1993    ----------------------------------------------------------------------
1994    Name: Matthias Blume
1995    Date: 2001/01/05 00:30:00 JST
1996    Tag: blume-20010105-primops
1997    Description:
1998    
1999    Added some experimental support for work that I am doing right now.
2000    These changes mostly concern added primops, but there is also a new
2001    experimental C library in the runtime system (but currently not enabled
2002    anywhere except on Linux/X86).
2003    
2004    In the course of adding primops (and playing with them), I discovered that
2005    Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly
2006    broken.  (Zhong was very right he labeled this stuff as "major gross hack".)
2007    To recover, I made type information in INL_PRIM mandatory and changed
2008    prim.sml as well as built-in.sml accordingly.  The InLine structure now
2009    has complete, correct type information (i.e., no bottom types).
2010    
2011    Since all these changes mean that we need new binfiles, I also bumped the
2012    version number to 110.32.1.
2013    
2014    ----------------------------------------------------------------------
2015    Name: Matthias Blume
2016    Date: 2000/12/30 22:10:00 JST
2017    Tag: blume-20001230-various
2018    Description:
2019    
2020    Added proxy libraries for MLRISC and let MLRISC libraries refer
2021    to each other using path anchors.  (See CM manual for explanation.)
2022    
2023    Updated CM documentation.
2024    
2025    Fixed some bugs in CM.
2026    
2027    Implemented "proxy" libraries (= syntactic sugar for CM).
2028    
2029    Added "-quiet" option to makeml and changed runtime system accordingly.
2030    
2031    Added cleanup handler for exportML to reset timers and compiler stats.
2032    
2033    ----------------------------------------------------------------------
2034    Name: Lal George
2035    Date: 2000/12/22 22:22:58 EST 2000
2036    Tag: Release_110_32
2037    Description:
2038    
2039            Infinite precision used throughout MLRISC.
2040            see MLRISC/mltree/machine-int.sig
2041    
2042    ----------------------------------------------------------------------
2043    Name: Matthias Blume
2044    Date: 2000/12/22 23:16:00 JST
2045    Tag: blume-20001222-warn
2046    Description:
2047    
2048    Corrected wording and formatting of some CM warning message which I
2049    broke in my previous patch.
2050    
2051    ----------------------------------------------------------------------
2052    Name: Matthias Blume
2053    Date: 2000/12/22 21:20:00 JST
2054    Tag: blume-20001222-anchorenv
2055    Description:
2056    
2057    Fixed CM's handling of anchor environments in connection with CMB.make.
2058    
2059    ----------------------------------------------------------------------
2060    Name: Matthias Blume
2061    Date: 2000/12/22 13:15:00 JST
2062    Tag: blume-20001222-cleanup
2063    Description:
2064    
2065    Removed src/cm/ffi which does not (and did not) belong here.
2066    
2067    ----------------------------------------------------------------------
2068    Name: Matthias Blume
2069    Date: 2000/12/21 23:55:00 JST
2070    Tag: blume-20001221-exn
2071    Description:
2072    
2073    Probably most important: CM no longer silently swallows all exceptions
2074    in the compiler.
2075    Plus: some other minor CM changes.  For example, CM now reports some
2076    sizes for generated binfiles (code, data, envpickle, lambdapickle).
2077    
2078    ----------------------------------------------------------------------
2079    Name: Matthias Blume
2080    Date: 2000/12/15 00:01:05 JST
2081    Tag: blume-20001215-dirtool
2082    Description:
2083    
2084    - "dir" tool added.
2085    - improvements and cleanup to Tools structure
2086    - documentation updates
2087    
2088    ----------------------------------------------------------------------
2089    Name: Allen Leung
2090    Date: Thu Dec 14 03:45:24 EST 2000
2091    Description:
2092    Tag:  leunga-20001214-int-inf
2093    Description:
2094    
2095       In IntInf, added these standard functions, which are missing from our
2096    implementation:
2097    
2098        andb : int * int -> int
2099        xorb : int * int -> int
2100        orb  : int * int -> int
2101        notb : int -> int
2102         <<   : int * word -> int
2103        ~>>  : int * word -> int
2104    
2105       Not tested, I hope they are correct.
2106    
2107    ----------------------------------------------------------------------
2108    Name: Allen Leung
2109    Date: Fri Dec  8 19:23:26 EST 2000
2110    Description:
2111    Tag:  leunga-20001208-nowhere
2112    Description:
2113    
2114      Slight improvements to the 'nowhere' tool to handle OR-patterns,
2115    to generate better error messages etc.  Plus a brief manual.
2116    
2117    ----------------------------------------------------------------------
2118    Name: Lal George
2119    Date: 2000/12/08 09:54:02 EST 2000
2120    Tag: Release_110_31
2121    Description:
2122    
2123    - Version 110.31
2124    ----------------------------------------------------------------------
2125    Name: Allen Leung
2126    Date: Thu Dec  7 22:01:04 EST 2000
2127    Tag:  leunga-20001207-cell-monster-hack
2128    Description:
2129    
2130    Major MLRISC internal changes.  Affect all clients.
2131    Summary:
2132    
2133    1.  Type CELLS.cell = int is now replaced by a datatype.
2134        As a result, the old regmap is now gone.  Almost all interfaces
2135        in MLRISC change as a consequence.
2136    
2137    2.  A new brand version of machine description tool (v3.0) that generates
2138        modules expecting the new interface.  The old version is removed.
2139    
2140    3.  The RA interface has been further abstracted into two new functors.
2141        RISC_RA and X86RA.  These functors have much simpler interfaces.
2142        [See also directory MLRISC/demo.]
2143    
2144    4.  Some other new source->source code generation tools are available:
2145    
2146        a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
2147        b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
2148           I use this tool to generate the peephole optimizers---with the new
2149           cell type changes, peephole rules are becoming difficult to write
2150           without conditional pattern matching.
2151    
2152    5.  More Intmap -> IntHashTable change.  Previous changes by Matthias didn't
2153        cover the entire MLRISC source tree so many things broke.
2154    
2155    6.  CM files have been moved to the subdirectory MLRISC/cm.
2156        They are moved because there are a lot of them and they clutter up the
2157        root dir.
2158    
2159    7.  More detailed documentation to come...
2160    
2161        NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
2162        a makeml -rebuild first.  This is because of other other
2163        changes that Matthias has made (see below).
2164    
2165    
2166    ----------------------------------------------------------------------
2167    Name: Matthias Blume
2168    Date: 2000/11/30 23:12:00 JST
2169    Tag: blume-20001130-filereorg
2170    Description:
2171    
2172    Some manual updates and some file reorganizations in CM.
2173    
2174    ----------------------------------------------------------------------
2175    Name: Matthias Blume
2176    Date: 2000/11/24 17:45:00 JST
2177    Tag: blume-20001124-link
2178    Description:
2179    
2180    Drastically improved link traversal code for the case that the dynamic
2181    value was already loaded at bootstrap time.  As a result, CM and CMB
2182    now both load blazingly fast -- even on a very slow machine.  Also,
2183    memory consumption has been further reduced by this.
2184    
2185    Warning: The format of the PIDMAP file has changed.  THerefore, to
2186    bootstrap you have to do this:
2187    
2188    1. Run CMB.make
2189    2. Make a symbolic link for the boot directory:
2190         ln -s sml.boot.ARCH-OS xxx
2191    3. "Rebuild" the boot directory:
2192         ./makeml -boot xxx -rebuild sml ; rm xxx
2193    4. Boot normally:
2194          ./makeml
2195    
2196    ----------------------------------------------------------------------
2197    Name: Matthias Blume
2198    Date: 2000/11/21 21:20:00 JST
2199    Tag: blume-20001121-tools
2200    Description:
2201    
2202    Continued hacking on autoloading problem -- with success this time.
2203    Also changed tool-plugin mechanism.  See new CM manual.
2204    
2205    ----------------------------------------------------------------------
2206    Name: Matthias Blume
2207    Date: 2000/11/19 14:30:00 JST
2208    Tag:  blume-20001119-autoload
2209    Description:
2210    
2211    Some hacking to make autoloading faster.  Success for CMB, no success
2212    so far for CM.  There is a reduced structure CM' that autoloads faster.
2213    (This is a temporary, non-documented hack to be eliminated again when
2214    the general problem is solved.)
2215    
2216    ----------------------------------------------------------------------
2217    Name: Matthias Blume
2218    Date: 2000/11/17 14:10:00 JST
2219    Tag: blume-20001117-pickle-lib
2220    Description:
2221    
2222    1. Eliminated comp-lib.cm
2223    2. Made pickle-lib.cm
2224    3. Eliminated all uses of intset.sml (from comp-lib.cm)
2225    4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
2226       equivalent constructs from smlnj-lib.cm (INtHashTable).
2227    5. Point 4. also goes for those uses of intmap.* in MLRISC.
2228       Duplicated intmap modules thrown out.
2229    6. Hunted down all duplicated SCC code and replaced it with
2230       equivalent stuff (GraphSCCFn from smlnj-lib.cm).
2231    7. Rewrote Feedback module.
2232    8. Moved sortedlist.sml into viscomp-lib.cm.  Eventually it
2233       should be thrown out and equivalent modules from smlnj-lib.cm
2234       should be used (IntRedBlackSet, IntListSet, ...).
2235    
2236    Confirmed that compiler compiles to fixpoint.
2237    
2238    ----------------------------------------------------------------------
2239    Name: Allen Leung
2240    Date: 2000/11/10 18:00:00
2241    Tag: leunga-20001110-new-x86-fp
2242    
2243    A new x86 floating point code generator has been added.
2244    By default this is turned off.  To turn this on, do:
2245    
2246        CM.autoload "$smlnj/compiler.cm";
2247        Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
2248    
2249    Changes:
2250    
2251    1.  Changed FTAN to FPTAN so that the assembly output is correct.
2252    2.  Changed the extension callback for FTANGENT to generate:
2253    
2254              fptan
2255              fstp  %st(0)
2256        instead of
2257              fptan
2258              fstpl ftempmem
2259    
2260    3.  Numerous assembly fixes for x86.
2261    
2262    5.  Cleaned up the machine code output module x86/x86MC.sml and added
2263        support for a whole bunch of instructions and addressing modes:
2264    
2265          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st, %st(n)
2266          faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp  %st, %st(n)
2267          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st(n), %st
2268          fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
2269          fxch %st(n)
2270          fld %st(n)
2271          fst %st(n)
2272          fst mem
2273          fstp %st(n)
2274          fucom %st(n)
2275          fucomp %st(n)
2276    
2277        All these are now generated when the fast fp mode is turned on.
2278    
2279    6.  Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
2280    
2281    ----------------------------------------------------------------------
2282    Name: Matthias Blume
2283    Date: 2000/11/09 11:20:00 JST
2284    Tag: blume-20001109-scc
2285    Description:
2286    
2287    Eliminated some code duplication:
2288    
2289    1. Added "where" clause to GraphSCCFn in SML/NJ Library.
2290       (Otherwise the functor is useless.)
2291    2. Used GraphSCCFn where SCCUtilFun was used previously.
2292    3. Got rid of SCCUtilFun (in comp-lib.cm).
2293    
2294    ----------------------------------------------------------------------
2295    Name: Lal George
2296    Date: 2000/11/06 09:02:21 EST 2000
2297    Tag: Release_110_30
2298    Description:
2299    
2300    - Version 110.30
2301    ----------------------------------------------------------------------
2302    Name: Matthias Blume
2303    Date: 2000/11/04 14:45:00
2304    Tag: blume-20001104-mlbuild
2305    Description:
2306    
2307    - Made ml-build faster on startup.
2308    - Documentation fixes.
2309    
2310    ----------------------------------------------------------------------
2311    Name: Matthias Blume
2312    Date: 2000/11/02 17:00:00 JST
2313    Tag: blume-20001102-condcomp
2314    Description:
2315    
2316    - Small tweaks to pickler -- new BOOTFILES!
2317    - Version bumped to 110.29.2.
2318    - Added conditional compilation facility to init.cmi (see comment there).
2319    ----------------------------------------------------------------------
2320    Name: Allen Leung
2321    Date: 2000/10/23 19:31:00
2322    Tag: leunga-20001023-demo-ra
2323    
2324    1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
2325    2. Test programs for the graph library updated
2326    3. Some new MLRISC demo programs added
2327    
2328    ----------------------------------------------------------------------
2329    Name: Matthias Blume
2330    Date: 2000/08/31 22:15:00 JST
2331    Tag: blume-20001017-errmsg
2332    Description:
2333    
2334    More error message grief: Where there used to be no messages, there
2335    now were some that had bogus error regions.  Fixed.
2336    
2337    ----------------------------------------------------------------------
2338    Name: Matthias Blume
2339    Date: 2000/08/31 17:30:00 JST
2340    Tag: blume-20001017-v110p29p1
2341    Description:
2342    
2343    I made a version 110.29.1 with new bootfiles.
2344    
2345    Changes:  Modified pickler/unpickler for faster and leaner unpickling.
2346              CM documentation changes and a small bugfix in CM's error reporting.
2347    
2348    ----------------------------------------------------------------------
2349    Name: Lal George
2350    Date: 2000/09/27 14:42:35 EDT
2351    Tag: george-20000927-nodestatus
2352    Description:
2353    
2354    Changed the type of the nodestatus, so that:
2355    
2356            SPILLED(~1)             is now SPILLED
2357            SPILLED(m) where m>=0   is now MEMREG(m)
2358            SPILLED(s) where s<~1   is now SPILL_LOC(~s)
2359    
2360    ----------------------------------------------------------------------
2361    Name: Matthias Blume
2362    Date: 2000/09/07 14:45:00 JST
2363    Tag: blume-20000907-cmerrmsg
2364    Description:
2365    
2366    Small tweak to CM to avoid getting ML syntax error messages twice.
2367    
2368    ----------------------------------------------------------------------
2369    Name: Matthias Blume
2370    Date: 2000/08/31 18:00:00 JST
2371    Tag: blume-20000831-cvsbootfiles
2372    Description:
2373    
2374    New URL for boot files (because the 110.29 files on the BL server do
2375    now work correctly with my updated install scripts for yacc and lex).
2376    
2377    ----------------------------------------------------------------------
2378    Name: Matthias Blume
2379    Date: 2000/08/08 12:33:00 JST
2380    Tag: blume-20000808-manual
2381    Description:
2382    
2383    Tiny update to CM manual.
2384    
2385    ----------------------------------------------------------------------
2386    Name: Allen Leung
2387    Date: 2000/08/7 19:31:00
2388    Tag: leunga-20000807-a-whole-bunch-of-stuff
2389    
2390      Moby, C--, SSA, x86, machine descriptions etc.  Should only affect C--
2391    and Mobdy.
2392    
2393    1.  x86
2394    
2395       a.  Fixes to peephole module by John and Dan.
2396       b.  Assembly fix to SETcc by Allen.
2397       c.  Fix to c-call by John.
2398       d.  Fix to spilling by John.  (This one deals with the missing FSTPT case)
2399       e.  Instruction selection optimization to SETcc as suggested by John.
2400    
2401           For example,
2402    
2403            MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
2404    
2405           should generate:
2406    
2407            MOVL a, x
2408            SUBL b, x
2409            SHRL 31, x
2410    
2411    2.  IR stuff
2412    
2413         A bunch of new DJ-graph related algorithms added.  These
2414         speed up SSA construction.
2415    
2416    3.  SSA + Scheduling
2417    
2418         Added code for SSA and scheduling to the repository
2419    
2420    ----------------------------------------------------------------------
2421    Name: Lal George
2422    Date: 2000/07/27 11:53:14 EDT
2423    
2424    Tag: lal-20000727-linux-ppc
2425    Description:
2426    
2427     Made changes to support Linux PPC.
2428     p.s. I have confirmation that the 110.29 boot files work fine.
2429    
2430    ----------------------------------------------------------------------
2431    Name: Matthias Blume
2432    Date: 2000/07/27 17:40:00 JST
2433    Tag: blume-20000727-scripts
2434    Description:
2435    
2436    !!!! WARNING !!!!
2437    You must recompile the runtime system!
2438    !!!! WARNING !!!!
2439    
2440    This is basically another round of script-enhancements:
2441    
2442    1. sml, ml-build, and ml-makedepend accept options -D and -U to define
2443       and undefine CM preprocessor symbols.
2444    
2445    2. ml-build avoids generating a new heap image if it finds that the
2446       existing one is still ok.  (The condition is that no ML file had to
2447       be recompiled and all ML files are found to be older that the heap
2448       file.)
2449    
2450       To make this work smoothly, I also hacked the runtime system as
2451       well as SMLofNJ.SysInfo to get access to the heap image suffix
2452       (.sparc-solaris, ...) that is currently being used.
2453    
2454       Moreover, the signature of CM.mk_standalone has changed.  See the
2455       CM manual.
2456    
2457    3. ml-makedepend accepts additional options -n, -a, and -o.  (See the
2458       CM manual for details.)
2459    
2460    4. More CM manual updates:
2461        - all of the above has been documented.
2462        - there is now a section describing the (CM-related) command line
2463          arguments that are accepted by the "sml" command
2464    
2465    ----------------------------------------------------------------------
2466    Name: Matthias Blume
2467    Date: 2000/07/25 16:20:00 JST
2468    Tag: blume-20000725-makedepend
2469    Description:
2470    
2471    Added a script called ml-makedepend.  This can be used in makefiles
2472    for Unix' make in a way very similar to the "makedepend" command for
2473    C.
2474    
2475    The script internally uses function CM.sources.
2476    
2477    Synopsis:
2478    
2479        ml-makedepend [-f makefile] cmfile targetname
2480    
2481    The default for the makefile is "makefile" (or "Makefile" should
2482    "makefile" not exist).
2483    
2484    ml-makedepend adds a cmfile/targetname-specific section to this
2485    makefile (after removing the previous version of this section).  The
2486    section contains a single dependency specification with targetname on
2487    the LHS (targetname is an arbitrary name), and a list of files derived
2488    from the cmfile on the RHS.  Some of the files on the RHS are
2489    ARCH/OPSYS-specific.  Therefore, ml-makedepend inserts references to
2490    "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
2491    path names.  The makefile writer is responsible for making sure that
2492    these variables have correct at the time "make" is invoked.
2493    
2494    ----------------------------------------------------------------------
2495    Name: Matthias Blume
2496    Date: 2000/07/22 23:30:00 JST
2497    Tag: blume-20000722-urlupdate
2498    Description:
2499    
2500    Changed BOOT and config/srcarchiveurl to point to BL server:
2501    
2502        ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
2503    
2504    ----------------------------------------------------------------------
2505    Name: Matthias Blume
2506    Date: 2000/07/18 18:00:00 JST
2507    Tag: blume-20000718-Version_110_29
2508    Description:
2509    
2510    1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
2511    
2512    2. Updated config/version to 110.29
2513    
2514    3. Updated config/srcarchiveurl
2515    
2516    3. New boot files!
2517       ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
2518    
2519    ----------------------------------------------------------------------
2520    Name: Matthias Blume
2521    Date: 2000/07/11 13:58:00 JST
2522    Tag: blume-20000711-doctypo
2523    Description:
2524    
2525    Fixed a few typos in CM manual.
2526    
2527    ----------------------------------------------------------------------
2528    Name: Allen Leung
2529    Date: 2000/06/15 00:38:00
2530    Tag: leunga-20000704-sparc-x86
2531    
2532    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
2533    2. fix to x86 RET bug [found by Dan Grossman]
2534    3. sparc assembly bug fix for ticc instructions [found by Fermin]
2535    
2536       Affects c-- and moby only
2537    
2538    ----------------------------------------------------------------------
2539    Name: Matthias Blume
2540    Date: 2000/07/04 15:26:00
2541    Tag: blume-20000704-trigger
2542    Description:
2543    
2544    1. Improvements to CM manual.
2545    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
2546       of getting a back-trace.  The function, when called, raises an
2547       internal exception which explicitly carries the full back-trace history,
2548       so it is unaffected by any intervening handle-raise pairs ("trivial"
2549       or not).  The interactive loop will print that history once it arrives
2550       at top level.
2551       Short of having all exceptions implicitly carry the full history, the
2552       recommended way of using this facility is:
2553         - compile your program with instrumentation "on"
2554         - run it, when it raises an exception, look at the history
2555         - if the history is "cut off" because of some handler, go and modify
2556           your program so that it explicitly calls BTrace.trigger
2557         - recompile (still instrumented), and rerun; look at the full history
2558    
2559    ----------------------------------------------------------------------
2560    Name: Matthias Blume
2561    Date: 2000/07/03 15:36:00 JST
2562    Tag: blume-20000702-manual
2563    Description:
2564    
2565    Small corrections and updates to CM manual.
2566    
2567    ----------------------------------------------------------------------
2568    Name: Matthias Blume
2569    Date: 2000/06/29 16:04:00 JST
2570    Tag: blume-20000629-yacctool
2571    Description:
2572    
2573    Changes:
2574    
2575    1. Class "mlyacc" now takes separate arguments to pass options to
2576       generated .sml- and .sig-files independently.
2577    2. Corresponding CM manual updates.
2578    3. BTrace module now also reports call sites.  (However, for loop clusters
2579       it only shows from where the cluster was entered.)  There are associated
2580       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
2581    
2582    ----------------------------------------------------------------------
2583    Name: Matthias Blume
2584    Date: 2000/06/27 16:51:00 JST
2585    Tag: blume-20000627-noweb
2586    Description:
2587    
2588    Changes:
2589    
2590     1. Implemented "subdir" and "witness" options for noweb tool.
2591        This caused some slight internal changes in CM's tool implementation.
2592     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
2593        some remaining issues from earlier path anchor changes.
2594     3. Updated CM manual accordingly.
2595    
2596     4. Changed implementation of back-tracing so that I now consider it
2597        ready for prime-time.
2598    
2599        In particular, you don't have to explicitly trigger the back-trace
2600        anymore.  Instead, if you are running BTrace-instrumented code and
2601        there is an uncaught exception (regardless of whether or not it was
2602        raised in instrumented code), the top-level evalloop will print
2603        the back-trace.
2604    
2605        Features:
2606    
2607          - Instrumented and uninstrumented code work together seemlessly.
2608            (Of course, uninstrumented code is never mentioned in actual
2609             back-traces.)
2610    
2611          - Asymptotic time- and space-complexity of instrumented code is
2612            equal to that of uninstrumented code.  (This means that
2613            tail-recursion is preserved by the instrumentation phase.)
2614    
2615          - Modules whose code has been instrumented in different sessions
2616            work together without problem.
2617    
2618          - There is no penalty whatsoever on uninstrumented code.
2619    
2620          - There is no penalty on "raise" expressions, even in
2621            instrumented code.
2622    
2623        A potential bug (or perhaps it is a feature, too):
2624    
2625          A back-trace reaches no further than the outermost instrumented
2626          non-trivial "raise".  Here, a "trivial" raise is one that is the
2627          sole RHS of a "handle" rule.  Thus, back-traces reach trough
2628    
2629               <exp> handle e => raise e
2630    
2631          and even
2632    
2633               <exp> handle Foo => raise Bar
2634    
2635          and, of course, through
2636    
2637               <exp> handle Foo => ...
2638    
2639         if the exception was not Foo.
2640    
2641         Back-traces always reach right through any un-instrumented code
2642         including any of its "handle" expressions, trivial or not.
2643    
2644       To try this out, do the following:
2645    
2646         - Erase all existing binfiles for your program.
2647           (You may keep binfiles for those modules where you think you
2648            definitely don't need back-tracing.)
2649         - Turn on back-trace instrumentation:
2650              SMLofNJ.Internals.BTrace.mode (SOME true);
2651         - Recompile your program.  (I.e., run "CM.make" or "use".)
2652         - You may now turn instrumentation off again (if you want):
2653              SMLofNJ.Internals.BTrace.mode (SOME false);
2654         - Run your program as usual.  If it raises an exception that
2655           reaches the interactive toplevel, then a back-trace will
2656           automatically be printed.  After that, the toplevel loop
2657           will print the exception history as usual.
2658    
2659    ----------------------------------------------------------------------
2660    Name: Matthias Blume
2661    Date: 2000/06/26 09:56:46 JST
2662    Tag: blume-20000626-setup
2663    Description:
2664    
2665    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
2666          ML code before and after compiling a file (e.g., to set compiler
2667          flags)
2668    
2669    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
2670              - associated changes to btrace.sml (BTrace instrumentation pass)
2671              - cleaner implementation of btimp.sml (BTrace tracing and report
2672                module)
2673    
2674    CM manual: * new path encoding documented
2675               * description of setup-parameter to "sml" added
2676    
2677    The biggest user-visible change to back-tracing is that it is no
2678    longer necessary to compile all traced modules within the same
2679    session.  (This was a real limitation.)
2680    
2681    ----------------------------------------------------------------------
2682    Name: Matthias Blume
2683    Date: 2000/06/24 12:40:00 JST
2684    Tag: blume-20000624-startup
2685    Description:
2686    
2687    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
2688    bit too often -- to put it mildly. :)
2689    
2690    ----------------------------------------------------------------------
2691    Name: Matthias Blume
2692    Date: 2000/06/23 18:20:00 JST
2693    Tag: blume-20000623-btrace
2694    Description:
2695    
2696    This updates adds a backtrace facility to aid programmers in debugging
2697    their programs.  This involves the following changes:
2698    
2699    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
2700       keeping track of the current call stack.  When programs are compiled
2701       in a special mode, the compiler will insert calls to these hooks
2702       into the user program.
2703       "Hook" means that it is possible for different implementations of
2704       back-tracing to register themselves (at different times).
2705    
2706    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
2707       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
2708       It can be turned on using this call:
2709         SMLofNJ.Internals.BTrace.mode (SOME true);
2710       Turning it off again:
2711         SMLofNJ.Internals.BTrace.mode (SOME false);
2712       Querying the current status:
2713         SMLofNJ.Internals.BTrace.mode NONE;
2714       Annotated programs are about twice as big as normal ones, and they
2715       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
2716       where all hooks do nothing).  The slowdown with a plugin that is
2717       actually useful (such as the one supplied by default) is even greater,
2718       but in the case of the default plugin it is still only an constant
2719       factor (amortized).
2720    
2721    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
2722       with a sub-structure BTrace for controlling back-tracing.  In particular,
2723       the above-mentioned function "mode" controls whether the annotation
2724       phase is invoked by the compiler.  Another important function is
2725       "trigger": when called it aborts the current execution and causes
2726       the top-level loop to print a full back-trace.
2727    
2728    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
2729       for back-tracing.  It keeps track of the dynamic call stack and in
2730       addition to that it keeps a partial history at each "level" of that
2731       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
2732       d and b (at separate times, dynamically), then the report will show:
2733    
2734       GOTO   d
2735             /c
2736       GOTO  \b
2737       CALL   a
2738    
2739       This shows that there was an initial non-tail call of a, then a
2740       tail-call to b or c, looping behavior in a cluster of functions that
2741       consist of b and c, and then a goto from that cluster (i.e., either from
2742       b or from c) to d.
2743    
2744       Note that (depending on the user program) the amount of information
2745       that the back-trace module has to keep track of at each level is bounded
2746       by a constant.  Thus, the whole implementation has the same asymptotical
2747       complexity as the original program (both in space and in time).
2748    
2749    5. compiler/TopLevel/interact/evalloop.sml has been modified to
2750       handle the special exception SMLofNJ.Internals.BTrace.BTrace
2751       which is raised by the "trigger" function mentioned above.
2752    
2753    Notes on usage:
2754    
2755    - Annotated code works well together with unannotated code:
2756    Unannotated calls simply do not show up at all in the backtrace.
2757    
2758    - It is not a good idea to let modules that were annotated during
2759    different sessions run at the same time.  This is because the compiler
2760    chooses small integers to identify individual functions, and there
2761    will be clashes if different modules were compiled in separate sessions.
2762    (Nothing will crash, and you will even be told about the clashes, but
2763    back-trace information will in general not be useful.)
2764    
2765    - Back-tracing can be confused by callcc and capture.
2766    
2767    - The only way of getting a back-trace right now is to explicitly
2768    invoke the "trigger" function from your user program.  Eventually, we
2769    should make every exception carry back-trace information (if
2770    available).  But since this creates more overhead at "raise"-time
2771    (similar to the current exnHistory overhead), I have not yet
2772    implemented this.  (The implementation will be rather easy.)  With
2773    exceptions carrying back-trace information, this facility will be even
2774    more useful because users don't need to modify their programs...
2775    
2776    - While it is possible to compile the compiler with back-trace
2777    annotations turned on (I did it to get some confidence in
2778    correctness), you must make absolutely sure that core.sml and
2779    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
2780    be compiled with annotation because there is no core access yet, but
2781    if you compile btimp.sml with annotation, then the system will go into
2782    an infinite recursion and crash.)
2783    Since CM currently does not know about BTrace, the only way to turn
2784    annotations on and off for different modules of the compiler is to
2785    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
2786    this is awkward and clumsy.
2787    
2788    Sample sessions:
2789    
2790    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
2791    - SMLofNJ.Internals.BTrace.mode (SOME true);
2792    [autoloading]
2793    [autoloading done]
2794    val it = false : bool
2795    - structure X = struct
2796    -     fun main n = let
2797    -         fun a (x, 0) = d x
2798    -           | a (x, n) = b (x, n - 1)
2799    -         and b (x, n) = c (x, n)
2800    -         and c (x, n) = a (x, n)
2801    -         and d x = e (x, 3)
2802    -         and e (x, 0) = f x
2803    -           | e (x, n) = e (x, n - 1)
2804    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
2805    -           | f n = n * g (n - 1)
2806    -         and g n = a (n, 3)
2807    -     in
2808    -         f n
2809    -     end
2810    - end;
2811    structure X : sig val main : int -> int end
2812    - X.main 3;
2813    *** BACK-TRACE ***
2814    GOTO   stdIn:4.2-13.20: X.main[2].f
2815    GOTO-( stdIn:4.2-13.20: X.main[2].e
2816    GOTO   stdIn:4.2-13.20: X.main[2].d
2817         / stdIn:4.2-13.20: X.main[2].a
2818         | stdIn:4.2-13.20: X.main[2].b
2819    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2820    CALL   stdIn:4.2-13.20: X.main[2].g
2821    GOTO   stdIn:4.2-13.20: X.main[2].f
2822    GOTO-( stdIn:4.2-13.20: X.main[2].e
2823    GOTO   stdIn:4.2-13.20: X.main[2].d
2824         / stdIn:4.2-13.20: X.main[2].a
2825         | stdIn:4.2-13.20: X.main[2].b
2826    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2827    CALL   stdIn:4.2-13.20: X.main[2].g
2828    GOTO   stdIn:4.2-13.20: X.main[2].f
2829    GOTO-( stdIn:4.2-13.20: X.main[2].e
2830    GOTO   stdIn:4.2-13.20: X.main[2].d
2831         / stdIn:4.2-13.20: X.main[2].a
2832         | stdIn:4.2-13.20: X.main[2].b
2833    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2834    CALL   stdIn:4.2-13.20: X.main[2].g
2835    GOTO   stdIn:4.2-13.20: X.main[2].f
2836    CALL   stdIn:2.15-17.4: X.main[2]
2837    -
2838    
2839    (Note that because of a FLINt bug the above code currently does not
2840    compile without BTrace turned on.)
2841    
2842    Here is another example, using my modified Tiger compiler:
2843    
2844    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
2845    - SMLofNJ.Internals.BTrace.mode (SOME true);
2846    [autoloading]
2847    [autoloading done]
2848    val it = false : bool
2849    - CM.make "sources.cm";
2850    [autoloading]
2851    ...
2852    [autoloading done]
2853    [scanning sources.cm]
2854    [parsing (sources.cm):parse.sml]
2855    [creating directory CM/SKEL ...]
2856    [parsing (sources.cm):tiger.lex.sml]
2857    ...
2858    [wrote CM/sparc-unix/semant.sml]
2859    [compiling (sources.cm):main.sml]
2860    [wrote CM/sparc-unix/main.sml]
2861    [New bindings added.]
2862    val it = true : bool
2863    - Main.compile ("../testcases/merge.tig", "foo.out");
2864    *** BACK-TRACE ***
2865    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
2866    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2867    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
2868    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
2869    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2870    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2871    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
2872         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
2873    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
2874    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2875    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
2876    CALL   main.sml:1.18-118.4: Main.compile[2]
2877    -
2878    
2879    ----------------------------------------------------------------------
2880    Name: Matthias Blumen
2881    Date: 2000/06/21 18:00:00 JST
2882    Tag: blume-20000621-manual
2883    Description:
2884    
2885    CM manual update: Path environments documented.
2886    
2887    ----------------------------------------------------------------------
2888    Name: Matthias Blume
2889    Date: 2000/06/19 13:40:00
2890    Tag: blume-20000619-manual
2891    Description:
2892    
2893    CM manual and system/README update.  This only covers the fact that
2894    there are no more implicit anchors.  (Path environments and the "bind"
2895    option to "cm" have yet to be documented.)
2896    
2897    ----------------------------------------------------------------------
2898    Name: Matthias Blume
2899    Date: 2000/06/19 11:05:00 JST
2900    Tag: blume-20000619-chdir-bugfix
2901    Description:
2902    
2903    Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
2904    
2905    ----------------------------------------------------------------------
2906    Name: Matthias Blume
2907    Date: 2000/06/18 22:00:10 JST
2908    Tag: blume-20000618-implicit-anchors-really-gone
2909    Description:
2910    
2911    I updates the previous HISTORY entry where I forgot to mention that
2912    implicit anchors are no longer with us.
2913    
2914    The current update also gets rid of the (now useless) controller
2915    CM.Control.implicit_anchors.
2916    
2917    ----------------------------------------------------------------------
2918    Name: Matthias Blume
2919    Date: 2000/06/16 17:30:00 JST
2920    Tag: blume-20000616-anchorenv
2921    Description:
2922    
2923    This patch implements the long anticipated (just kidding :) "anchor
2924    environment" mechanism.  In the course of doing this, I also
2925    re-implemented CM's internal "SrcPath" module from scratch.  The new
2926    one should be more robust in certain boundary cases.  In any case, it
2927    is a lot cleaner than its predecessor (IMHO).
2928    
2929    This time, although there is yet another boot file format change, I
2930    kept the unpickler backward-compatible.  As a result, no new bootfiles
2931    are necessary and bootstrapping is straightforward.  (You cannot read
2932    new bootfiles into an old system, but the other way around is no
2933    problem.)
2934    
2935    Visible changes:
2936    
2937    ** 0. Implicit path anchors (without the leading $-symbol) are no
2938    longer recognized at all. This means that such path names are not
2939    illegal either.  For example, the name basis.cm simply refers to a
2940    local file called "basis.cm" (i.e, the name is an ordinary path
2941    relative to .cm-files directory).  Or, to put it differently, only
2942    names that start with $ are anchored paths.
2943    
2944    ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
2945    vanished.
2946    
2947    John (Reppy) had critizised this as soon as I originally proposed and
2948    implemented it, but at that time I did not really deeply believe
2949    him. :) Now I came full-circle because I need the $<singlearc> syntax
2950    in another place where it cannot be seen as an abbreviation for
2951    $/<singlearc>.  To avoid the confusion, $<singlearc> now means what it
2952    seems to mean (i.e., it "expands" into the corresponding anchor
2953    value).
2954    
2955    However, when paths are used as members in CM description files, it
2956    continues to be true that there must be at least another arc after the
2957    anchor.  This is now enforced separately during semantic analysis
2958    (i.e., from a lexical/syntactical point of view, the notation is ok.)
2959    
2960    ** 2. The "cm" class now accepts an option "bind".  The option's value
2961    is a sub-option list of precisely two items -- one labeled "anchor"
2962    and the other one labeled "value".  As you might expect, "anchor" is
2963    used to specify an anchor name to be bound, and "value" specifies what
2964    the anchor is being bound to.
2965    
2966    The value must be a directory name and can be given in either standard
2967    syntax (including the possibility that it is itself an anchored path)
2968    or native syntax.
2969    
2970    Examples:
2971    
2972       foo.cm (bind:(anchor:bar value:$mystuff/bar))
2973       lib.cm (bind:(anchor:a value:"H:\\x\\y\\z"))  (* only works under windows *)
2974    
2975    and so on.
2976    
2977    The meaning of this is that the .cm-file will be processed with an
2978    augmented anchor environment where the given anchor(s) is/are bound to
2979    the given values(s).
2980    
2981    The rationale for having this feature is this: Suppose you are trying
2982    to use two different (already stable) libraries a.cm and b.cm (that
2983    you perhaps didn't write yourself).  Further, suppose each of these
2984    two libraries internally uses its own auxiliary library $aux/lib.cm.
2985    Normally you would now have a problem because the anchor "lib" can not
2986    be bound to more than one value globally.  Therefore, the project that
2987    uses both a.cm and b.cm must locally redirect the anchor to some other
2988    place:
2989    
2990       a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
2991       b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
2992    
2993    This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
2994    /usr/lib/smlnj/b-stuff/aux.cm, respectively.
2995    
2996    Hard-wiring path names is a bit inflexible (and CM will verbosely warn
2997    you when you do so at the time of CM.stabilize).  Therefore, you can
2998    also use an anchored path as the value:
2999    
3000      a.cm (bind:(anchor:lib value:$a-lib))
3001      b.cm (bind:(anchor:lib value:$b-lib))
3002    
3003    Now you can globally configure (using the usual CM.Anchor.anchor or
3004    pathconfig machinery) bindings for "a-lib" and "b-lib".  Since "lib"
3005    itself is always locally bound, setting it globally is no longer
3006    meaningful or necessary (but it does not hurt either).  In fact, "lib"
3007    can still be used as a global anchor for separate purposes.  As a
3008    matter of fact, one can locally define "lib" in terms of a global
3009    "lib":
3010    
3011      a.cm (bind:(anchor:lib value:$lib/a))
3012      b.cm (bind:(anchor:lib value:$lib/b))
3013    
3014    ** 3: The encoding of path names has changed.  This affects the way
3015    path names are shown in CM's progress report and also the internal
3016    protocol encoding used for parallel make.
3017    
3018    The encoding now uses one or more ':'-separated segments.  Each
3019    segments corresponds to a file that has been specified relative to the
3020    file given by its preceding segment.  The first segment is either
3021    relative to the CWD, absolute, or anchored.  Each segment itself is
3022    basically a Unix pathname; all segments but the first are relative.
3023    
3024    Example:
3025    
3026       $foo/bar/baz.cm:a/b/c.sml
3027    
3028    This path denotes the file bar/a/b/c.sml relative to the directory
3029    denoted by anchor "foo".  Notice that the encoding also includes
3030    baz.cm which is the .cm-file that listed a/b/c.sml.  As usual, such
3031    paths are resolved relative to the .cm-files directory, so baz.cm must
3032    be ignored to get the "real" pathname.
3033    
3034    To make this fact more obvious, CM puts the names of such "virtual
3035    arcs" into parentheses when they appear in progress reports. (No
3036    parentheses will appear in the internal protocol encoding.)  Thus,
3037    what you really see is:
3038    
3039      $foo/bar/(baz.cm):a/b/c.sml
3040    
3041    I find this notation to be much more informative than before.
3042    
3043    Another new feature of the encoding is that special characters
3044    including parentheses, colons, (back)slashes, and white space are
3045    written as \ddd (where ddd is the decimal encoding of the character).
3046    
3047    *** The CM manual still needs to be updated.
3048    
3049    ----------------------------------------------------------------------
3050    Name: Allen Leung
3051    Date: 2000/06/15 00:38:00
3052    Tag: leunga-20000615-x86-peephole
3053    
3054    x86 Peephole fix by Fermin.  Affects c-- and moby only.
3055    
3056    ----------------------------------------------------------------------
3057    Name: Matthias Blume
3058    Date: 2000/06/12 11:40:00
3059    Tag: blume-20000612-parmakefix
3060    Description:
3061    
3062    More cleanup after changing the file naming scheme: This time I
3063    repaired the parallel make mechanism for CMB.make which I broke earlier.
3064    
3065    ----------------------------------------------------------------------
3066    Name: Allen Leung
3067    Date: 2000/06/09 01:25:00
3068    Tag: leunga-20000609-various
3069    
3070    None of these things should affect normal SML/NJ operations
3071    
3072    1. Peephole improvements provided by Fermin (c--)
3073    2. New annotation DEFUSE for adding extra dependence (moby)
3074    3. New X86 LOCK instructions (moby)
3075    4. New machine description language for reservation tables (scheduling)
3076    5. Fixes to various optimization/analysis modules (branch chaining, dominator
3077       trees etc.)
3078    6. I've changed the CM files so that they can work with versions
3079       110.0.6, 110.25 and 110.28
3080    
3081    ----------------------------------------------------------------------
3082    Name: Matthias Blume
3083    Date: 2000/06/09 12:40:00
3084    Tag: blume-20000609-log
3085    Description:
3086    
3087    - Removed all(?) remaining RCS Log entries from sources.
3088    
3089    - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
3090      anchored paths).
3091    
3092    ----------------------------------------------------------------------
3093    Name: Matthias Blume
3094    Date: 2000/06/07 17:00:00 JST
3095    Tag: blume-20000607-no-implicit-anchors
3096    Description:
3097    
3098    1. This update changes the default setting for
3099    CM.Control.implicit_anchors from true to false.  This means that
3100    implicit anchors are no longer permitted by default.  I also tried to
3101    make sure that nothing else still relies on implicit anchors.
3102    (This is the next step on the schedule towards a CM that does not even
3103    have the notion of implicit anchors anymore.)
3104    
3105    2. More CM manual updates.
3106    
3107    3. I managed to track down and fix the pickling bug I mentioned last
3108    time.  Because of the previously existing workaround, this entails no
3109    immediate practical changes.
3110    
3111    ----------------------------------------------------------------------
3112    Name: Matthias Blume
3113    Date: 2000/06/06 11:15:00 JST
3114    Tag: blume-20000606-lazierpickle
3115    Description:
3116    
3117    !!!! NEW BOOT FILES !!!!
3118    
3119    * The main purpose of this update is to make library pickles lazier in
3120    order to reduce the initial space penalty for autoloading a library.
3121    As a result, it is now possible to have $smlnj/compiler.cm
3122    pre-registered.  This should take care of the many complaints or
3123    inquiries about missing structure Compiler.  This required changes to
3124    CM's internal data structures and small tweaks to some algorithms.
3125    
3126    As a neat additional effect, it is no longer necessary (for the sake
3127    of lean heap image files) to distinguish between a "minimal" CM and a
3128    "full" CM.  Now, there is only one CM (i.e., the "full" version:
3129    $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
3130    interactive top level. ($smlnj/cm/minimal.cm is gone.)
3131    
3132    To make the life of compiler-hackers easier, "makeml" now also
3133    pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm).  In other
3134    words, after you bootstrap a new sml for the first time, you will not
3135    have to autoload $smlnj/cmb.cm again afterwards.  (The first time
3136    around you will still have to do it, though.)
3137    
3138    * A second change consists of major updates to the CM manual.  There
3139    are now several appendices with summary information and also a full
3140    specification of the CM description file syntax.
3141    
3142    * In directory src/system I added the script "allcross".  This script
3143    invokes sml and cross-compiles the compiler for all supported
3144    architectures.  (Useful when providing a new set of boot files.)
3145    
3146    * There seems to be a latent bug in my "lazy pickles" mechanism.  I
3147    added a small tweak to pickle-util.sml to work around this problem,
3148    but it is not a proper fix yet.  I will investigate further.  (The
3149    effect of the bug was an inflation of library pickle size.)
3150    
3151    * Version number increased to 110.28.1 (to avoid compatibility problems).
3152    
3153    ----------------------------------------------------------------------
3154    Name: Allen Leung
3155    Date: 2000/05/25 17:28 EDT
3156    Tag: leunga-20000525-ra
3157    Description:
3158    
3159      Fixed a bug in freezing phase of the register allocator.
3160    
3161    ----------------------------------------------------------------------
3162    Name: Allen Leung
3163    Date: 2000/05/15 22:53 EDT
3164    Tag: leunga-20000515-alpha-x86-ra
3165    Description:
3166    
3167      1. Alpha
3168    
3169          Slight cleanup.  Removed the instruction SGNXL
3170    
3171      2. X86
3172    
3173          Added the following instructions to the instruction set:
3174    
3175            ROLx, RORx,
3176            BTx, BTSx, BTLx, BTRx,
3177            XCHGx, and variants with the LOCK prefix
3178    
3179      3. Register Allocation
3180    
3181          The module ra-rewrite-with-renaming has been improved.
3182    
3183      These have no effect on SML/NJ.
3184    
3185    ----------------------------------------------------------------------
3186    Name: Matthias Blume
3187    Date: 2000/05/15 16:20:00 JST
3188    Tag: blume-20000515-lightrebuild
3189    Description:
3190    
3191    1. I added an alternative to "-rebuild" to "makeml".  The difference is
3192       that prior to calling CMB.make' the CM-variable "LIGHT" will be
3193       defined.  In effect, the command will not build any cross-compiler
3194       backends and therefore finish more quickly.
3195    
3196       The "fixpt" script also takes a "-light" switch to be able to use
3197       this new facility while compiling for a fixpoint.
3198    
3199    2. I replaced all mentions of anchored paths in group owner specifications
3200       with simple relative paths (usually starting with "..").
3201       The rationale is that a library's internal workings should not be
3202       compromised by the lack of some anchor.  (An anchor is necessary
3203       for someone who wants to refer to the library by an anchored path,
3204       but it should not be necessary to build the same library in the first
3205       place.)
3206    
3207    3. I changed the way CM's tool mechanism determines the shell command
3208       string used for things like ml-yacc etc. so that it does not break
3209       when CM.Control.implicit_anchors is turned off.
3210    
3211    ----------------------------------------------------------------------
3212    Name: Matthias Blume
3213    Date: 2000/05/12 18:20:00 JST
3214    Tag: blume-20000512-ml-build
3215    Description:
3216    
3217    Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from
3218    getting installed properly (by config/install.sh).
3219    
3220    ----------------------------------------------------------------------
3221    Name: Matthias Blume
3222    Date: 2000/05/12 17:30:00 JST
3223    Tag: blume-20000512-anchors
3224    Description:
3225    
3226    !!! NEW BOOT FILES !!!
3227    
3228    This change is in preparation of fading out support for "implicitly
3229    anchored path names".  I went through all sources and used the
3230    explicit (and relatively new) $-notation.  See system/README and the
3231    CM manual for more info on this.
3232    
3233    I also modified the anchoring scheme for some things such as "smlnj",
3234    "MLRISC", "cm", etc. to take advantage of the fact that explicit
3235    anchors are more expressive: anchor name and first arc do not have to
3236    coincide.  This entails the following user-visible change:
3237    
3238    You have to write $smlnj/foo/bar instead of smlnj/foo/bar.  In
3239    particular, when you fire up sml with a command-line argument, say,
3240    e.g.:
3241    
3242       sml '$smlnj/cmb.cm'
3243    
3244    At the ML toplevel prompt:
3245    
3246       CM.autoload "$smlnj/cmb.cm";
3247    
3248    There is also a new controller in CM.Control that can be used to turn
3249    off all remaining support for implicit anchors by saying:
3250    
3251        CM.autoload "$smlnj/
3252        #set CM.Control.implicit_anchors false;
3253    
3254    This causes CM to reject implicitly anchored paths.  This is (for the
3255    time being) less permissive than the "final" version where there will
3256    be no more such implicit anchors and relative paths will be just that:
3257    relative.
3258    
3259    The next step (version after next version?) will be to make the
3260    default for CM.Control.implicit_anchors false.  After the dust has
3261    settled, I can then produce the "final" version of this...
3262    
3263    Note: Since bootstrapping is a bit tricky, I provided new boot files.
3264    
3265    ----------------------------------------------------------------------
3266    Name: Matthias Blume
3267    Date: 2000/05/11 16:30:00 JST
3268    Tag: blume-20000511-sources
3269    Description:
3270    
3271    The main change is that I added function CM.sources as a generalized
3272    version of the earlier CM.makedepend.  This entails the following
3273    additional changes:
3274    
3275      - CM.makedepend has been dropped.
3276    
3277      - CM manual has been updated.
3278    
3279      - TOOLS signature and API have been changed.
3280    
3281    ----------------------------------------------------------------------
3282    Name: Allen Leung
3283    Date: 2000/05/10 21:17 EDT
3284    Tag: leunga-20000510-moby-c--ssa
3285    Description:
3286    
3287      Various bug fixes and new features for C--, Moby and MLRISC optimizations.
3288    None of these affect SML/NJ.
3289    
3290    1. Register Allocation
3291    
3292        a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented.
3293           This module tries to remove local (i.e. basic block level) redundancies
3294           during spilling.
3295    
3296        b. A new framework for performing region based register allocation.
3297           Not yet entirely functional.
3298    
3299    2. X86
3300    
3301       a. DefUse for POP was missing the stack pointer [found by Lal]
3302       b. Reload for CALL was incorrect in X86Spill [found by John]
3303       c. Various fixes in X86Spill so that it can be used correctly for
3304          the new spilling module.
3305    
3306    3. SSA/IR
3307    
3308       a. New module ir/dj-dataflow.sml implements elimination based
3309          data flow analysis.
3310    
3311    4. MLRiscGen
3312    
3313       a. Fix for gc type annotation
3314    
3315    5. MDGen
3316    
3317       Various fixes for machine description -> ml code translation.  For ssa
3318       only.
3319    
3320    ----------------------------------------------------------------------
3321    Name: Allen Leung
3322    Date: 2000/05/08 22:17 EDT
3323    Tag: leunga-20000508-labexp
3324    Description:
3325    
3326      Fermin has found a few assembly problems with constant expressions
3327      generated in LabelExp.  Mostly, the problems involve extra parentheses,
3328      which choke on dumb assemblers.  This is his fix.
3329    
3330    ----------------------------------------------------------------------
3331    Name: Dave MacQueen
3332    Date: 2000/04/09 14:00 EDT
3333    Tag: dbm-20000502-Version_110_28
3334    Description:
3335    
3336    1. Updated src/compiler/TopLevel/main/version.sml to version 110.28
3337    
3338    2. Updated config/version to 110.28
3339    
3340    3. Updated config/srcarchiveurl
3341    
3342    3. New boot files!
3343       ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/
3344    
3345    ----------------------------------------------------------------------
3346    Name: Matthias Blume
3347    Date: 2000/05/01 19:05:00 JST
3348    Tag: blume-20000501-noweb
3349    Description:
3350    
3351    A new noweb tool has been added.  The existing system is entirely
3352    unaffected by this, but some CM users have asked for renewed noweb
3353    support.  Everything is documented in the CM manual.
3354    
3355    New (plugin) libraries:
3356    
3357       noweb-tool.cm
3358       nw-ext.cm
3359    
3360    ----------------------------------------------------------------------
3361    Name: Dave MacQueen
3362    Date: 2000/04/30 12:40PM EDT
3363    Tag: dbm-20000430-bug_fixes
3364    Description:
3365    
3366    1. Fix for bug 1498
3367       smlnj/src/system/Basis/Implementation/Unsafe/object.sig
3368       smlnj/src/system/Basis/Implementation/Unsafe/object.sml
3369         added toRealArray function
3370       smlnj/src/compiler/MiscUtil/print/ppobj.sml
3371         added check for tag Obj.RealArray to array printing case in ppObj
3372    
3373    2. Fix for bug 1510
3374       smlnj/src/compiler/Semant/types/typesutil.sml
3375         fixed definition of dummyargs (used by equalTycon) so that
3376         dummy args are distinct types
3377    
3378    ----------------------------------------------------------------------
3379    Name: Matthias Blume
3380    Date: 2000/04/30 01:00:00 JST
3381    Tag: blume-20000430-versions
3382    Description:
3383    
3384    1. CM version numbering added.  This is an implementation of Lal's
3385       proposal for adding version numbers and version checking to .cm
3386       files.  Lal said that his proposal was just that -- a proposal.
3387       For the time being I went ahead and implemented it so that people
3388       can comment on it.  Everything is completely backward-compatible
3389       (except for the stable library format, i.e., new bootfiles!).
3390    
3391       As usual, see the CM manual for details.
3392    
3393    2. An alternative syntax for anchored paths has been implemented.
3394       Dave has recently voiced the same concerns that I had when I did
3395       this, so there should be some support.  My take is that eventually
3396       I will let support for the current syntax (where anchors are
3397       "implicit") fade out in favor of the new, explicit syntax.
3398       In order to be backward-compatible, both old and new syntax are
3399       currently supported.
3400    
3401       Again, see the CM manual for details.
3402    
3403    3. Parallel make is trying to be slightly smarter:  When the master
3404       process finds a "bottleneck", i.e., when there is only one
3405       compilation unit that can be compiled and everybody else is
3406       waiting on it, then it will simply compile it directly instead
3407       of clumsily telling one of the slaves to do it.
3408    
3409    4. Support for "unsharing" added.  This is necessary in order to be
3410       able to have two different versions of the same library running
3411       at the same time (e.g., for trying out a new MLRISC while still
3412       having the old MLRISC linked into the current compiler, etc.)
3413       See the CM manual.
3414    
3415    5. Simple "makedepend" functionality added for generating Makefile
3416       dependency information.  (This is rather crude at the moment.
3417       Expect some changes here in the future.)
3418    
3419    6. ".fun" added as a recognized suffix for ML files. Also documented
3420       explicitly in the manual that the fallback behavior (unknown suffix
3421       -> ML file) is not an official feature!
3422    
3423    7. Small changes to the pickler for stable libraries.
3424    
3425    8. Several internal changes to CM (for cleanup/improvement).
3426    
3427    
3428    !!!! NEW BINFILES !!!!
3429    
3430    ----------------------------------------------------------------------
3431    Name: Matthias Blume
3432    Date: 2000/04/28 17:30:00 JST
3433    Tag: blume-20000428-pathconfig
3434    Description:
3435    
3436    1. I changed config/install.sh to remove duplicate entries from the
3437       lib/pathconfig file at the end.  Moreover, the final version of
3438       lib/pathconfig is sorted alphabetically.  The same (sorting) is done
3439       in src/system/installml.
3440    
3441    2. The config/install.sh script now consistently uses relative
3442       pathnames in lib/pathconfig whenever the anchor is in the lib
3443       directory.  (So far this was true for the libraries that come
3444       pre-compiled and bundled as part of the bootfiles but not for
3445       libraries that are compiled by the script itself.)
3446    
3447    ----------------------------------------------------------------------
3448    Name: Matthias Blume
3449    Date: 2000/04/26 13:10:00 JST
3450    Tag: blume-20000426-fun_suffix
3451    Description:
3452    
3453    Added ".fun" as a recognized file name suffix (for ML code).
3454    
3455    ----------------------------------------------------------------------
3456    Name: Allen Leung
3457    Date: 2000/04/25 17:00:00 EST
3458    Tag: leunga-20000425-alpha-ra
3459    Description:
3460    
3461    1. Alpha
3462    
3463        PSEUDOARITH was missing in AlphaRewrite.  This causes an endless loop
3464    in C--.
3465    
3466    2. RA
3467    
3468       Added a flag "ra-dump-size" to print out the size of the flowgraph
3469       and the interference graph.
3470    
3471    ----------------------------------------------------------------------
3472    Name: Dave MacQueen
3473    Date: 2000/04/25/
3474    Tag: dbm-20000425-mlyacc_doc_examples
3475    Description:
3476      Updated mlyacc.tex sections 5 and 7 for SML '97 and CM.
3477      Updated all three examples in src/ml-yacc/examples to run
3478      under 110.* using CM.make.
3479    
3480    ----------------------------------------------------------------------
3481    Name: Allen Leung
3482    Date: 2000/04/20 23:04:00 EST
3483    Tag: leunga-20000420-ssa-c---stuff
3484    Description:
3485    
3486      This update synchronizes my repository with Yale's.  Most of these
3487    changes, however, do not affect SML/NJ at all (the RA is an exception).
3488    
3489    1. Register Allocator
3490    
3491       a. An improvement in the interference graph construction:
3492          Given a copy
3493    
3494                s <- t
3495    
3496          no interference edge between s and t is added for this definition of s.
3497    
3498       b. I've added two new spill heuristic modules that Fermin and I developed
3499          (in the new library RA.cm). These are unused in SML/NJ but maybe
3500          useful for others (Moby?)
3501    
3502    2. X86
3503    
3504       a. Various fixes in the backend provided by Fermin [C--] and Lal.
3505    
3506    3. Alpha
3507    
3508       a. Added the BSR instruction and code generation that goes with it [C--]
3509       b. Other fixes too numerous to recount provided by Fermin [C--]
3510    
3511    4. Regmaps
3512    
3513       a. The regmaps are not initialized with the identity physical bindings
3514          at creation time.  This is unneeded.
3515    
3516    5. MLRISC Optimizations
3517    
3518       a. The DJ-Graph module can now compute the iterated dominance frontiers
3519          intersects with liveness incrementally in linear time! Woohoo!
3520          This is now used in my new SSA construction algorithm.
3521    
3522       b. THe branch reorganization module is now smarter about linear chains of
3523          basic blocks.
3524    
3525    
3526    ----------------------------------------------------------------------
3527    Name: Matthias Blume
3528    Date: 2000/04/12 13:52:00 JST
3529    Tag: blume_main_v110p27_1
3530    Description:
3531    
3532    Changed install.sh script to handle archive files without version number
3533    and to use "boot.<arch>-<os>" instead of "sml.boot.<arch>-<os>" for the
3534    name of the boot file archive.
3535    
3536    ----------------------------------------------------------------------
3537    Name: Dave MacQueen
3538    Date: 2000/04/09 14:00 EDT
3539    Tag: dbm-20000410-Version_110_27
3540    Description:
3541    
3542    1. Updated src/compiler/TopLevel/main/version.sml to version 110.27
3543    
3544    2. Updated src/config/version to 110.27
3545    
3546    3. New boot files!
3547    
3548  ----------------------------------------------------------------------  ----------------------------------------------------------------------
3549  Name: Allen Leung  Name: Allen Leung
3550  Date: 2000/04/09 19:09:00 EST  Date: 2000/04/09 19:09:00 EST
# Line 107  Line 3641 
3641    
3642  3.  Assembly  3.  Assembly
3643    
3644      When generating assemby, resolve the value of client defined constants,      When generating assembly, resolve the value of client defined constants,
3645      instead of generating symbolic values.  This is controlled by the      instead of generating symbolic values.  This is controlled by the
3646      new flag "asm-resolve-constants", which is default to true.      new flag "asm-resolve-constants", which is default to true.
3647    
# Line 130  Line 3664 
3664    
3665  To this end, I arranged that instead of "structure Core" as "structure  To this end, I arranged that instead of "structure Core" as "structure
3666  _Core" is bound in the pervasive environment.  Core access is done via  _Core" is bound in the pervasive environment.  Core access is done via
3667  _Core (which can never be accidentially rebound because _Core is not a  _Core (which can never be accidentally rebound because _Core is not a
3668  legal surface-syntax symbol).  legal surface-syntax symbol).
3669    
3670  The current solution is much cleaner because the core environment is  The current solution is much cleaner because the core environment is
# Line 140  Line 3674 
3674  with dynamic and symbolic parts of the core environment.  with dynamic and symbolic parts of the core environment.
3675    
3676  Remaining hackery (to bind the "magic" symbol _Core) is localized in the  Remaining hackery (to bind the "magic" symbol _Core) is localized in the
3677  compilation mananger's bootstrap compiler (actually: in the "init group"  compilation manager's bootstrap compiler (actually: in the "init group"
3678  handling).  See the comments in src/system/smlnj/init/init.cmi for  handling).  See the comments in src/system/smlnj/init/init.cmi for
3679  more details.  more details.
3680    
# Line 255  Line 3789 
3789     (specified in the .cm file at each instance where the tool's class is     (specified in the .cm file at each instance where the tool's class is
3790     used).     used).
3791    
3792     This was done to accomodate the new "make" and "shell" tools which     This was done to accommodate the new "make" and "shell" tools which
3793     facilitate fairly seemless hookup to portions of code managed using     facilitate fairly seamless hookup to portions of code managed using
3794     Makefiles or Shell scripts.     Makefiles or Shell scripts.
3795    
3796     There are no classes "shared" or "private" anymore.  Instead, the     There are no classes "shared" or "private" anymore.  Instead, the
# Line 268  Line 3802 
3802    
3803     All existing tools are described in the CM manual.     All existing tools are described in the CM manual.
3804    
3805     - Slightly better error handling.  (CM now surpresses many followup     - Slightly better error handling.  (CM now suppresses many followup
3806     error messages that tended to be more annoying than helpful.)     error messages that tended to be more annoying than helpful.)
3807    
3808  2. Major changes to the compiler's static environment data structures.  2. Major changes to the compiler's static environment data structures.
# Line 299  Line 3833 
3833       elaborator). There were a lot of changes during my "linkpath" trials       elaborator). There were a lot of changes during my "linkpath" trials
3834       that could have been reverted to their original state but weren't.       that could have been reverted to their original state but weren't.
3835       Please, don't be too harsh on me for messing with this code a bit more       Please, don't be too harsh on me for messing with this code a bit more
3836       than what was strictly necessary...  (I _did_ resist the tempation       than what was strictly necessary...  (I _did_ resist the temptation
3837       of doing any "global reformatting" to avoid an untimely death at       of doing any "global reformatting" to avoid an untimely death at
3838       Dave's hands. :)       Dave's hands. :)
3839    
# Line 402  Line 3936 
3936    
3937       I've changed andl to testl in the floating point test sequence       I've changed andl to testl in the floating point test sequence
3938       whenever appropriate.  The Intel optimization guide states that       whenever appropriate.  The Intel optimization guide states that
3939       testl is perferable to andl.       testl is preferable to andl.
3940    
3941  7. RA (x86 only)  7. RA (x86 only)
3942    
# Line 584  Line 4118 
4118    
4119  1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an  1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
4120  additional argument called "template" which is an optional string that  additional argument called "template" which is an optional string that
4121  specifiel the layout of the tool command line.  See the CM manual for  specifies the layout of the tool command line.  See the CM manual for
4122  explanation.  explanation.
4123    
4124  2. A special-purpose tool can be "regisitered" by simply dropping the  2. A special-purpose tool can be "registered" by simply dropping the
4125  corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same  corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
4126  directory where the .cm file lives that uses this tool.  (The  directory where the .cm file lives that uses this tool.  (The
4127  behavior/misfeature until now was to look for the tool description  behavior/misfeature until now was to look for the tool description
#