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