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 1066, Thu Feb 14 16:50:02 2002 UTC revision 1334, Thu May 22 22:46:30 2003 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Matthias Blume (blume@tti-c.org)
17    Date: 2003/05/21 17:45:00 CDT
18    Tag: blume-20030517-complete
19    Description:
20    
21    Two changes:
22    
23      1. Added a flag for controlling whether non-exhaustive bindings will
24         be treated as errors (default is false).
25      2. Cleaned up the *entire* source tree so that CMB.make goes through
26         without a single non-exhaustive match- or bind warning.
27    
28    ----------------------------------------------------------------------
29    Name: Matthias Blume (blume@tti-c.org)
30    Date: 2003/05/17 10:20:00 CDT
31    Tag: blume-20030517-absyn
32    Description:
33    
34    1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
35    
36       This mainly affects the quality of error messages.  However, some
37       of the code is now more straightforward than before. (Treatment of
38       the above four constructs in translate.sml is much simpler than
39       the "macro-expansion" that was going on before.  Plus, the mach-
40       compiler no longer gets invoked just to be able to compile an
41       if-expression.)
42    
43    2. The ErrorMsg.Error exception is now caught and absorbed by the
44       interactive loop.
45    
46    ----------------------------------------------------------------------
47    Name: Allen Leung
48    Date: 2003/05/16 13:05:00 CDT
49    Tag: leunga-20030516-cygwin-runtime
50    Description:
51    
52        Ported the runtime system to cygwin, which uses the unix
53    x86-unix bin files.  Missing/buggy features:
54    
55       o getnetbyname, getnetbyaddr: these functions seem to be missing in
56         the Cygwin library.
57       o Ctrl-C handling may be flaky.
58       o Windows system calls and Windows I/O are not supported.
59    
60       A new set of binfiles is located at:
61    
62         http://www.dorsai.org/~leunga/boot.x86-unix.tgz
63    
64       This is only needed for bootstrapping the cygwin version of smlnj.
65       Other x86 versions can use the existing binfiles.
66    
67    ----------------------------------------------------------------------
68    Name: Matthias Blume
69    Date: 2003/04/08 15:42:00 CDT
70    Tag: blume-20030408-listpair
71    Description:
72    
73    1. Added a target 'mlrisc' to installer.
74    
75    2. Added missing elements to structure ListPair.
76    
77    ----------------------------------------------------------------------
78    Name: Allen Leung
79    Date: 2003/01/07 10:40:00 EST
80    Tag: leunga-20030107-int-rem
81    Description:
82    
83    Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86.
84    The arguments to the SUBL instruction were swapped.
85    
86    ----------------------------------------------------------------------
87    Name: Matthias Blume
88    Date: 2002/12/12 16:25:00 EST
89    Tag: blume-20021212-risc-ra
90    Description:
91    
92    Fixed a serious bug in the rewrite code for FP spilling/reloading that
93    sent the RA into an infinite loop when floating point registers get
94    spilled.  (Because of this bug, e.g., nucleic stopped compiling between
95    110.37 and 110.38.)
96    There was another set of potential problems related to the handling of
97    MLRISC annotations (but those did not yet cause real problems, apparently).
98    
99    ----------------------------------------------------------------------
100    Name: Matthias Blume
101    Date: 2002/12/06 22:40:00 EST
102    Tag: blume-20021206-cm-fileid
103    Description:
104    
105    Added a call of SrcPath.sync at the beginning of Parse.parse (in CM).
106    This fixes the problem of CM getting confused by files that suddenly
107    change their identity (e.g., by getting unlinked and recreated by some
108    text editor such as vi).  There might be a better/cheaper/cleaner way
109    of doing this, but for now this will have to do.
110    
111    ----------------------------------------------------------------------
112    Name: Matthias Blume
113    Date: 2002/10/28 09:50:00 EST
114    Tag: blume-20021028-typecheck
115    Description:
116    
117    Exported structure Typecheck from $smlnj/viscomp/core.cm.
118    
119    ----------------------------------------------------------------------
120    Name: Matthias Blume
121    Date: 2002/10/17 09:10:00 EDT
122    Tag: Release_110_42
123    Description:
124    
125    In good old tradition, there has been a slight hiccup so that we have
126    to patch 110.42 after the fact.   The old release tag has been replaced
127    (see below).
128    
129    The change solves a problem with two competing approaches the
130    configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in
131    each other's way.
132    
133    This change only affects the runtime system code and the installer script.
134    (No new bootfiles.)
135    
136    ----------------------------------------------------------------------
137    Name: Matthias Blume
138    Date: 2002/10/16 12:00:00 EDT
139    Tag: Release_110_42_removed
140    Description:
141    
142    New working release.  New bootfiles.
143    
144    ----------------------------------------------------------------------
145    Name: Matthias Blume
146    Date: 2002/10/10 13:10:00 EDT
147    Tag: blume-20021010-ppc-divs
148    Description:
149    
150    The mltree operator DIVS must be implemented with an overflow check on
151    the PPC because the hardware indicates divide-by-zero using "overflow" as
152    well.
153    
154    ----------------------------------------------------------------------
155    Name: Matthias Blume
156    Date: 2002/07/23 11:45:00
157    Tag: blume-20020723-smlnj-home
158    Description:
159    
160    Sml now senses the SMLNJ_HOME environment variable.  If this is set,
161    then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless
162    CM_PATHCONFIG is also set), the path configuration file is assumed
163    to be in $SMLNJ_HOME/lib/pathconfig.  This way one can easily move
164    the entire tree to some other place and everything will "just work".
165    
166    (Companion commands such as ml-build and ml-makedepend also sense this
167    variable.)
168    
169    ----------------------------------------------------------------------
170    Name: Matthias Blume
171    Date: 2002/07/12 21:19:00 EDT
172    Tag: blume-20020712-liveness
173    Description:
174    
175    Exported two useful "step" functions from liveness module (MLRISC).
176    
177    ----------------------------------------------------------------------
178    Name: Matthias Blume
179    Date: 2002/07/05 16:00 EDT
180    Tag: Release_110_41
181    Description:
182    
183    New working release.  New bootfiles.
184    
185    ----------------------------------------------------------------------
186    Name: Matthias Blume
187    Date: 2002/07/05 10:25:00 EDT
188    Tag: blume-20020705-btimp
189    Description:
190    
191    Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that
192    other clients can set up backtracing support.
193    
194    ----------------------------------------------------------------------
195    Name: Matthias Blume
196    Date: 2002/06/25 17:23:00 EDT
197    Tag: blume-20020625-fpmax
198    Description:
199    
200    Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point
201    case.  (The sense of the isNaN test was reversed -- which made min and
202    max always return their first argument.)
203    
204    ----------------------------------------------------------------------
205    Name: Matthias Blume
206    Date: 2002/06/11
207    Tag: blume-20020611-unixpath
208    Description:
209    
210    Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
211    
212    ----------------------------------------------------------------------
213    Name: Matthias Blume
214    Date: 2002/06/10 16:35:00 EDT
215    Tag: blume-20020610-ieeereal
216    Description:
217    
218    I back-ported my implementation of IEEEReal.fromString from the
219    idlbasis-devel branch so that we can test it.
220    
221    Another small change is that ppDec tries to give more information
222    than just "<sig>" in the case of functors.  However, this code is
223    broken in some mysterious way if the functor's body's signature
224    has not been declared by ascription but gets inferred from the
225    implementation.  This needs fixing...
226    
227    ----------------------------------------------------------------------
228    Name: Matthias Blume
229    Date: 2002/05/31
230    Tag: blume-20020531-btrace-mode
231    Description:
232    
233    Resurrected SMLofNJ.Internals.BTrace.mode.  (It accidentally fell by
234    the wayside when I switched over to using Controls everywhere.)
235    
236    ----------------------------------------------------------------------
237    Name: Lal George
238    Date: 2002/05/23 12:21:40 EDT
239    Tag: george-20020523-visual-labels
240    Description:
241    
242    Labels are now displayed in the graphical output to make
243    the fall-through and target blocks obvious.
244    
245    ----------------------------------------------------------------------
246    Name: Matthias Blume
247    Date: 2002/05/22 11:03:00 EDT
248    Tag: blume-20020522-shrink
249    Description:
250    
251    John tweaked yesterday's fix for 1131 to handle an out-of-memory
252    situation that comes up when allocating huge arrays.
253    
254    ----------------------------------------------------------------------
255    Name: Matthias Blume
256    Date: 2002/05/21 16:00:00 EDT
257    Tag: Release_110_40
258    Description:
259    
260    New working release (110.40).  New bootfiles.
261    
262    [Also: John Reppy fixed GC bug 1131.]
263    
264    ----------------------------------------------------------------------
265    Name: Matthias Blume
266    Date: 2002/05/21 12:35:00 EDT
267    Tag: blume-20020521-cmdoc
268    Description:
269    
270    CM documentation update.
271    
272    ----------------------------------------------------------------------
273    Name: Matthias Blume
274    Date: 2002/05/21 10:55:00 EDT
275    Tag: blume-20020521-misc
276    Description:
277    
278    - John tweaked runtime to be silent on heap export (except when
279      GC messages are on).
280    - I added a few more things (cross-compiling versions of CMB) to
281      config/preloads (as suggestions).
282    
283    ----------------------------------------------------------------------
284    Name: Matthias Blume
285    Date: 2002/05/20 22:25:00 EDT
286    Tag: blume-20020520-controls
287    Description:
288    
289    - Added ControlUtil structure to control-lib.cm.
290    - Use it throughout.
291    - Used Controls facility to define MLRISC controls (as opposed to
292      registering MLRISC control ref cells with Controls after the fact)
293    - Fixed messed-up controls priorities.
294    
295    * Removed again all the stuff from config/preloads that one wouldn't
296      be able to preload at the time the initial heap image is built.
297      (Many libraries, e.g., CML, do not exist yet at this time.  The
298       only libraries that can be preloaded via config/preloads are those
299       that come bundled with the bootfiles.)
300    
301    ----------------------------------------------------------------------
302    Name: Matthias Blume
303    Date: 2002/05/20 10:59:00 EDT
304    Tag: blume-20020520-preloads
305    Description:
306    
307    Added a lot of commented-out suggestions for things to be included
308    in config/preloads.
309    
310    ----------------------------------------------------------------------
311    Name: Allen Leung
312    Date: 2002/05/18 14:20:00 EDT
313    Tag: leunga-20020518-mdl
314    Description:
315    
316    o Made the mdl tool stuff compile and run again.
317    o I've disabled all the stuff that depends on RTL specifications; they
318      are all badly broken anyway.
319    
320    ----------------------------------------------------------------------
321    Name: Matthias Blume
322    Date: 2002/05/17 16:49:00 EDT
323    Tag: blume-20020517-controls
324    Description:
325    
326    0. John Reppy made several modifications to the SML/NJ library.
327       In particular, there is a shiny new controls-lib.cm.
328    
329    1. Pushed new controls interface through compiler so that everything
330       compiles again.
331    
332    2. Added FormatComb and FORMAT_COMB to the CML version of the
333       SML/NJ library (so that CML compiles again).
334    
335    3. Modified init scripts because XXX_DEFAULT environment variables
336       are no longer with us.  (Boot-time initialization is now done
337       using the same environment variables that are also used for
338       startup-time initialization of controls.)
339    
340    ----------------------------------------------------------------------
341    Name: Lal George
342    Date: 2002/05/15 09:20:10 EDT
343    Tag: george-20020515-pseudo-op-decls
344    Description:
345    
346            All pseudo-ops emitted before the first segment declaration
347    such as TEXT, DATA, and BSS directives are assumed to be global
348    declarations and are emitted first in the assembly file. This is
349    useful in a number of situations where one has pseudo-ops that are not
350    specific to any segment, and also works around the constraint that one
351    cannot have client pseudo-ops in the TEXT segment.
352    
353            Because no segment is associated with these declarations it is
354    an error to allocate any space or objects before the first segment
355    directive and an exception will be raised. However, we cannot make
356    this check for client pseudo-ops.
357    
358            These top level declarations are a field in the CFG graph_info.
359    In theory you can continue to add to this field after the CFG has been
360    built -- provided you know what you are doing;-)
361    
362    ----------------------------------------------------------------------
363    Name: Matthias Blume
364    Date: 2002/05/13 16:40:00 EDT
365    Tag: blume-20020513-pp-etc
366    Description:
367    
368    A few minor bugfixes:
369    
370      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
371        (Bogus printouts for redefined bindings still occur.  Compiler
372        bug should no longer occur now.  We need to redo the prettyprinter
373        from scratch.)
374    
375      - CM pathname printer now also adds escape sequences for ( and )
376    
377      - commend and docu fixes for ml-nlffi
378    
379    ----------------------------------------------------------------------
380    Name: Matthias Blume
381    Date: 2002/05/10 16:40:00 EDT
382    Tag: blume-20020510-erg-textio
383    Description:
384    
385    Applied the following bugfix provided by Emden Gansner:
386    
387        Output is corrupted when outputSubstr is used rather than output.
388    
389        The problem occurs when a substring
390    
391            ss = (s, dataStart, dataLen)
392    
393        where dataStart > 0, fills a stream buffer with avail bytes left.
394        avail bytes of s, starting at index dataStart, are copied into the
395        buffer, the buffer is flushed, and then the remaining dataLen-avail
396        bytes of ss are copied into the beginning of the buffer. Instead of
397        starting this copy at index dataStart+avail in s, the current code
398        starts the copy at index avail.
399    
400        Fix:
401        In text-io-fn.sml, change line 695 from
402             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
403        to
404             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
405    
406    ----------------------------------------------------------------------
407    Name: Matthias Blume
408    Date: 2002/04/12 13:55:00 EDT
409    Tag: blume-20020412-assyntax
410    Description:
411    
412    1. Grabbed newer assyntax.h from the XFree86 project.
413    2. Fiddled with how to compile X86.prim.asm without warnings.
414    3. (Very) Minor cleanup in CM.
415    
416    ----------------------------------------------------------------------
417    Name: Matthias Blume
418    Date: 2002/04/01 (no joke!) 17:07:00 EST
419    Tag: blume-20020401-x86div
420    Description:
421    
422    Added full support for div/mod/rem/quot on the x86, using the machine
423    instruction's two results (without clumsily recomputing the remainder)
424    directly where appropriate.
425    
426    Some more extensive power-of-two support was added to the x86 instruction
427    selector (avoiding expensive divs, mods, and muls where they can be
428    replaced with cheaper shifts and masks).  However, this sort of thing
429    ought to be done earlier, e.g., within the CPS optimizer so that
430    all architectures benefit from it.
431    
432    The compiler compiles to a fixed point, but changes might be somewhat
433    fragile nevertheless.  Please, report any strange things that you might
434    see wrt. div/mod/quot/rem...
435    
436    ----------------------------------------------------------------------
437    Name: Matthias Blume
438    Date: 2002/03/29 17:22:00
439    Tag: blume-20020329-div
440    Description:
441    
442    Fixed my broken div/mod logic.  Unfortunately, this means that the
443    inline code for div/mod now has one more comparison than before.
444    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
445    The problem was with quotient = 0, because that alone does not tell
446    us which way the rounding went.  One then has to look at whether
447    remainder and divisor have the same sign...  :(
448    
449    Anyway, I replaced the bootfiles with fresh ones...
450    
451    ----------------------------------------------------------------------
452    Name: Matthias Blume
453    Date: 2002/03/29 14:10:00 EST
454    Tag: blume-20020329-inlprims
455    Description:
456    
457    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
458    
459    Primops have changed. This means that the bin/boot-file formats have
460    changed as well.
461    
462    To make sure that there is no confusion, I made a new version.
463    
464    
465    CHANGES:
466    
467    * removed REMT from mltree (remainder should never overflow).
468    
469    * added primops to deal with divisions of all flavors to the frontend
470    
471    * handled these primops all the way through so they map to their respective
472      MLRISC support
473    
474    * used these primops in the implementation of Int, Int32, Word, Word32
475    
476    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
477    
478    * parameterized INLMIN, INLMAX, and INLABS by a numkind
479    
480    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
481      floating point
482    
483    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
484      and Real (but Real.abs maps to a separate floating-point-only primop)
485    
486    
487    TODO items:
488    
489    * Hacked Alpha32 instruction selection, disabling the selection of REMx
490      instructions because the machine instruction encoder cannot handle
491      them.  (Hppa, PPC, and Sparc instruction selection did not handle
492      REM in the first place, and REM is supported by the x86 machine coder.)
493    
494    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
495      selection phase.  (The two can be streamlined because the hardware
496      delivers both quotient and remainder at the same time anyway.)
497    
498    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
499      (Currently the behavior is inconsistent both across architectures and
500      wrt. the draft Basis spec.)
501    
502    * Word8 should eventually be handled natively, too.
503    
504    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
505      as if there currently is no execution path that could trigger it in
506      SML/NJ.  (The assumptions underlying functions arith and promotable do not
507      hold for things like multiplication and division.)
508    
509    ----------------------------------------------------------------------
510    Name: Matthias Blume
511    Date: 2002/03/27 16:27:00 EST
512    Tag: blume-20020327-mlrisc-divisions
513    Description:
514    
515    Added support for all four division operations (ML's div, mod, quot,
516    and rem) to MLRISC.  In the course of doing so, I also rationalized
517    the naming (no more annoying switch-around of DIV and QUOT), by
518    parameterizing the operation by div_rounding_mode (which can be either
519    DIV_TO_ZERO or DIV_TO_NEGINF).
520    
521    The generic MLTreeGen functor takes care of compiling all four
522    operations down to only round-to-zero div.
523    
524    Missing pieces:
525    
526      * Doing something smarter than relying on MLTreeGen on architectures
527        like, e.g., the x86 where hardware division delivers both quotient and
528        remainder at the same time.  With this, the implementation of the
529        round-to-neginf operations could be further streamlined.
530    
531      * Remove inlining support for div/mod/rem from the frontend and replace it
532        with primops that get carried through to the backend.  Do this for all
533        int and word types.
534    
535    ----------------------------------------------------------------------
536    Name: Matthias Blume
537    Date: 2002/03/25 17:25:00 EST
538    Tag: blume-20020325-divmod
539    Description:
540    
541    I improved (hopefully without breaking them) the implementation of Int.div,
542    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
543    advantage of the following observations:
544    
545      Let  q = x quot y      r = x rem y
546           d = x div  y      m = x mod y
547    
548    where "quot" is the round-to-zero version of integer division that
549    hardware usually provides.  Then we have:
550    
551         r = x - q * y        where neither the * nor the - will overflow
552         d = if q >= 0 orelse x = q * y then q else q - 1
553                              where neither the * nor the - will overflow
554         m = if q >= 0 orelse r = 0 then r else r + y
555                              where the + will not overflow
556    
557    This results in substantial simplification of the generated code.
558    The following table shows the number of CFG nodes and edges generated
559    for
560            fun f (x, y) = x OPER y
561            (* with OPER \in div, mod, quot, rem *)
562    
563    
564        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
565        --------------------------------------------------------
566         div |         24 |         39 |         12 |         16
567         mod |         41 |         71 |         12 |         16
568        quot |          8 |         10 |          8 |         10
569         rem |         10 |         14 |          8 |         10
570    
571    
572    ----------------------------------------------------------------------
573    Name: Matthias Blume
574    Date: 2002/03/25 22:06:00 EST
575    Tag: blume-20020325-cprotobug
576    Description:
577    
578    Fixed a bug in cproto (c prototype decoder).
579    
580    ----------------------------------------------------------------------
581    Name: Matthias Blume
582    Date: 2002/03/25 16:00:00 EST
583    Tag: blume-20020325-raw-primops
584    Description:
585    
586    I did some cleanup to Allen's new primop code and
587    replaced yesterday's bootfiles with new ones.
588    (But they are stored in the same place.)
589    
590    ----------------------------------------------------------------------
591    Name: Matthias Blume
592    Date: 2002/03/24 22:40:00 EST
593    Tag: blume-20020324-bootfiles
594    Description:
595    
596    Made the bootfiles that Allen asked for.
597    
598    ----------------------------------------------------------------------
599    Name: Allen Leung
600    Date: 2002/03/23 15:50:00 EST
601    Tag: leunga-20020323-flint-cps-rcc-primops
602    Description:
603    
604      1. Changes to FLINT primops:
605    
606        (* make a call to a C-function;
607         * The primop carries C function prototype information and specifies
608         * which of its (ML-) arguments are floating point. C prototype
609         * information is for use by the backend, ML information is for
610         * use by the CPS converter. *)
611      | RAW_CCALL of { c_proto: CTypes.c_proto,
612                       ml_args: ccall_type list,
613                       ml_res_opt: ccall_type option,
614                       reentrant : bool
615                     } option
616       (* Allocate uninitialized storage on the heap.
617        * The record is meant to hold short-lived C objects, i.e., they
618        * are not ML pointers.  With the tag, the representation is
619        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
620        *)
621      | RAW_RECORD of {tag:bool,sz:int}
622      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
623    
624      2.  These CPS primops are now overloaded:
625    
626           rawload of {kind:numkind}
627           rawstore of {kind:numkind}
628    
629          The one argument form is:
630    
631             rawload {kind} address
632    
633          The two argument form is:
634    
635             rawload {kind} [ml object, byte-offset]
636    
637      3. RAW_CCALL/RCC now takes two extra arguments:
638    
639         a. The first is whether the C call is reentrant, i.e., whether
640            ML state should be saved and restored.
641         b. The second argument is a string argument specifying the name of
642            library and the C function.
643    
644         These things are currently not handled in the code generator, yet.
645    
646      4. In CProto,
647    
648         An encoding type of "bool" means "ml object" and is mapped into
649         C prototype of PTR.  Note that "bool" is different than "string",
650         even though "string" is also mapped into PTR, because "bool"
651         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
652    
653      5. Pickler/unpicker
654    
655         Changed to handle RAW_RECORD and newest RAW_CCALL
656    
657      6. MLRiscGen,
658    
659         1. Changed to handle the new rawload/rawstore/rawrecord operators.
660         2. Code for handling C Calls has been moved to a new module CPSCCalls,
661            in the file CodeGen/cpscompile/cps-c-calls.sml
662    
663      7. Added the conditional move operator
664    
665             condmove of branch
666    
667         to cps.  Generation of this is still buggy so it is currently
668         disabled.
669    
670    ----------------------------------------------------------------------
671    Name: Lal George
672    Date: 2002/03/22 14:18:25 EST
673    Tag: george-20020322-cps-branch-prob
674    Description:
675    
676    Implemented the Ball-Larus branch prediction-heuristics, and
677    incorporated graphical viewers for control flow graphs.
678    
679    Ball-Larus Heuristics:
680    ---------------------
681    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
682    
683    By design it uses the Dempster-Shafer theory for combining
684    probabilities.  For example, in the function:
685    
686        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
687    
688    the ball-larus heuristics predicts that the n=0 is unlikely
689    (OH-heuristic), and the 'then' branch is unlikely because of the
690    RH-heuristic -- giving the 'then' branch an even lower combined
691    probability using the Dempster-Shafer theory.
692    
693    Finally, John Reppy's loop analysis in MLRISC, further lowers the
694    probability of the 'then' branch because of the loop in the else
695    branch.
696    
697    
698    Graphical Viewing:
699    ------------------
700    I merely plugged in Allen's graphical viewers into the compiler. The
701    additional code is not much. At the top level, saying:
702    
703            Control.MLRISC.getFlag "cfg-graphical-view" := true;
704    
705    will display the graphical view of the control flow graph just before
706    back-patching.  daVinci must be in your path for this to work. If
707    daVinci is not available, then the default viewer can be changed
708    using:
709    
710            Control.MLRISC.getString "viewer"
711    
712    which can be set to "dot" or "vcg" for the corresponding viewers. Of
713    course, these viewers must be in your path.
714    
715    The above will display the compilation unit at the level of clusters,
716    many of which are small, boring, and un-interesting. Also setting:
717    
718            Control.MLRISC.getInt "cfg-graphical-view_size"
719    
720    will display clusters that are larger than the value set by the above.
721    
722    
723    ----------------------------------------------------------------------
724    Name: Matthias Blume
725    Date: 2002/03/21 22:20:00 EST
726    Tag: blume-20020321-kmp-bugfix
727    Description:
728    
729    Changed the interface to the KMP routine in PreString and fixed
730    a minor bug in one place where it was used.
731    
732    ----------------------------------------------------------------------
733    Name: Allen Leung
734    Date: 2002/03/21 20:30:00 EST
735    Tag: leunga-20020321-cfg
736    Description:
737    
738      Fixed a potential problem in cfg edge splitting.
739    
740    ----------------------------------------------------------------------
741    Name: Allen Leung
742    Date: 2002/03/21 17:15:00 EST
743    Tag: leunga-20020321-x86-fp-cfg
744    Description:
745    
746      1. Recoded the buggy parts of x86-fp.
747    
748         a. All the block reordering code has been removed.
749            We now depend on the block placement phases to do this work.
750    
751         b. Critical edge splitting code has been simplified and moved into the
752            CFG modules, as where they belong.
753    
754         Both of these were quite buggy and complex.  The code is now much, much
755         simpler.
756    
757      2. X86 backend.
758    
759         a. Added instructions for 64-bit support.  Instruction selection for
760            64-bit has not been committed, however, since that
761            requires changes to MLTREE which haven't been approved by
762            Lal and John.
763    
764         b. Added support for FUCOMI and FUCOMIP when generating code for
765            PentiumPro and above.  We only generate these instructions in
766            the fast-fp mode.
767    
768         c. Added cases for JP and JNP in X86FreqProps.
769    
770      3. CFG
771    
772         CFG now has a bunch of methods for edge splitting and merging.
773    
774      4. Machine description.
775    
776         John's simplification of MLTREE_BASIS.fcond broke a few machine
777         description things:
778    
779         rtl-build.{sig,sml} and hppa.mdl fixed.
780    
781         NOTE: the machine description stuff in the repository is still broken.
782               Again, I can't put my fixes in because that involves
783               changes to MLTREE.
784    
785    ----------------------------------------------------------------------
786    Name: Matthias Blume
787    Date: 2002/03/20 15:55:00 EST
788    Tag: blume-20020320-kmp
789    Description:
790    
791    Implemented Knuth-Morris-Pratt string matching in PreString and used
792    it for String.isSubstring, Substring.isSubstring, and
793    Substring.position.
794    
795    (Might need some stress-testing.  Simple examples worked fine.)
796    
797    ----------------------------------------------------------------------
798    Name: Matthias Blume
799    Date: 2002/03/19 16:37:00 EST
800    Tag: blume-20020319-witnesses
801    Description:
802    
803    Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib.
804    
805    This implements a generic mechanism for changing constness qualifiers
806    anywhere within big C types without resorting to outright "casts".
807    (So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you
808    modify the constness at the outermost level.)
809    The implementation of "convert" is based on the idea of "witness"
810    values -- values that are not used by the operation but whose types
811    "testify" to their applicability.  On the implementation side, "convert"
812    is simply a projection (returning its second curried argument).  With
813    cross-module inlining, it should not result in any machine code being
814    generated.
815    
816    ----------------------------------------------------------------------
817    Name: Matthias Blume
818    Date: 2002/03/15 16:40:00 EST
819    Tag: blume-20020315-basis
820    Description:
821    
822    Provided (preliminary?) implementations for
823    
824      {String,Substring}.{concatWith,isSuffix,isSubstring}
825    
826    and
827    
828      Substring.full
829    
830    Those are in the Basis spec but they were missing in SML/NJ.
831    
832    ----------------------------------------------------------------------
833    Name: Matthias Blume
834    Date: 2002/03/14 21:30:00 EST
835    Tag: blume-20020314-controls
836    Description:
837    
838    Controls:
839    ---------
840    
841    1. Factored out the recently-added Controls : CONTROLS stuff and put
842       it into its own library $/controls-lib.cm.  The source tree for
843       this is under src/smlnj-lib/Controls.
844    
845    2. Changed the names of types and functions in this interface, so they
846       make a bit more "sense":
847    
848          module -> registry
849          'a registry -> 'a group
850    
851    3. The interface now deals in ref cells only.  The getter/setter interface
852       is (mostly) gone.
853    
854    4. Added a function that lets one register an already-existing ref cell.
855    
856    5. Made the corresponding modifications to the rest of the code so that
857       everything compiles again.
858    
859    6. Changed the implementation of Controls.MLRISC back to something closer
860       to the original.  In particular, this module (and therefore MLRISC)
861       does not depend on Controls.  There now is some link-time code in
862       int-sys.sml that registers the MLRISC controls with the Controls
863       module.
864    
865    CM:
866    ---
867    
868      * One can now specify the lambda-split aggressiveness in init.cmi.
869    
870    ----------------------------------------------------------------------
871    Name: Allen Leung
872    Date: 2002/03/13 17:30:00 EST
873    Tag: leunga-20020313-x86-fp-unary
874    Description:
875    
876    Bug fix for:
877    
878    > leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml
879    > Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002
880    > - fun f(x,(y,z)) = Real.~ y;
881    > [autoloading]
882    > [autoloading done]
883    >       fchsl   (%eax), 184(%esp)
884    > Error: MLRisc bug: X86MCEmitter.emitInstr
885    >
886    > uncaught exception Error
887    >   raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19
888    
889    The problem was that the code generator did not generate any fp registers
890    in this case, and the ra didn't know that it needed to run the X86FP phase to
891    translate the pseudo fp instruction.   This only happened with unary fp
892    operators in certain situations.
893    
894    ----------------------------------------------------------------------
895    Name: Matthias Blume
896    Date: 2002/03/13 14:00:00 EST
897    Tag: blume-20020313-overload-etc
898    Description:
899    
900    1. Added _overload as a synonym for overload for backward compatibility.
901       (Control.overloadKW must be true for either version to be accepted.)
902    
903    2. Fixed bug in install script that caused more things to be installed
904       than what was requested in config/targets.
905    
906    3. Made CM aware of the (_)overload construct so that autoloading
907       works.
908    
909    ----------------------------------------------------------------------
910    Name: Matthias Blume
911    Date: 2002/03/12 22:03:00 EST
912    Tag: blume-20020312-url
913    Description:
914    
915    Forgot to update BOOT and srcarchiveurl.
916    
917    ----------------------------------------------------------------------
918    Name: Matthias Blume
919    Date: 2002/03/12 17:30:00 EST
920    Tag: blume-20020312-version110392
921    Description:
922    
923    Yet another version number bump (because of small changes to the
924    binfile format).  Version number is now 110.39.2.  NEW BOOTFILES!
925    
926    Changes:
927    
928      The new pid generation scheme described a few weeks ago was overly
929      complicated.  I implemented a new mechanism that is simpler and
930      provides a bit more "stability":  Once CM has seen a compilation
931      unit, it keeps its identity constant (as long as you do not delete
932      those crucial CM/GUID/* files).  This means that when you change
933      an interface, compile, then go back to the old interface, and
934      compile again, you arrive at the original pid.
935    
936      There now also is a mechanism that instructs CM to use the plain
937      environment hash as a module's pid (effectively making its GUID
938      the empty string).  For this, "noguid" must be specified as an
939      option to the .sml file in question within its .cm file.
940      This is most useful for code that is being generated by tools such
941      as ml-nlffigen (because during development programmers tend to
942      erase the tool's entire output directory tree including CM's cached
943      GUIDs).  "noguid" is somewhat dangerous (since it can be used to locally
944      revert to the old, broken behavior of SML/NJ, but in specific cases
945      where there is no danger of interface confusion, its use is ok
946      (I think).
947    
948      ml-nlffigen by default generates "noguid" annotations.  They can be
949      turned off by specifying -guid in its command line.
950    
951    ----------------------------------------------------------------------
952    Name: Lal George
953    Date: 2002/03/12 12 14:42:36 EST
954    Tag: george-20020312-frequency-computation
955    Description:
956    
957    Integrated jump chaining and static block frequency into the
958    compiler. More details and numbers later.
959    
960    ----------------------------------------------------------------------
961    Name: Lal George
962    Date: 2002/03/11 11 22:38:53 EST
963    Tag: george-20020311-jump-chain-elim
964    Description:
965    
966    Tested the jump chain elimination on all architectures (except the
967    hppa).  This is on by default right now and is profitable for the
968    alpha and x86, however, it may not be profitable for the sparc and ppc
969    when compiling the compiler.
970    
971    The gc test will typically jump to a label at the end of the cluster,
972    where there is another jump to an external cluster containing the actual
973    code to invoke gc. This is to allow factoring of common gc invocation
974    sequences. That is to say, we generate:
975    
976            f:
977               testgc
978               ja   L1      % jump if above to L1
979    
980            L1:
981               jmp L2
982    
983    
984    After jump chain elimination the 'ja L1' instructions is converted to
985    'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end
986    up being implemented in their long form (if L2 is far away) using:
987    
988            jbe     L3      % jump if below or equal to L3
989            jmp     L2
990         L3:
991            ...
992    
993    
994    For large compilation units L2  may be far away.
995    
996    
997    ----------------------------------------------------------------------
998    Name: Matthias Blume
999    Date: 2002/03/11 13:30:00 EST
1000    Tag: blume-20020311-mltreeeval
1001    Description:
1002    
1003    A functor parameter was missing.
1004    
1005    ----------------------------------------------------------------------
1006    Name: Allen Leung
1007    Date: 2002/03/11 10:30:00 EST
1008    Tag: leunga-20020311-runtime-string0
1009    Description:
1010    
1011       The representation of the empty string now points to a
1012    legal null terminated C string instead of unit.  It is now possible
1013    to convert an ML string into C string with InlineT.CharVector.getData.
1014    This compiles into one single machine instruction.
1015    
1016    ----------------------------------------------------------------------
1017    Name: Allen Leung
1018    Date: 2002/03/10 23:55:00 EST
1019    Tag: leunga-20020310-x86-call
1020    Description:
1021    
1022       Added machine generation for CALL instruction (relative displacement mode)
1023    
1024    ----------------------------------------------------------------------
1025    Name: Matthias Blume
1026    Date: 2002/03/08 16:05:00
1027    Tag: blume-20020308-entrypoints
1028    Description:
1029    
1030    Version number bumped to 110.39.1.  NEW BOOTFILES!
1031    
1032    Entrypoints: non-zero offset into a code object where execution should begin.
1033    
1034    - Added the notion of an entrypoint to CodeObj.
1035    - Added reading/writing of entrypoint info to Binfile.
1036    - Made runtime system bootloader aware of entrypoints.
1037    - Use the address of the label of the first function given to mlriscGen
1038      as the entrypoint.  This address is currently always 0, but it will
1039      not be 0 once we turn on block placement.
1040    - Removed the linkage cluster code (which was The Other Way(tm) of dealing
1041      with entry points) from mlriscGen.
1042    
1043    ----------------------------------------------------------------------
1044    Name: Allen Leung
1045    Date: 2002/03/07 20:45:00 EST
1046    Tag: leunga-20020307-x86-cmov
1047    Description:
1048    
1049       Bug fixes for CMOVcc on x86.
1050    
1051       1. Added machine code generation for CMOVcc
1052       2. CMOVcc is now generated in preference over SETcc on PentiumPro or above.
1053       3. CMOVcc cannot have an immediate operand as argument.
1054    
1055    ----------------------------------------------------------------------
1056    Name: Matthias Blume
1057    Date: 2002/03/07 16:15:00 EST
1058    Tag: blume-20020307-controls
1059    Description:
1060    
1061    This is a very large but mostly boring patch which makes (almost)
1062    every tuneable compiler knob (i.e., pretty much everything under
1063    Control.* plus a few other things) configurable via both the command
1064    line and environment variables in the style CM did its configuration
1065    until now.
1066    
1067    Try starting sml with '-h' (or, if you are brave, '-H')
1068    
1069    To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which
1070    implements the underlying generic mechanism.
1071    
1072    The interface to some of the existing such facilities has changed somewhat.
1073    For example, the MLRiscControl module now provides mkFoo instead of getFoo.
1074    (The getFoo interface is still there for backward-compatibility, but its
1075    use is deprecated.)
1076    
1077    The ml-build script passes -Cxxx=yyy command-line arguments through so
1078    that one can now twiddle the compiler settings when using this "batch"
1079    compiler.
1080    
1081    TODO items:
1082    
1083    We should go through and throw out all controls that are no longer
1084    connected to anything.  Moreover, we should go through and provide
1085    meaningful (and correct!) documentation strings for those controls
1086    that still are connected.
1087    
1088    Currently, multiple calls to Controls.new are accepted (only the first
1089    has any effect).  Eventually we should make sure that every control
1090    is being made (via Controls.new) exactly once.  Future access can then
1091    be done using Controls.acc.
1092    
1093    Finally, it would probably be a good idea to use the getter-setter
1094    interface to controls rather than ref cells.  For the time being, both
1095    styles are provided by the Controls module, but getter-setter pairs are
1096    better if thread-safety is of any concern because they can be wrapped.
1097    
1098    *****************************************
1099    
1100    One bug fix: The function blockPlacement in three of the MLRISC
1101    backpatch files used to be hard-wired to one of two possibilities at
1102    link time (according to the value of the placementFlag).  But (I
1103    think) it should rather sense the flag every time.
1104    
1105    *****************************************
1106    
1107    Other assorted changes (by other people who did not supply a HISTORY entry):
1108    
1109    1. the cross-module inliner now works much better (Monnier)
1110    2. representation of weights, frequencies, and probabilities in MLRISC
1111       changed in preparation of using those for weighted block placement
1112       (Reppy, George)
1113    
1114    ----------------------------------------------------------------------
1115    Name: Lal George
1116    Date: 2002/03/07 14:44:24 EST 2002
1117    Tag: george-20020307-weighted-block-placement
1118    
1119    Tested the weighted block placement optimization on all architectures
1120    (except the hppa) using AMPL to generate the block and edge frequencies.
1121    Changes were required in the machine properties to correctly
1122    categorize trap instructions. There is an MLRISC flag
1123    "weighted-block-placement" that can be used to enable weighted block
1124    placement, but this will be ineffective without block/edge
1125    frequencies (coming soon).
1126    
1127    
1128    ----------------------------------------------------------------------
1129    Name: Lal George
1130    Date: 2002/03/05 17:24:48 EST
1131    Tag: george-20020305-linkage-cluster
1132    
1133    In order to support the block placement optimization, a new cluster
1134    is generated as the very first cluster (called the linkage cluster).
1135    It contains a single jump to the 'real' entry point for the compilation
1136    unit. Block placement has no effect on the linkage cluster itself, but
1137    all the other clusters  have full freedom in the manner in which they
1138    reorder blocks or functions.
1139    
1140    On the x86 the typical linkage code that is generated is:
1141       ----------------------
1142            .align 2
1143       L0:
1144            addl    $L1-L0, 72(%esp)
1145            jmp     L1
1146    
1147    
1148            .align  2
1149       L1:
1150       ----------------------
1151    
1152    72(%esp) is the memory location for the stdlink register. This
1153    must contain the address of the CPS function being called. In the
1154    above example, it contains the address of  L0; before
1155    calling L1 (the real entry point for the compilation unit), it
1156    must contain the address for L1, and hence
1157    
1158            addl $L1-L0, 72(%esp)
1159    
1160    I have tested this on all architectures except the hppa.The increase
1161    in code size is of course negligible
1162    
1163    ----------------------------------------------------------------------
1164    Name: Allen Leung
1165    Date: 2002/03/03 13:20:00 EST
1166    Tag: leunga-20020303-mlrisc-tools
1167    
1168      Added #[ ... ] expressions to mlrisc tools
1169    
1170    ----------------------------------------------------------------------
1171    Name: Matthias Blume
1172    Date: 2002/02/27 12:29:00 EST
1173    Tag: blume-20020227-cdebug
1174    Description:
1175    
1176    - made types in structure C and C_Debug to be equal
1177    - got rid of code duplication (c-int.sml vs. c-int-debug.sml)
1178    - there no longer is a C_Int_Debug (C_Debug is directly derived from C)
1179    
1180    ----------------------------------------------------------------------
1181    Name: Matthias Blume
1182    Date: 2002/02/26 12:00:00 EST
1183    Tag: blume-20020226-ffi
1184    Description:
1185    
1186    1. Fixed a minor bug in CM's "noweb" tool:
1187       If numbering is turned off, then truly don't number (i.e., do not
1188       supply the -L option to noweb).  The previous behavior was to supply
1189       -L'' -- which caused noweb to use the "default" line numbering scheme.
1190       Thanks to Chris Richards for pointing this out (and supplying the fix).
1191    
1192    2. Once again, I reworked some aspects of the FFI:
1193    
1194       A. The incomplete/complete type business:
1195    
1196       - Signatures POINTER_TO_INCOMPLETE_TYPE and accompanying functors are
1197         gone!
1198       - ML types representing an incomplete type are now *equal* to
1199         ML types representing their corresponding complete types (just like
1200         in C).  This is still safe because ml-nlffigen will not generate
1201         RTTI for incomplete types, nor will it generate functions that
1202         require access to such RTTI.   But when ML code generated from both
1203         incomplete and complete versions of the C type meet, the ML types
1204         are trivially interoperable.
1205    
1206         NOTE:  These changes restore the full generality of the translation
1207         (which was previously lost when I eliminated functorization)!
1208    
1209       B. Enum types:
1210    
1211       - Structure C now has a type constructor "enum" that is similar to
1212         how the "su" constructor works.  However, "enum" is not a phantom
1213         type because each "T enum" has values (and is isomorphic to
1214         MLRep.Signed.int).
1215       - There are generic access operations for enum objects (using
1216         MLRep.Signed.int).
1217       - ml-nlffigen will generate a structure E_foo for each "enum foo".
1218         * The structure contains the definition of type "mlrep" (the ML-side
1219         representation type of the enum).  Normally, mlrep is the same
1220         as "MLRep.Signed.int", but if ml-nlffigen was invoked with "-ec",
1221         then mlrep will be defined as a datatype -- thus facilitating
1222         pattern matching on mlrep values.
1223         ("-ec" will be suppressed if there are duplicate values in an
1224          enumeration.)
1225         * Constructors ("-ec") or values (no "-ec") e_xxx of type mlrep
1226         will be generated for each C enum constant xxx.
1227         * Conversion functions m2i and i2m convert between mlrep and
1228         MLRep.Signed.int.  (Without "-ec", these functions are identities.)
1229         * Coversion functions c and ml convert between mlrep and "tag enum".
1230         * Access functions (get/set) fetch and store mlrep values.
1231       - By default (unless ml-nlffigen was invoked with "-nocollect"), unnamed
1232         enumerations are merged into one single enumeration represented by
1233         structure E_'.
1234    
1235    ----------------------------------------------------------------------
1236    Name: Allen Leung
1237    Date: 2002/02/25 04:45:00 EST
1238    Tag: leunga-20020225-cps-spill
1239    
1240    This is a new implementation of the CPS spill phase.
1241    The new phase is in the new file compiler/CodeGen/cpscompile/spill-new.sml
1242    In case of problems, replace it with the old file spill.sml
1243    
1244    The current compiler runs into some serious performance problems when
1245    constructing a large record.  This can happen when we try to compile a
1246    structure with many items.  Even a very simple structure like the following
1247    makes the compiler slow down.
1248    
1249        structure Foo = struct
1250           val x_1 = 0w1 : Word32.int
1251           val x_2 = 0w2 : Word32.int
1252           val x_3 = 0w3 : Word32.int
1253           ...
1254           val x_N = 0wN : Word32.int
1255        end
1256    
1257    The following table shows the compile time, from N=1000 to N=4000,
1258    with the old compiler:
1259    
1260    N
1261    1000   CPS 100 spill                           0.04u  0.00s  0.00g
1262           MLRISC ra                               0.06u  0.00s  0.05g
1263              (spills = 0 reloads = 0)
1264           TOTAL                                   0.63u  0.07s  0.21g
1265    
1266    1100   CPS 100 spill                           8.25u  0.32s  0.64g
1267           MLRISC ra                               5.68u  0.59s  3.93g
1268              (spills = 0 reloads = 0)
1269           TOTAL                                   14.71u  0.99s  4.81g
1270    
1271    1500   CPS 100 spill                           58.55u  2.34s  1.74g
1272           MLRISC ra                               5.54u  0.65s  3.91g
1273              (spills = 543 reloads = 1082)
1274           TOTAL                                   65.40u  3.13s  6.00g
1275    
1276    2000   CPS 100 spill                           126.69u  4.84s  3.08g
1277           MLRISC ra                               0.80u  0.10s  0.55g
1278              (spills = 42 reloads = 84)
1279           TOTAL                                   129.42u  5.10s  4.13g
1280    
1281    3000   CPS 100 spill                           675.59u  19.03s  11.64g
1282           MLRISC ra                               2.69u  0.27s  1.38g
1283              (spills = 62 reloads = 124)
1284           TOTAL                                   682.48u  19.61s  13.99g
1285    
1286    4000   CPS 100 spill                           2362.82u  56.28s  43.60g
1287           MLRISC ra                               4.96u  0.27s  2.72g
1288              (spills = 85 reloads = 170)
1289           TOTAL                                   2375.26u  57.21s  48.00g
1290    
1291    As you can see the old cps spill module suffers from some serious
1292    performance problem.  But since I cannot decipher the old code fully,
1293    instead of patching the problems up, I'm reimplementing it
1294    with a different algorithm.  The new code is more modular,
1295    smaller when compiled, and substantially faster
1296    (O(n log n) time and O(n) space).  Timing of the new spill module:
1297    
1298    4000  CPS 100 spill                           0.02u  0.00s  0.00g
1299          MLRISC ra                               0.25u  0.02s  0.15g
1300             (spills=1 reloads=3)
1301          TOTAL                                   7.74u  0.34s  1.62g
1302    
1303    Implementation details:
1304    
1305    As far as I can tell, the purpose of the CPS spill module is to make sure the
1306    number of live variables at any program point (the bandwidth)
1307    does not exceed a certain limit, which is determined by the
1308    size of the spill area.
1309    
1310    When the bandwidth is too large, we decrease the register pressure by
1311    packing live variables into spill records.  How we achieve this is
1312    completely different than what we did in the old code.
1313    
1314    First, there is something about the MLRiscGen code generator
1315    that we should be aware of:
1316    
1317    o MLRiscGen performs code motion!
1318    
1319       In particular, it will move floating point computations and
1320       address computations involving only the heap pointer to
1321       their use sites (if there is only a single use).
1322       What this means is that if we have a CPS record construction
1323       statement
1324    
1325           RECORD(k,vl,w,e)
1326    
1327       we should never count the new record address w as live if w
1328       has only one use (which is often the case).
1329    
1330       We should do something similar to floating point, but the transformation
1331       there is much more complex, so I won't deal with that.
1332    
1333    Secondly, there are now two new cps primops at our disposal:
1334    
1335     1. rawrecord of record_kind option
1336        This pure operator allocates some uninitialized storage from the heap.
1337        There are two forms:
1338    
1339         rawrecord NONE [INT n]  allocates a tagless record of length n
1340         rawrecord (SOME rk) [INT n] allocates a tagged record of length n
1341                                     and initializes the tag.
1342    
1343     2. rawupdate of cty
1344          rawupdate cty (v,i,x)
1345          Assigns to x to the ith component of record v.
1346          The storelist is not updated.
1347    
1348    We use these new primops for both spilling and increment record construction.
1349    
1350     1. Spilling.
1351    
1352        This is implemented with a linear scan algorithm (but generalized
1353        to trees).  The algorithm will create a single spill record at the
1354        beginning of the cps function and use rawupdate to spill to it,
1355        and SELECT or SELp to reload from it.  So both spills and reloads
1356        are fine-grain operations.  In contrast, in the old algorithm
1357        "spills" have to be bundled together in records.
1358    
1359        Ideally, we should sink the spill record construction to where
1360        it is needed.  We can even split the spill record into multiple ones
1361        at the places where they are needed.  But CPS is not a good
1362        representation for global code motion, so I'll keep it simple and
1363        am not attempting this.
1364    
1365     2. Incremental record construction (aka record splitting).
1366    
1367        Long records with many component values which are simulatenously live
1368        (recall that single use record addresses are not considered to
1369         be live) are constructed with rawrecord and rawupdate.
1370        We allocate space on the heap with rawrecord first, then gradually
1371        fill it in with rawupdate.  This is the technique suggested to me
1372        by Matthias.
1373    
1374        Some restrictions on when this is applicable:
1375        1. It is not a VECTOR record.  The code generator currently does not handle
1376           this case. VECTOR record uses double indirection like arrays.
1377        2. All the record component values are defined in the same "basic block"
1378           as the record constructor.  This is to prevent speculative
1379           record construction.
1380    
1381    ----------------------------------------------------------------------
1382    Name: Allen Leung
1383    Date: 2002/02/22 01:02:00 EST
1384    Tag: leunga-20020222-mlrisc-tools
1385    
1386    Minor bug fixes in the parser and rewriter
1387    
1388    ----------------------------------------------------------------------
1389    Name: Allen Leung
1390    Date: 2002/02/21 20:20:00 EST
1391    Tag: leunga-20020221-peephole
1392    
1393    Regenerated the peephole files.  Some contained typos in the specification
1394    and some didn't compile because of pretty printing bugs in the old version
1395    of 'nowhere'.
1396    
1397    ----------------------------------------------------------------------
1398    Name: Allen Leung
1399    Date: 2002/02/19 20:20:00 EST
1400    Tag: leunga-20020219-mlrisc-tools
1401    Description:
1402    
1403       Minor bug fixes to the mlrisc-tools library:
1404    
1405       1.  Fixed up parsing colon suffixed keywords
1406       2.  Added the ability to shut the error messages up
1407       3.  Reimplemented the pretty printer and fixed up/improved
1408           the pretty printing of handle and -> types.
1409       4.  Fixed up generation of literal symbols in the nowhere tool.
1410       5.  Added some SML keywords to to sml.sty
1411    
1412    ----------------------------------------------------------------------
1413    Name: Matthias Blume
1414    Date: 2002/02/19 16:20:00 EST
1415    Tag: blume-20020219-cmffi
1416    Description:
1417    
1418    A wild mix of changes, some minor, some major:
1419    
1420    * All C FFI-related libraries are now anchored under $c:
1421        $/c.cm      --> $c/c.cm
1422        $/c-int.cm  --> $c/internals/c-int.cm
1423        $/memory.cm --> $c/memory/memory.cm
1424    
1425    * "make" tool (in CM) now treats its argument pathname slightly
1426      differently:
1427        1. If the native expansion is an absolute name, then before invoking
1428           the "make" command on it, CM will apply OS.Path.mkRelative
1429           (with relativeTo = OS.FileSys.getDir()) to it.
1430        2. The argument will be passed through to subsequent phases of CM
1431           processing without "going native".  In particular, if the argument
1432           was an anchored path, then "make" will not lose track of that anchor.
1433    
1434    * Compiler backends now "know" their respective C calling conventions
1435      instead of having to be told about it by ml-nlffigen.  This relieves
1436      ml-nlffigen from one of its burdens.
1437    
1438    * The X86Backend has been split into X86CCallBackend and X86StdCallBackend.
1439    
1440    * Export C_DEBUG and C_Debug from $c/c.cm.
1441    
1442    * C type encoding in ml-nlffi-lib has been improved to model the conceptual
1443      subtyping relationship between incomplete pointers and their complete
1444      counterparts.  For this, ('t, 'c) ptr has been changed to 'o ptr --
1445      with the convention of instantiating 'o with ('t, 'c) obj whenever
1446      the pointer target type is complete.  In the incomplete case, 'o
1447      will be instantiated with some "'c iobj" -- a type obtained by
1448      using one of the functors PointerToIncompleteType or PointerToCompleteType.
1449    
1450      Operations that work on both incomplete and complete pointer types are
1451      typed as taking an 'o ptr while operations that require the target to
1452      be known are typed as taking some ('t, 'c) obj ptr.
1453    
1454      voidptr is now a bit "more concrete", namely "type voidptr = void ptr'"
1455      where void is an eqtype without any values.  This makes it possible
1456      to work on voidptr values using functions meant to operate on light
1457      incomplete pointers.
1458    
1459    * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has
1460      been vastly simplified.
1461    
1462    ----------------------------------------------------------------------
1463    Name: Matthias Blume
1464    Date: 2002/02/19 10:48:00 EST
1465    Tag: blume-20020219-pqfix
1466    Description:
1467    
1468    Applied Chris Okasaki's bug fix for priority queues.
1469    
1470    ----------------------------------------------------------------------
1471    Name: Matthias Blume
1472    Date: 2002/02/15 17:05:00
1473    Tag: Release_110_39
1474    Description:
1475    
1476    Last-minute retagging is becoming a tradition... :-(
1477    
1478    This is the working release 110.39.
1479    
1480    ----------------------------------------------------------------------
1481    Name: Matthias Blume
1482    Date: 2002/02/15 16:00:00 EST
1483    Tag: Release_110_39-orig
1484    Description:
1485    
1486    Working release 110.39.  New bootfiles.
1487    
1488    (Update: There was a small bug in the installer so it wouldn't work
1489    with all shells.  So I retagged. -Matthias)
1490    
1491    ----------------------------------------------------------------------
1492    Name: Matthias Blume
1493    Date: 2002/02/15 14:17:00 EST
1494    Tag: blume-20020215-showbindings
1495    Description:
1496    
1497    Added EnvRef.listBoundSymbols and CM.State.showBindings.  Especially
1498    the latter can be useful for exploring what bindings are available at
1499    the interactive prompt.  (The first function returns only the list
1500    of symbols that are really bound, the second prints those but also the
1501    ones that CM's autoloading mechanism knows about.)
1502    
1503    ----------------------------------------------------------------------
1504    Name: Matthias Blume
1505    Date: 2002/02/15 12:08:00 EST
1506    Tag: blume-20020215-iptrs
1507    Description:
1508    
1509    Two improvements to ml-nlffigen:
1510    
1511      1. Write files only if they do not exist or if their current contents
1512         do not coincide with what's being written.  (That is, avoid messing
1513         with the time stamps unless absolutely necessary.)
1514    
1515      2. Implement a "repository" mechanism for generated files related
1516         to "incomplete pointer types".   See the README file for details.
1517    
1518    ----------------------------------------------------------------------
1519  Name: Matthias Blume  Name: Matthias Blume
1520  Date: 2002/02/14 11:50:00 EST  Date: 2002/02/14 11:50:00 EST
1521  Tag: blume-20020214-quote  Tag: blume-20020214-quote

Legend:
Removed from v.1066  
changed lines
  Added in v.1334

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