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

SCM Repository

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

Diff of /sml/trunk/HISTORY

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

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