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

Legend:
Removed from v.1069  
changed lines
  Added in v.1383

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