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

Legend:
Removed from v.653  
changed lines
  Added in v.1055

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