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

Legend:
Removed from v.1073  
changed lines
  Added in v.1387

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