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

Legend:
Removed from v.1158  
changed lines
  Added in v.1352

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