Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/HISTORY
ViewVC logotype

Diff of /sml/trunk/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1158, Fri Mar 22 01:21:25 2002 UTC revision 1500, Fri May 28 21:44:42 2004 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Matthias Blume (blume (at) tti - c (dot) org)
17    Date: 2004/05/28 16:45:00 CDT
18    Tag: blume-20040528-basis
19    Description:
20    
21    Added signature PACK_REAL and exported functor PrimIO.
22    
23    ----------------------------------------------------------------------
24    Name: Matthias Blume (blume (at) tti - c (dot) org)
25    Date: 2004/05/25 16:00:00 CDT
26    Tag: blume-20040525-group-owner
27    Description:
28    
29    CM now ignores (but still accepts) the "owner" information in group
30    descriptions.  The owner of a group is its next enclosing
31    library. Each group must have a unique owner.  (There is a virtual
32    "toplevel" library that own groups which are not nested within a real
33    library.)  Previously, each group had to explicitly declare its owner,
34    and CM would check that such a declaration is correct.  The new scheme
35    is to have CM check that for each group there is precisely one owning
36    library.
37    
38    The advantage of the new scheme is that the programmer no longer needs
39    to maintain the somewhat annoying owner information.  The downside is
40    that CM cannot enforce the ownership rule across multiple runs of
41    CM.make.  Fortunately, enclosing the same group in two different
42    libraries A and B which are not part of the same program does not
43    cause real problems.
44    
45    ----------------------------------------------------------------------
46    Name: Matthias Blume (blume (at) tti - c (dot) org)
47    Date: 2004/05/20 16:00:00 CDT
48    Tag: blume-20040520-win32
49    Description:
50    
51    Made the win32 version work again.  (Strangely, a misplaced comma had
52    slipped into win32-process.c which prevented the runtime from being
53    compiled correctly.)
54    
55    Also, included a minor addition to ml-build.bat analogous to what was
56    done in blume-20040519-ml-build.
57    
58    ----------------------------------------------------------------------
59    Name: Matthias Blume (blume (at) tti - c (dot) org)
60    Date: 2004/05/19 22:10:00 CDT
61    Tag: blume-20040519-ml-build
62    Description:
63    
64    Arranged for ml-build to clean up after itself a little bit better.
65    The script generates a temporary SML source file and compiles it using
66    CM, so CM generates metadata (GUID, SKEL, objectfile) for it.  It now
67    gets rid of those at the end, so they don't accumulate under .cm.
68    
69    This required a minor change to install.sh because the name of the
70    metadata directory (default: .cm) is actually configurable at
71    installation time.
72    
73    ----------------------------------------------------------------------
74    Name: Matthias Blume (blume (at) tti - c (dot) org)
75    Date: 2004/05/18 15:50:00 CDT
76    Tag: blume-20040518-mkreader
77    Description:
78    
79    Added Posix.IO.mk{Bin,Text}{Reader,Writer} by lifting their respective
80    implementations from internal modules PosixBinPrimIO and PosixTextPrimIO.
81    
82    ----------------------------------------------------------------------
83    Name: Matthias Blume (blume (at) tti - c (dot) org)
84    Date: 2004/05/11 14:35:00 CDT
85    Tag: blume-20040511-win32sock
86    Description:
87    
88    Added previously missing support for many socket-related functions
89    under win32.  Thanks to David Hansel <hansel@reactive-systems.com>
90    for the voluminous patch!
91    
92    (I have not tested this patch under win32 yet.)
93    
94    Here is David's e-mail:
95    
96    Hi,
97    
98    Attached to this email you find a diff against sml/nj 110.45
99    that will enable socket support under Windows.
100    
101    To apply the patch (using unix or cygwin)
102    1) gunzip runtime.diff.gz
103    2) "cd" into "src/runtime" in the source tree of a fresh
104       110.45 installation.
105    3) patch -p 1 < [your/path/to]runtime.diff
106    
107    The code compiles fine but has NOT yet been extensively tested.
108    I only ran a few tests for basic socket client functionality
109    (which worked fine).  Especially the functions that use ioctl
110    are not tested at all and might not work (see below).
111    
112    I implemented this since we want to move to a newer version of sml/nj
113    but need socket support in order to use it.  This is the first time I
114    even had a look at the sml/nj source,  so please review my changes
115    before making this part of the distribution!  Here are a few issues
116    that I think might be better for someone to solve who is more
117    familiar with the sml/nj source (and socket programming):
118    
119    - getnetbyaddr.c and getnetbyname.c will raise a "not implemented"
120      exception since I could not figure out what the windows equivalent
121      of these functions is
122    
123    - In sockets-osdep.h there are a some #include statements that are
124      only used in a few files that include sockets-osdep.h
125    
126    - In smlnj-sock-lib.c, function init_fn() calls WSAStartup() but
127      does not process its return value since I don't know how to
128      report an error upwards.
129    
130    - It would probably be good to have a call to WSACleanup() when
131      the library is unloaded (if there is such a possibility).
132      Otherwise I think Windows will take care of this automatically
133      when the process finishes.
134    
135    - I used ioctlsocket() as a replacement for ioctl() but I have
136      no idea if that is actually the proper replacement on Windows.
137    
138    - All these issues are marked in the code by "FIXME" comments.
139    
140    We use sml/nj extensively in our products and are quite happy
141    with it.  I hope this contribution will help you.
142    
143    Keep up the good work!
144    
145    David
146    
147    ----------------------------------------------------------------------
148    Name: Matthias Blume (blume (at) tti - c (dot) org)
149    Date: 2004/05/11 14:20:00 CDT
150    Tag: blume-20040511-installml
151    Description:
152    
153    Fixed two bugs in installml script.  (Thanks to Vesa A. Norrman for
154    the patch.)
155    
156    ----------------------------------------------------------------------
157    Name: Matthias Blume (blume (at) tti - c (dot) org)
158    Date: 2004/05/11 14:05:00 CDT
159    Tag: blume-20040511-nlffi-netbsd
160    Description:
161    
162    Added support for nlffi under netbsd.  (Thanks to Vesa A. Norrman for
163    the patch.)
164    
165    ----------------------------------------------------------------------
166    Name: Matthias Blume (blume (at) tti - c (dot) org)
167    Date: 2004/05/11 12:05:00 CDT
168    Tag: blume-20040511-exports
169    Description:
170    
171    As per request by Adam Chlipala <adam@hcoop.net>, extended various
172    export lists in compiler-related .cm-files.
173    
174    ----------------------------------------------------------------------
175    Name: Matthias Blume (blume (at) tti - c (dot) org)
176    Date: 2004/05/11 11:35:00 CDT
177    Tag: blume-20040511-allsource
178    Description:
179    
180    The installer now honors the "src-smlnj" target again, although its meaning
181    has changed from "all sources required for the compiler" to "all sources
182    the installer knows about".  In other words, if you enable "src-smlnj"
183    in the "targets" file, then the installer will pull in sources for
184    everything.  (Notice that this refers to source code only.  Compiled
185    code is still only installed for modules that were requested explicitly
186    or which are required for other modules that were requested explicitly.)
187    
188    ----------------------------------------------------------------------
189    Name: Matthias Blume (blume (at) tti - c (dot) org)
190    Date: 2004/04/23 17:40:00 CDT
191    Tag: blume-20040423-ieee-scan
192    Description:
193    
194    Fixed IEEEReal.scan (and .fromString) so that if there is an overflow
195    in the exponent calculation we get INF or ZERO (depending on the mantissa
196    and the sign of the exponent).
197    
198    ----------------------------------------------------------------------
199    Name: Matthias Blume (blume (at) tti - c (dot) org)
200    Date: 2004/04/23 10:40:00 CDT
201    Tag: blume-20040423-ml-build
202    Description:
203    
204    The ml-build script now terminates with a non-0 status when something
205    goes wrong.
206    
207    ----------------------------------------------------------------------
208    Name: Matthias Blume (blume (at) tti - c (dot) org)
209    Date: 2004/04/22 16:35:00 CDT
210    Tag: blume-20040422-Option
211    Description:
212    
213    Made exception Option to be the same as exception Option.Option
214    (as it should be).
215    
216    ----------------------------------------------------------------------
217    Name: Allen Leung (leunga (at) reservoir (dot) com)
218    Date: 2004/03/19 14:40:00 EST
219    Tag: leunga-20040319-cygwin-nlffi
220    Description:
221    
222    Fixed the runtime so that ml-nlffi-lib runs on the cygwin version
223    of SML/NJ.  The problem is that
224    
225       lib = dlopen(NULL, ...)
226       f   = dlsym(lib, "malloc");
227    
228    does not work on Windows unless we explicitly export symbols
229    such as 'malloc' during linking.  We fixed this by explicitly
230    exporting the required symbols with the magic gcc incantation:
231    
232        -Wl,--export-all cygwin.def
233    
234    where cygwin.def is a file containing all the symbols that
235    we wish to export.
236    
237    I suspect this is a Windows problem and we'll have to
238    do the same (somehow with windows compilers) when
239    we build the native win32 version with the system
240    calls LoadLibrary/GetProcAddress.
241    
242    ----------------------------------------------------------------------
243    Name: Matthias Blume (blume (at) tti - c (dot) org)
244    Date: 2004/03/04 16:35:00 CST
245    Tag: blume-20040304-intinf-fmt
246    Description:
247    
248    Fixed problem with IntInf.fmt (sign would show up on the right instead
249    of on the left for BIN, OCT, and HEX).
250    
251    ----------------------------------------------------------------------
252    Name: Matthias Blume (blume (at) tti - c (dot) org)
253    Date: 2004/03/04 11:25:00 CST
254    Tag: blume-20040304-symlinks
255    Description:
256    
257    Fixed problem with installer script (unix only) where bin/ml-yacc and
258    friends pointed (via symlinks) to absolute locations instead of just
259    .run-sml.  This was reported by Vesa A Norrman.
260    
261    ----------------------------------------------------------------------
262    Name: Matthias Blume (blume (at) tti - c (dot) org)
263    Date: 2004/02/13 14:50:00 CST
264    Tag: Release_110_45
265    Description:
266    
267    New working version (110.45). New bootfiles.
268    
269    ----------------------------------------------------------------------
270    Name: Matthias Blume (blume (at) tti - c (dot) org)
271    Date: 2004/01/26 15:15:15 CST
272    Tag: blume-20040126-toplevel
273    Description:
274    
275    Improved handling of exceptions at the interactive toplevel.
276    
277    ----------------------------------------------------------------------
278    Name: Matthias Blume (blume (at) tti - c (dot) org)
279    Date: 2004/01/26 11:25:00
280    Tag: blume-20040126-app
281    Description:
282    
283    Type of top-level "app" corrected.
284    Added code for setting vp_limitPtrMask to Win32-specific runtime.
285    
286    ----------------------------------------------------------------------
287    Name: Matthias Blume (blume (at) tti - c (dot) org)
288    Date: 2003/11/18 17:10 CST
289    Tag: blume-20031118-basis-fiddle
290    Description:
291    
292    - changed Timer interface to what might become the spec
293    - POSIX_FLAGS -> BIT_FLAGS according to spec
294    - some other minor discrepancies wrt. spec eliminated
295    
296    ----------------------------------------------------------------------
297    Name: Matthias Blume (blume (at) tti - c (dot) org)
298    Date: 2003/11/06 12:00:00 CST
299    Tag: Release_110_44
300    Description:
301    
302    New working version (110.44). New bootfiles.
303    
304    ----------------------------------------------------------------------
305    Name: Matthias Blume (blume (at) tti - c (dot) org)
306    Date: 2003/11/04 11:50:00 CST
307    Tag: blume-20031104-move-libraries
308    Description:
309    
310    Eliminated the "dont_move_libraries" directive in config/targets.
311    (The mechanism was broken and could not be fixed easily.  Moreover,
312    there does not seem to be any reason not to move all libraries into
313    lib during installation.  I originally implemented this directive as a
314    backward-compatibility feature when I first introduced the new CM.
315    Now that things have been stable for a long time and going back to the
316    old CM is not an option, there is no reason to keep it around.)
317    
318    ----------------------------------------------------------------------
319    Name: Matthias Blume (blume (at) tti - c (dot) org)
320    Date: 2003/11/03 16:00:00 CST
321    Tag: blume-20031103-installdir
322    Description:
323    
324    Made installer honor INSTALLDIR variable again.  (Thanks to Chris
325    Richards for pointing out the problem and providing the solution.)
326    
327    ----------------------------------------------------------------------
328    Name: Matthias Blume (blume (at) tti - c (dot) org)
329    Date: 2003/10/01 17:05:00 CDT
330    Tag: blume-20031001-lal-mlrisc
331    Description:
332    
333    MLRISC bug fix from Lal.
334    
335    ----------------------------------------------------------------------
336    Name: Matthias Blume (blume (at) tti - c (dot) org)
337    Date: 2003/09/30 16:10:00 CDT
338    Tag: blume-20030930-primio-bat
339    Description:
340    
341    1. Added openVector, nullRd, and nullWr to PRIM_IO.
342    2. Improved .bat files (for Win32 port) to make things work under Win95.
343       (thanks to Aaron S. Hawley for this one)
344    
345    ----------------------------------------------------------------------
346    Name: Matthias Blume (blume (at) tti - c (dot) org)
347    Date: 2003/09/26 16:05:00 CDT
348    Tag: blume-20030926-wrappriv
349    Description:
350    
351    Added missing wrapper for privilege "primitive" in $smlnj/viscomp/core.cm.
352    
353    ----------------------------------------------------------------------
354    Name: Matthias Blume (blume (at) tti - c (dot) org)
355    Date: 2003/09/26 15:00:00 CDT
356    Tag: blume-20030926-110_43_3
357    Description:
358    
359    - additional cleanup
360    - version number bump, NEW BOOTFILES
361    
362    ----------------------------------------------------------------------
363    Name: Matthias Blume (blume (at) tti - c (dot) org)
364    Date: 2003/09/26 12:00:00 CDT
365    Tag: blume-20030926-ppautoload
366    Description:
367    
368    I modified the read-eval-print loop so that the autoloader gets
369    invoked whenever the prettyprinter tries to look up a symbol that
370    is not currently defined in the toplevel environment but which
371    appears in CM's autoload registry.  As a result, we see far fewer of
372    those ?.Foo.Bar.xxx names in the prettyprinter's output.
373    
374    In addition to this I tried to clean up some pieces of the Basis
375    implementation (e.g., Socket, Word8Array) in order to prevent other
376    instances of these ?.Foo.Bar.xxx names from being printed.
377    
378    The mechanism that picks names for types still needs some work, though.
379    (Right now it seems that if there is a type A.t which is defined to
380    be B.u, but B is unavailable at toplevel, then A.t gets printed as
381    "?.B.u" although the perhaps more sensible solution would be to use
382    "A.t" in this case.  In other words, the prettyprinter should follow
383    a chain of DEFtycs not farther than there are corresponding toplevel
384    names in the current environment.)
385    
386    ----------------------------------------------------------------------
387    Name: Matthias Blume (blume (at) tti - c (dot) org)
388    Date: 2003/09/24 16:31:00 CDT
389    Tag: blume-20030924-installer
390    Description:
391    
392    Another installer tweak:  All the ML code for the installer is now
393    compiled during CMB.make and put into a little library called
394    $smlnj/installer.cm.  The installation then simply invokes
395    
396       sml -m $smlnj/installer.cm
397    
398    and everything happens automagically.
399    
400    Win32:  ML code senses value of environment variable SMLNJ_HOME.
401    Unix:   ML code senses values of environment variables ROOT, CONFIGDIR,
402            and BINDIR.
403    
404    The new scheme guarantees that the ML code responsible for the installation
405    is in sync with the APIs of the main system.  Also, the installer is
406    somewhat faster because the installer script is precompiled.
407    
408    ----------------------------------------------------------------------
409    Name: Matthias Blume (blume (at) tti - c (dot) org)
410    Date: 2003/09/24 15:35:00 CDT
411    Tag: blume-20030924-synsock
412    Description:
413    
414    Added a signature SYNCHRONOUS_SOCKET to basis.cm.  This is like SOCKET
415    but excludes all non-blocking operations.  Defined SOCKET (in Basis)
416    and CML_SOCKET in terms of SYNCHRONOUS_SOCKET.  Removed superfluous
417    implementations of non-blocking operations from CML's Socket
418    structure.
419    
420    ----------------------------------------------------------------------
421    Name: Matthias Blume (blume (at) tti - c (dot) org)
422    Date: 2003/09/24 15:10:05 CDT
423    Tag: blume-20030924-sockets
424    Description:
425    
426    1. Fixed SOCKET API and implementation to match Basis spec.
427       This required changing the internal representation of sockets to one
428       that remembers (for each socket file descriptor) whether it is currently
429       blocking or non-blocking.  This state is maintained lazily (i.e., a system
430       call is made only if the state actually needs to change).
431    
432    2. OS-specific details of sockets were moved into separate files, thus
433       making it possible to unify the bulk of the socket implementations
434       between Unix and Win32.
435    
436    3. CML's socket API changed accordingly.
437       (Note that we need to remove non-blocking functions from this API
438       since they are redundant in the case of CML!)
439    
440    4. CML's socket implementation now makes use of non-blocking functions
441       provided by Basis, thus removing all OS-dependent code from this part
442       of CML.
443    
444    5. Changed Real64.precision from 52 to 53.  Minor cleanup in Real64 code.
445    
446    ----------------------------------------------------------------------
447    Name: Matthias Blume (blume (at) tti - c (dot) org)
448    Date: 2003/09/22 12:10:00 CDT
449    Tag: blume-20030922-110_43_2
450    Description:
451    
452    Made a new interim version and bootfiles for developer's bootstrapping
453    convenience.
454    
455       110.43.2 -- NEW BOOTFILES
456    
457    ----------------------------------------------------------------------
458    Name: Matthias Blume (blume (at) tti - c (dot) org)
459    Date: 2003/09/19 15:55:00 CDT
460    Tag: blume-20030919-cmdir
461    Description:
462    
463    1. new-install.sh -> install.sh
464    2. changed default CM "metadata" directory name to ".cm" (instead of "CM")
465    3. tweaked installer so that another name instead of .cm can be chosen
466       at install time (by setting the CM_DIR_ARC environment variable
467       during installation); once installation is complete, the name is
468       fixed
469    
470    ----------------------------------------------------------------------
471    Name: Matthias Blume (blume (at) tti - c (dot) org)
472    Date: 2003/09/18 16:00:00 CDT
473    Tag: blume-20030918-110_43_1
474    Description:
475    
476    Made a new interim version and bootfiles for developer's bootstrapping
477    convenience.
478    
479       110.43.1 -- NEW BOOTFILES
480    
481    ----------------------------------------------------------------------
482    Name: Matthias Blume (blume (at) tti - c (dot) org)
483    Date: 2003/09/18 15:20:00 CDT
484    Tag: blume-20030918-misc
485    Description:
486    
487    1. Exported fractionsPerSecond etc. from TimeImp (but not from Time as
488       this seems to be controversial at the moment) and used those in
489       Posix.ProcEnv.times.
490    
491    2. Added Time.{from,to}Nanoseconds to Time.
492    
493    3. Improved Real.{from,to}LargeInt by avoiding needless calculations.
494       For example, fromLargeInt never needs to look at more than 3 "big
495       digits" to get its 53 bits of precision.
496    
497    ----------------------------------------------------------------------
498    Name: Matthias Blume (blume (at) tti - c (dot) org)
499    Date: 2003/09/17 16:30:00 CDT
500    Tag: blume-20030917-real32-slices
501    Description:
502    
503    Added an entry to the primitive environment
504    (compiler/Semant/statenv/prim.sml) for int32->real64 conversion and
505    added code to compiler/CodeGen/main/mlriscGen.sml to implement it.
506    
507    Removed some of the "magic" constants in real64.sml and replaced them
508    with code that generates these values from their corresponding
509    integer counterparts.
510    
511    Made all(?) the slice-related changes to the Basis and made everything
512    compile again...
513    
514    ----------------------------------------------------------------------
515    Name: Matthias Blume (blume (at) tti - c (dot) org)
516    Date: 2003/09/15 17:45:00 CDT
517    Tag: blume-20030915-rbase
518    Description:
519    
520    Fixed bug in Real.fromLargeInt.
521    
522    ----------------------------------------------------------------------
523    Name: Matthias Blume (blume (at) tti - c (dot) org)
524    Date: 2003/09/13 18:11:00 CDT
525    Tag: blume-20030913-libinstall
526    Description:
527    
528    Minor bugfix in config/libinstall (set anchor with path to
529    standalone tool after installing it, otherwise libraries that
530    need ml-lex or ml-yacc won't compile the first time the installer
531    runs).
532    
533    ----------------------------------------------------------------------
534    Name: Matthias Blume (blume (at) tti - c (dot) org)
535    Date: 2003/09/12 11:45:00 CDT
536    Tag: blume-20030912-various
537    Description:
538    
539     - fixed bug in Real.toLargeInt
540     - fixed bug in Posix.ProcEnv.times
541     - changed inputLine functions to return an option
542     - minor installer improvements / bugfixes
543     - changed default @SMLalloc parameter for x86/celeron to 64k
544    
545    ----------------------------------------------------------------------
546    Name: Matthias Blume (blume (at) tti - c (dot) org)
547    Date: 2003/09/09 22:00:00 CDT
548    Tag: Release_110_43
549    Description:
550    
551        New working release 110.43.  New bootfiles.
552    
553    ----------------------------------------------------------------------
554    Name: Matthias Blume (blume (at) tti - c (dot) org)
555    Date: 2003/09/09 19:20:00 CDT
556    Tag: blume-20030909-installer
557    Description:
558    
559    Rewrote large parts of config/install.sh in SML (config/libinstall.sml).
560    Modified config/install.bat to take advantage of it.  Also modified
561    config/install.sh (and called it config/new-install.sh) to take advantage
562    of it on Unix systems.  (The SML code is (supposed to be) platform-
563    independent.)
564    
565    The installer can now install everything under Win32
566    as well as under *nix as long as it compiles.
567    
568    Other changes:
569    
570      - made CML compile again under Win32
571      - made eXene compile under Win32 (by providing a fake structure UnixSock
572        and by using OS.Process.getEnv instead of Posix.ProcEnv.getenv)
573      - fixed a bug in nowhere: it assumed that type OS.Process.status is the
574        same as type int;  under Win32 it isn't
575      - fixed some slice-related problems in the win32-specific parts of CML
576      - added a functor argument "sameVol" to os-path-fn.sml in the Basis
577        (under Win32, the volume name is case-insensitive, and the
578        OS.Path code compares volume names for equality)
579    
580    ----------------------------------------------------------------------
581    Name: Matthias Blume (blume (at) tti - c (dot) org)
582    Date: 2003/09/08 11:55:00 CDT
583    Tag: blume-20030908-fullpath
584    Description:
585    
586    Made Win32 version of OS.FileSys.fullPath return current directory
587    when given an empty string.  This is what the spec says, and incidentally,
588    CM depends on it.  (CM otherwise goes into an infinite loop in certain
589    cases when presented with the name of a non-existing .cm file.)
590    
591    ----------------------------------------------------------------------
592    Name: Matthias Blume (blume (at) tti - c (dot) org)
593    Date: 2003/09/04 16:30:00 CDT
594    Tag: blume-20030905-slices-etc
595    Description:
596    
597      1. Changed interface to vectors and arrays in Basis to match
598         (draft) Basis spec.
599      2. Added signatures and implementations of slices according to
600         Basis spec.
601      3. Edited source code throughout the system to make it compile again
602         under 1. and 2.  (In some cases code had to be added to have it
603         match the new signatures.)
604      4. MLRISC should be backward-compatible: the copies of the originals
605         of files that needed to change under 3. were retained, the .cm files
606         check the compiler version number and use old versions when
607         appropriate.
608      5. Changed type of OS.FileSys.readDir and Posix.FileSys.readdir to
609         dirstream -> string option (in accordance with Basis spec).
610      6. When generating code that counts lines, ml-lex used function
611         CharVector.foldli, taking advantage of its old interface.
612         This has been replaced with the corresponding code from
613         CharVectorSlice.  (html-lex must be re-lexed!)
614      7. BitArray in smlnj-lib/Util has been extended/modified to match the
615         new MONO_ARRAY signature.  (Do we need BitArraySlice?)
616      8. Removed temporary additions (fromInternal, toInternal) from the
617         (now obsolete) IntInf in smlnj-lib/Util.
618      9. Cleaned up structure Byte.
619     10. Added localOffset, scan, and fromString to Date (according to spec).
620         Cleaned/corrected implementation of Date.
621         (Still need to check for correctness; implement better canonicalizeDate.)
622     11. Added "scan" to signature IEEE_REAL.
623     12. Some improvements to IntInf [in particular: efficiency-hack for
624         mod and rem when second operand is 2 (for parity checks).]
625     13. Changed representation of type Time.time, using a single IntInf.int
626         value counting microseconds.  This considerably simplified the
627         implementation of structure Time.  We now support negative time
628         values; scan and fromString handle signs.
629     14. Functor PrimIO now takes two additional arguments (VectorSlice and
630         ArraySlice).
631    
632    ----------------------------------------------------------------------
633    Name: Matthias Blume (blume (at) tti - c (dot) org)
634    Date: 2003/08/28 17:00:00 CDT
635    Tag: blume-20030828-intinf
636    Description:
637    
638    This is a major update which comes with a version number bump
639    (110.42.99 -- yes, we are really close to 110.43 :-), NEW BOOTFILES,
640    and an implementation of IntInf in the Basis.
641    
642    There are a fairly large number of related changes and updates throughout
643    the system:
644    
645    Basis:
646            - Implemented IntInf.
647            - Made LargeInt a projection of IntInf (by filtering through INTEGER).
648            - Added some missing Real64 operations, most notably Real.toLargeInt.
649            - Added FixedInt as a synonym for Int32.
650    
651    compiler:
652            * Added support for a built-in intinf type.
653              - literals
654              - pattern matching
655              - conversion shortcuts (Int32.fromLarge o Int.toLarge etc.)
656              - overloading on literals and operations
657    
658            This required adding a primitive type intinf, some additional
659            primops, and implementations for several non-trivial intinf
660            operations in Core.  (The intinf type is completely abstract
661            to the compiler; all operations get delegated back to the Core.)
662    
663            * Intinf equality is handled by polyequal.  However, the compiler
664            does not print its usual warning in this case (since polyequal
665            is the right thing to do there).
666    
667            * Improved the organization of structure InlineT.
668    
669            * A word about conversion primops:
670            If conversions involving intinf do not cancel out during
671            CPS contract, then the compiler must insert calls to Core functions.
672            Since all core access must be resolved already during the FLINT
673            translate phase, it would be too late a the time of CPS contract
674            to add new Core calls.  For this reason, conversion primops
675            for intinf carry two arguments:  1. the numeric argument that
676            they are supposed to convert, and 2. the Core function that
677            can help with this conversion if necessary.  If CPS contract
678            eliminates a primop, then the associated Core function becomes
679            dead and goes away.  Intinf conversion primops that do not get
680            eliminated by CPS contract get rewritten into calls of their
681            core functions by a separate, new phase.
682    
683    interactive system:
684            - Control.Print.intinfDepth controls max length of intinf constants
685            being printed. (Analogous to Control.Print.stringDepth.)
686            - Cleanup in printutil and pputil: got rid of unused stuff and
687            duplicates; replaced some of the code with code that makes better
688            use of library functionality.
689    
690    CM:
691            Bugfix: parse-errors in init group (system/smlnj/init/init.cmi)
692            are no longer silent.
693    
694    CKIT:
695            Fixed mismatched uses of Int32 and LargeInt.  I always decided
696            in favor of LargeInt -- which is now the same as IntInf.
697            CKIT-knowledgable people should check whether this is what's
698            intended and otherwise change things back to using Int32 or
699            FixedInt.
700    
701    Throughout the code:
702            Started using IntInf.int literals and built-in operations
703            (e.g., comparison with 0) where this seems appropriate.
704    
705    
706    ----------------------------------------------------------------------
707    Name: Dave MacQueen (dbm@cs.uchicago.edu)
708    Date: 2003/08/13 11:36:00 CDT
709    Tag: dbm-20030813-mcz-merge1
710    Description:
711    
712    Merging changes from the mcz-branch development branch into trunk.
713    These changes involve replacement of the emulated old prettyprinter
714    interface with direct use of the SML/NJ Lib PP library, and fixing
715    of a couple of bugs (895, 1186) relating to error messages.  A new
716    prettyprinter for ast datatypes (Elaborator/print/ppast.{sig,sml})
717    has been added.
718    
719    ----------------------------------------------------------------------
720    Name: Matthias Blume (blume (at) tti - c (dot) org)
721    Date: 2003/08/11 15:45:00 CDT
722    Tag: blume-20030811-windows
723    Description:
724    
725    Version number bumped to 110.42.9.  NEW BOOTFILES!!!
726    
727        http://smlnj.cs.uchicago.edu/dist/working/110.42.9/
728    
729    This patch restores SML/NJ's ability to run under win32.  There are a
730    number of changes, including fixes for several bugs that had gone
731    unnoticed until now:
732    
733      - uname "CYGWIN_NT*" is recognized as win32 (This is relevant only when
734        trying to run the win32 version from within cygwin.)
735    
736      - There are a number of simple .bat scripts that substitute for their
737        corresponding Unix shell-scripts.  (See below.)
738    
739      - The internals of ml-build have been modified slightly.  The main
740        difference is that instead of calling ".link-sml" (or link-sml.bat)
741        using OS.Process.system, the ML process delegates this task back
742        to the script.  Otherwise problems arise in mixed environments such
743        as Cygwin where scripts look and work like Unix scripts, but
744        where OS.Process.system cannot run them.
745    
746      - In CM, the srcpath pickler used native pathname syntax -- which
747        is incorrect in the case of cross-compilation.  The new pickle format
748        is independent of platform-specific naming conventions.
749    
750      - Path configuration files (such as lib/pathconfig) can now choose
751        between native and standard syntax.  Placing a line of the form
752    
753            standard!
754    
755        into the file causes all subsequent paths to be interpreted using
756        CM standard pathname syntax (= Unix conventions); a line
757    
758            native!
759    
760        switches back to native style.  This was needed so that
761        path config files can be written portably, see src/system/pathconfig.
762    
763      - Runtime system:
764    
765          - win32-filesys.c:  get_file_time and set_file_time now
766            access modification time, not creation time.
767    
768          - I/O code made aware of new array representation.
769    
770          - Bug fixes in X86.prim.masm.
771    
772       - src/system/makeml made aware of win32. (For use under cygwin
773            and other Unix-environments for windows.)
774    
775       - In Basis, fixed off-by-one error in win32-io.sml (function vecF)
776         which caused BinIO.inputAll to fail consistently.
777    
778    .bat scripts:
779    
780       Windows .bat scripts assume that SMLNJ_HOME is defined.
781    
782       - sml.bat, ml-yacc.bat, ml-lex.bat:  Driver scripts for standalone
783         applications (sml, ml-yacc, ml-lex).
784       - ml-build.bat: analogous to ml-build.
785       - config\install.bat:  Analogous to config/install.sh.  This requires
786         that SMLNJ_HOME is set and that Microsoft Visual C is ready to use.
787         (nmake etc. must be on the path, and vcvars32 must have been run.)
788         Moreover, sources for ml-lex and ml-yacc need to exist under src,
789         and the bootfile hierarchy must have been unpacked under
790         sml.boot.x86-win32.
791         The script is very primitive and does a poor job at error checking.
792         It only installs the base system, ml-lex, and ml-yacc.  No other
793         libraries are being installed (i.e., you get only those that
794         are part of the compiler.)
795       - link-sml.bat:  analogous to .link-sml, but not currently used
796    
797    Unrelated bug fixes:
798    
799      - ml-nlffigen now exports structures ST_* corresponding to incomplete
800        types.
801      - Added getDevice to PP/src/pp-debug-fn.sml.  (Would not compile
802        otherwise.)
803    
804    ----------------------------------------------------------------------
805    Name: Dave MacQueen (macqueen@cs.uchicago.edu)
806    Date: 2003/06/17
807    Tag: macqueen-20030617-bug895
808    Description:
809    
810    Modified compiler/Elaborator/print/pptype.sml to fix bug 895.
811    Tag will be used for new development branch (mcz-branch) for
812    use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago.
813    
814    ----------------------------------------------------------------------
815    Name: Matthias Blume (blume (at) tti - c (dot) org)
816    Date: 2003/05/27 16:55:00 CDT
817    Tag: blume-20030527-polyeq
818    Description:
819    
820    Tried to eliminated most cases of polymorphic equality.
821    
822    ----------------------------------------------------------------------
823    Name: Matthias Blume (blume (at) tti - c (dot) org)
824    Date: 2003/05/21 17:45:00 CDT
825    Tag: blume-20030517-complete
826    Description:
827    
828    Two changes:
829    
830      1. Added a flag for controlling whether non-exhaustive bindings will
831         be treated as errors (default is false).
832      2. Cleaned up the *entire* source tree so that CMB.make goes through
833         without a single non-exhaustive match- or bind warning.
834    
835    ----------------------------------------------------------------------
836    Name: Matthias Blume (blume (at) tti - c (dot) org)
837    Date: 2003/05/17 10:20:00 CDT
838    Tag: blume-20030517-absyn
839    Description:
840    
841    1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
842    
843       This mainly affects the quality of error messages.  However, some
844       of the code is now more straightforward than before. (Treatment of
845       the above four constructs in translate.sml is much simpler than
846       the "macro-expansion" that was going on before.  Plus, the mach-
847       compiler no longer gets invoked just to be able to compile an
848       if-expression.)
849    
850    2. The ErrorMsg.Error exception is now caught and absorbed by the
851       interactive loop.
852    
853    ----------------------------------------------------------------------
854    Name: Allen Leung
855    Date: 2003/05/16 13:05:00 CDT
856    Tag: leunga-20030516-cygwin-runtime
857    Description:
858    
859        Ported the runtime system to cygwin, which uses the unix
860    x86-unix bin files.  Missing/buggy features:
861    
862       o getnetbyname, getnetbyaddr: these functions seem to be missing in
863         the Cygwin library.
864       o Ctrl-C handling may be flaky.
865       o Windows system calls and Windows I/O are not supported.
866    
867       A new set of binfiles is located at:
868    
869         http://www.dorsai.org/~leunga/boot.x86-unix.tgz
870    
871       This is only needed for bootstrapping the cygwin version of smlnj.
872       Other x86 versions can use the existing binfiles.
873    
874    ----------------------------------------------------------------------
875    Name: Matthias Blume
876    Date: 2003/04/08 15:42:00 CDT
877    Tag: blume-20030408-listpair
878    Description:
879    
880    1. Added a target 'mlrisc' to installer.
881    
882    2. Added missing elements to structure ListPair.
883    
884    ----------------------------------------------------------------------
885    Name: Allen Leung
886    Date: 2003/01/07 10:40:00 EST
887    Tag: leunga-20030107-int-rem
888    Description:
889    
890    Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86.
891    The arguments to the SUBL instruction were swapped.
892    
893    ----------------------------------------------------------------------
894    Name: Matthias Blume
895    Date: 2002/12/12 16:25:00 EST
896    Tag: blume-20021212-risc-ra
897    Description:
898    
899    Fixed a serious bug in the rewrite code for FP spilling/reloading that
900    sent the RA into an infinite loop when floating point registers get
901    spilled.  (Because of this bug, e.g., nucleic stopped compiling between
902    110.37 and 110.38.)
903    There was another set of potential problems related to the handling of
904    MLRISC annotations (but those did not yet cause real problems, apparently).
905    
906    ----------------------------------------------------------------------
907    Name: Matthias Blume
908    Date: 2002/12/06 22:40:00 EST
909    Tag: blume-20021206-cm-fileid
910    Description:
911    
912    Added a call of SrcPath.sync at the beginning of Parse.parse (in CM).
913    This fixes the problem of CM getting confused by files that suddenly
914    change their identity (e.g., by getting unlinked and recreated by some
915    text editor such as vi).  There might be a better/cheaper/cleaner way
916    of doing this, but for now this will have to do.
917    
918    ----------------------------------------------------------------------
919    Name: Matthias Blume
920    Date: 2002/10/28 09:50:00 EST
921    Tag: blume-20021028-typecheck
922    Description:
923    
924    Exported structure Typecheck from $smlnj/viscomp/core.cm.
925    
926    ----------------------------------------------------------------------
927    Name: Matthias Blume
928    Date: 2002/10/17 09:10:00 EDT
929    Tag: Release_110_42
930    Description:
931    
932    In good old tradition, there has been a slight hiccup so that we have
933    to patch 110.42 after the fact.   The old release tag has been replaced
934    (see below).
935    
936    The change solves a problem with two competing approaches the
937    configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in
938    each other's way.
939    
940    This change only affects the runtime system code and the installer script.
941    (No new bootfiles.)
942    
943    ----------------------------------------------------------------------
944    Name: Matthias Blume
945    Date: 2002/10/16 12:00:00 EDT
946    Tag: Release_110_42_removed
947    Description:
948    
949    New working release.  New bootfiles.
950    
951    ----------------------------------------------------------------------
952    Name: Matthias Blume
953    Date: 2002/10/10 13:10:00 EDT
954    Tag: blume-20021010-ppc-divs
955    Description:
956    
957    The mltree operator DIVS must be implemented with an overflow check on
958    the PPC because the hardware indicates divide-by-zero using "overflow" as
959    well.
960    
961    ----------------------------------------------------------------------
962    Name: Matthias Blume
963    Date: 2002/07/23 11:45:00
964    Tag: blume-20020723-smlnj-home
965    Description:
966    
967    Sml now senses the SMLNJ_HOME environment variable.  If this is set,
968    then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless
969    CM_PATHCONFIG is also set), the path configuration file is assumed
970    to be in $SMLNJ_HOME/lib/pathconfig.  This way one can easily move
971    the entire tree to some other place and everything will "just work".
972    
973    (Companion commands such as ml-build and ml-makedepend also sense this
974    variable.)
975    
976    ----------------------------------------------------------------------
977    Name: Matthias Blume
978    Date: 2002/07/12 21:19:00 EDT
979    Tag: blume-20020712-liveness
980    Description:
981    
982    Exported two useful "step" functions from liveness module (MLRISC).
983    
984    ----------------------------------------------------------------------
985    Name: Matthias Blume
986    Date: 2002/07/05 16:00 EDT
987    Tag: Release_110_41
988    Description:
989    
990    New working release.  New bootfiles.
991    
992    ----------------------------------------------------------------------
993    Name: Matthias Blume
994    Date: 2002/07/05 10:25:00 EDT
995    Tag: blume-20020705-btimp
996    Description:
997    
998    Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that
999    other clients can set up backtracing support.
1000    
1001    ----------------------------------------------------------------------
1002    Name: Matthias Blume
1003    Date: 2002/06/25 17:23:00 EDT
1004    Tag: blume-20020625-fpmax
1005    Description:
1006    
1007    Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point
1008    case.  (The sense of the isNaN test was reversed -- which made min and
1009    max always return their first argument.)
1010    
1011    ----------------------------------------------------------------------
1012    Name: Matthias Blume
1013    Date: 2002/06/11
1014    Tag: blume-20020611-unixpath
1015    Description:
1016    
1017    Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
1018    
1019    ----------------------------------------------------------------------
1020    Name: Matthias Blume
1021    Date: 2002/06/10 16:35:00 EDT
1022    Tag: blume-20020610-ieeereal
1023    Description:
1024    
1025    I back-ported my implementation of IEEEReal.fromString from the
1026    idlbasis-devel branch so that we can test it.
1027    
1028    Another small change is that ppDec tries to give more information
1029    than just "<sig>" in the case of functors.  However, this code is
1030    broken in some mysterious way if the functor's body's signature
1031    has not been declared by ascription but gets inferred from the
1032    implementation.  This needs fixing...
1033    
1034    ----------------------------------------------------------------------
1035    Name: Matthias Blume
1036    Date: 2002/05/31
1037    Tag: blume-20020531-btrace-mode
1038    Description:
1039    
1040    Resurrected SMLofNJ.Internals.BTrace.mode.  (It accidentally fell by
1041    the wayside when I switched over to using Controls everywhere.)
1042    
1043    ----------------------------------------------------------------------
1044    Name: Lal George
1045    Date: 2002/05/23 12:21:40 EDT
1046    Tag: george-20020523-visual-labels
1047    Description:
1048    
1049    Labels are now displayed in the graphical output to make
1050    the fall-through and target blocks obvious.
1051    
1052    ----------------------------------------------------------------------
1053    Name: Matthias Blume
1054    Date: 2002/05/22 11:03:00 EDT
1055    Tag: blume-20020522-shrink
1056    Description:
1057    
1058    John tweaked yesterday's fix for 1131 to handle an out-of-memory
1059    situation that comes up when allocating huge arrays.
1060    
1061    ----------------------------------------------------------------------
1062    Name: Matthias Blume
1063    Date: 2002/05/21 16:00:00 EDT
1064    Tag: Release_110_40
1065    Description:
1066    
1067    New working release (110.40).  New bootfiles.
1068    
1069    [Also: John Reppy fixed GC bug 1131.]
1070    
1071    ----------------------------------------------------------------------
1072    Name: Matthias Blume
1073    Date: 2002/05/21 12:35:00 EDT
1074    Tag: blume-20020521-cmdoc
1075    Description:
1076    
1077    CM documentation update.
1078    
1079    ----------------------------------------------------------------------
1080    Name: Matthias Blume
1081    Date: 2002/05/21 10:55:00 EDT
1082    Tag: blume-20020521-misc
1083    Description:
1084    
1085    - John tweaked runtime to be silent on heap export (except when
1086      GC messages are on).
1087    - I added a few more things (cross-compiling versions of CMB) to
1088      config/preloads (as suggestions).
1089    
1090    ----------------------------------------------------------------------
1091    Name: Matthias Blume
1092    Date: 2002/05/20 22:25:00 EDT
1093    Tag: blume-20020520-controls
1094    Description:
1095    
1096    - Added ControlUtil structure to control-lib.cm.
1097    - Use it throughout.
1098    - Used Controls facility to define MLRISC controls (as opposed to
1099      registering MLRISC control ref cells with Controls after the fact)
1100    - Fixed messed-up controls priorities.
1101    
1102    * Removed again all the stuff from config/preloads that one wouldn't
1103      be able to preload at the time the initial heap image is built.
1104      (Many libraries, e.g., CML, do not exist yet at this time.  The
1105       only libraries that can be preloaded via config/preloads are those
1106       that come bundled with the bootfiles.)
1107    
1108    ----------------------------------------------------------------------
1109    Name: Matthias Blume
1110    Date: 2002/05/20 10:59:00 EDT
1111    Tag: blume-20020520-preloads
1112    Description:
1113    
1114    Added a lot of commented-out suggestions for things to be included
1115    in config/preloads.
1116    
1117    ----------------------------------------------------------------------
1118    Name: Allen Leung
1119    Date: 2002/05/18 14:20:00 EDT
1120    Tag: leunga-20020518-mdl
1121    Description:
1122    
1123    o Made the mdl tool stuff compile and run again.
1124    o I've disabled all the stuff that depends on RTL specifications; they
1125      are all badly broken anyway.
1126    
1127    ----------------------------------------------------------------------
1128    Name: Matthias Blume
1129    Date: 2002/05/17 16:49:00 EDT
1130    Tag: blume-20020517-controls
1131    Description:
1132    
1133    0. John Reppy made several modifications to the SML/NJ library.
1134       In particular, there is a shiny new controls-lib.cm.
1135    
1136    1. Pushed new controls interface through compiler so that everything
1137       compiles again.
1138    
1139    2. Added FormatComb and FORMAT_COMB to the CML version of the
1140       SML/NJ library (so that CML compiles again).
1141    
1142    3. Modified init scripts because XXX_DEFAULT environment variables
1143       are no longer with us.  (Boot-time initialization is now done
1144       using the same environment variables that are also used for
1145       startup-time initialization of controls.)
1146    
1147    ----------------------------------------------------------------------
1148    Name: Lal George
1149    Date: 2002/05/15 09:20:10 EDT
1150    Tag: george-20020515-pseudo-op-decls
1151    Description:
1152    
1153            All pseudo-ops emitted before the first segment declaration
1154    such as TEXT, DATA, and BSS directives are assumed to be global
1155    declarations and are emitted first in the assembly file. This is
1156    useful in a number of situations where one has pseudo-ops that are not
1157    specific to any segment, and also works around the constraint that one
1158    cannot have client pseudo-ops in the TEXT segment.
1159    
1160            Because no segment is associated with these declarations it is
1161    an error to allocate any space or objects before the first segment
1162    directive and an exception will be raised. However, we cannot make
1163    this check for client pseudo-ops.
1164    
1165            These top level declarations are a field in the CFG graph_info.
1166    In theory you can continue to add to this field after the CFG has been
1167    built -- provided you know what you are doing;-)
1168    
1169    ----------------------------------------------------------------------
1170    Name: Matthias Blume
1171    Date: 2002/05/13 16:40:00 EDT
1172    Tag: blume-20020513-pp-etc
1173    Description:
1174    
1175    A few minor bugfixes:
1176    
1177      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
1178        (Bogus printouts for redefined bindings still occur.  Compiler
1179        bug should no longer occur now.  We need to redo the prettyprinter
1180        from scratch.)
1181    
1182      - CM pathname printer now also adds escape sequences for ( and )
1183    
1184      - commend and docu fixes for ml-nlffi
1185    
1186    ----------------------------------------------------------------------
1187    Name: Matthias Blume
1188    Date: 2002/05/10 16:40:00 EDT
1189    Tag: blume-20020510-erg-textio
1190    Description:
1191    
1192    Applied the following bugfix provided by Emden Gansner:
1193    
1194        Output is corrupted when outputSubstr is used rather than output.
1195    
1196        The problem occurs when a substring
1197    
1198            ss = (s, dataStart, dataLen)
1199    
1200        where dataStart > 0, fills a stream buffer with avail bytes left.
1201        avail bytes of s, starting at index dataStart, are copied into the
1202        buffer, the buffer is flushed, and then the remaining dataLen-avail
1203        bytes of ss are copied into the beginning of the buffer. Instead of
1204        starting this copy at index dataStart+avail in s, the current code
1205        starts the copy at index avail.
1206    
1207        Fix:
1208        In text-io-fn.sml, change line 695 from
1209             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
1210        to
1211             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
1212    
1213    ----------------------------------------------------------------------
1214    Name: Matthias Blume
1215    Date: 2002/04/12 13:55:00 EDT
1216    Tag: blume-20020412-assyntax
1217    Description:
1218    
1219    1. Grabbed newer assyntax.h from the XFree86 project.
1220    2. Fiddled with how to compile X86.prim.asm without warnings.
1221    3. (Very) Minor cleanup in CM.
1222    
1223    ----------------------------------------------------------------------
1224    Name: Matthias Blume
1225    Date: 2002/04/01 (no joke!) 17:07:00 EST
1226    Tag: blume-20020401-x86div
1227    Description:
1228    
1229    Added full support for div/mod/rem/quot on the x86, using the machine
1230    instruction's two results (without clumsily recomputing the remainder)
1231    directly where appropriate.
1232    
1233    Some more extensive power-of-two support was added to the x86 instruction
1234    selector (avoiding expensive divs, mods, and muls where they can be
1235    replaced with cheaper shifts and masks).  However, this sort of thing
1236    ought to be done earlier, e.g., within the CPS optimizer so that
1237    all architectures benefit from it.
1238    
1239    The compiler compiles to a fixed point, but changes might be somewhat
1240    fragile nevertheless.  Please, report any strange things that you might
1241    see wrt. div/mod/quot/rem...
1242    
1243    ----------------------------------------------------------------------
1244    Name: Matthias Blume
1245    Date: 2002/03/29 17:22:00
1246    Tag: blume-20020329-div
1247    Description:
1248    
1249    Fixed my broken div/mod logic.  Unfortunately, this means that the
1250    inline code for div/mod now has one more comparison than before.
1251    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
1252    The problem was with quotient = 0, because that alone does not tell
1253    us which way the rounding went.  One then has to look at whether
1254    remainder and divisor have the same sign...  :(
1255    
1256    Anyway, I replaced the bootfiles with fresh ones...
1257    
1258    ----------------------------------------------------------------------
1259    Name: Matthias Blume
1260    Date: 2002/03/29 14:10:00 EST
1261    Tag: blume-20020329-inlprims
1262    Description:
1263    
1264    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
1265    
1266    Primops have changed. This means that the bin/boot-file formats have
1267    changed as well.
1268    
1269    To make sure that there is no confusion, I made a new version.
1270    
1271    
1272    CHANGES:
1273    
1274    * removed REMT from mltree (remainder should never overflow).
1275    
1276    * added primops to deal with divisions of all flavors to the frontend
1277    
1278    * handled these primops all the way through so they map to their respective
1279      MLRISC support
1280    
1281    * used these primops in the implementation of Int, Int32, Word, Word32
1282    
1283    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
1284    
1285    * parameterized INLMIN, INLMAX, and INLABS by a numkind
1286    
1287    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
1288      floating point
1289    
1290    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
1291      and Real (but Real.abs maps to a separate floating-point-only primop)
1292    
1293    
1294    TODO items:
1295    
1296    * Hacked Alpha32 instruction selection, disabling the selection of REMx
1297      instructions because the machine instruction encoder cannot handle
1298      them.  (Hppa, PPC, and Sparc instruction selection did not handle
1299      REM in the first place, and REM is supported by the x86 machine coder.)
1300    
1301    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
1302      selection phase.  (The two can be streamlined because the hardware
1303      delivers both quotient and remainder at the same time anyway.)
1304    
1305    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
1306      (Currently the behavior is inconsistent both across architectures and
1307      wrt. the draft Basis spec.)
1308    
1309    * Word8 should eventually be handled natively, too.
1310    
1311    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
1312      as if there currently is no execution path that could trigger it in
1313      SML/NJ.  (The assumptions underlying functions arith and promotable do not
1314      hold for things like multiplication and division.)
1315    
1316    ----------------------------------------------------------------------
1317    Name: Matthias Blume
1318    Date: 2002/03/27 16:27:00 EST
1319    Tag: blume-20020327-mlrisc-divisions
1320    Description:
1321    
1322    Added support for all four division operations (ML's div, mod, quot,
1323    and rem) to MLRISC.  In the course of doing so, I also rationalized
1324    the naming (no more annoying switch-around of DIV and QUOT), by
1325    parameterizing the operation by div_rounding_mode (which can be either
1326    DIV_TO_ZERO or DIV_TO_NEGINF).
1327    
1328    The generic MLTreeGen functor takes care of compiling all four
1329    operations down to only round-to-zero div.
1330    
1331    Missing pieces:
1332    
1333      * Doing something smarter than relying on MLTreeGen on architectures
1334        like, e.g., the x86 where hardware division delivers both quotient and
1335        remainder at the same time.  With this, the implementation of the
1336        round-to-neginf operations could be further streamlined.
1337    
1338      * Remove inlining support for div/mod/rem from the frontend and replace it
1339        with primops that get carried through to the backend.  Do this for all
1340        int and word types.
1341    
1342    ----------------------------------------------------------------------
1343    Name: Matthias Blume
1344    Date: 2002/03/25 17:25:00 EST
1345    Tag: blume-20020325-divmod
1346    Description:
1347    
1348    I improved (hopefully without breaking them) the implementation of Int.div,
1349    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
1350    advantage of the following observations:
1351    
1352      Let  q = x quot y      r = x rem y
1353           d = x div  y      m = x mod y
1354    
1355    where "quot" is the round-to-zero version of integer division that
1356    hardware usually provides.  Then we have:
1357    
1358         r = x - q * y        where neither the * nor the - will overflow
1359         d = if q >= 0 orelse x = q * y then q else q - 1
1360                              where neither the * nor the - will overflow
1361         m = if q >= 0 orelse r = 0 then r else r + y
1362                              where the + will not overflow
1363    
1364    This results in substantial simplification of the generated code.
1365    The following table shows the number of CFG nodes and edges generated
1366    for
1367            fun f (x, y) = x OPER y
1368            (* with OPER \in div, mod, quot, rem *)
1369    
1370    
1371        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
1372        --------------------------------------------------------
1373         div |         24 |         39 |         12 |         16
1374         mod |         41 |         71 |         12 |         16
1375        quot |          8 |         10 |          8 |         10
1376         rem |         10 |         14 |          8 |         10
1377    
1378    
1379    ----------------------------------------------------------------------
1380    Name: Matthias Blume
1381    Date: 2002/03/25 22:06:00 EST
1382    Tag: blume-20020325-cprotobug
1383    Description:
1384    
1385    Fixed a bug in cproto (c prototype decoder).
1386    
1387    ----------------------------------------------------------------------
1388    Name: Matthias Blume
1389    Date: 2002/03/25 16:00:00 EST
1390    Tag: blume-20020325-raw-primops
1391    Description:
1392    
1393    I did some cleanup to Allen's new primop code and
1394    replaced yesterday's bootfiles with new ones.
1395    (But they are stored in the same place.)
1396    
1397    ----------------------------------------------------------------------
1398    Name: Matthias Blume
1399    Date: 2002/03/24 22:40:00 EST
1400    Tag: blume-20020324-bootfiles
1401    Description:
1402    
1403    Made the bootfiles that Allen asked for.
1404    
1405    ----------------------------------------------------------------------
1406    Name: Allen Leung
1407    Date: 2002/03/23 15:50:00 EST
1408    Tag: leunga-20020323-flint-cps-rcc-primops
1409    Description:
1410    
1411      1. Changes to FLINT primops:
1412    
1413        (* make a call to a C-function;
1414         * The primop carries C function prototype information and specifies
1415         * which of its (ML-) arguments are floating point. C prototype
1416         * information is for use by the backend, ML information is for
1417         * use by the CPS converter. *)
1418      | RAW_CCALL of { c_proto: CTypes.c_proto,
1419                       ml_args: ccall_type list,
1420                       ml_res_opt: ccall_type option,
1421                       reentrant : bool
1422                     } option
1423       (* Allocate uninitialized storage on the heap.
1424        * The record is meant to hold short-lived C objects, i.e., they
1425        * are not ML pointers.  With the tag, the representation is
1426        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
1427        *)
1428      | RAW_RECORD of {tag:bool,sz:int}
1429      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
1430    
1431      2.  These CPS primops are now overloaded:
1432    
1433           rawload of {kind:numkind}
1434           rawstore of {kind:numkind}
1435    
1436          The one argument form is:
1437    
1438             rawload {kind} address
1439    
1440          The two argument form is:
1441    
1442             rawload {kind} [ml object, byte-offset]
1443    
1444      3. RAW_CCALL/RCC now takes two extra arguments:
1445    
1446         a. The first is whether the C call is reentrant, i.e., whether
1447            ML state should be saved and restored.
1448         b. The second argument is a string argument specifying the name of
1449            library and the C function.
1450    
1451         These things are currently not handled in the code generator, yet.
1452    
1453      4. In CProto,
1454    
1455         An encoding type of "bool" means "ml object" and is mapped into
1456         C prototype of PTR.  Note that "bool" is different than "string",
1457         even though "string" is also mapped into PTR, because "bool"
1458         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
1459    
1460      5. Pickler/unpicker
1461    
1462         Changed to handle RAW_RECORD and newest RAW_CCALL
1463    
1464      6. MLRiscGen,
1465    
1466         1. Changed to handle the new rawload/rawstore/rawrecord operators.
1467         2. Code for handling C Calls has been moved to a new module CPSCCalls,
1468            in the file CodeGen/cpscompile/cps-c-calls.sml
1469    
1470      7. Added the conditional move operator
1471    
1472             condmove of branch
1473    
1474         to cps.  Generation of this is still buggy so it is currently
1475         disabled.
1476    
1477    ----------------------------------------------------------------------
1478    Name: Lal George
1479    Date: 2002/03/22 14:18:25 EST
1480    Tag: george-20020322-cps-branch-prob
1481    Description:
1482    
1483    Implemented the Ball-Larus branch prediction-heuristics, and
1484    incorporated graphical viewers for control flow graphs.
1485    
1486    Ball-Larus Heuristics:
1487    ---------------------
1488    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
1489    
1490    By design it uses the Dempster-Shafer theory for combining
1491    probabilities.  For example, in the function:
1492    
1493        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
1494    
1495    the ball-larus heuristics predicts that the n=0 is unlikely
1496    (OH-heuristic), and the 'then' branch is unlikely because of the
1497    RH-heuristic -- giving the 'then' branch an even lower combined
1498    probability using the Dempster-Shafer theory.
1499    
1500    Finally, John Reppy's loop analysis in MLRISC, further lowers the
1501    probability of the 'then' branch because of the loop in the else
1502    branch.
1503    
1504    
1505    Graphical Viewing:
1506    ------------------
1507    I merely plugged in Allen's graphical viewers into the compiler. The
1508    additional code is not much. At the top level, saying:
1509    
1510            Control.MLRISC.getFlag "cfg-graphical-view" := true;
1511    
1512    will display the graphical view of the control flow graph just before
1513    back-patching.  daVinci must be in your path for this to work. If
1514    daVinci is not available, then the default viewer can be changed
1515    using:
1516    
1517            Control.MLRISC.getString "viewer"
1518    
1519    which can be set to "dot" or "vcg" for the corresponding viewers. Of
1520    course, these viewers must be in your path.
1521    
1522    The above will display the compilation unit at the level of clusters,
1523    many of which are small, boring, and un-interesting. Also setting:
1524    
1525            Control.MLRISC.getInt "cfg-graphical-view_size"
1526    
1527    will display clusters that are larger than the value set by the above.
1528    
1529    
1530    ----------------------------------------------------------------------
1531    Name: Matthias Blume
1532    Date: 2002/03/21 22:20:00 EST
1533    Tag: blume-20020321-kmp-bugfix
1534    Description:
1535    
1536    Changed the interface to the KMP routine in PreString and fixed
1537    a minor bug in one place where it was used.
1538    
1539    ----------------------------------------------------------------------
1540  Name: Allen Leung  Name: Allen Leung
1541  Date: 2002/03/21 20:30:00 EST  Date: 2002/03/21 20:30:00 EST
1542  Tag: leunga-20020321-cfg  Tag: leunga-20020321-cfg

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

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