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 1156, Thu Mar 21 22:01:11 2002 UTC revision 1347, Thu Aug 28 21:59:15 2003 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Matthias Blume (blume@tti-c.org)
17    Date: 2003/08/28 17:00:00 CDT
18    Tag: blume-20030828-intinf
19    Description:
20    
21    This is a major update which comes with a version number bump
22    (110.42.99 -- yes, we are really close to 110.43 :-), NEW BOOTFILES,
23    and an implementation of IntInf in the Basis.
24    
25    There are a fairly large number of related changes and updates throughout
26    the system:
27    
28    Basis:
29            - Implemented IntInf.
30            - Made LargeInt a projection of IntInf (by filtering through INTEGER).
31            - Added some missing Real54 operations, most notably Real.toLargeInt.
32            - Added FixedInt as a synonym for Int32.
33    
34    compiler:
35            * Added support for a built-in intinf type.
36              - literals
37              - pattern matching
38              - conversion shortcuts (Int32.fromLarge o Int.toLarge etc.)
39              - overloading on literals and operations
40    
41            This required adding a primitive type intinf, some additional
42            primops, and implementations for several non-trivial intinf
43            operations in Core.  (The intinf type is completely abstract
44            to the compiler; all operations get delegated back to the Core.)
45    
46            * Intinf equality is handled by polyequal.  However, the compiler
47            does not print its usual warning in this case (since polyequal
48            is the right thing to do there).
49    
50            * Improved the organization of structure InlineT.
51    
52            * A word about conversion primops:
53            If conversions involving intinf do not cancel out during
54            CPS contract, the compiler must insert calls to Core functions.
55            Since all core access must be resolved already during the FLINT
56            translate phase, it would be too late a the time of CPS contract
57            to add now Core calls.  For this reason, conversion primops
58            for intinf carry two arguments:  1. the numeric argument that
59            they are supposed to convert, and 2. the Core function that
60            can help with this conversion if necessary.  If CPS contract
61            eliminates the primop, the Core functions become dead and go
62            away.  Intinf conversion primops that do not get eliminated
63            by CPS contract get rewritten into calls of those core functions
64            by a separate, new phase.
65    
66    interactive system:
67            - Control.Print.intinfDepth controls max length of intinf constants
68            being printed. (Analogous to Control.Print.stringDepth.)
69            - Cleanup in printutil and pputil: got rid of unused stuff and
70            duplicates; replaced some of the code with code that makes better
71            use of library functionality.
72    
73    CM:
74            Bugfix: parse-errors in init group (system/smlnj/init/init.cmi)
75            are no longer silent.
76    
77    CKIT:
78            Fixed mismatched uses of Int32 and LargeInt.  I always decided
79            in favor of LargeInt -- which is now the same as IntInf.
80            CKIT-knowledgable people should check whether this is what's
81            intended and otherwise change things back to using Int32 or
82            FixedInt.
83    
84    Throughout the code:
85            Started useng IntInf.int literals and built-in operations
86            (e.g., comparison with 0) where this seems appropriate.
87    
88    
89    ----------------------------------------------------------------------
90    Name: Dave MacQueen (dbm@cs.uchicago.edu)
91    Date: 2003/08/13 11:36:00 CDT
92    Tag: dbm-20030813-mcz-merge1
93    Description:
94    
95    Merging changes from the mcz-branch development branch into trunk.
96    These changes involve replacement of the emulated old prettyprinter
97    interface with direct use of the SML/NJ Lib PP library, and fixing
98    of a couple of bugs (895, 1186) relating to error messages.  A new
99    prettyprinter for ast datatypes (Elaborator/print/ppast.{sig,sml})
100    has been added.
101    
102    ----------------------------------------------------------------------
103    Name: Matthias Blume (blume@tti-c.org)
104    Date: 2003/08/11 15:45:00 CDT
105    Tag: blume-20030811-windows
106    Description:
107    
108    Version number bumped to 110.42.9.  NEW BOOTFILES!!!
109    
110        http://smlnj.cs.uchicago.edu/dist/working/110.42.9/
111    
112    This patch restores SML/NJ's ability to run under win32.  There are a
113    number of changes, including fixes for several bugs that had gone
114    unnoticed until now:
115    
116      - uname "CYGWIN_NT*" is recognized as win32 (This is relevant only when
117        trying to run the win32 version from within cygwin.)
118    
119      - There are a number of simple .bat scripts that substitute for their
120        corresponding Unix shell-scripts.  (See below.)
121    
122      - The internals of ml-build have been modified slightly.  The main
123        difference is that instead of calling ".link-sml" (or link-sml.bat)
124        using OS.Process.system, the ML process delegates this task back
125        to the script.  Otherwise problems arise in mixed environments such
126        as Cygwin where scripts look and work like Unix scripts, but
127        where OS.Process.system cannot run them.
128    
129      - In CM, the srcpath pickler used native pathname syntax -- which
130        is incorrect in the case of cross-compilation.  The new pickle format
131        is independent of platform-specific naming conventions.
132    
133      - Path configuration files (such as lib/pathconfig) can now choose
134        between native and standard syntax.  Placing a line of the form
135    
136            standard!
137    
138        into the file causes all subsequent paths to be interpreted using
139        CM standard pathname syntax (= Unix conventions); a line
140    
141            native!
142    
143        switches back to native style.  This was needed so that
144        path config files can be written portably, see src/system/pathconfig.
145    
146      - Runtime system:
147    
148          - win32-filesys.c:  get_file_time and set_file_time now
149            access modification time, not creation time.
150    
151          - I/O code made aware of new array representation.
152    
153          - Bug fixes in X86.prim.masm.
154    
155       - src/system/makeml made aware of win32. (For use under cygwin
156            and other Unix-environments for windows.)
157    
158       - In Basis, fixed off-by-one error in win32-io.sml (function vecF)
159         which caused BinIO.inputAll to fail consistently.
160    
161    .bat scripts:
162    
163       Windows .bat scripts assume that SMLNJ_HOME is defined.
164    
165       - sml.bat, ml-yacc.bat, ml-lex.bat:  Driver scripts for standalone
166         applications (sml, ml-yacc, ml-lex).
167       - ml-build.bat: analogous to ml-build.
168       - config\install.bat:  Analogous to config/install.sh.  This requires
169         that SMLNJ_HOME is set and that Microsoft Visual C is ready to use.
170         (nmake etc. must be on the path, and vcvars32 must have been run.)
171         Moreover, sources for ml-lex and ml-yacc need to exist under src,
172         and the bootfile hierarchy must have been unpacked under
173         sml.boot.x86-win32.
174         The script is very primitive and does a poor job at error checking.
175         It only installs the base system, ml-lex, and ml-yacc.  No other
176         libraries are being installed (i.e., you get only those that
177         are part of the compiler.)
178       - link-sml.bat:  analogous to .link-sml, but not currently used
179    
180    Unrelated bug fixes:
181    
182      - ml-nlffigen now exports structures ST_* corresponding to incomplete
183        types.
184      - Added getDevice to PP/src/pp-debug-fn.sml.  (Would not compile
185        otherwise.)
186    
187    ----------------------------------------------------------------------
188    Name: Dave MacQueen (macqueen@cs.uchicago.edu)
189    Date: 2003/06/17
190    Tag: macqueen-20030617-bug895
191    Description:
192    
193    Modified compiler/Elaborator/print/pptype.sml to fix bug 895.
194    Tag will be used for new development branch (mcz-branch) for
195    use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago.
196    
197    ----------------------------------------------------------------------
198    Name: Matthias Blume (blume@tti-c.org)
199    Date: 2003/05/27 16:55:00 CDT
200    Tag: blume-20030527-polyeq
201    Description:
202    
203    Tried to eliminated most cases of polymorphic equality.
204    
205    ----------------------------------------------------------------------
206    Name: Matthias Blume (blume@tti-c.org)
207    Date: 2003/05/21 17:45:00 CDT
208    Tag: blume-20030517-complete
209    Description:
210    
211    Two changes:
212    
213      1. Added a flag for controlling whether non-exhaustive bindings will
214         be treated as errors (default is false).
215      2. Cleaned up the *entire* source tree so that CMB.make goes through
216         without a single non-exhaustive match- or bind warning.
217    
218    ----------------------------------------------------------------------
219    Name: Matthias Blume (blume@tti-c.org)
220    Date: 2003/05/17 10:20:00 CDT
221    Tag: blume-20030517-absyn
222    Description:
223    
224    1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
225    
226       This mainly affects the quality of error messages.  However, some
227       of the code is now more straightforward than before. (Treatment of
228       the above four constructs in translate.sml is much simpler than
229       the "macro-expansion" that was going on before.  Plus, the mach-
230       compiler no longer gets invoked just to be able to compile an
231       if-expression.)
232    
233    2. The ErrorMsg.Error exception is now caught and absorbed by the
234       interactive loop.
235    
236    ----------------------------------------------------------------------
237    Name: Allen Leung
238    Date: 2003/05/16 13:05:00 CDT
239    Tag: leunga-20030516-cygwin-runtime
240    Description:
241    
242        Ported the runtime system to cygwin, which uses the unix
243    x86-unix bin files.  Missing/buggy features:
244    
245       o getnetbyname, getnetbyaddr: these functions seem to be missing in
246         the Cygwin library.
247       o Ctrl-C handling may be flaky.
248       o Windows system calls and Windows I/O are not supported.
249    
250       A new set of binfiles is located at:
251    
252         http://www.dorsai.org/~leunga/boot.x86-unix.tgz
253    
254       This is only needed for bootstrapping the cygwin version of smlnj.
255       Other x86 versions can use the existing binfiles.
256    
257    ----------------------------------------------------------------------
258    Name: Matthias Blume
259    Date: 2003/04/08 15:42:00 CDT
260    Tag: blume-20030408-listpair
261    Description:
262    
263    1. Added a target 'mlrisc' to installer.
264    
265    2. Added missing elements to structure ListPair.
266    
267    ----------------------------------------------------------------------
268    Name: Allen Leung
269    Date: 2003/01/07 10:40:00 EST
270    Tag: leunga-20030107-int-rem
271    Description:
272    
273    Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86.
274    The arguments to the SUBL instruction were swapped.
275    
276    ----------------------------------------------------------------------
277    Name: Matthias Blume
278    Date: 2002/12/12 16:25:00 EST
279    Tag: blume-20021212-risc-ra
280    Description:
281    
282    Fixed a serious bug in the rewrite code for FP spilling/reloading that
283    sent the RA into an infinite loop when floating point registers get
284    spilled.  (Because of this bug, e.g., nucleic stopped compiling between
285    110.37 and 110.38.)
286    There was another set of potential problems related to the handling of
287    MLRISC annotations (but those did not yet cause real problems, apparently).
288    
289    ----------------------------------------------------------------------
290    Name: Matthias Blume
291    Date: 2002/12/06 22:40:00 EST
292    Tag: blume-20021206-cm-fileid
293    Description:
294    
295    Added a call of SrcPath.sync at the beginning of Parse.parse (in CM).
296    This fixes the problem of CM getting confused by files that suddenly
297    change their identity (e.g., by getting unlinked and recreated by some
298    text editor such as vi).  There might be a better/cheaper/cleaner way
299    of doing this, but for now this will have to do.
300    
301    ----------------------------------------------------------------------
302    Name: Matthias Blume
303    Date: 2002/10/28 09:50:00 EST
304    Tag: blume-20021028-typecheck
305    Description:
306    
307    Exported structure Typecheck from $smlnj/viscomp/core.cm.
308    
309    ----------------------------------------------------------------------
310    Name: Matthias Blume
311    Date: 2002/10/17 09:10:00 EDT
312    Tag: Release_110_42
313    Description:
314    
315    In good old tradition, there has been a slight hiccup so that we have
316    to patch 110.42 after the fact.   The old release tag has been replaced
317    (see below).
318    
319    The change solves a problem with two competing approaches the
320    configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in
321    each other's way.
322    
323    This change only affects the runtime system code and the installer script.
324    (No new bootfiles.)
325    
326    ----------------------------------------------------------------------
327    Name: Matthias Blume
328    Date: 2002/10/16 12:00:00 EDT
329    Tag: Release_110_42_removed
330    Description:
331    
332    New working release.  New bootfiles.
333    
334    ----------------------------------------------------------------------
335    Name: Matthias Blume
336    Date: 2002/10/10 13:10:00 EDT
337    Tag: blume-20021010-ppc-divs
338    Description:
339    
340    The mltree operator DIVS must be implemented with an overflow check on
341    the PPC because the hardware indicates divide-by-zero using "overflow" as
342    well.
343    
344    ----------------------------------------------------------------------
345    Name: Matthias Blume
346    Date: 2002/07/23 11:45:00
347    Tag: blume-20020723-smlnj-home
348    Description:
349    
350    Sml now senses the SMLNJ_HOME environment variable.  If this is set,
351    then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless
352    CM_PATHCONFIG is also set), the path configuration file is assumed
353    to be in $SMLNJ_HOME/lib/pathconfig.  This way one can easily move
354    the entire tree to some other place and everything will "just work".
355    
356    (Companion commands such as ml-build and ml-makedepend also sense this
357    variable.)
358    
359    ----------------------------------------------------------------------
360    Name: Matthias Blume
361    Date: 2002/07/12 21:19:00 EDT
362    Tag: blume-20020712-liveness
363    Description:
364    
365    Exported two useful "step" functions from liveness module (MLRISC).
366    
367    ----------------------------------------------------------------------
368    Name: Matthias Blume
369    Date: 2002/07/05 16:00 EDT
370    Tag: Release_110_41
371    Description:
372    
373    New working release.  New bootfiles.
374    
375    ----------------------------------------------------------------------
376    Name: Matthias Blume
377    Date: 2002/07/05 10:25:00 EDT
378    Tag: blume-20020705-btimp
379    Description:
380    
381    Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that
382    other clients can set up backtracing support.
383    
384    ----------------------------------------------------------------------
385    Name: Matthias Blume
386    Date: 2002/06/25 17:23:00 EDT
387    Tag: blume-20020625-fpmax
388    Description:
389    
390    Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point
391    case.  (The sense of the isNaN test was reversed -- which made min and
392    max always return their first argument.)
393    
394    ----------------------------------------------------------------------
395    Name: Matthias Blume
396    Date: 2002/06/11
397    Tag: blume-20020611-unixpath
398    Description:
399    
400    Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
401    
402    ----------------------------------------------------------------------
403    Name: Matthias Blume
404    Date: 2002/06/10 16:35:00 EDT
405    Tag: blume-20020610-ieeereal
406    Description:
407    
408    I back-ported my implementation of IEEEReal.fromString from the
409    idlbasis-devel branch so that we can test it.
410    
411    Another small change is that ppDec tries to give more information
412    than just "<sig>" in the case of functors.  However, this code is
413    broken in some mysterious way if the functor's body's signature
414    has not been declared by ascription but gets inferred from the
415    implementation.  This needs fixing...
416    
417    ----------------------------------------------------------------------
418    Name: Matthias Blume
419    Date: 2002/05/31
420    Tag: blume-20020531-btrace-mode
421    Description:
422    
423    Resurrected SMLofNJ.Internals.BTrace.mode.  (It accidentally fell by
424    the wayside when I switched over to using Controls everywhere.)
425    
426    ----------------------------------------------------------------------
427    Name: Lal George
428    Date: 2002/05/23 12:21:40 EDT
429    Tag: george-20020523-visual-labels
430    Description:
431    
432    Labels are now displayed in the graphical output to make
433    the fall-through and target blocks obvious.
434    
435    ----------------------------------------------------------------------
436    Name: Matthias Blume
437    Date: 2002/05/22 11:03:00 EDT
438    Tag: blume-20020522-shrink
439    Description:
440    
441    John tweaked yesterday's fix for 1131 to handle an out-of-memory
442    situation that comes up when allocating huge arrays.
443    
444    ----------------------------------------------------------------------
445    Name: Matthias Blume
446    Date: 2002/05/21 16:00:00 EDT
447    Tag: Release_110_40
448    Description:
449    
450    New working release (110.40).  New bootfiles.
451    
452    [Also: John Reppy fixed GC bug 1131.]
453    
454    ----------------------------------------------------------------------
455    Name: Matthias Blume
456    Date: 2002/05/21 12:35:00 EDT
457    Tag: blume-20020521-cmdoc
458    Description:
459    
460    CM documentation update.
461    
462    ----------------------------------------------------------------------
463    Name: Matthias Blume
464    Date: 2002/05/21 10:55:00 EDT
465    Tag: blume-20020521-misc
466    Description:
467    
468    - John tweaked runtime to be silent on heap export (except when
469      GC messages are on).
470    - I added a few more things (cross-compiling versions of CMB) to
471      config/preloads (as suggestions).
472    
473    ----------------------------------------------------------------------
474    Name: Matthias Blume
475    Date: 2002/05/20 22:25:00 EDT
476    Tag: blume-20020520-controls
477    Description:
478    
479    - Added ControlUtil structure to control-lib.cm.
480    - Use it throughout.
481    - Used Controls facility to define MLRISC controls (as opposed to
482      registering MLRISC control ref cells with Controls after the fact)
483    - Fixed messed-up controls priorities.
484    
485    * Removed again all the stuff from config/preloads that one wouldn't
486      be able to preload at the time the initial heap image is built.
487      (Many libraries, e.g., CML, do not exist yet at this time.  The
488       only libraries that can be preloaded via config/preloads are those
489       that come bundled with the bootfiles.)
490    
491    ----------------------------------------------------------------------
492    Name: Matthias Blume
493    Date: 2002/05/20 10:59:00 EDT
494    Tag: blume-20020520-preloads
495    Description:
496    
497    Added a lot of commented-out suggestions for things to be included
498    in config/preloads.
499    
500    ----------------------------------------------------------------------
501    Name: Allen Leung
502    Date: 2002/05/18 14:20:00 EDT
503    Tag: leunga-20020518-mdl
504    Description:
505    
506    o Made the mdl tool stuff compile and run again.
507    o I've disabled all the stuff that depends on RTL specifications; they
508      are all badly broken anyway.
509    
510    ----------------------------------------------------------------------
511    Name: Matthias Blume
512    Date: 2002/05/17 16:49:00 EDT
513    Tag: blume-20020517-controls
514    Description:
515    
516    0. John Reppy made several modifications to the SML/NJ library.
517       In particular, there is a shiny new controls-lib.cm.
518    
519    1. Pushed new controls interface through compiler so that everything
520       compiles again.
521    
522    2. Added FormatComb and FORMAT_COMB to the CML version of the
523       SML/NJ library (so that CML compiles again).
524    
525    3. Modified init scripts because XXX_DEFAULT environment variables
526       are no longer with us.  (Boot-time initialization is now done
527       using the same environment variables that are also used for
528       startup-time initialization of controls.)
529    
530    ----------------------------------------------------------------------
531    Name: Lal George
532    Date: 2002/05/15 09:20:10 EDT
533    Tag: george-20020515-pseudo-op-decls
534    Description:
535    
536            All pseudo-ops emitted before the first segment declaration
537    such as TEXT, DATA, and BSS directives are assumed to be global
538    declarations and are emitted first in the assembly file. This is
539    useful in a number of situations where one has pseudo-ops that are not
540    specific to any segment, and also works around the constraint that one
541    cannot have client pseudo-ops in the TEXT segment.
542    
543            Because no segment is associated with these declarations it is
544    an error to allocate any space or objects before the first segment
545    directive and an exception will be raised. However, we cannot make
546    this check for client pseudo-ops.
547    
548            These top level declarations are a field in the CFG graph_info.
549    In theory you can continue to add to this field after the CFG has been
550    built -- provided you know what you are doing;-)
551    
552    ----------------------------------------------------------------------
553    Name: Matthias Blume
554    Date: 2002/05/13 16:40:00 EDT
555    Tag: blume-20020513-pp-etc
556    Description:
557    
558    A few minor bugfixes:
559    
560      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
561        (Bogus printouts for redefined bindings still occur.  Compiler
562        bug should no longer occur now.  We need to redo the prettyprinter
563        from scratch.)
564    
565      - CM pathname printer now also adds escape sequences for ( and )
566    
567      - commend and docu fixes for ml-nlffi
568    
569    ----------------------------------------------------------------------
570    Name: Matthias Blume
571    Date: 2002/05/10 16:40:00 EDT
572    Tag: blume-20020510-erg-textio
573    Description:
574    
575    Applied the following bugfix provided by Emden Gansner:
576    
577        Output is corrupted when outputSubstr is used rather than output.
578    
579        The problem occurs when a substring
580    
581            ss = (s, dataStart, dataLen)
582    
583        where dataStart > 0, fills a stream buffer with avail bytes left.
584        avail bytes of s, starting at index dataStart, are copied into the
585        buffer, the buffer is flushed, and then the remaining dataLen-avail
586        bytes of ss are copied into the beginning of the buffer. Instead of
587        starting this copy at index dataStart+avail in s, the current code
588        starts the copy at index avail.
589    
590        Fix:
591        In text-io-fn.sml, change line 695 from
592             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
593        to
594             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
595    
596    ----------------------------------------------------------------------
597    Name: Matthias Blume
598    Date: 2002/04/12 13:55:00 EDT
599    Tag: blume-20020412-assyntax
600    Description:
601    
602    1. Grabbed newer assyntax.h from the XFree86 project.
603    2. Fiddled with how to compile X86.prim.asm without warnings.
604    3. (Very) Minor cleanup in CM.
605    
606    ----------------------------------------------------------------------
607    Name: Matthias Blume
608    Date: 2002/04/01 (no joke!) 17:07:00 EST
609    Tag: blume-20020401-x86div
610    Description:
611    
612    Added full support for div/mod/rem/quot on the x86, using the machine
613    instruction's two results (without clumsily recomputing the remainder)
614    directly where appropriate.
615    
616    Some more extensive power-of-two support was added to the x86 instruction
617    selector (avoiding expensive divs, mods, and muls where they can be
618    replaced with cheaper shifts and masks).  However, this sort of thing
619    ought to be done earlier, e.g., within the CPS optimizer so that
620    all architectures benefit from it.
621    
622    The compiler compiles to a fixed point, but changes might be somewhat
623    fragile nevertheless.  Please, report any strange things that you might
624    see wrt. div/mod/quot/rem...
625    
626    ----------------------------------------------------------------------
627    Name: Matthias Blume
628    Date: 2002/03/29 17:22:00
629    Tag: blume-20020329-div
630    Description:
631    
632    Fixed my broken div/mod logic.  Unfortunately, this means that the
633    inline code for div/mod now has one more comparison than before.
634    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
635    The problem was with quotient = 0, because that alone does not tell
636    us which way the rounding went.  One then has to look at whether
637    remainder and divisor have the same sign...  :(
638    
639    Anyway, I replaced the bootfiles with fresh ones...
640    
641    ----------------------------------------------------------------------
642    Name: Matthias Blume
643    Date: 2002/03/29 14:10:00 EST
644    Tag: blume-20020329-inlprims
645    Description:
646    
647    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
648    
649    Primops have changed. This means that the bin/boot-file formats have
650    changed as well.
651    
652    To make sure that there is no confusion, I made a new version.
653    
654    
655    CHANGES:
656    
657    * removed REMT from mltree (remainder should never overflow).
658    
659    * added primops to deal with divisions of all flavors to the frontend
660    
661    * handled these primops all the way through so they map to their respective
662      MLRISC support
663    
664    * used these primops in the implementation of Int, Int32, Word, Word32
665    
666    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
667    
668    * parameterized INLMIN, INLMAX, and INLABS by a numkind
669    
670    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
671      floating point
672    
673    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
674      and Real (but Real.abs maps to a separate floating-point-only primop)
675    
676    
677    TODO items:
678    
679    * Hacked Alpha32 instruction selection, disabling the selection of REMx
680      instructions because the machine instruction encoder cannot handle
681      them.  (Hppa, PPC, and Sparc instruction selection did not handle
682      REM in the first place, and REM is supported by the x86 machine coder.)
683    
684    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
685      selection phase.  (The two can be streamlined because the hardware
686      delivers both quotient and remainder at the same time anyway.)
687    
688    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
689      (Currently the behavior is inconsistent both across architectures and
690      wrt. the draft Basis spec.)
691    
692    * Word8 should eventually be handled natively, too.
693    
694    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
695      as if there currently is no execution path that could trigger it in
696      SML/NJ.  (The assumptions underlying functions arith and promotable do not
697      hold for things like multiplication and division.)
698    
699    ----------------------------------------------------------------------
700    Name: Matthias Blume
701    Date: 2002/03/27 16:27:00 EST
702    Tag: blume-20020327-mlrisc-divisions
703    Description:
704    
705    Added support for all four division operations (ML's div, mod, quot,
706    and rem) to MLRISC.  In the course of doing so, I also rationalized
707    the naming (no more annoying switch-around of DIV and QUOT), by
708    parameterizing the operation by div_rounding_mode (which can be either
709    DIV_TO_ZERO or DIV_TO_NEGINF).
710    
711    The generic MLTreeGen functor takes care of compiling all four
712    operations down to only round-to-zero div.
713    
714    Missing pieces:
715    
716      * Doing something smarter than relying on MLTreeGen on architectures
717        like, e.g., the x86 where hardware division delivers both quotient and
718        remainder at the same time.  With this, the implementation of the
719        round-to-neginf operations could be further streamlined.
720    
721      * Remove inlining support for div/mod/rem from the frontend and replace it
722        with primops that get carried through to the backend.  Do this for all
723        int and word types.
724    
725    ----------------------------------------------------------------------
726    Name: Matthias Blume
727    Date: 2002/03/25 17:25:00 EST
728    Tag: blume-20020325-divmod
729    Description:
730    
731    I improved (hopefully without breaking them) the implementation of Int.div,
732    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
733    advantage of the following observations:
734    
735      Let  q = x quot y      r = x rem y
736           d = x div  y      m = x mod y
737    
738    where "quot" is the round-to-zero version of integer division that
739    hardware usually provides.  Then we have:
740    
741         r = x - q * y        where neither the * nor the - will overflow
742         d = if q >= 0 orelse x = q * y then q else q - 1
743                              where neither the * nor the - will overflow
744         m = if q >= 0 orelse r = 0 then r else r + y
745                              where the + will not overflow
746    
747    This results in substantial simplification of the generated code.
748    The following table shows the number of CFG nodes and edges generated
749    for
750            fun f (x, y) = x OPER y
751            (* with OPER \in div, mod, quot, rem *)
752    
753    
754        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
755        --------------------------------------------------------
756         div |         24 |         39 |         12 |         16
757         mod |         41 |         71 |         12 |         16
758        quot |          8 |         10 |          8 |         10
759         rem |         10 |         14 |          8 |         10
760    
761    
762    ----------------------------------------------------------------------
763    Name: Matthias Blume
764    Date: 2002/03/25 22:06:00 EST
765    Tag: blume-20020325-cprotobug
766    Description:
767    
768    Fixed a bug in cproto (c prototype decoder).
769    
770    ----------------------------------------------------------------------
771    Name: Matthias Blume
772    Date: 2002/03/25 16:00:00 EST
773    Tag: blume-20020325-raw-primops
774    Description:
775    
776    I did some cleanup to Allen's new primop code and
777    replaced yesterday's bootfiles with new ones.
778    (But they are stored in the same place.)
779    
780    ----------------------------------------------------------------------
781    Name: Matthias Blume
782    Date: 2002/03/24 22:40:00 EST
783    Tag: blume-20020324-bootfiles
784    Description:
785    
786    Made the bootfiles that Allen asked for.
787    
788    ----------------------------------------------------------------------
789    Name: Allen Leung
790    Date: 2002/03/23 15:50:00 EST
791    Tag: leunga-20020323-flint-cps-rcc-primops
792    Description:
793    
794      1. Changes to FLINT primops:
795    
796        (* make a call to a C-function;
797         * The primop carries C function prototype information and specifies
798         * which of its (ML-) arguments are floating point. C prototype
799         * information is for use by the backend, ML information is for
800         * use by the CPS converter. *)
801      | RAW_CCALL of { c_proto: CTypes.c_proto,
802                       ml_args: ccall_type list,
803                       ml_res_opt: ccall_type option,
804                       reentrant : bool
805                     } option
806       (* Allocate uninitialized storage on the heap.
807        * The record is meant to hold short-lived C objects, i.e., they
808        * are not ML pointers.  With the tag, the representation is
809        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
810        *)
811      | RAW_RECORD of {tag:bool,sz:int}
812      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
813    
814      2.  These CPS primops are now overloaded:
815    
816           rawload of {kind:numkind}
817           rawstore of {kind:numkind}
818    
819          The one argument form is:
820    
821             rawload {kind} address
822    
823          The two argument form is:
824    
825             rawload {kind} [ml object, byte-offset]
826    
827      3. RAW_CCALL/RCC now takes two extra arguments:
828    
829         a. The first is whether the C call is reentrant, i.e., whether
830            ML state should be saved and restored.
831         b. The second argument is a string argument specifying the name of
832            library and the C function.
833    
834         These things are currently not handled in the code generator, yet.
835    
836      4. In CProto,
837    
838         An encoding type of "bool" means "ml object" and is mapped into
839         C prototype of PTR.  Note that "bool" is different than "string",
840         even though "string" is also mapped into PTR, because "bool"
841         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
842    
843      5. Pickler/unpicker
844    
845         Changed to handle RAW_RECORD and newest RAW_CCALL
846    
847      6. MLRiscGen,
848    
849         1. Changed to handle the new rawload/rawstore/rawrecord operators.
850         2. Code for handling C Calls has been moved to a new module CPSCCalls,
851            in the file CodeGen/cpscompile/cps-c-calls.sml
852    
853      7. Added the conditional move operator
854    
855             condmove of branch
856    
857         to cps.  Generation of this is still buggy so it is currently
858         disabled.
859    
860    ----------------------------------------------------------------------
861    Name: Lal George
862    Date: 2002/03/22 14:18:25 EST
863    Tag: george-20020322-cps-branch-prob
864    Description:
865    
866    Implemented the Ball-Larus branch prediction-heuristics, and
867    incorporated graphical viewers for control flow graphs.
868    
869    Ball-Larus Heuristics:
870    ---------------------
871    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
872    
873    By design it uses the Dempster-Shafer theory for combining
874    probabilities.  For example, in the function:
875    
876        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
877    
878    the ball-larus heuristics predicts that the n=0 is unlikely
879    (OH-heuristic), and the 'then' branch is unlikely because of the
880    RH-heuristic -- giving the 'then' branch an even lower combined
881    probability using the Dempster-Shafer theory.
882    
883    Finally, John Reppy's loop analysis in MLRISC, further lowers the
884    probability of the 'then' branch because of the loop in the else
885    branch.
886    
887    
888    Graphical Viewing:
889    ------------------
890    I merely plugged in Allen's graphical viewers into the compiler. The
891    additional code is not much. At the top level, saying:
892    
893            Control.MLRISC.getFlag "cfg-graphical-view" := true;
894    
895    will display the graphical view of the control flow graph just before
896    back-patching.  daVinci must be in your path for this to work. If
897    daVinci is not available, then the default viewer can be changed
898    using:
899    
900            Control.MLRISC.getString "viewer"
901    
902    which can be set to "dot" or "vcg" for the corresponding viewers. Of
903    course, these viewers must be in your path.
904    
905    The above will display the compilation unit at the level of clusters,
906    many of which are small, boring, and un-interesting. Also setting:
907    
908            Control.MLRISC.getInt "cfg-graphical-view_size"
909    
910    will display clusters that are larger than the value set by the above.
911    
912    
913    ----------------------------------------------------------------------
914    Name: Matthias Blume
915    Date: 2002/03/21 22:20:00 EST
916    Tag: blume-20020321-kmp-bugfix
917    Description:
918    
919    Changed the interface to the KMP routine in PreString and fixed
920    a minor bug in one place where it was used.
921    
922    ----------------------------------------------------------------------
923    Name: Allen Leung
924    Date: 2002/03/21 20:30:00 EST
925    Tag: leunga-20020321-cfg
926    Description:
927    
928      Fixed a potential problem in cfg edge splitting.
929    
930    ----------------------------------------------------------------------
931  Name: Allen Leung  Name: Allen Leung
932  Date: 2002/03/21 17:15:00 EST  Date: 2002/03/21 17:15:00 EST
933  Tag: leunga-20020321-x86-fp-cfg  Tag: leunga-20020321-x86-fp-cfg

Legend:
Removed from v.1156  
changed lines
  Added in v.1347

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