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

Legend:
Removed from v.757  
changed lines
  Added in v.1337

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