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

Legend:
Removed from v.799  
changed lines
  Added in v.1259

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