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