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 686, Tue Jul 18 08:58:50 2000 UTC revision 1581, Wed Aug 4 19:00:53 2004 UTC
# Line 8  Line 8 
8  The form of an entry should be:  The form of an entry should be:
9    
10  Name:  Name:
11  Date:  Date: yyyy/mm/dd
12  Tag: <post-commit CVS tag>  Tag: <post-commit CVS tag>
13  Description:  Description:
14    
15    ----------------------------------------------------------------------
16    Name: Matthias Blume (blume (at) tti - c (dot) org)
17    Date: 2004/08/04 14:00:00 CDT
18    Tag: Release_110_47
19    Description:
20    
21    New working version (110.47).  NEW BOOTFILES!
22    
23    ----------------------------------------------------------------------
24    Name: Matthias Blume (blume (at) tti - c (dot) org)
25    Date: 2004/08/03 14:25:00 CDT
26    Tag: blume-20040803-callingconv
27    Description:
28    
29    Added low-level support for choosing C calling conventions by
30    twiddling the type of rawccall.  (See
31    src/compiler/Semant/types/cproto.sml for details.)
32    
33    ----------------------------------------------------------------------
34    Name: Matthias Blume (blume (at) tti - c (dot) org)
35    Date: 2004/08/02 15:55:00 CDT
36    Tag: blume-20040802-backout
37    Description:
38    
39    Backed out of change to win32-filesys.c.  The earlier patch to
40    get_file_time caused CM to produce files with the wrong time stamp.
41    
42    ----------------------------------------------------------------------
43    Name: Matthias Blume (blume (at) tti - c (dot) org)
44    Date: 2004/08/02 14:45:00 CDT
45    Tag: blume-20040802-nlffi-win32
46    Description:
47    
48    Added NLFFI support for Win32, adapted from a patch provided by David
49    Hansel.  This is currently completely untested.  Also, the issue
50    concerning stdcall vs. ccall is still unresolved.
51    
52    ----------------------------------------------------------------------
53    Name: Matthias Blume (blume (at) tti - c (dot) org)
54    Date: 2004/07/30 17:55:00 CDT
55    Tag: blume-20040730-various
56    Description:
57    
58    Gearing up towards 110.47...
59    
60    - various minor bugfixes to ml-nlffigen
61    - a beginning of a manual for nlffi
62    
63    - eliminated 'export name=value' in config/install.sh as this does
64      not work with certain versions of /bin/sh
65      (Thanks to David King at Motorola for catching this.)
66    
67    - several bugfixes provided or suggested by David Hansel at Reactive Systems:
68      - added a test for tm==NULL to gmtime.c and localtime.c
69      - applied patch for incorrect GetFileTime under win32
70      - toSeconds -> toMilliseconds in Win32/win32-process.sml
71    
72    ----------------------------------------------------------------------
73    Name: Matthias Blume (blume (at) tti - c (dot) org)
74    Date: 2004/07/21 18:20:00 CDT
75    Tag: blume-20040721-nlffigen
76    Description:
77    
78    - Fixed minor issue in ml-nlffigen: Now generate structure T_foo
79      for a typedef to an incomplete type, but leave out the "typ" member.
80      (This is just for consistency.)
81    - Started to produce what is supposed to become better (i.e., comprehensive)
82      documentation of what ml-nlffigen does and produces.
83    
84    ----------------------------------------------------------------------
85    Name: Matthias Blume (blume (at) tti - c (dot) org)
86    Date: 2004/07/14 16:25:00 CDT
87    Tag: blume-20040714-union
88    Description:
89    
90    Added C_UNION to c-calls/c-types.sml and updated the machinery
91    (ml-nlffigen, cproto.sml) that conveys C function interface
92    information to the code generator.
93    
94    However, the actual architecture-specific implementation of function
95    arguments and results that are C unions is still not implemented.
96    
97    ----------------------------------------------------------------------
98    Name: Allen Leung (leunga (at) reservoir (dot) com)
99    Date: 2004/07/14 14:38:00 EST
100    Tag: leunga-110_46_1-ppc-lwzu
101    Description:
102    
103        Added these instructions to the PowerPC architecture:
104        LBZU(X), LHZU(X), LWZU(X),
105        STWU(X), STFDU, STFSU
106    
107        etc...
108    
109        Note: I haven't added their instruction encoding into the description.
110    
111    ----------------------------------------------------------------------
112    Name: Allen Leung (leunga (at) reservoir (dot) com)
113    Date: 2004/07/13 15:04:00 EST
114    Tag: leunga-110_46_1-ppc-lwarx
115    Description:
116    
117       Added the two instructions LWARX and STWCX to the PowerPC
118    instruction set.
119    
120       A (untested) rewrite of loop-structure.sml.  The old version
121    is completely broken.
122    
123    ----------------------------------------------------------------------
124    Name: Matthias Blume (blume (at) tti - c (dot) org)
125    Date: 2004/07/13 13:50:00 CDT
126    Tag: blume-20040713-nlffi
127    Description:
128    
129    - use paramAlloc to report c-calls with too many arguments
130      (for PPC version where parameter area is pre-allocated)
131    - added ccall_maxargspace to machspec (to implement the above)
132    - made "make" commend in CM's "make" tool configurable
133    - added option (default: on) for passing the name of the SML/NJ's "bin"
134      directory to "make"; the call looks like this:
135    
136         make <options> SMLNJ_BINDIR=<dir> <target>
137    
138      This can be used by the Makefile to, e.g., pick the "right" version
139      of ml-nlffigen.
140    - minor code tweaks
141    
142    ----------------------------------------------------------------------
143    Name: Matthias Blume (blume (at) tti - c (dot) org)
144    Date: 2004/07/12 22:50:00 CDT
145    Tag: blume-110_46_1-macosx-nlffi
146    Description:
147    
148    NLFFI under Mac OS X now working (sort of).  This is largely untested,
149    though.
150    
151    Note:  1. You have to make a new, clean build of the runtime system.
152           2. There are new BOOTFILES, you have to use them!
153              (Doing the bootstrap process yourself would be *very* painful!
154               If you absolutely have to do it, build the system under
155               a different architecture and then cross-compile.)
156    
157    Version bumped to 110.46.1 to account for runtime data format changes.
158    
159    ----------------------------------------------------------------------
160    Name: Matthias Blume (blume (at) tti - c (dot) org)
161    Date: 2004/06/18 14:30:00 CDT
162    Tag: blume-20040618-unix
163    Description:
164    
165    Changed the implementation of structure Unix so that the same stream
166    is returned every time one of the {text,bin}{In,Out}streamOf functions
167    is invoked on the same proc.  This is not what the spec currently
168    says -- although IMO it arguably should.  (See discussion below.)
169    
170    ----------------------------------------------------------------------
171    Name: Matthias Blume (blume (at) tti - c (dot) org)
172    Date: 2004/06/17 18:15:00 CDT
173    Tag: Release_110_46
174    Description:
175    
176    New working version (110.46).  NEW BOOTFILES!
177    
178    ----------------------------------------------------------------------
179    Name: Matthias Blume (blume (at) tti - c (dot) org)
180    Date: 2004/06/17 17:20:00 CDT
181    Tag: blume-20040617-timer-unix
182    Description:
183    
184    Changed the interface of structures Timer and Unix to match the most
185    recent Basis spec.
186    
187    In the case of Unix there still seems to be an open/weird issue:
188    
189       The {text,bin}{In,Out}streamOf functions are supposed to create
190       fresh streams whenever they are called -- as opposed to have them
191       return the same stream every time.  This design is supposed to
192       prevent space leaks caused by proc values hanging on to streams.
193    
194       The reap function, on the other hand, is supposed to close the
195       streams.  This cannot be done without having a handle on the
196       stream in proc after all...
197    
198    I took the liberty to implement the following stopgap solution:
199    
200      The proc value hangs on to the most recently created stream(s).
201      Reap closes those.  If either or both of the two streams hadn't
202      been created at all yet, then reap will close the corresponding
203      file descriptors directly.
204    
205    PS: I don't understand the original space leak argument anymore.  If
206    a proc hangs on to the imperative stream, then I/O operations on those
207    will advance the state of the cached stream and avoid the space leak.
208    
209    ----------------------------------------------------------------------
210    Name: Matthias Blume (blume (at) tti - c (dot) org)
211    Date: 2004/05/28 16:45:00 CDT
212    Tag: blume-20040528-basis
213    Description:
214    
215    Added signature PACK_REAL and exported functor PrimIO.
216    
217    ----------------------------------------------------------------------
218    Name: Matthias Blume (blume (at) tti - c (dot) org)
219    Date: 2004/05/25 16:00:00 CDT
220    Tag: blume-20040525-group-owner
221    Description:
222    
223    CM now ignores (but still accepts) the "owner" information in group
224    descriptions.  The owner of a group is its next enclosing
225    library. Each group must have a unique owner.  (There is a virtual
226    "toplevel" library that owns groups which are not nested within a real
227    library.)  Previously, each group had to explicitly declare its owner,
228    and CM would check that such a declaration is correct.  The new scheme
229    is to have CM check that for each group there is precisely one owning
230    library.
231    
232    The advantage of the new scheme is that the programmer no longer needs
233    to maintain the somewhat annoying owner information.  The downside is
234    that CM cannot enforce the ownership rule across multiple runs of
235    CM.make.  Fortunately, enclosing the same group in two different
236    libraries A and B which are not part of the same program does not
237    cause real problems.
238    
239    ----------------------------------------------------------------------
240    Name: Matthias Blume (blume (at) tti - c (dot) org)
241    Date: 2004/05/20 16:00:00 CDT
242    Tag: blume-20040520-win32
243    Description:
244    
245    Made the win32 version work again.  (Strangely, a misplaced comma had
246    slipped into win32-process.c which prevented the runtime from being
247    compiled correctly.)
248    
249    Also, included a minor addition to ml-build.bat analogous to what was
250    done in blume-20040519-ml-build.
251    
252    ----------------------------------------------------------------------
253    Name: Matthias Blume (blume (at) tti - c (dot) org)
254    Date: 2004/05/19 22:10:00 CDT
255    Tag: blume-20040519-ml-build
256    Description:
257    
258    Arranged for ml-build to clean up after itself a little bit better.
259    The script generates a temporary SML source file and compiles it using
260    CM, so CM generates metadata (GUID, SKEL, objectfile) for it.  It now
261    gets rid of those at the end, so they don't accumulate under .cm.
262    
263    This required a minor change to install.sh because the name of the
264    metadata directory (default: .cm) is actually configurable at
265    installation time.
266    
267    ----------------------------------------------------------------------
268    Name: Matthias Blume (blume (at) tti - c (dot) org)
269    Date: 2004/05/18 15:50:00 CDT
270    Tag: blume-20040518-mkreader
271    Description:
272    
273    Added Posix.IO.mk{Bin,Text}{Reader,Writer} by lifting their respective
274    implementations from internal modules PosixBinPrimIO and PosixTextPrimIO.
275    
276    ----------------------------------------------------------------------
277    Name: Matthias Blume (blume (at) tti - c (dot) org)
278    Date: 2004/05/11 14:35:00 CDT
279    Tag: blume-20040511-win32sock
280    Description:
281    
282    Added previously missing support for many socket-related functions
283    under win32.  Thanks to David Hansel <hansel@reactive-systems.com>
284    for the voluminous patch!
285    
286    (I have not tested this patch under win32 yet.)
287    
288    Here is David's e-mail:
289    
290    Hi,
291    
292    Attached to this email you find a diff against sml/nj 110.45
293    that will enable socket support under Windows.
294    
295    To apply the patch (using unix or cygwin)
296    1) gunzip runtime.diff.gz
297    2) "cd" into "src/runtime" in the source tree of a fresh
298       110.45 installation.
299    3) patch -p 1 < [your/path/to]runtime.diff
300    
301    The code compiles fine but has NOT yet been extensively tested.
302    I only ran a few tests for basic socket client functionality
303    (which worked fine).  Especially the functions that use ioctl
304    are not tested at all and might not work (see below).
305    
306    I implemented this since we want to move to a newer version of sml/nj
307    but need socket support in order to use it.  This is the first time I
308    even had a look at the sml/nj source,  so please review my changes
309    before making this part of the distribution!  Here are a few issues
310    that I think might be better for someone to solve who is more
311    familiar with the sml/nj source (and socket programming):
312    
313    - getnetbyaddr.c and getnetbyname.c will raise a "not implemented"
314      exception since I could not figure out what the windows equivalent
315      of these functions is
316    
317    - In sockets-osdep.h there are a some #include statements that are
318      only used in a few files that include sockets-osdep.h
319    
320    - In smlnj-sock-lib.c, function init_fn() calls WSAStartup() but
321      does not process its return value since I don't know how to
322      report an error upwards.
323    
324    - It would probably be good to have a call to WSACleanup() when
325      the library is unloaded (if there is such a possibility).
326      Otherwise I think Windows will take care of this automatically
327      when the process finishes.
328    
329    - I used ioctlsocket() as a replacement for ioctl() but I have
330      no idea if that is actually the proper replacement on Windows.
331    
332    - All these issues are marked in the code by "FIXME" comments.
333    
334    We use sml/nj extensively in our products and are quite happy
335    with it.  I hope this contribution will help you.
336    
337    Keep up the good work!
338    
339    David
340    
341    ----------------------------------------------------------------------
342    Name: Matthias Blume (blume (at) tti - c (dot) org)
343    Date: 2004/05/11 14:20:00 CDT
344    Tag: blume-20040511-installml
345    Description:
346    
347    Fixed two bugs in installml script.  (Thanks to Vesa A. Norrman for
348    the patch.)
349    
350    ----------------------------------------------------------------------
351    Name: Matthias Blume (blume (at) tti - c (dot) org)
352    Date: 2004/05/11 14:05:00 CDT
353    Tag: blume-20040511-nlffi-netbsd
354    Description:
355    
356    Added support for nlffi under netbsd.  (Thanks to Vesa A. Norrman for
357    the patch.)
358    
359    ----------------------------------------------------------------------
360    Name: Matthias Blume (blume (at) tti - c (dot) org)
361    Date: 2004/05/11 12:05:00 CDT
362    Tag: blume-20040511-exports
363    Description:
364    
365    As per request by Adam Chlipala <adam@hcoop.net>, extended various
366    export lists in compiler-related .cm-files.
367    
368    ----------------------------------------------------------------------
369    Name: Matthias Blume (blume (at) tti - c (dot) org)
370    Date: 2004/05/11 11:35:00 CDT
371    Tag: blume-20040511-allsource
372    Description:
373    
374    The installer now honors the "src-smlnj" target again, although its meaning
375    has changed from "all sources required for the compiler" to "all sources
376    the installer knows about".  In other words, if you enable "src-smlnj"
377    in the "targets" file, then the installer will pull in sources for
378    everything.  (Notice that this refers to source code only.  Compiled
379    code is still only installed for modules that were requested explicitly
380    or which are required for other modules that were requested explicitly.)
381    
382    ----------------------------------------------------------------------
383    Name: Matthias Blume (blume (at) tti - c (dot) org)
384    Date: 2004/04/23 17:40:00 CDT
385    Tag: blume-20040423-ieee-scan
386    Description:
387    
388    Fixed IEEEReal.scan (and .fromString) so that if there is an overflow
389    in the exponent calculation we get INF or ZERO (depending on the mantissa
390    and the sign of the exponent).
391    
392    ----------------------------------------------------------------------
393    Name: Matthias Blume (blume (at) tti - c (dot) org)
394    Date: 2004/04/23 10:40:00 CDT
395    Tag: blume-20040423-ml-build
396    Description:
397    
398    The ml-build script now terminates with a non-0 status when something
399    goes wrong.
400    
401    ----------------------------------------------------------------------
402    Name: Matthias Blume (blume (at) tti - c (dot) org)
403    Date: 2004/04/22 16:35:00 CDT
404    Tag: blume-20040422-Option
405    Description:
406    
407    Made exception Option to be the same as exception Option.Option
408    (as it should be).
409    
410    ----------------------------------------------------------------------
411    Name: Allen Leung (leunga (at) reservoir (dot) com)
412    Date: 2004/03/19 14:40:00 EST
413    Tag: leunga-20040319-cygwin-nlffi
414    Description:
415    
416    Fixed the runtime so that ml-nlffi-lib runs on the cygwin version
417    of SML/NJ.  The problem is that
418    
419       lib = dlopen(NULL, ...)
420       f   = dlsym(lib, "malloc");
421    
422    does not work on Windows unless we explicitly export symbols
423    such as 'malloc' during linking.  We fixed this by explicitly
424    exporting the required symbols with the magic gcc incantation:
425    
426        -Wl,--export-all cygwin.def
427    
428    where cygwin.def is a file containing all the symbols that
429    we wish to export.
430    
431    I suspect this is a Windows problem and we'll have to
432    do the same (somehow with windows compilers) when
433    we build the native win32 version with the system
434    calls LoadLibrary/GetProcAddress.
435    
436    ----------------------------------------------------------------------
437    Name: Matthias Blume (blume (at) tti - c (dot) org)
438    Date: 2004/03/04 16:35:00 CST
439    Tag: blume-20040304-intinf-fmt
440    Description:
441    
442    Fixed problem with IntInf.fmt (sign would show up on the right instead
443    of on the left for BIN, OCT, and HEX).
444    
445    ----------------------------------------------------------------------
446    Name: Matthias Blume (blume (at) tti - c (dot) org)
447    Date: 2004/03/04 11:25:00 CST
448    Tag: blume-20040304-symlinks
449    Description:
450    
451    Fixed problem with installer script (unix only) where bin/ml-yacc and
452    friends pointed (via symlinks) to absolute locations instead of just
453    .run-sml.  This was reported by Vesa A Norrman.
454    
455    ----------------------------------------------------------------------
456    Name: Matthias Blume (blume (at) tti - c (dot) org)
457    Date: 2004/02/13 14:50:00 CST
458    Tag: Release_110_45
459    Description:
460    
461    New working version (110.45). New bootfiles.
462    
463    ----------------------------------------------------------------------
464    Name: Matthias Blume (blume (at) tti - c (dot) org)
465    Date: 2004/01/26 15:15:15 CST
466    Tag: blume-20040126-toplevel
467    Description:
468    
469    Improved handling of exceptions at the interactive toplevel.
470    
471    ----------------------------------------------------------------------
472    Name: Matthias Blume (blume (at) tti - c (dot) org)
473    Date: 2004/01/26 11:25:00
474    Tag: blume-20040126-app
475    Description:
476    
477    Type of top-level "app" corrected.
478    Added code for setting vp_limitPtrMask to Win32-specific runtime.
479    
480    ----------------------------------------------------------------------
481    Name: Matthias Blume (blume (at) tti - c (dot) org)
482    Date: 2003/11/18 17:10 CST
483    Tag: blume-20031118-basis-fiddle
484    Description:
485    
486    - changed Timer interface to what might become the spec
487    - POSIX_FLAGS -> BIT_FLAGS according to spec
488    - some other minor discrepancies wrt. spec eliminated
489    
490    ----------------------------------------------------------------------
491    Name: Matthias Blume (blume (at) tti - c (dot) org)
492    Date: 2003/11/06 12:00:00 CST
493    Tag: Release_110_44
494    Description:
495    
496    New working version (110.44). New bootfiles.
497    
498    ----------------------------------------------------------------------
499    Name: Matthias Blume (blume (at) tti - c (dot) org)
500    Date: 2003/11/04 11:50:00 CST
501    Tag: blume-20031104-move-libraries
502    Description:
503    
504    Eliminated the "dont_move_libraries" directive in config/targets.
505    (The mechanism was broken and could not be fixed easily.  Moreover,
506    there does not seem to be any reason not to move all libraries into
507    lib during installation.  I originally implemented this directive as a
508    backward-compatibility feature when I first introduced the new CM.
509    Now that things have been stable for a long time and going back to the
510    old CM is not an option, there is no reason to keep it around.)
511    
512    ----------------------------------------------------------------------
513    Name: Matthias Blume (blume (at) tti - c (dot) org)
514    Date: 2003/11/03 16:00:00 CST
515    Tag: blume-20031103-installdir
516    Description:
517    
518    Made installer honor INSTALLDIR variable again.  (Thanks to Chris
519    Richards for pointing out the problem and providing the solution.)
520    
521    ----------------------------------------------------------------------
522    Name: Matthias Blume (blume (at) tti - c (dot) org)
523    Date: 2003/10/01 17:05:00 CDT
524    Tag: blume-20031001-lal-mlrisc
525    Description:
526    
527    MLRISC bug fix from Lal.
528    
529    ----------------------------------------------------------------------
530    Name: Matthias Blume (blume (at) tti - c (dot) org)
531    Date: 2003/09/30 16:10:00 CDT
532    Tag: blume-20030930-primio-bat
533    Description:
534    
535    1. Added openVector, nullRd, and nullWr to PRIM_IO.
536    2. Improved .bat files (for Win32 port) to make things work under Win95.
537       (thanks to Aaron S. Hawley for this one)
538    
539    ----------------------------------------------------------------------
540    Name: Matthias Blume (blume (at) tti - c (dot) org)
541    Date: 2003/09/26 16:05:00 CDT
542    Tag: blume-20030926-wrappriv
543    Description:
544    
545    Added missing wrapper for privilege "primitive" in $smlnj/viscomp/core.cm.
546    
547    ----------------------------------------------------------------------
548    Name: Matthias Blume (blume (at) tti - c (dot) org)
549    Date: 2003/09/26 15:00:00 CDT
550    Tag: blume-20030926-110_43_3
551    Description:
552    
553    - additional cleanup
554    - version number bump, NEW BOOTFILES
555    
556    ----------------------------------------------------------------------
557    Name: Matthias Blume (blume (at) tti - c (dot) org)
558    Date: 2003/09/26 12:00:00 CDT
559    Tag: blume-20030926-ppautoload
560    Description:
561    
562    I modified the read-eval-print loop so that the autoloader gets
563    invoked whenever the prettyprinter tries to look up a symbol that
564    is not currently defined in the toplevel environment but which
565    appears in CM's autoload registry.  As a result, we see far fewer of
566    those ?.Foo.Bar.xxx names in the prettyprinter's output.
567    
568    In addition to this I tried to clean up some pieces of the Basis
569    implementation (e.g., Socket, Word8Array) in order to prevent other
570    instances of these ?.Foo.Bar.xxx names from being printed.
571    
572    The mechanism that picks names for types still needs some work, though.
573    (Right now it seems that if there is a type A.t which is defined to
574    be B.u, but B is unavailable at toplevel, then A.t gets printed as
575    "?.B.u" although the perhaps more sensible solution would be to use
576    "A.t" in this case.  In other words, the prettyprinter should follow
577    a chain of DEFtycs not farther than there are corresponding toplevel
578    names in the current environment.)
579    
580    ----------------------------------------------------------------------
581    Name: Matthias Blume (blume (at) tti - c (dot) org)
582    Date: 2003/09/24 16:31:00 CDT
583    Tag: blume-20030924-installer
584    Description:
585    
586    Another installer tweak:  All the ML code for the installer is now
587    compiled during CMB.make and put into a little library called
588    $smlnj/installer.cm.  The installation then simply invokes
589    
590       sml -m $smlnj/installer.cm
591    
592    and everything happens automagically.
593    
594    Win32:  ML code senses value of environment variable SMLNJ_HOME.
595    Unix:   ML code senses values of environment variables ROOT, CONFIGDIR,
596            and BINDIR.
597    
598    The new scheme guarantees that the ML code responsible for the installation
599    is in sync with the APIs of the main system.  Also, the installer is
600    somewhat faster because the installer script is precompiled.
601    
602    ----------------------------------------------------------------------
603    Name: Matthias Blume (blume (at) tti - c (dot) org)
604    Date: 2003/09/24 15:35:00 CDT
605    Tag: blume-20030924-synsock
606    Description:
607    
608    Added a signature SYNCHRONOUS_SOCKET to basis.cm.  This is like SOCKET
609    but excludes all non-blocking operations.  Defined SOCKET (in Basis)
610    and CML_SOCKET in terms of SYNCHRONOUS_SOCKET.  Removed superfluous
611    implementations of non-blocking operations from CML's Socket
612    structure.
613    
614    ----------------------------------------------------------------------
615    Name: Matthias Blume (blume (at) tti - c (dot) org)
616    Date: 2003/09/24 15:10:05 CDT
617    Tag: blume-20030924-sockets
618    Description:
619    
620    1. Fixed SOCKET API and implementation to match Basis spec.
621       This required changing the internal representation of sockets to one
622       that remembers (for each socket file descriptor) whether it is currently
623       blocking or non-blocking.  This state is maintained lazily (i.e., a system
624       call is made only if the state actually needs to change).
625    
626    2. OS-specific details of sockets were moved into separate files, thus
627       making it possible to unify the bulk of the socket implementations
628       between Unix and Win32.
629    
630    3. CML's socket API changed accordingly.
631       (Note that we need to remove non-blocking functions from this API
632       since they are redundant in the case of CML!)
633    
634    4. CML's socket implementation now makes use of non-blocking functions
635       provided by Basis, thus removing all OS-dependent code from this part
636       of CML.
637    
638    5. Changed Real64.precision from 52 to 53.  Minor cleanup in Real64 code.
639    
640    ----------------------------------------------------------------------
641    Name: Matthias Blume (blume (at) tti - c (dot) org)
642    Date: 2003/09/22 12:10:00 CDT
643    Tag: blume-20030922-110_43_2
644    Description:
645    
646    Made a new interim version and bootfiles for developer's bootstrapping
647    convenience.
648    
649       110.43.2 -- NEW BOOTFILES
650    
651    ----------------------------------------------------------------------
652    Name: Matthias Blume (blume (at) tti - c (dot) org)
653    Date: 2003/09/19 15:55:00 CDT
654    Tag: blume-20030919-cmdir
655    Description:
656    
657    1. new-install.sh -> install.sh
658    2. changed default CM "metadata" directory name to ".cm" (instead of "CM")
659    3. tweaked installer so that another name instead of .cm can be chosen
660       at install time (by setting the CM_DIR_ARC environment variable
661       during installation); once installation is complete, the name is
662       fixed
663    
664    ----------------------------------------------------------------------
665    Name: Matthias Blume (blume (at) tti - c (dot) org)
666    Date: 2003/09/18 16:00:00 CDT
667    Tag: blume-20030918-110_43_1
668    Description:
669    
670    Made a new interim version and bootfiles for developer's bootstrapping
671    convenience.
672    
673       110.43.1 -- NEW BOOTFILES
674    
675    ----------------------------------------------------------------------
676    Name: Matthias Blume (blume (at) tti - c (dot) org)
677    Date: 2003/09/18 15:20:00 CDT
678    Tag: blume-20030918-misc
679    Description:
680    
681    1. Exported fractionsPerSecond etc. from TimeImp (but not from Time as
682       this seems to be controversial at the moment) and used those in
683       Posix.ProcEnv.times.
684    
685    2. Added Time.{from,to}Nanoseconds to Time.
686    
687    3. Improved Real.{from,to}LargeInt by avoiding needless calculations.
688       For example, fromLargeInt never needs to look at more than 3 "big
689       digits" to get its 53 bits of precision.
690    
691    ----------------------------------------------------------------------
692    Name: Matthias Blume (blume (at) tti - c (dot) org)
693    Date: 2003/09/17 16:30:00 CDT
694    Tag: blume-20030917-real32-slices
695    Description:
696    
697    Added an entry to the primitive environment
698    (compiler/Semant/statenv/prim.sml) for int32->real64 conversion and
699    added code to compiler/CodeGen/main/mlriscGen.sml to implement it.
700    
701    Removed some of the "magic" constants in real64.sml and replaced them
702    with code that generates these values from their corresponding
703    integer counterparts.
704    
705    Made all(?) the slice-related changes to the Basis and made everything
706    compile again...
707    
708    ----------------------------------------------------------------------
709    Name: Matthias Blume (blume (at) tti - c (dot) org)
710    Date: 2003/09/15 17:45:00 CDT
711    Tag: blume-20030915-rbase
712    Description:
713    
714    Fixed bug in Real.fromLargeInt.
715    
716    ----------------------------------------------------------------------
717    Name: Matthias Blume (blume (at) tti - c (dot) org)
718    Date: 2003/09/13 18:11:00 CDT
719    Tag: blume-20030913-libinstall
720    Description:
721    
722    Minor bugfix in config/libinstall (set anchor with path to
723    standalone tool after installing it, otherwise libraries that
724    need ml-lex or ml-yacc won't compile the first time the installer
725    runs).
726    
727    ----------------------------------------------------------------------
728    Name: Matthias Blume (blume (at) tti - c (dot) org)
729    Date: 2003/09/12 11:45:00 CDT
730    Tag: blume-20030912-various
731    Description:
732    
733     - fixed bug in Real.toLargeInt
734     - fixed bug in Posix.ProcEnv.times
735     - changed inputLine functions to return an option
736     - minor installer improvements / bugfixes
737     - changed default @SMLalloc parameter for x86/celeron to 64k
738    
739    ----------------------------------------------------------------------
740    Name: Matthias Blume (blume (at) tti - c (dot) org)
741    Date: 2003/09/09 22:00:00 CDT
742    Tag: Release_110_43
743    Description:
744    
745        New working release 110.43.  New bootfiles.
746    
747    ----------------------------------------------------------------------
748    Name: Matthias Blume (blume (at) tti - c (dot) org)
749    Date: 2003/09/09 19:20:00 CDT
750    Tag: blume-20030909-installer
751    Description:
752    
753    Rewrote large parts of config/install.sh in SML (config/libinstall.sml).
754    Modified config/install.bat to take advantage of it.  Also modified
755    config/install.sh (and called it config/new-install.sh) to take advantage
756    of it on Unix systems.  (The SML code is (supposed to be) platform-
757    independent.)
758    
759    The installer can now install everything under Win32
760    as well as under *nix as long as it compiles.
761    
762    Other changes:
763    
764      - made CML compile again under Win32
765      - made eXene compile under Win32 (by providing a fake structure UnixSock
766        and by using OS.Process.getEnv instead of Posix.ProcEnv.getenv)
767      - fixed a bug in nowhere: it assumed that type OS.Process.status is the
768        same as type int;  under Win32 it isn't
769      - fixed some slice-related problems in the win32-specific parts of CML
770      - added a functor argument "sameVol" to os-path-fn.sml in the Basis
771        (under Win32, the volume name is case-insensitive, and the
772        OS.Path code compares volume names for equality)
773    
774    ----------------------------------------------------------------------
775    Name: Matthias Blume (blume (at) tti - c (dot) org)
776    Date: 2003/09/08 11:55:00 CDT
777    Tag: blume-20030908-fullpath
778    Description:
779    
780    Made Win32 version of OS.FileSys.fullPath return current directory
781    when given an empty string.  This is what the spec says, and incidentally,
782    CM depends on it.  (CM otherwise goes into an infinite loop in certain
783    cases when presented with the name of a non-existing .cm file.)
784    
785    ----------------------------------------------------------------------
786    Name: Matthias Blume (blume (at) tti - c (dot) org)
787    Date: 2003/09/04 16:30:00 CDT
788    Tag: blume-20030905-slices-etc
789    Description:
790    
791      1. Changed interface to vectors and arrays in Basis to match
792         (draft) Basis spec.
793      2. Added signatures and implementations of slices according to
794         Basis spec.
795      3. Edited source code throughout the system to make it compile again
796         under 1. and 2.  (In some cases code had to be added to have it
797         match the new signatures.)
798      4. MLRISC should be backward-compatible: the copies of the originals
799         of files that needed to change under 3. were retained, the .cm files
800         check the compiler version number and use old versions when
801         appropriate.
802      5. Changed type of OS.FileSys.readDir and Posix.FileSys.readdir to
803         dirstream -> string option (in accordance with Basis spec).
804      6. When generating code that counts lines, ml-lex used function
805         CharVector.foldli, taking advantage of its old interface.
806         This has been replaced with the corresponding code from
807         CharVectorSlice.  (html-lex must be re-lexed!)
808      7. BitArray in smlnj-lib/Util has been extended/modified to match the
809         new MONO_ARRAY signature.  (Do we need BitArraySlice?)
810      8. Removed temporary additions (fromInternal, toInternal) from the
811         (now obsolete) IntInf in smlnj-lib/Util.
812      9. Cleaned up structure Byte.
813     10. Added localOffset, scan, and fromString to Date (according to spec).
814         Cleaned/corrected implementation of Date.
815         (Still need to check for correctness; implement better canonicalizeDate.)
816     11. Added "scan" to signature IEEE_REAL.
817     12. Some improvements to IntInf [in particular: efficiency-hack for
818         mod and rem when second operand is 2 (for parity checks).]
819     13. Changed representation of type Time.time, using a single IntInf.int
820         value counting microseconds.  This considerably simplified the
821         implementation of structure Time.  We now support negative time
822         values; scan and fromString handle signs.
823     14. Functor PrimIO now takes two additional arguments (VectorSlice and
824         ArraySlice).
825    
826    ----------------------------------------------------------------------
827    Name: Matthias Blume (blume (at) tti - c (dot) org)
828    Date: 2003/08/28 17:00:00 CDT
829    Tag: blume-20030828-intinf
830    Description:
831    
832    This is a major update which comes with a version number bump
833    (110.42.99 -- yes, we are really close to 110.43 :-), NEW BOOTFILES,
834    and an implementation of IntInf in the Basis.
835    
836    There are a fairly large number of related changes and updates throughout
837    the system:
838    
839    Basis:
840            - Implemented IntInf.
841            - Made LargeInt a projection of IntInf (by filtering through INTEGER).
842            - Added some missing Real64 operations, most notably Real.toLargeInt.
843            - Added FixedInt as a synonym for Int32.
844    
845    compiler:
846            * Added support for a built-in intinf type.
847              - literals
848              - pattern matching
849              - conversion shortcuts (Int32.fromLarge o Int.toLarge etc.)
850              - overloading on literals and operations
851    
852            This required adding a primitive type intinf, some additional
853            primops, and implementations for several non-trivial intinf
854            operations in Core.  (The intinf type is completely abstract
855            to the compiler; all operations get delegated back to the Core.)
856    
857            * Intinf equality is handled by polyequal.  However, the compiler
858            does not print its usual warning in this case (since polyequal
859            is the right thing to do there).
860    
861            * Improved the organization of structure InlineT.
862    
863            * A word about conversion primops:
864            If conversions involving intinf do not cancel out during
865            CPS contract, then the compiler must insert calls to Core functions.
866            Since all core access must be resolved already during the FLINT
867            translate phase, it would be too late a the time of CPS contract
868            to add new Core calls.  For this reason, conversion primops
869            for intinf carry two arguments:  1. the numeric argument that
870            they are supposed to convert, and 2. the Core function that
871            can help with this conversion if necessary.  If CPS contract
872            eliminates a primop, then the associated Core function becomes
873            dead and goes away.  Intinf conversion primops that do not get
874            eliminated by CPS contract get rewritten into calls of their
875            core functions by a separate, new phase.
876    
877    interactive system:
878            - Control.Print.intinfDepth controls max length of intinf constants
879            being printed. (Analogous to Control.Print.stringDepth.)
880            - Cleanup in printutil and pputil: got rid of unused stuff and
881            duplicates; replaced some of the code with code that makes better
882            use of library functionality.
883    
884    CM:
885            Bugfix: parse-errors in init group (system/smlnj/init/init.cmi)
886            are no longer silent.
887    
888    CKIT:
889            Fixed mismatched uses of Int32 and LargeInt.  I always decided
890            in favor of LargeInt -- which is now the same as IntInf.
891            CKIT-knowledgable people should check whether this is what's
892            intended and otherwise change things back to using Int32 or
893            FixedInt.
894    
895    Throughout the code:
896            Started using IntInf.int literals and built-in operations
897            (e.g., comparison with 0) where this seems appropriate.
898    
899    
900    ----------------------------------------------------------------------
901    Name: Dave MacQueen (dbm@cs.uchicago.edu)
902    Date: 2003/08/13 11:36:00 CDT
903    Tag: dbm-20030813-mcz-merge1
904    Description:
905    
906    Merging changes from the mcz-branch development branch into trunk.
907    These changes involve replacement of the emulated old prettyprinter
908    interface with direct use of the SML/NJ Lib PP library, and fixing
909    of a couple of bugs (895, 1186) relating to error messages.  A new
910    prettyprinter for ast datatypes (Elaborator/print/ppast.{sig,sml})
911    has been added.
912    
913    ----------------------------------------------------------------------
914    Name: Matthias Blume (blume (at) tti - c (dot) org)
915    Date: 2003/08/11 15:45:00 CDT
916    Tag: blume-20030811-windows
917    Description:
918    
919    Version number bumped to 110.42.9.  NEW BOOTFILES!!!
920    
921        http://smlnj.cs.uchicago.edu/dist/working/110.42.9/
922    
923    This patch restores SML/NJ's ability to run under win32.  There are a
924    number of changes, including fixes for several bugs that had gone
925    unnoticed until now:
926    
927      - uname "CYGWIN_NT*" is recognized as win32 (This is relevant only when
928        trying to run the win32 version from within cygwin.)
929    
930      - There are a number of simple .bat scripts that substitute for their
931        corresponding Unix shell-scripts.  (See below.)
932    
933      - The internals of ml-build have been modified slightly.  The main
934        difference is that instead of calling ".link-sml" (or link-sml.bat)
935        using OS.Process.system, the ML process delegates this task back
936        to the script.  Otherwise problems arise in mixed environments such
937        as Cygwin where scripts look and work like Unix scripts, but
938        where OS.Process.system cannot run them.
939    
940      - In CM, the srcpath pickler used native pathname syntax -- which
941        is incorrect in the case of cross-compilation.  The new pickle format
942        is independent of platform-specific naming conventions.
943    
944      - Path configuration files (such as lib/pathconfig) can now choose
945        between native and standard syntax.  Placing a line of the form
946    
947            standard!
948    
949        into the file causes all subsequent paths to be interpreted using
950        CM standard pathname syntax (= Unix conventions); a line
951    
952            native!
953    
954        switches back to native style.  This was needed so that
955        path config files can be written portably, see src/system/pathconfig.
956    
957      - Runtime system:
958    
959          - win32-filesys.c:  get_file_time and set_file_time now
960            access modification time, not creation time.
961    
962          - I/O code made aware of new array representation.
963    
964          - Bug fixes in X86.prim.masm.
965    
966       - src/system/makeml made aware of win32. (For use under cygwin
967            and other Unix-environments for windows.)
968    
969       - In Basis, fixed off-by-one error in win32-io.sml (function vecF)
970         which caused BinIO.inputAll to fail consistently.
971    
972    .bat scripts:
973    
974       Windows .bat scripts assume that SMLNJ_HOME is defined.
975    
976       - sml.bat, ml-yacc.bat, ml-lex.bat:  Driver scripts for standalone
977         applications (sml, ml-yacc, ml-lex).
978       - ml-build.bat: analogous to ml-build.
979       - config\install.bat:  Analogous to config/install.sh.  This requires
980         that SMLNJ_HOME is set and that Microsoft Visual C is ready to use.
981         (nmake etc. must be on the path, and vcvars32 must have been run.)
982         Moreover, sources for ml-lex and ml-yacc need to exist under src,
983         and the bootfile hierarchy must have been unpacked under
984         sml.boot.x86-win32.
985         The script is very primitive and does a poor job at error checking.
986         It only installs the base system, ml-lex, and ml-yacc.  No other
987         libraries are being installed (i.e., you get only those that
988         are part of the compiler.)
989       - link-sml.bat:  analogous to .link-sml, but not currently used
990    
991    Unrelated bug fixes:
992    
993      - ml-nlffigen now exports structures ST_* corresponding to incomplete
994        types.
995      - Added getDevice to PP/src/pp-debug-fn.sml.  (Would not compile
996        otherwise.)
997    
998    ----------------------------------------------------------------------
999    Name: Dave MacQueen (macqueen@cs.uchicago.edu)
1000    Date: 2003/06/17
1001    Tag: macqueen-20030617-bug895
1002    Description:
1003    
1004    Modified compiler/Elaborator/print/pptype.sml to fix bug 895.
1005    Tag will be used for new development branch (mcz-branch) for
1006    use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago.
1007    
1008    ----------------------------------------------------------------------
1009    Name: Matthias Blume (blume (at) tti - c (dot) org)
1010    Date: 2003/05/27 16:55:00 CDT
1011    Tag: blume-20030527-polyeq
1012    Description:
1013    
1014    Tried to eliminated most cases of polymorphic equality.
1015    
1016    ----------------------------------------------------------------------
1017    Name: Matthias Blume (blume (at) tti - c (dot) org)
1018    Date: 2003/05/21 17:45:00 CDT
1019    Tag: blume-20030517-complete
1020    Description:
1021    
1022    Two changes:
1023    
1024      1. Added a flag for controlling whether non-exhaustive bindings will
1025         be treated as errors (default is false).
1026      2. Cleaned up the *entire* source tree so that CMB.make goes through
1027         without a single non-exhaustive match- or bind warning.
1028    
1029    ----------------------------------------------------------------------
1030    Name: Matthias Blume (blume (at) tti - c (dot) org)
1031    Date: 2003/05/17 10:20:00 CDT
1032    Tag: blume-20030517-absyn
1033    Description:
1034    
1035    1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
1036    
1037       This mainly affects the quality of error messages.  However, some
1038       of the code is now more straightforward than before. (Treatment of
1039       the above four constructs in translate.sml is much simpler than
1040       the "macro-expansion" that was going on before.  Plus, the mach-
1041       compiler no longer gets invoked just to be able to compile an
1042       if-expression.)
1043    
1044    2. The ErrorMsg.Error exception is now caught and absorbed by the
1045       interactive loop.
1046    
1047    ----------------------------------------------------------------------
1048    Name: Allen Leung
1049    Date: 2003/05/16 13:05:00 CDT
1050    Tag: leunga-20030516-cygwin-runtime
1051    Description:
1052    
1053        Ported the runtime system to cygwin, which uses the unix
1054    x86-unix bin files.  Missing/buggy features:
1055    
1056       o getnetbyname, getnetbyaddr: these functions seem to be missing in
1057         the Cygwin library.
1058       o Ctrl-C handling may be flaky.
1059       o Windows system calls and Windows I/O are not supported.
1060    
1061       A new set of binfiles is located at:
1062    
1063         http://www.dorsai.org/~leunga/boot.x86-unix.tgz
1064    
1065       This is only needed for bootstrapping the cygwin version of smlnj.
1066       Other x86 versions can use the existing binfiles.
1067    
1068    ----------------------------------------------------------------------
1069    Name: Matthias Blume
1070    Date: 2003/04/08 15:42:00 CDT
1071    Tag: blume-20030408-listpair
1072    Description:
1073    
1074    1. Added a target 'mlrisc' to installer.
1075    
1076    2. Added missing elements to structure ListPair.
1077    
1078    ----------------------------------------------------------------------
1079    Name: Allen Leung
1080    Date: 2003/01/07 10:40:00 EST
1081    Tag: leunga-20030107-int-rem
1082    Description:
1083    
1084    Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86.
1085    The arguments to the SUBL instruction were swapped.
1086    
1087    ----------------------------------------------------------------------
1088    Name: Matthias Blume
1089    Date: 2002/12/12 16:25:00 EST
1090    Tag: blume-20021212-risc-ra
1091    Description:
1092    
1093    Fixed a serious bug in the rewrite code for FP spilling/reloading that
1094    sent the RA into an infinite loop when floating point registers get
1095    spilled.  (Because of this bug, e.g., nucleic stopped compiling between
1096    110.37 and 110.38.)
1097    There was another set of potential problems related to the handling of
1098    MLRISC annotations (but those did not yet cause real problems, apparently).
1099    
1100    ----------------------------------------------------------------------
1101    Name: Matthias Blume
1102    Date: 2002/12/06 22:40:00 EST
1103    Tag: blume-20021206-cm-fileid
1104    Description:
1105    
1106    Added a call of SrcPath.sync at the beginning of Parse.parse (in CM).
1107    This fixes the problem of CM getting confused by files that suddenly
1108    change their identity (e.g., by getting unlinked and recreated by some
1109    text editor such as vi).  There might be a better/cheaper/cleaner way
1110    of doing this, but for now this will have to do.
1111    
1112    ----------------------------------------------------------------------
1113    Name: Matthias Blume
1114    Date: 2002/10/28 09:50:00 EST
1115    Tag: blume-20021028-typecheck
1116    Description:
1117    
1118    Exported structure Typecheck from $smlnj/viscomp/core.cm.
1119    
1120    ----------------------------------------------------------------------
1121    Name: Matthias Blume
1122    Date: 2002/10/17 09:10:00 EDT
1123    Tag: Release_110_42
1124    Description:
1125    
1126    In good old tradition, there has been a slight hiccup so that we have
1127    to patch 110.42 after the fact.   The old release tag has been replaced
1128    (see below).
1129    
1130    The change solves a problem with two competing approaches the
1131    configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in
1132    each other's way.
1133    
1134    This change only affects the runtime system code and the installer script.
1135    (No new bootfiles.)
1136    
1137    ----------------------------------------------------------------------
1138    Name: Matthias Blume
1139    Date: 2002/10/16 12:00:00 EDT
1140    Tag: Release_110_42_removed
1141    Description:
1142    
1143    New working release.  New bootfiles.
1144    
1145    ----------------------------------------------------------------------
1146    Name: Matthias Blume
1147    Date: 2002/10/10 13:10:00 EDT
1148    Tag: blume-20021010-ppc-divs
1149    Description:
1150    
1151    The mltree operator DIVS must be implemented with an overflow check on
1152    the PPC because the hardware indicates divide-by-zero using "overflow" as
1153    well.
1154    
1155    ----------------------------------------------------------------------
1156    Name: Matthias Blume
1157    Date: 2002/07/23 11:45:00
1158    Tag: blume-20020723-smlnj-home
1159    Description:
1160    
1161    Sml now senses the SMLNJ_HOME environment variable.  If this is set,
1162    then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless
1163    CM_PATHCONFIG is also set), the path configuration file is assumed
1164    to be in $SMLNJ_HOME/lib/pathconfig.  This way one can easily move
1165    the entire tree to some other place and everything will "just work".
1166    
1167    (Companion commands such as ml-build and ml-makedepend also sense this
1168    variable.)
1169    
1170    ----------------------------------------------------------------------
1171    Name: Matthias Blume
1172    Date: 2002/07/12 21:19:00 EDT
1173    Tag: blume-20020712-liveness
1174    Description:
1175    
1176    Exported two useful "step" functions from liveness module (MLRISC).
1177    
1178    ----------------------------------------------------------------------
1179    Name: Matthias Blume
1180    Date: 2002/07/05 16:00 EDT
1181    Tag: Release_110_41
1182    Description:
1183    
1184    New working release.  New bootfiles.
1185    
1186    ----------------------------------------------------------------------
1187    Name: Matthias Blume
1188    Date: 2002/07/05 10:25:00 EDT
1189    Tag: blume-20020705-btimp
1190    Description:
1191    
1192    Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that
1193    other clients can set up backtracing support.
1194    
1195    ----------------------------------------------------------------------
1196    Name: Matthias Blume
1197    Date: 2002/06/25 17:23:00 EDT
1198    Tag: blume-20020625-fpmax
1199    Description:
1200    
1201    Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point
1202    case.  (The sense of the isNaN test was reversed -- which made min and
1203    max always return their first argument.)
1204    
1205    ----------------------------------------------------------------------
1206    Name: Matthias Blume
1207    Date: 2002/06/11
1208    Tag: blume-20020611-unixpath
1209    Description:
1210    
1211    Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
1212    
1213    ----------------------------------------------------------------------
1214    Name: Matthias Blume
1215    Date: 2002/06/10 16:35:00 EDT
1216    Tag: blume-20020610-ieeereal
1217    Description:
1218    
1219    I back-ported my implementation of IEEEReal.fromString from the
1220    idlbasis-devel branch so that we can test it.
1221    
1222    Another small change is that ppDec tries to give more information
1223    than just "<sig>" in the case of functors.  However, this code is
1224    broken in some mysterious way if the functor's body's signature
1225    has not been declared by ascription but gets inferred from the
1226    implementation.  This needs fixing...
1227    
1228    ----------------------------------------------------------------------
1229    Name: Matthias Blume
1230    Date: 2002/05/31
1231    Tag: blume-20020531-btrace-mode
1232    Description:
1233    
1234    Resurrected SMLofNJ.Internals.BTrace.mode.  (It accidentally fell by
1235    the wayside when I switched over to using Controls everywhere.)
1236    
1237    ----------------------------------------------------------------------
1238    Name: Lal George
1239    Date: 2002/05/23 12:21:40 EDT
1240    Tag: george-20020523-visual-labels
1241    Description:
1242    
1243    Labels are now displayed in the graphical output to make
1244    the fall-through and target blocks obvious.
1245    
1246    ----------------------------------------------------------------------
1247    Name: Matthias Blume
1248    Date: 2002/05/22 11:03:00 EDT
1249    Tag: blume-20020522-shrink
1250    Description:
1251    
1252    John tweaked yesterday's fix for 1131 to handle an out-of-memory
1253    situation that comes up when allocating huge arrays.
1254    
1255    ----------------------------------------------------------------------
1256    Name: Matthias Blume
1257    Date: 2002/05/21 16:00:00 EDT
1258    Tag: Release_110_40
1259    Description:
1260    
1261    New working release (110.40).  New bootfiles.
1262    
1263    [Also: John Reppy fixed GC bug 1131.]
1264    
1265    ----------------------------------------------------------------------
1266    Name: Matthias Blume
1267    Date: 2002/05/21 12:35:00 EDT
1268    Tag: blume-20020521-cmdoc
1269    Description:
1270    
1271    CM documentation update.
1272    
1273    ----------------------------------------------------------------------
1274    Name: Matthias Blume
1275    Date: 2002/05/21 10:55:00 EDT
1276    Tag: blume-20020521-misc
1277    Description:
1278    
1279    - John tweaked runtime to be silent on heap export (except when
1280      GC messages are on).
1281    - I added a few more things (cross-compiling versions of CMB) to
1282      config/preloads (as suggestions).
1283    
1284    ----------------------------------------------------------------------
1285    Name: Matthias Blume
1286    Date: 2002/05/20 22:25:00 EDT
1287    Tag: blume-20020520-controls
1288    Description:
1289    
1290    - Added ControlUtil structure to control-lib.cm.
1291    - Use it throughout.
1292    - Used Controls facility to define MLRISC controls (as opposed to
1293      registering MLRISC control ref cells with Controls after the fact)
1294    - Fixed messed-up controls priorities.
1295    
1296    * Removed again all the stuff from config/preloads that one wouldn't
1297      be able to preload at the time the initial heap image is built.
1298      (Many libraries, e.g., CML, do not exist yet at this time.  The
1299       only libraries that can be preloaded via config/preloads are those
1300       that come bundled with the bootfiles.)
1301    
1302    ----------------------------------------------------------------------
1303    Name: Matthias Blume
1304    Date: 2002/05/20 10:59:00 EDT
1305    Tag: blume-20020520-preloads
1306    Description:
1307    
1308    Added a lot of commented-out suggestions for things to be included
1309    in config/preloads.
1310    
1311    ----------------------------------------------------------------------
1312    Name: Allen Leung
1313    Date: 2002/05/18 14:20:00 EDT
1314    Tag: leunga-20020518-mdl
1315    Description:
1316    
1317    o Made the mdl tool stuff compile and run again.
1318    o I've disabled all the stuff that depends on RTL specifications; they
1319      are all badly broken anyway.
1320    
1321    ----------------------------------------------------------------------
1322    Name: Matthias Blume
1323    Date: 2002/05/17 16:49:00 EDT
1324    Tag: blume-20020517-controls
1325    Description:
1326    
1327    0. John Reppy made several modifications to the SML/NJ library.
1328       In particular, there is a shiny new controls-lib.cm.
1329    
1330    1. Pushed new controls interface through compiler so that everything
1331       compiles again.
1332    
1333    2. Added FormatComb and FORMAT_COMB to the CML version of the
1334       SML/NJ library (so that CML compiles again).
1335    
1336    3. Modified init scripts because XXX_DEFAULT environment variables
1337       are no longer with us.  (Boot-time initialization is now done
1338       using the same environment variables that are also used for
1339       startup-time initialization of controls.)
1340    
1341    ----------------------------------------------------------------------
1342    Name: Lal George
1343    Date: 2002/05/15 09:20:10 EDT
1344    Tag: george-20020515-pseudo-op-decls
1345    Description:
1346    
1347            All pseudo-ops emitted before the first segment declaration
1348    such as TEXT, DATA, and BSS directives are assumed to be global
1349    declarations and are emitted first in the assembly file. This is
1350    useful in a number of situations where one has pseudo-ops that are not
1351    specific to any segment, and also works around the constraint that one
1352    cannot have client pseudo-ops in the TEXT segment.
1353    
1354            Because no segment is associated with these declarations it is
1355    an error to allocate any space or objects before the first segment
1356    directive and an exception will be raised. However, we cannot make
1357    this check for client pseudo-ops.
1358    
1359            These top level declarations are a field in the CFG graph_info.
1360    In theory you can continue to add to this field after the CFG has been
1361    built -- provided you know what you are doing;-)
1362    
1363    ----------------------------------------------------------------------
1364    Name: Matthias Blume
1365    Date: 2002/05/13 16:40:00 EDT
1366    Tag: blume-20020513-pp-etc
1367    Description:
1368    
1369    A few minor bugfixes:
1370    
1371      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
1372        (Bogus printouts for redefined bindings still occur.  Compiler
1373        bug should no longer occur now.  We need to redo the prettyprinter
1374        from scratch.)
1375    
1376      - CM pathname printer now also adds escape sequences for ( and )
1377    
1378      - commend and docu fixes for ml-nlffi
1379    
1380    ----------------------------------------------------------------------
1381    Name: Matthias Blume
1382    Date: 2002/05/10 16:40:00 EDT
1383    Tag: blume-20020510-erg-textio
1384    Description:
1385    
1386    Applied the following bugfix provided by Emden Gansner:
1387    
1388        Output is corrupted when outputSubstr is used rather than output.
1389    
1390        The problem occurs when a substring
1391    
1392            ss = (s, dataStart, dataLen)
1393    
1394        where dataStart > 0, fills a stream buffer with avail bytes left.
1395        avail bytes of s, starting at index dataStart, are copied into the
1396        buffer, the buffer is flushed, and then the remaining dataLen-avail
1397        bytes of ss are copied into the beginning of the buffer. Instead of
1398        starting this copy at index dataStart+avail in s, the current code
1399        starts the copy at index avail.
1400    
1401        Fix:
1402        In text-io-fn.sml, change line 695 from
1403             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
1404        to
1405             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
1406    
1407    ----------------------------------------------------------------------
1408    Name: Matthias Blume
1409    Date: 2002/04/12 13:55:00 EDT
1410    Tag: blume-20020412-assyntax
1411    Description:
1412    
1413    1. Grabbed newer assyntax.h from the XFree86 project.
1414    2. Fiddled with how to compile X86.prim.asm without warnings.
1415    3. (Very) Minor cleanup in CM.
1416    
1417    ----------------------------------------------------------------------
1418    Name: Matthias Blume
1419    Date: 2002/04/01 (no joke!) 17:07:00 EST
1420    Tag: blume-20020401-x86div
1421    Description:
1422    
1423    Added full support for div/mod/rem/quot on the x86, using the machine
1424    instruction's two results (without clumsily recomputing the remainder)
1425    directly where appropriate.
1426    
1427    Some more extensive power-of-two support was added to the x86 instruction
1428    selector (avoiding expensive divs, mods, and muls where they can be
1429    replaced with cheaper shifts and masks).  However, this sort of thing
1430    ought to be done earlier, e.g., within the CPS optimizer so that
1431    all architectures benefit from it.
1432    
1433    The compiler compiles to a fixed point, but changes might be somewhat
1434    fragile nevertheless.  Please, report any strange things that you might
1435    see wrt. div/mod/quot/rem...
1436    
1437    ----------------------------------------------------------------------
1438    Name: Matthias Blume
1439    Date: 2002/03/29 17:22:00
1440    Tag: blume-20020329-div
1441    Description:
1442    
1443    Fixed my broken div/mod logic.  Unfortunately, this means that the
1444    inline code for div/mod now has one more comparison than before.
1445    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
1446    The problem was with quotient = 0, because that alone does not tell
1447    us which way the rounding went.  One then has to look at whether
1448    remainder and divisor have the same sign...  :(
1449    
1450    Anyway, I replaced the bootfiles with fresh ones...
1451    
1452    ----------------------------------------------------------------------
1453    Name: Matthias Blume
1454    Date: 2002/03/29 14:10:00 EST
1455    Tag: blume-20020329-inlprims
1456    Description:
1457    
1458    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
1459    
1460    Primops have changed. This means that the bin/boot-file formats have
1461    changed as well.
1462    
1463    To make sure that there is no confusion, I made a new version.
1464    
1465    
1466    CHANGES:
1467    
1468    * removed REMT from mltree (remainder should never overflow).
1469    
1470    * added primops to deal with divisions of all flavors to the frontend
1471    
1472    * handled these primops all the way through so they map to their respective
1473      MLRISC support
1474    
1475    * used these primops in the implementation of Int, Int32, Word, Word32
1476    
1477    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
1478    
1479    * parameterized INLMIN, INLMAX, and INLABS by a numkind
1480    
1481    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
1482      floating point
1483    
1484    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
1485      and Real (but Real.abs maps to a separate floating-point-only primop)
1486    
1487    
1488    TODO items:
1489    
1490    * Hacked Alpha32 instruction selection, disabling the selection of REMx
1491      instructions because the machine instruction encoder cannot handle
1492      them.  (Hppa, PPC, and Sparc instruction selection did not handle
1493      REM in the first place, and REM is supported by the x86 machine coder.)
1494    
1495    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
1496      selection phase.  (The two can be streamlined because the hardware
1497      delivers both quotient and remainder at the same time anyway.)
1498    
1499    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
1500      (Currently the behavior is inconsistent both across architectures and
1501      wrt. the draft Basis spec.)
1502    
1503    * Word8 should eventually be handled natively, too.
1504    
1505    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
1506      as if there currently is no execution path that could trigger it in
1507      SML/NJ.  (The assumptions underlying functions arith and promotable do not
1508      hold for things like multiplication and division.)
1509    
1510    ----------------------------------------------------------------------
1511    Name: Matthias Blume
1512    Date: 2002/03/27 16:27:00 EST
1513    Tag: blume-20020327-mlrisc-divisions
1514    Description:
1515    
1516    Added support for all four division operations (ML's div, mod, quot,
1517    and rem) to MLRISC.  In the course of doing so, I also rationalized
1518    the naming (no more annoying switch-around of DIV and QUOT), by
1519    parameterizing the operation by div_rounding_mode (which can be either
1520    DIV_TO_ZERO or DIV_TO_NEGINF).
1521    
1522    The generic MLTreeGen functor takes care of compiling all four
1523    operations down to only round-to-zero div.
1524    
1525    Missing pieces:
1526    
1527      * Doing something smarter than relying on MLTreeGen on architectures
1528        like, e.g., the x86 where hardware division delivers both quotient and
1529        remainder at the same time.  With this, the implementation of the
1530        round-to-neginf operations could be further streamlined.
1531    
1532      * Remove inlining support for div/mod/rem from the frontend and replace it
1533        with primops that get carried through to the backend.  Do this for all
1534        int and word types.
1535    
1536    ----------------------------------------------------------------------
1537    Name: Matthias Blume
1538    Date: 2002/03/25 17:25:00 EST
1539    Tag: blume-20020325-divmod
1540    Description:
1541    
1542    I improved (hopefully without breaking them) the implementation of Int.div,
1543    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
1544    advantage of the following observations:
1545    
1546      Let  q = x quot y      r = x rem y
1547           d = x div  y      m = x mod y
1548    
1549    where "quot" is the round-to-zero version of integer division that
1550    hardware usually provides.  Then we have:
1551    
1552         r = x - q * y        where neither the * nor the - will overflow
1553         d = if q >= 0 orelse x = q * y then q else q - 1
1554                              where neither the * nor the - will overflow
1555         m = if q >= 0 orelse r = 0 then r else r + y
1556                              where the + will not overflow
1557    
1558    This results in substantial simplification of the generated code.
1559    The following table shows the number of CFG nodes and edges generated
1560    for
1561            fun f (x, y) = x OPER y
1562            (* with OPER \in div, mod, quot, rem *)
1563    
1564    
1565        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
1566        --------------------------------------------------------
1567         div |         24 |         39 |         12 |         16
1568         mod |         41 |         71 |         12 |         16
1569        quot |          8 |         10 |          8 |         10
1570         rem |         10 |         14 |          8 |         10
1571    
1572    
1573    ----------------------------------------------------------------------
1574    Name: Matthias Blume
1575    Date: 2002/03/25 22:06:00 EST
1576    Tag: blume-20020325-cprotobug
1577    Description:
1578    
1579    Fixed a bug in cproto (c prototype decoder).
1580    
1581    ----------------------------------------------------------------------
1582    Name: Matthias Blume
1583    Date: 2002/03/25 16:00:00 EST
1584    Tag: blume-20020325-raw-primops
1585    Description:
1586    
1587    I did some cleanup to Allen's new primop code and
1588    replaced yesterday's bootfiles with new ones.
1589    (But they are stored in the same place.)
1590    
1591    ----------------------------------------------------------------------
1592    Name: Matthias Blume
1593    Date: 2002/03/24 22:40:00 EST
1594    Tag: blume-20020324-bootfiles
1595    Description:
1596    
1597    Made the bootfiles that Allen asked for.
1598    
1599    ----------------------------------------------------------------------
1600    Name: Allen Leung
1601    Date: 2002/03/23 15:50:00 EST
1602    Tag: leunga-20020323-flint-cps-rcc-primops
1603    Description:
1604    
1605      1. Changes to FLINT primops:
1606    
1607        (* make a call to a C-function;
1608         * The primop carries C function prototype information and specifies
1609         * which of its (ML-) arguments are floating point. C prototype
1610         * information is for use by the backend, ML information is for
1611         * use by the CPS converter. *)
1612      | RAW_CCALL of { c_proto: CTypes.c_proto,
1613                       ml_args: ccall_type list,
1614                       ml_res_opt: ccall_type option,
1615                       reentrant : bool
1616                     } option
1617       (* Allocate uninitialized storage on the heap.
1618        * The record is meant to hold short-lived C objects, i.e., they
1619        * are not ML pointers.  With the tag, the representation is
1620        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
1621        *)
1622      | RAW_RECORD of {tag:bool,sz:int}
1623      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
1624    
1625      2.  These CPS primops are now overloaded:
1626    
1627           rawload of {kind:numkind}
1628           rawstore of {kind:numkind}
1629    
1630          The one argument form is:
1631    
1632             rawload {kind} address
1633    
1634          The two argument form is:
1635    
1636             rawload {kind} [ml object, byte-offset]
1637    
1638      3. RAW_CCALL/RCC now takes two extra arguments:
1639    
1640         a. The first is whether the C call is reentrant, i.e., whether
1641            ML state should be saved and restored.
1642         b. The second argument is a string argument specifying the name of
1643            library and the C function.
1644    
1645         These things are currently not handled in the code generator, yet.
1646    
1647      4. In CProto,
1648    
1649         An encoding type of "bool" means "ml object" and is mapped into
1650         C prototype of PTR.  Note that "bool" is different than "string",
1651         even though "string" is also mapped into PTR, because "bool"
1652         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
1653    
1654      5. Pickler/unpicker
1655    
1656         Changed to handle RAW_RECORD and newest RAW_CCALL
1657    
1658      6. MLRiscGen,
1659    
1660         1. Changed to handle the new rawload/rawstore/rawrecord operators.
1661         2. Code for handling C Calls has been moved to a new module CPSCCalls,
1662            in the file CodeGen/cpscompile/cps-c-calls.sml
1663    
1664      7. Added the conditional move operator
1665    
1666             condmove of branch
1667    
1668         to cps.  Generation of this is still buggy so it is currently
1669         disabled.
1670    
1671    ----------------------------------------------------------------------
1672    Name: Lal George
1673    Date: 2002/03/22 14:18:25 EST
1674    Tag: george-20020322-cps-branch-prob
1675    Description:
1676    
1677    Implemented the Ball-Larus branch prediction-heuristics, and
1678    incorporated graphical viewers for control flow graphs.
1679    
1680    Ball-Larus Heuristics:
1681    ---------------------
1682    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
1683    
1684    By design it uses the Dempster-Shafer theory for combining
1685    probabilities.  For example, in the function:
1686    
1687        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
1688    
1689    the ball-larus heuristics predicts that the n=0 is unlikely
1690    (OH-heuristic), and the 'then' branch is unlikely because of the
1691    RH-heuristic -- giving the 'then' branch an even lower combined
1692    probability using the Dempster-Shafer theory.
1693    
1694    Finally, John Reppy's loop analysis in MLRISC, further lowers the
1695    probability of the 'then' branch because of the loop in the else
1696    branch.
1697    
1698    
1699    Graphical Viewing:
1700    ------------------
1701    I merely plugged in Allen's graphical viewers into the compiler. The
1702    additional code is not much. At the top level, saying:
1703    
1704            Control.MLRISC.getFlag "cfg-graphical-view" := true;
1705    
1706    will display the graphical view of the control flow graph just before
1707    back-patching.  daVinci must be in your path for this to work. If
1708    daVinci is not available, then the default viewer can be changed
1709    using:
1710    
1711            Control.MLRISC.getString "viewer"
1712    
1713    which can be set to "dot" or "vcg" for the corresponding viewers. Of
1714    course, these viewers must be in your path.
1715    
1716    The above will display the compilation unit at the level of clusters,
1717    many of which are small, boring, and un-interesting. Also setting:
1718    
1719            Control.MLRISC.getInt "cfg-graphical-view_size"
1720    
1721    will display clusters that are larger than the value set by the above.
1722    
1723    
1724    ----------------------------------------------------------------------
1725    Name: Matthias Blume
1726    Date: 2002/03/21 22:20:00 EST
1727    Tag: blume-20020321-kmp-bugfix
1728    Description:
1729    
1730    Changed the interface to the KMP routine in PreString and fixed
1731    a minor bug in one place where it was used.
1732    
1733    ----------------------------------------------------------------------
1734    Name: Allen Leung
1735    Date: 2002/03/21 20:30:00 EST
1736    Tag: leunga-20020321-cfg
1737    Description:
1738    
1739      Fixed a potential problem in cfg edge splitting.
1740    
1741    ----------------------------------------------------------------------
1742    Name: Allen Leung
1743    Date: 2002/03/21 17:15:00 EST
1744    Tag: leunga-20020321-x86-fp-cfg
1745    Description:
1746    
1747      1. Recoded the buggy parts of x86-fp.
1748    
1749         a. All the block reordering code has been removed.
1750            We now depend on the block placement phases to do this work.
1751    
1752         b. Critical edge splitting code has been simplified and moved into the
1753            CFG modules, as where they belong.
1754    
1755         Both of these were quite buggy and complex.  The code is now much, much
1756         simpler.
1757    
1758      2. X86 backend.
1759    
1760         a. Added instructions for 64-bit support.  Instruction selection for
1761            64-bit has not been committed, however, since that
1762            requires changes to MLTREE which haven't been approved by
1763            Lal and John.
1764    
1765         b. Added support for FUCOMI and FUCOMIP when generating code for
1766            PentiumPro and above.  We only generate these instructions in
1767            the fast-fp mode.
1768    
1769         c. Added cases for JP and JNP in X86FreqProps.
1770    
1771      3. CFG
1772    
1773         CFG now has a bunch of methods for edge splitting and merging.
1774    
1775      4. Machine description.
1776    
1777         John's simplification of MLTREE_BASIS.fcond broke a few machine
1778         description things:
1779    
1780         rtl-build.{sig,sml} and hppa.mdl fixed.
1781    
1782         NOTE: the machine description stuff in the repository is still broken.
1783               Again, I can't put my fixes in because that involves
1784               changes to MLTREE.
1785    
1786    ----------------------------------------------------------------------
1787    Name: Matthias Blume
1788    Date: 2002/03/20 15:55:00 EST
1789    Tag: blume-20020320-kmp
1790    Description:
1791    
1792    Implemented Knuth-Morris-Pratt string matching in PreString and used
1793    it for String.isSubstring, Substring.isSubstring, and
1794    Substring.position.
1795    
1796    (Might need some stress-testing.  Simple examples worked fine.)
1797    
1798    ----------------------------------------------------------------------
1799    Name: Matthias Blume
1800    Date: 2002/03/19 16:37:00 EST
1801    Tag: blume-20020319-witnesses
1802    Description:
1803    
1804    Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib.
1805    
1806    This implements a generic mechanism for changing constness qualifiers
1807    anywhere within big C types without resorting to outright "casts".
1808    (So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you
1809    modify the constness at the outermost level.)
1810    The implementation of "convert" is based on the idea of "witness"
1811    values -- values that are not used by the operation but whose types
1812    "testify" to their applicability.  On the implementation side, "convert"
1813    is simply a projection (returning its second curried argument).  With
1814    cross-module inlining, it should not result in any machine code being
1815    generated.
1816    
1817    ----------------------------------------------------------------------
1818    Name: Matthias Blume
1819    Date: 2002/03/15 16:40:00 EST
1820    Tag: blume-20020315-basis
1821    Description:
1822    
1823    Provided (preliminary?) implementations for
1824    
1825      {String,Substring}.{concatWith,isSuffix,isSubstring}
1826    
1827    and
1828    
1829      Substring.full
1830    
1831    Those are in the Basis spec but they were missing in SML/NJ.
1832    
1833    ----------------------------------------------------------------------
1834    Name: Matthias Blume
1835    Date: 2002/03/14 21:30:00 EST
1836    Tag: blume-20020314-controls
1837    Description:
1838    
1839    Controls:
1840    ---------
1841    
1842    1. Factored out the recently-added Controls : CONTROLS stuff and put
1843       it into its own library $/controls-lib.cm.  The source tree for
1844       this is under src/smlnj-lib/Controls.
1845    
1846    2. Changed the names of types and functions in this interface, so they
1847       make a bit more "sense":
1848    
1849          module -> registry
1850          'a registry -> 'a group
1851    
1852    3. The interface now deals in ref cells only.  The getter/setter interface
1853       is (mostly) gone.
1854    
1855    4. Added a function that lets one register an already-existing ref cell.
1856    
1857    5. Made the corresponding modifications to the rest of the code so that
1858       everything compiles again.
1859    
1860    6. Changed the implementation of Controls.MLRISC back to something closer
1861       to the original.  In particular, this module (and therefore MLRISC)
1862       does not depend on Controls.  There now is some link-time code in
1863       int-sys.sml that registers the MLRISC controls with the Controls
1864       module.
1865    
1866    CM:
1867    ---
1868    
1869      * One can now specify the lambda-split aggressiveness in init.cmi.
1870    
1871    ----------------------------------------------------------------------
1872    Name: Allen Leung
1873    Date: 2002/03/13 17:30:00 EST
1874    Tag: leunga-20020313-x86-fp-unary
1875    Description:
1876    
1877    Bug fix for:
1878    
1879    > leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml
1880    > Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002
1881    > - fun f(x,(y,z)) = Real.~ y;
1882    > [autoloading]
1883    > [autoloading done]
1884    >       fchsl   (%eax), 184(%esp)
1885    > Error: MLRisc bug: X86MCEmitter.emitInstr
1886    >
1887    > uncaught exception Error
1888    >   raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19
1889    
1890    The problem was that the code generator did not generate any fp registers
1891    in this case, and the ra didn't know that it needed to run the X86FP phase to
1892    translate the pseudo fp instruction.   This only happened with unary fp
1893    operators in certain situations.
1894    
1895    ----------------------------------------------------------------------
1896    Name: Matthias Blume
1897    Date: 2002/03/13 14:00:00 EST
1898    Tag: blume-20020313-overload-etc
1899    Description:
1900    
1901    1. Added _overload as a synonym for overload for backward compatibility.
1902       (Control.overloadKW must be true for either version to be accepted.)
1903    
1904    2. Fixed bug in install script that caused more things to be installed
1905       than what was requested in config/targets.
1906    
1907    3. Made CM aware of the (_)overload construct so that autoloading
1908       works.
1909    
1910    ----------------------------------------------------------------------
1911    Name: Matthias Blume
1912    Date: 2002/03/12 22:03:00 EST
1913    Tag: blume-20020312-url
1914    Description:
1915    
1916    Forgot to update BOOT and srcarchiveurl.
1917    
1918    ----------------------------------------------------------------------
1919    Name: Matthias Blume
1920    Date: 2002/03/12 17:30:00 EST
1921    Tag: blume-20020312-version110392
1922    Description:
1923    
1924    Yet another version number bump (because of small changes to the
1925    binfile format).  Version number is now 110.39.2.  NEW BOOTFILES!
1926    
1927    Changes:
1928    
1929      The new pid generation scheme described a few weeks ago was overly
1930      complicated.  I implemented a new mechanism that is simpler and
1931      provides a bit more "stability":  Once CM has seen a compilation
1932      unit, it keeps its identity constant (as long as you do not delete
1933      those crucial CM/GUID/* files).  This means that when you change
1934      an interface, compile, then go back to the old interface, and
1935      compile again, you arrive at the original pid.
1936    
1937      There now also is a mechanism that instructs CM to use the plain
1938      environment hash as a module's pid (effectively making its GUID
1939      the empty string).  For this, "noguid" must be specified as an
1940      option to the .sml file in question within its .cm file.
1941      This is most useful for code that is being generated by tools such
1942      as ml-nlffigen (because during development programmers tend to
1943      erase the tool's entire output directory tree including CM's cached
1944      GUIDs).  "noguid" is somewhat dangerous (since it can be used to locally
1945      revert to the old, broken behavior of SML/NJ, but in specific cases
1946      where there is no danger of interface confusion, its use is ok
1947      (I think).
1948    
1949      ml-nlffigen by default generates "noguid" annotations.  They can be
1950      turned off by specifying -guid in its command line.
1951    
1952    ----------------------------------------------------------------------
1953    Name: Lal George
1954    Date: 2002/03/12 12 14:42:36 EST
1955    Tag: george-20020312-frequency-computation
1956    Description:
1957    
1958    Integrated jump chaining and static block frequency into the
1959    compiler. More details and numbers later.
1960    
1961    ----------------------------------------------------------------------
1962    Name: Lal George
1963    Date: 2002/03/11 11 22:38:53 EST
1964    Tag: george-20020311-jump-chain-elim
1965    Description:
1966    
1967    Tested the jump chain elimination on all architectures (except the
1968    hppa).  This is on by default right now and is profitable for the
1969    alpha and x86, however, it may not be profitable for the sparc and ppc
1970    when compiling the compiler.
1971    
1972    The gc test will typically jump to a label at the end of the cluster,
1973    where there is another jump to an external cluster containing the actual
1974    code to invoke gc. This is to allow factoring of common gc invocation
1975    sequences. That is to say, we generate:
1976    
1977            f:
1978               testgc
1979               ja   L1      % jump if above to L1
1980    
1981            L1:
1982               jmp L2
1983    
1984    
1985    After jump chain elimination the 'ja L1' instructions is converted to
1986    'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end
1987    up being implemented in their long form (if L2 is far away) using:
1988    
1989            jbe     L3      % jump if below or equal to L3
1990            jmp     L2
1991         L3:
1992            ...
1993    
1994    
1995    For large compilation units L2  may be far away.
1996    
1997    
1998    ----------------------------------------------------------------------
1999    Name: Matthias Blume
2000    Date: 2002/03/11 13:30:00 EST
2001    Tag: blume-20020311-mltreeeval
2002    Description:
2003    
2004    A functor parameter was missing.
2005    
2006    ----------------------------------------------------------------------
2007    Name: Allen Leung
2008    Date: 2002/03/11 10:30:00 EST
2009    Tag: leunga-20020311-runtime-string0
2010    Description:
2011    
2012       The representation of the empty string now points to a
2013    legal null terminated C string instead of unit.  It is now possible
2014    to convert an ML string into C string with InlineT.CharVector.getData.
2015    This compiles into one single machine instruction.
2016    
2017    ----------------------------------------------------------------------
2018    Name: Allen Leung
2019    Date: 2002/03/10 23:55:00 EST
2020    Tag: leunga-20020310-x86-call
2021    Description:
2022    
2023       Added machine generation for CALL instruction (relative displacement mode)
2024    
2025    ----------------------------------------------------------------------
2026    Name: Matthias Blume
2027    Date: 2002/03/08 16:05:00
2028    Tag: blume-20020308-entrypoints
2029    Description:
2030    
2031    Version number bumped to 110.39.1.  NEW BOOTFILES!
2032    
2033    Entrypoints: non-zero offset into a code object where execution should begin.
2034    
2035    - Added the notion of an entrypoint to CodeObj.
2036    - Added reading/writing of entrypoint info to Binfile.
2037    - Made runtime system bootloader aware of entrypoints.
2038    - Use the address of the label of the first function given to mlriscGen
2039      as the entrypoint.  This address is currently always 0, but it will
2040      not be 0 once we turn on block placement.
2041    - Removed the linkage cluster code (which was The Other Way(tm) of dealing
2042      with entry points) from mlriscGen.
2043    
2044    ----------------------------------------------------------------------
2045    Name: Allen Leung
2046    Date: 2002/03/07 20:45:00 EST
2047    Tag: leunga-20020307-x86-cmov
2048    Description:
2049    
2050       Bug fixes for CMOVcc on x86.
2051    
2052       1. Added machine code generation for CMOVcc
2053       2. CMOVcc is now generated in preference over SETcc on PentiumPro or above.
2054       3. CMOVcc cannot have an immediate operand as argument.
2055    
2056    ----------------------------------------------------------------------
2057    Name: Matthias Blume
2058    Date: 2002/03/07 16:15:00 EST
2059    Tag: blume-20020307-controls
2060    Description:
2061    
2062    This is a very large but mostly boring patch which makes (almost)
2063    every tuneable compiler knob (i.e., pretty much everything under
2064    Control.* plus a few other things) configurable via both the command
2065    line and environment variables in the style CM did its configuration
2066    until now.
2067    
2068    Try starting sml with '-h' (or, if you are brave, '-H')
2069    
2070    To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which
2071    implements the underlying generic mechanism.
2072    
2073    The interface to some of the existing such facilities has changed somewhat.
2074    For example, the MLRiscControl module now provides mkFoo instead of getFoo.
2075    (The getFoo interface is still there for backward-compatibility, but its
2076    use is deprecated.)
2077    
2078    The ml-build script passes -Cxxx=yyy command-line arguments through so
2079    that one can now twiddle the compiler settings when using this "batch"
2080    compiler.
2081    
2082    TODO items:
2083    
2084    We should go through and throw out all controls that are no longer
2085    connected to anything.  Moreover, we should go through and provide
2086    meaningful (and correct!) documentation strings for those controls
2087    that still are connected.
2088    
2089    Currently, multiple calls to Controls.new are accepted (only the first
2090    has any effect).  Eventually we should make sure that every control
2091    is being made (via Controls.new) exactly once.  Future access can then
2092    be done using Controls.acc.
2093    
2094    Finally, it would probably be a good idea to use the getter-setter
2095    interface to controls rather than ref cells.  For the time being, both
2096    styles are provided by the Controls module, but getter-setter pairs are
2097    better if thread-safety is of any concern because they can be wrapped.
2098    
2099    *****************************************
2100    
2101    One bug fix: The function blockPlacement in three of the MLRISC
2102    backpatch files used to be hard-wired to one of two possibilities at
2103    link time (according to the value of the placementFlag).  But (I
2104    think) it should rather sense the flag every time.
2105    
2106    *****************************************
2107    
2108    Other assorted changes (by other people who did not supply a HISTORY entry):
2109    
2110    1. the cross-module inliner now works much better (Monnier)
2111    2. representation of weights, frequencies, and probabilities in MLRISC
2112       changed in preparation of using those for weighted block placement
2113       (Reppy, George)
2114    
2115    ----------------------------------------------------------------------
2116    Name: Lal George
2117    Date: 2002/03/07 14:44:24 EST 2002
2118    Tag: george-20020307-weighted-block-placement
2119    
2120    Tested the weighted block placement optimization on all architectures
2121    (except the hppa) using AMPL to generate the block and edge frequencies.
2122    Changes were required in the machine properties to correctly
2123    categorize trap instructions. There is an MLRISC flag
2124    "weighted-block-placement" that can be used to enable weighted block
2125    placement, but this will be ineffective without block/edge
2126    frequencies (coming soon).
2127    
2128    
2129    ----------------------------------------------------------------------
2130    Name: Lal George
2131    Date: 2002/03/05 17:24:48 EST
2132    Tag: george-20020305-linkage-cluster
2133    
2134    In order to support the block placement optimization, a new cluster
2135    is generated as the very first cluster (called the linkage cluster).
2136    It contains a single jump to the 'real' entry point for the compilation
2137    unit. Block placement has no effect on the linkage cluster itself, but
2138    all the other clusters  have full freedom in the manner in which they
2139    reorder blocks or functions.
2140    
2141    On the x86 the typical linkage code that is generated is:
2142       ----------------------
2143            .align 2
2144       L0:
2145            addl    $L1-L0, 72(%esp)
2146            jmp     L1
2147    
2148    
2149            .align  2
2150       L1:
2151       ----------------------
2152    
2153    72(%esp) is the memory location for the stdlink register. This
2154    must contain the address of the CPS function being called. In the
2155    above example, it contains the address of  L0; before
2156    calling L1 (the real entry point for the compilation unit), it
2157    must contain the address for L1, and hence
2158    
2159            addl $L1-L0, 72(%esp)
2160    
2161    I have tested this on all architectures except the hppa.The increase
2162    in code size is of course negligible
2163    
2164    ----------------------------------------------------------------------
2165    Name: Allen Leung
2166    Date: 2002/03/03 13:20:00 EST
2167    Tag: leunga-20020303-mlrisc-tools
2168    
2169      Added #[ ... ] expressions to mlrisc tools
2170    
2171    ----------------------------------------------------------------------
2172    Name: Matthias Blume
2173    Date: 2002/02/27 12:29:00 EST
2174    Tag: blume-20020227-cdebug
2175    Description:
2176    
2177    - made types in structure C and C_Debug to be equal
2178    - got rid of code duplication (c-int.sml vs. c-int-debug.sml)
2179    - there no longer is a C_Int_Debug (C_Debug is directly derived from C)
2180    
2181    ----------------------------------------------------------------------
2182    Name: Matthias Blume
2183    Date: 2002/02/26 12:00:00 EST
2184    Tag: blume-20020226-ffi
2185    Description:
2186    
2187    1. Fixed a minor bug in CM's "noweb" tool:
2188       If numbering is turned off, then truly don't number (i.e., do not
2189       supply the -L option to noweb).  The previous behavior was to supply
2190       -L'' -- which caused noweb to use the "default" line numbering scheme.
2191       Thanks to Chris Richards for pointing this out (and supplying the fix).
2192    
2193    2. Once again, I reworked some aspects of the FFI:
2194    
2195       A. The incomplete/complete type business:
2196    
2197       - Signatures POINTER_TO_INCOMPLETE_TYPE and accompanying functors are
2198         gone!
2199       - ML types representing an incomplete type are now *equal* to
2200         ML types representing their corresponding complete types (just like
2201         in C).  This is still safe because ml-nlffigen will not generate
2202         RTTI for incomplete types, nor will it generate functions that
2203         require access to such RTTI.   But when ML code generated from both
2204         incomplete and complete versions of the C type meet, the ML types
2205         are trivially interoperable.
2206    
2207         NOTE:  These changes restore the full generality of the translation
2208         (which was previously lost when I eliminated functorization)!
2209    
2210       B. Enum types:
2211    
2212       - Structure C now has a type constructor "enum" that is similar to
2213         how the "su" constructor works.  However, "enum" is not a phantom
2214         type because each "T enum" has values (and is isomorphic to
2215         MLRep.Signed.int).
2216       - There are generic access operations for enum objects (using
2217         MLRep.Signed.int).
2218       - ml-nlffigen will generate a structure E_foo for each "enum foo".
2219         * The structure contains the definition of type "mlrep" (the ML-side
2220         representation type of the enum).  Normally, mlrep is the same
2221         as "MLRep.Signed.int", but if ml-nlffigen was invoked with "-ec",
2222         then mlrep will be defined as a datatype -- thus facilitating
2223         pattern matching on mlrep values.
2224         ("-ec" will be suppressed if there are duplicate values in an
2225          enumeration.)
2226         * Constructors ("-ec") or values (no "-ec") e_xxx of type mlrep
2227         will be generated for each C enum constant xxx.
2228         * Conversion functions m2i and i2m convert between mlrep and
2229         MLRep.Signed.int.  (Without "-ec", these functions are identities.)
2230         * Coversion functions c and ml convert between mlrep and "tag enum".
2231         * Access functions (get/set) fetch and store mlrep values.
2232       - By default (unless ml-nlffigen was invoked with "-nocollect"), unnamed
2233         enumerations are merged into one single enumeration represented by
2234         structure E_'.
2235    
2236    ----------------------------------------------------------------------
2237    Name: Allen Leung
2238    Date: 2002/02/25 04:45:00 EST
2239    Tag: leunga-20020225-cps-spill
2240    
2241    This is a new implementation of the CPS spill phase.
2242    The new phase is in the new file compiler/CodeGen/cpscompile/spill-new.sml
2243    In case of problems, replace it with the old file spill.sml
2244    
2245    The current compiler runs into some serious performance problems when
2246    constructing a large record.  This can happen when we try to compile a
2247    structure with many items.  Even a very simple structure like the following
2248    makes the compiler slow down.
2249    
2250        structure Foo = struct
2251           val x_1 = 0w1 : Word32.int
2252           val x_2 = 0w2 : Word32.int
2253           val x_3 = 0w3 : Word32.int
2254           ...
2255           val x_N = 0wN : Word32.int
2256        end
2257    
2258    The following table shows the compile time, from N=1000 to N=4000,
2259    with the old compiler:
2260    
2261    N
2262    1000   CPS 100 spill                           0.04u  0.00s  0.00g
2263           MLRISC ra                               0.06u  0.00s  0.05g
2264              (spills = 0 reloads = 0)
2265           TOTAL                                   0.63u  0.07s  0.21g
2266    
2267    1100   CPS 100 spill                           8.25u  0.32s  0.64g
2268           MLRISC ra                               5.68u  0.59s  3.93g
2269              (spills = 0 reloads = 0)
2270           TOTAL                                   14.71u  0.99s  4.81g
2271    
2272    1500   CPS 100 spill                           58.55u  2.34s  1.74g
2273           MLRISC ra                               5.54u  0.65s  3.91g
2274              (spills = 543 reloads = 1082)
2275           TOTAL                                   65.40u  3.13s  6.00g
2276    
2277    2000   CPS 100 spill                           126.69u  4.84s  3.08g
2278           MLRISC ra                               0.80u  0.10s  0.55g
2279              (spills = 42 reloads = 84)
2280           TOTAL                                   129.42u  5.10s  4.13g
2281    
2282    3000   CPS 100 spill                           675.59u  19.03s  11.64g
2283           MLRISC ra                               2.69u  0.27s  1.38g
2284              (spills = 62 reloads = 124)
2285           TOTAL                                   682.48u  19.61s  13.99g
2286    
2287    4000   CPS 100 spill                           2362.82u  56.28s  43.60g
2288           MLRISC ra                               4.96u  0.27s  2.72g
2289              (spills = 85 reloads = 170)
2290           TOTAL                                   2375.26u  57.21s  48.00g
2291    
2292    As you can see the old cps spill module suffers from some serious
2293    performance problem.  But since I cannot decipher the old code fully,
2294    instead of patching the problems up, I'm reimplementing it
2295    with a different algorithm.  The new code is more modular,
2296    smaller when compiled, and substantially faster
2297    (O(n log n) time and O(n) space).  Timing of the new spill module:
2298    
2299    4000  CPS 100 spill                           0.02u  0.00s  0.00g
2300          MLRISC ra                               0.25u  0.02s  0.15g
2301             (spills=1 reloads=3)
2302          TOTAL                                   7.74u  0.34s  1.62g
2303    
2304    Implementation details:
2305    
2306    As far as I can tell, the purpose of the CPS spill module is to make sure the
2307    number of live variables at any program point (the bandwidth)
2308    does not exceed a certain limit, which is determined by the
2309    size of the spill area.
2310    
2311    When the bandwidth is too large, we decrease the register pressure by
2312    packing live variables into spill records.  How we achieve this is
2313    completely different than what we did in the old code.
2314    
2315    First, there is something about the MLRiscGen code generator
2316    that we should be aware of:
2317    
2318    o MLRiscGen performs code motion!
2319    
2320       In particular, it will move floating point computations and
2321       address computations involving only the heap pointer to
2322       their use sites (if there is only a single use).
2323       What this means is that if we have a CPS record construction
2324       statement
2325    
2326           RECORD(k,vl,w,e)
2327    
2328       we should never count the new record address w as live if w
2329       has only one use (which is often the case).
2330    
2331       We should do something similar to floating point, but the transformation
2332       there is much more complex, so I won't deal with that.
2333    
2334    Secondly, there are now two new cps primops at our disposal:
2335    
2336     1. rawrecord of record_kind option
2337        This pure operator allocates some uninitialized storage from the heap.
2338        There are two forms:
2339    
2340         rawrecord NONE [INT n]  allocates a tagless record of length n
2341         rawrecord (SOME rk) [INT n] allocates a tagged record of length n
2342                                     and initializes the tag.
2343    
2344     2. rawupdate of cty
2345          rawupdate cty (v,i,x)
2346          Assigns to x to the ith component of record v.
2347          The storelist is not updated.
2348    
2349    We use these new primops for both spilling and increment record construction.
2350    
2351     1. Spilling.
2352    
2353        This is implemented with a linear scan algorithm (but generalized
2354        to trees).  The algorithm will create a single spill record at the
2355        beginning of the cps function and use rawupdate to spill to it,
2356        and SELECT or SELp to reload from it.  So both spills and reloads
2357        are fine-grain operations.  In contrast, in the old algorithm
2358        "spills" have to be bundled together in records.
2359    
2360        Ideally, we should sink the spill record construction to where
2361        it is needed.  We can even split the spill record into multiple ones
2362        at the places where they are needed.  But CPS is not a good
2363        representation for global code motion, so I'll keep it simple and
2364        am not attempting this.
2365    
2366     2. Incremental record construction (aka record splitting).
2367    
2368        Long records with many component values which are simulatenously live
2369        (recall that single use record addresses are not considered to
2370         be live) are constructed with rawrecord and rawupdate.
2371        We allocate space on the heap with rawrecord first, then gradually
2372        fill it in with rawupdate.  This is the technique suggested to me
2373        by Matthias.
2374    
2375        Some restrictions on when this is applicable:
2376        1. It is not a VECTOR record.  The code generator currently does not handle
2377           this case. VECTOR record uses double indirection like arrays.
2378        2. All the record component values are defined in the same "basic block"
2379           as the record constructor.  This is to prevent speculative
2380           record construction.
2381    
2382    ----------------------------------------------------------------------
2383    Name: Allen Leung
2384    Date: 2002/02/22 01:02:00 EST
2385    Tag: leunga-20020222-mlrisc-tools
2386    
2387    Minor bug fixes in the parser and rewriter
2388    
2389    ----------------------------------------------------------------------
2390    Name: Allen Leung
2391    Date: 2002/02/21 20:20:00 EST
2392    Tag: leunga-20020221-peephole
2393    
2394    Regenerated the peephole files.  Some contained typos in the specification
2395    and some didn't compile because of pretty printing bugs in the old version
2396    of 'nowhere'.
2397    
2398    ----------------------------------------------------------------------
2399    Name: Allen Leung
2400    Date: 2002/02/19 20:20:00 EST
2401    Tag: leunga-20020219-mlrisc-tools
2402    Description:
2403    
2404       Minor bug fixes to the mlrisc-tools library:
2405    
2406       1.  Fixed up parsing colon suffixed keywords
2407       2.  Added the ability to shut the error messages up
2408       3.  Reimplemented the pretty printer and fixed up/improved
2409           the pretty printing of handle and -> types.
2410       4.  Fixed up generation of literal symbols in the nowhere tool.
2411       5.  Added some SML keywords to to sml.sty
2412    
2413    ----------------------------------------------------------------------
2414    Name: Matthias Blume
2415    Date: 2002/02/19 16:20:00 EST
2416    Tag: blume-20020219-cmffi
2417    Description:
2418    
2419    A wild mix of changes, some minor, some major:
2420    
2421    * All C FFI-related libraries are now anchored under $c:
2422        $/c.cm      --> $c/c.cm
2423        $/c-int.cm  --> $c/internals/c-int.cm
2424        $/memory.cm --> $c/memory/memory.cm
2425    
2426    * "make" tool (in CM) now treats its argument pathname slightly
2427      differently:
2428        1. If the native expansion is an absolute name, then before invoking
2429           the "make" command on it, CM will apply OS.Path.mkRelative
2430           (with relativeTo = OS.FileSys.getDir()) to it.
2431        2. The argument will be passed through to subsequent phases of CM
2432           processing without "going native".  In particular, if the argument
2433           was an anchored path, then "make" will not lose track of that anchor.
2434    
2435    * Compiler backends now "know" their respective C calling conventions
2436      instead of having to be told about it by ml-nlffigen.  This relieves
2437      ml-nlffigen from one of its burdens.
2438    
2439    * The X86Backend has been split into X86CCallBackend and X86StdCallBackend.
2440    
2441    * Export C_DEBUG and C_Debug from $c/c.cm.
2442    
2443    * C type encoding in ml-nlffi-lib has been improved to model the conceptual
2444      subtyping relationship between incomplete pointers and their complete
2445      counterparts.  For this, ('t, 'c) ptr has been changed to 'o ptr --
2446      with the convention of instantiating 'o with ('t, 'c) obj whenever
2447      the pointer target type is complete.  In the incomplete case, 'o
2448      will be instantiated with some "'c iobj" -- a type obtained by
2449      using one of the functors PointerToIncompleteType or PointerToCompleteType.
2450    
2451      Operations that work on both incomplete and complete pointer types are
2452      typed as taking an 'o ptr while operations that require the target to
2453      be known are typed as taking some ('t, 'c) obj ptr.
2454    
2455      voidptr is now a bit "more concrete", namely "type voidptr = void ptr'"
2456      where void is an eqtype without any values.  This makes it possible
2457      to work on voidptr values using functions meant to operate on light
2458      incomplete pointers.
2459    
2460    * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has
2461      been vastly simplified.
2462    
2463    ----------------------------------------------------------------------
2464    Name: Matthias Blume
2465    Date: 2002/02/19 10:48:00 EST
2466    Tag: blume-20020219-pqfix
2467    Description:
2468    
2469    Applied Chris Okasaki's bug fix for priority queues.
2470    
2471    ----------------------------------------------------------------------
2472    Name: Matthias Blume
2473    Date: 2002/02/15 17:05:00
2474    Tag: Release_110_39
2475    Description:
2476    
2477    Last-minute retagging is becoming a tradition... :-(
2478    
2479    This is the working release 110.39.
2480    
2481    ----------------------------------------------------------------------
2482    Name: Matthias Blume
2483    Date: 2002/02/15 16:00:00 EST
2484    Tag: Release_110_39-orig
2485    Description:
2486    
2487    Working release 110.39.  New bootfiles.
2488    
2489    (Update: There was a small bug in the installer so it wouldn't work
2490    with all shells.  So I retagged. -Matthias)
2491    
2492    ----------------------------------------------------------------------
2493    Name: Matthias Blume
2494    Date: 2002/02/15 14:17:00 EST
2495    Tag: blume-20020215-showbindings
2496    Description:
2497    
2498    Added EnvRef.listBoundSymbols and CM.State.showBindings.  Especially
2499    the latter can be useful for exploring what bindings are available at
2500    the interactive prompt.  (The first function returns only the list
2501    of symbols that are really bound, the second prints those but also the
2502    ones that CM's autoloading mechanism knows about.)
2503    
2504    ----------------------------------------------------------------------
2505    Name: Matthias Blume
2506    Date: 2002/02/15 12:08:00 EST
2507    Tag: blume-20020215-iptrs
2508    Description:
2509    
2510    Two improvements to ml-nlffigen:
2511    
2512      1. Write files only if they do not exist or if their current contents
2513         do not coincide with what's being written.  (That is, avoid messing
2514         with the time stamps unless absolutely necessary.)
2515    
2516      2. Implement a "repository" mechanism for generated files related
2517         to "incomplete pointer types".   See the README file for details.
2518    
2519    ----------------------------------------------------------------------
2520    Name: Matthias Blume
2521    Date: 2002/02/14 11:50:00 EST
2522    Tag: blume-20020214-quote
2523    Description:
2524    
2525    Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm).  This is required
2526    because of the new and improved tag generation scheme.  (Thanks to Allen
2527    Leung for pointing it out.)
2528    
2529    ----------------------------------------------------------------------
2530    Name: Lal George
2531    Date: 2002/02/14 09:55:27 EST 2002
2532    Tag: george-20020214-isabelle-bug
2533    Description:
2534    
2535    Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation
2536    of Isabelle on the x86.
2537    
2538    From Allen:
2539    -----------
2540     I've found the problem:
2541    
2542         in ra-core.sml, I use the counter "blocked" to keep track of the
2543         true number of elements in the freeze queue.  When the counter goes
2544         to zero, I skip examining the queue.  But I've messed up the
2545         bookkeeping in combine():
2546    
2547             else ();
2548             case !ucol of
2549               PSEUDO => (if !cntv > 0 then
2550                     (if !cntu > 0 then blocked := !blocked - 1 else ();
2551                                        ^^^^^^^^^^^^^^^^^^^^^^^
2552                      moveu := mergeMoveList(!movev, !moveu)
2553                     )
2554                  else ();
2555    
2556         combine() is called to coalesce two nodes u and v.
2557         I think I was thinking that if the move counts of u and v are both
2558         greater than zero then after they are coalesced then one node is
2559         removed from the freeze queue.  Apparently I was thinking that
2560         both u and v are of low degree, but that's clearly not necessarily true.
2561    
2562    
2563    02/12/2002:
2564        Here's the patch.  HOL now compiles.
2565    
2566        I don't know how this impact on performance (compile
2567        time or runtime).  This bug caused the RA (especially on the x86)
2568        to go thru the potential spill phase when there are still nodes on the
2569        freeze queue.
2570    
2571    
2572    
2573    
2574    ----------------------------------------------------------------------
2575    Name: Matthias Blume
2576    Date: 2002/02/13 22:40:00 EST
2577    Tag: blume-20020213-fptr-rtti
2578    Description:
2579    
2580    Fixed a bug in ml-nlffigen that was introduced with one of the previous
2581    updates.
2582    
2583    ----------------------------------------------------------------------
2584    Name: Matthias Blume
2585    Date: 2002/02/13 16:41:00 EST
2586    Tag: blume-20020213-cmlpq
2587    Description:
2588    
2589    Added new priority queue export symbols (which have just been added to
2590    smlnj-lib.cm) to CML's version of smlnj-lib.cm.  (Otherwise CML would
2591    not compile and the installer would choke.)
2592    
2593    ----------------------------------------------------------------------
2594    Name: Matthias Blume
2595    Date: 2002/02/13 16:15:00 EST
2596    Tag: blume-20020213-various
2597    Description:
2598    
2599    1. More tweaks to ml-nlffigen:
2600    
2601       - better internal datastructures (resulting in slight speedup)
2602       - "-match" option requires exact match
2603       - "localized" gensym counters (untagged structs/unions nested within
2604         other structs/unions or within typedefs get a fresh counter; their
2605         tag will be prefixed by a concatenation of their parents' tags)
2606       - bug fixes (related to calculation of transitive closure of types
2607         to be included in the output)
2608    
2609    2. Minor Basis updates:
2610    
2611       - added implementations for List.collate and Option.app
2612    
2613    ----------------------------------------------------------------------
2614    Name: Matthias Blume
2615    Date: 2002/02/11 15:55:00 EST
2616    Tag: blume-20020211-gensym
2617    Description:
2618    
2619    Added a "-gensym" option to command line of ml-nlffigen.  This can be
2620    used to specify a "stem" -- a string that is inserted in all "gensym'd"
2621    names (ML structure names that correspond to unnamed C structs, unions,
2622    and enums), so that separate runs of ml-nlffigen do not clash.
2623    
2624    ----------------------------------------------------------------------
2625    Name: Matthias Blume
2626    Date: 2002/02/11 12:05:00 EST
2627    Tag: blume-20020211-gensml
2628    Description:
2629    
2630    A quick fix for a problem with GenSML (in the pgraph-util library):
2631    Make generation of toplevel "local" optional.  (Strictly speaking,
2632    signature definitions within "local" are not legal SML.)
2633    
2634    Other than that: updates to INSTALL and cm/TODO.
2635    
2636    ----------------------------------------------------------------------
2637    Name: Matthias Blume
2638    Date: 2002/02/08 15:00:00 EST
2639    Tag: blume-20020208-uniquepid
2640    Description:
2641    
2642    0. Version number has been bumped to 110.38.1.  NEW BOOTFILES!!!
2643    
2644    1. The installer (config/install.sh) has gotten smarter:
2645    
2646         - Configuration options are a bit easier to specify now
2647           (in config/targets).
2648         - Bug in recognizing .tar.bz2 files fixed.
2649         - Installer automatically resolves dependencies between
2650           configuration options (e.g., if you ask for eXene, you will
2651           also get cml -- regardless whether you asked for it or not).
2652         - Installer can run in "quieter mode" by setting the environment
2653           variable INSTALL_QUIETLY to "true".  "Quieter" does not mean
2654           "completely silent", though.
2655         - Build HashCons library as part of smlnj-lib.
2656    
2657    2. A new scheme for assigning persistent identifiers to compilation
2658       units (and, by extension, to types etc.) has been put into place.
2659       This fixes a long-standing bug where types and even dynamic values
2660       can get internally confused, thereby compromising type safety
2661       (abstraction) and dynamic correctness.  See
2662    
2663         http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz
2664    
2665       for an example of how things could go wrong until now.
2666    
2667       The downside of the new scheme is that pids are not quite as
2668       persistent as they used to be: CM will generate a fresh pid
2669       for every compilation unit that it thinks it sees for the first
2670       time.  That means that if you compile starting from a clean, fresh
2671       source tree at two different times, you end up with different
2672       binaries.
2673    
2674       Cutoff recompilation, however, has not been compromised because
2675       CM keeps pid information in special caches between runs.
2676    
2677    ----------------------------------------------------------------------
2678    Name: Lal George
2679    Date: 2002/02/07 15:34:13 EST 2002
2680    Tag: <none>
2681    Description:
2682    
2683    Compilers that generate assembly code may produce  global labels
2684    whose value is resolved at link time. The various peephole optimization
2685    modules did not take this in account.
2686    
2687    TODO. The Labels.addrOf function should really return an option
2688    type so that clients are forced to deal with this issue, rather
2689    than an exception being raised.
2690    
2691    ----------------------------------------------------------------------
2692    Name: Lal George
2693    Date: 2002/02/06 13:55:02 EST
2694    Tag: george-20020206-ra-breakup
2695    Description:
2696    
2697    1. A bug fix from Allen.
2698    
2699        A typo causes extra fstp %st(0)'s to be generated at compensation
2700        edges, which might cause stack underflow traps at runtime.  This
2701        occurs in fft where there are extraneous fstps right before the 'into'
2702        trap instruction (in this case they are harmless since none of the
2703        integers overflow.)
2704    
2705    2. Pulled out various utility modules that were embedded in the modules
2706       of the register allocator. I need these modules for other purposes, but
2707       they are not complete enough to put into a library (just yet).
2708    ----------------------------------------------------------------------
2709    Name: Matthias Blume
2710    Date: 2002/01/31 16:05:00 EST
2711    Tag: blume-20020131-sparc-ccalls
2712    Description:
2713    
2714    1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes)
2715       of extra stack space by mistake.  Fixed.
2716    
2717    2. Bug in logic of handling of command-line options in ml-nlffigen fixed.
2718    
2719    ----------------------------------------------------------------------
2720    Name: Allen Leung
2721    Date: 2002/01/30
2722    Tag: leunga-20020130-nowhere-bug-fix
2723    Description:
2724    
2725       MLRISC bug fixes:
2726       1. Fixed a bindings computation bug in the 'nowhere' program generator tool.
2727       2. MachineInt.fromString was negating its value.
2728    
2729    ----------------------------------------------------------------------
2730    Name: Matthias Blume
2731    Date: 2002/01/29
2732    Tag: blume-20020129-INSTALL
2733    Description:
2734    
2735    - Added somewhat detailed installation instructions (file INSTALL).
2736    - Fixed curl-detection bug in config/install.sh.
2737    - It is now possible to select the URL getter using the URLGETTER
2738      environment variable:
2739    
2740          not set / "unknown"      --> automatic detection (script tries wget,
2741                                       curl, and lynx)
2742          "wget" / "curl" / "lynx" --> use the specified program (script "knows"
2743                                       how to properly invoke them)
2744          other                    --> use $URLGETTER directly, it must take
2745                                       precisely two command-line arguments
2746                                       (source URL and destination file name)
2747    
2748    ----------------------------------------------------------------------
2749    Name: Matthias Blume
2750    Date: 2002/01/28
2751    Tag: blume-20020128-sparc-ccalls
2752    Description:
2753    
2754    - Fixed problem with calculation of "used" registers in sparc-c-calls.
2755    - Make use of the allocParam argument in sparc-c-calls.
2756    
2757    ----------------------------------------------------------------------
2758    Name: Matthias Blume
2759    Date: 2002/01/28
2760    Tag: blume-20020128-allocParam
2761    Description:
2762    
2763    John Reppy:  Changes c-calls API to accept client-callback for
2764    allocating extra stack space.
2765    me: Corresponding changes to mlriscGen (using a dummy argument that
2766        does not change the current behavior).
2767    
2768    ----------------------------------------------------------------------
2769    Name: Matthias Blume
2770    Date: 2002/01/28 12:00:00
2771    Tag: Release_110_38
2772    Description:
2773    
2774    This time for real!!!
2775    
2776    ----------------------------------------------------------------------
2777    Name: Matthias Blume
2778    Date: 2002/01/28 10:56:00 EST
2779    Tag: blume-20020128-retraction
2780    Description:
2781    
2782    0. Retracted earlier 110.38.  (The Release_110_38 tag has been replaced
2783       with blume-Release_110_38-retracted.)
2784    
2785    1. Fixed a problem with incorrect rounding modes in real64.sml.
2786       (Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.)
2787    
2788    2. A bug in ml-nlffigen related to the handling of unnamed structs, unions,
2789       and enums fixed.  The naming of corresponding ML identifiers should
2790       now be consistent again.
2791    
2792    ----------------------------------------------------------------------
2793    Name: Allen Leung
2794    Date: 2002/01/27
2795    Tag: leunga-20020127-nowhere
2796    Description:
2797    
2798       Added a target called nowhere in the configuration scripts.
2799       Enabling this will build the MLRISC 'nowhere' tool (for translating
2800       programs with where-clauses into legal SML code) during installation.
2801    
2802    ----------------------------------------------------------------------
2803    Name: Matthias Blume
2804    Date: 2002/01/25 21:27:00 EST
2805    Tag: blume-Release_110_38-retracted
2806    Description:
2807    
2808    Call it a (working) release!  Version is 110.38. Bootfiles are ready.
2809    
2810    README will be added later.
2811    
2812    !!! NOTE:  Re-tagged as blume-Release_110_38-retracted. Original tag
2813    (Release_110_38) removed.  Reason: Last-minute bug fixes.
2814    
2815    ----------------------------------------------------------------------
2816    Name: Matthias Blume
2817    Date: 2002/01/25
2818    Tag: blume-20020125-ffi
2819    Description:
2820    
2821    A large number of tweaks and improvements to ml-nlffi-lib and
2822    ml-nlffigen:
2823    
2824       - ML represenation types have been streamlined
2825       - getter and setter functions work with concrete values, not abstract
2826         ones where possible
2827       - ml-nlffigen command line more flexible (see README file there)
2828       - some bugs have been fixed (hopefully)
2829    
2830    ----------------------------------------------------------------------
2831    Name: Lal George
2832    Date: 2002/01/24
2833    Tag: george-20020124-risc-ra-interface
2834    Description:
2835    
2836       There is a dramatic simplification in the interface to the
2837       register allocator for RISC architectures as a result of making
2838       parallel copy instructions explicit.
2839    
2840    ----------------------------------------------------------------------
2841    Name: Matthias Blume
2842    Date: 2002/01/22
2843    Tag: blume-20020122-x86-ccalls
2844    Description:
2845    
2846    Bug fix for c-calls on x86 (having to do with how char- and
2847    short-arguments are being handled).
2848    
2849    ----------------------------------------------------------------------
2850    Name: Matthias Blume
2851    Date: 2002/01/21
2852    Tag: blume-20020121-ff
2853    Description:
2854    
2855    Another day of fiddling with the FFI...
2856    
2857    1. Bug fix/workaround:  CKIT does not complain about negative array
2858       dimensions, so ml-nlffigen has to guard itself against this possibility.
2859       (Otherwise a negative dimension would send it into an infinite loop.)
2860    
2861    2. Some of the abstract types (light objects, light pointers, most "base"
2862       types) in structure C are now eqtypes.
2863    
2864    3. Added constructors and test functions for NULL function pointers.
2865    
2866    ----------------------------------------------------------------------
2867    Name: Matthias Blume
2868    Date: 2002/01/18
2869    Tag: blume-20020118-ready-for-new-release
2870    Description:
2871    
2872    Made config/srcarchiveurl point to a new place.  (Will provide boot
2873    files shortly.)
2874    
2875    Maybe we christen this to be 110.38?
2876    
2877    ----------------------------------------------------------------------
2878    Name: Matthias Blume
2879    Date: 2002/01/18
2880    Tag: blume-20020118-more-ffifiddle
2881    Description:
2882    
2883    Today's FFI fiddling:
2884    
2885      - Provided a structure CGetSet with "convenient" versions of C.Get.* and
2886        C.Set.* that use concrete (MLRep.*) arguments and results instead
2887        of abstract ones.
2888    
2889      - Provided word-style bit operations etc. for "int" representation
2890        types in MLRep.S<Foo>Bitops where <Foo> ranges over Char, Int, Short,
2891        and Long.
2892    
2893    ----------------------------------------------------------------------
2894    Name: Matthias Blume
2895    Date: 2002/01/18
2896    Tag: blume-20020118-use-x86-fp
2897    Description:
2898    
2899    Now that x86-fast-fp seems to be working, I turned it back on again
2900    by default.  (Seems to work fine now, even with the FFI.)
2901    
2902    Other than that, I added some documentation about the FFI to
2903    src/ml-nlffigen/README and updated the FFI test examples in
2904    src/ml-nlffi-lib/Tests/*.
2905    
2906    ----------------------------------------------------------------------
2907    Name: Allen Leung
2908    Date: 2002/01/17
2909    Tag: leunga-20020117-x86-fast-fp-call
2910    Description:
2911    
2912       1. Fixed a problem with handling return fp values when x86's fast fp
2913          mode is turned on.
2914    
2915       2. Minor pretty printing fix for cellset.  Print %st(0) as %st(0) instead
2916          of %f32.
2917    
2918       3. Added a constructor INT32lit to the ast of MLRISC tools.
2919    
2920    ----------------------------------------------------------------------
2921    Name: Matthias Blume
2922    Date: 2002/01/16
2923    Tag: blume-20020116-ffifiddle
2924    Description:
2925    
2926    More fiddling with the FFI interface:
2927    
2928     - Make constness 'c instead of rw wherever possible.  This eliminates
2929       the need for certain explicit coercions.  (However, due to ML's
2930       value polymorphism, there will still be many cases where explicit
2931       coercions are necessary.  Phantom types are not the whole answer
2932       to modeling a subtyping relationship in ML.)
2933    
2934     - ro/rw coersions for pointers added.  (Avoids the detour through */&.)
2935    
2936     - "printf" test example added to src/ml-nlffi-lib/Tests.  (Demonstrates
2937       clumsy workaround for varargs problem.)
2938    
2939    ----------------------------------------------------------------------
2940    Name: Lal George
2941    Date: 2002/01/15
2942    Tag: <none>
2943    Description:
2944    
2945    1. Since COPY instructions are no longer native to the architecture,
2946       a generic functor can be used to implement the expandCopies function.
2947    
2948    2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a
2949       TEXT segment.
2950    
2951    ----------------------------------------------------------------------
2952    Name: Matthias Blume
2953    Date: 2002/01/15
2954    Tag: blume-20020115-ffiupdates
2955    Description:
2956    
2957    1. Fix for bug resulting in single-precision float values being returned
2958       incorrectly from FFI calls.
2959    
2960    2. Small modifications to C FFI API:
2961    
2962        - memory-allocation routines return straight objects (no options)
2963          and raise an exception in out-of-memory situations
2964        - unsafe extensions to cast between function pointers and pointers
2965          from/to ints
2966        - added structure C_Debug as an alternative to structure C where
2967          pointer-dereferencing (|*| and |*!) always check for null-pointers
2968        - added open_lib' to DynLinkage;  open_lib' works like open_lib
2969          but also takes a (possibly empty) list of existing library handles
2970          that the current library depends on
2971    
2972    ----------------------------------------------------------------------
2973    Name: Matthias Blume
2974    Date: 2002/01/10
2975    Tag: blume-20020110-newffigen
2976    Description:
2977    
2978    1. Updates to portable graph code.
2979    
2980    2. Major update to ml-nlffigen and ml-nlffi-lib.  Things are much
2981       more scalable now so that even huge interfaces such as the one
2982       for GTK compile in finite time and space. :-)
2983       See src/ml-nlffigen/README for details on what's new.
2984    
2985    ----------------------------------------------------------------------
2986    Name: Lal George
2987    Date: 2001/01/09 14:31:35 EST 2002
2988    Tag: george-20011206-rm-native-copy
2989    Description:
2990    
2991            Removed the native COPY and FCOPY instructions
2992            from all the architectures and replaced it with the
2993            explicit COPY instruction from the previous commit.
2994    
2995            It is now possible to simplify many of the optimizations
2996            modules that manipulate copies. This has not been
2997            done in this change.
2998    
2999    ----------------------------------------------------------------------
3000    Name: Lal George
3001    Date: 2001/12/06 16:50:13 EST 2001
3002    Tag: george-20011206-mlrisc-instruction
3003    Description:
3004    
3005    Changed the representation of instructions from being fully abstract
3006    to being partially concrete. That is to say:
3007    
3008      from
3009            type instruction
3010    
3011      to
3012            type instr                              (* machine instruction *)
3013    
3014            datatype instruction =
3015                LIVE of {regs: C.cellset, spilled: C.cellset}
3016              | KILL of {regs: C.cellset, spilled: C.cellset}
3017              | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
3018              | ANNOTATION of {i: instruction, a: Annotations.annotation}
3019              | INSTR of instr
3020    
3021    This makes the handling of certain special instructions that appear on
3022    all architectures easier and uniform.
3023    
3024    LIVE and KILL say that a list of registers are live or killed at the
3025    program point where they appear. No spill code is generated when an
3026    element of the 'regs' field is spilled, but the register is moved to
3027    the 'spilled' (which is present, more for debugging than anything else).
3028    
3029    LIVE replaces the (now deprecated) DEFFREG instruction on the alpha.
3030    We used to generate:
3031    
3032            DEFFREG f1
3033            f1 := f2 + f3
3034            trapb
3035    
3036    but now generate:
3037    
3038            f1 := f2 + f3
3039            trapb
3040            LIVE {regs=[f1,f2,f3], spilled=[]}
3041    
3042    Furthermore, the DEFFREG (hack) required that all floating point instruction
3043    use all registers mentioned in the instruction. Therefore f1 := f2 + f3,
3044    defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting
3045    in a cleaner alpha implementation. (Hopefully, intel will not get rid of
3046    this architecture).
3047    
3048    COPYXXX is intended to replace the parallel COPY and FCOPY  available on
3049    all the architectures. This will result in further simplification of the
3050    register allocator that must be aware of them for coalescing purposes, and
3051    will also simplify certain aspects of the machine description that provides
3052    callbacks related to parallel copies.
3053    
3054    ANNOTATION should be obvious, and now INSTR represents the honest to God
3055    machine instruction set!
3056    
3057    The <arch>/instructions/<arch>Instr.sml files define certain utility
3058    functions for making porting easier -- essentially converting upper case
3059    to lower case. All machine instructions (of type instr) are in upper case,
3060    and the lower case form generates an MLRISC instruction. For example on
3061    the alpha we have:
3062    
3063      datatype instr =
3064         LDA of {r:cell, b:cell, d:operand}
3065       | ...
3066    
3067      val lda : {r:cell, b:cell, d:operand} -> instruction
3068        ...
3069    
3070    where lda is just (INSTR o LDA), etc.
3071    
3072    ----------------------------------------------------------------------
3073    Name: Matthias Blume
3074    Date: 2001/11/22 21:40:00 EST
3075    Tag: Release_110_37
3076    Description:
3077    
3078    Release 110.37.  This time for real.
3079    
3080    ----------------------------------------------------------------------
3081    Name: Matthias Blume
3082    Date: 2001/11/21 16:35:00 EST
3083    Tag: blume-20011121-foot-in-mouth
3084    Description:
3085    
3086    Removed the "Release_110_37" tag because of a serious bug.
3087    This will be re-tagged once the bug is fixed.
3088    
3089    ----------------------------------------------------------------------
3090    Name: Matthias Blume
3091    Date: 2001/11/21 16:14:00 EST
3092    Tag: blume-20011121-forgottenfile
3093    Description:
3094    
3095    Forgot to add a file.  (Just a .tex-file -- part of
3096    the CM manual source.)
3097    
3098    ----------------------------------------------------------------------
3099    Name: Matthias Blume
3100    Date: 2001/11/21 16:10:00 EST
3101    Tag: blume-20011121-invalid_110_37
3102    Description:
3103    
3104    Note: I removed the original tag "Release_110_37" from this commit
3105          because we found a serious bug in all non-x86 backends.
3106          - Matthias
3107    
3108    1. Modifications to the SML/NJ code generator and to the runtime system
3109       so that code object name strings are directly inserted into code
3110       objects at code generation time.  The only business the runtime system
3111       has with this is now to read the name strings on occasions.
3112       (The encoding of the name string has also changed somewhat.)
3113    
3114    2. CM now implements a simple "set calculus" for specifying export lists.
3115       In particular, it is now possible to refer to the export lists of
3116       other libraries/groups/sources and form unions as well as differences.
3117       See the latest CM manual for details.
3118    
3119    3. An separate notion of "proxy" libraries has again be eliminated from
3120       CM's model.  (Proxy libraries are now simply a special case of using
3121       the export list calculus.)
3122    
3123    4. Some of the existing libraries now take advantage of the new set
3124       calculus.
3125       (Notice that not all libraries have been converted because some
3126       of the existing .cm-files are supposed to be backward compatible
3127       with 110.0.x.)
3128    
3129    5. Some cleanup in stand-alone programs.  (Don't use "exnMessage" -- use
3130       "General.exnMessage"!  The former relies on a certain hook to be
3131       initialized, and that often does not happen in the stand-alone case.)
3132    
3133    ----------------------------------------------------------------------
3134    Name: Lal George
3135    Date: 2001/11/21  13:56:18 EST
3136    Tag: george-2001121-pseudo-ops
3137    Description:
3138    
3139      Implemented a complete redesign of MLRISC pseudo-ops. Now there
3140      ought to never be any question of incompatabilities with
3141      pseudo-op syntax expected by host assemblers.
3142    
3143      For now, only modules supporting GAS syntax are implemented
3144      but more should follow, such as MASM, and vendor assembler
3145      syntax, e.g. IBM as, Sun as, etc.
3146    
3147    ----------------------------------------------------------------------
3148    Name: Matthias Blume
3149    Date: 2001/11/14 11:52:00 EST
3150    Tag: blume-20011114-srcname
3151    Description:
3152    
3153    1. Routed the name of the current source file to mlriscgen where it
3154       should be directly emitted into the code object.  (This last part
3155       is yet to be done.)
3156    
3157    2. Some cleanup of the pgraph code to make it match the proposal that
3158       I put out the other day.  (The proposal notwithstanding, things are
3159       still in flux here.)
3160    
3161    ----------------------------------------------------------------------
3162    Name: Lal George
3163    Date: 2001/11/14 09:44:04 EST
3164    Tag:
3165    Description:
3166    
3167      Fix for a backpatching bug reported by Allen.
3168    
3169      Because the boundary between short and long span-dependent
3170      instructions is +/- 128, there are an astounding number of
3171      span-dependent instructions whose size is over estimated.
3172    
3173      Allen came up with the idea of letting the size of span
3174      dependent instructions be non-monotonic, for a maxIter
3175      number of times, after which the size must be monotonically
3176      increasing.
3177    
3178      This table shows the number of span-dependent instructions
3179      whose size was over-estimated as a function of maxIter, for the
3180      file Parse/parse/ml.grm.sml:
3181    
3182         maxIter            # of instructions:
3183            10                      687
3184            20                      438
3185            30                      198
3186            40                        0
3187    
3188      In compiling the compiler, there is no significant difference in
3189      compilation speed between maxIter=10 and maxIter=40. Actually,
3190      my measurements showed that maxIter=40 was a tad faster than
3191      maxIter=10! Also 96% of the  files in the compiler reach a fix
3192      point within 13 iterations, so fixing maxIter at 40, while high,
3193      is okay.
3194    
3195    ----------------------------------------------------------------------
3196    Name: Matthias Blume
3197    Date: 2001/10/31 15:25:00 EST
3198    Tag: blume-20011031-pgraph
3199    Description:
3200    
3201    CKIT:
3202    * Changed the "Function" constructor of type Ast.ctype to carry optional
3203      argument identifiers.
3204    * Changed the return type of TypeUtil.getFunction accordingly.
3205    * Type equality ignores the argument names.
3206    * TypeUtil.composite tries to preserve argument names but gives up quickly
3207      if there is a mismatch.
3208    
3209    installation script:
3210    * attempts to use "curl" if available (unless "wget" is available as well)
3211    
3212    CM:
3213    * has an experimental implementation of "portable graphs" which I will
3214      soon propose as an implementation-independent library format
3215    * there are also new libraries $/pgraph.cm and $/pgraph-util.cm
3216    
3217    NLFFI-LIB:
3218    * some cleanup (all cosmetic)
3219    
3220    NLFFIGEN:
3221    * temporarily disabled the mechanism that suppresses ML output for
3222      C definitions whose identifiers start with an underscore character
3223    * generate val bindings for enum constants
3224    * user can request that only one style (light or heavy) is being used;
3225      default is to use both (command-line arguments: -heavy and -light)
3226    * fixed bug in handling of function types involving incomplete pointers
3227    * generate ML entry points that take record arguments (i.e., using
3228      named arguments) for C functions that have a prototype with named
3229      arguments
3230      (see changes to CKIT)
3231    
3232    ----------------------------------------------------------------------
3233    Name: Allen Leung
3234    Date: 2001/10/27 20:34:00 EDT
3235    Tag: leunga-20011027-x86-fast-fp-call
3236    Description:
3237    
3238       Fixed the bug described in blume-20010920-slowfp.
3239    
3240       The fix involves
3241          1. generating FCOPYs in FSTP in ia32-svid
3242          2. marking a CALL with the appropriate annotation
3243    
3244    ----------------------------------------------------------------------
3245    Name: Matthias Blume
3246    Date: 2001/10/16 11:32:00 EDT
3247    Tag: blume-20011016-netbsd
3248    Description:
3249    
3250    Underscore patch from Chris Richards (fixing problem with compiling
3251    runtime system under recent NetBSD).
3252    
3253    ----------------------------------------------------------------------
3254    Name: Allen Leung
3255    Date: 2001/10/12 17:18:32 EDT 2001
3256    Tag: leung-20011012-x86-printflowgraph
3257    Description:
3258    
3259    X86RA now uses a valid (instead of dummy) PrintFlowgraph module.
3260    
3261    ----------------------------------------------------------------------
3262    Name: Lal George
3263    Date: 2001/10/11 23:51:34 EDT
3264    Tag: george-20011011-too-many-instrs
3265    Description:
3266    
3267    The representation of a program point never expected to see more
3268    than 65536 instructions in a basic block!
3269    
3270    ----------------------------------------------------------------------
3271    Name: Lal George
3272    Date: 2001/10/09 09:41:37 EDT
3273    Tag: george-20011008-mlrisc-labels
3274    Description:
3275    
3276    Changed the machine description files to support printing of
3277    local and global labels in assembly code, based on host assembler
3278    conventions.
3279    
3280    ----------------------------------------------------------------------
3281    Name: Matthias Blume
3282    Date: 2001/09/25 15:25:00 EDT
3283    Tag: blume-20010925-exninfo
3284    Description:
3285    
3286    I provided a non-hook implementation of exnName (at the toplevel) and
3287    made the "dummy" implementation of exnMessage (at the toplevel) more
3288    useful: if nothing gets "hooked in", then at least you are going to
3289    see the exception name and a message indicating why you don't see more.
3290    
3291    [For the time being, programs that need exnMessage and want to use
3292    ml-build should either use General.exnMessage (strongly recommended) or
3293    refer to structure General at some other point so that CM sees a
3294    static dependency.]
3295    
3296    [Similar remarks go for "print" and "use":  If you want to use their
3297    functionality in stand-alone programs generated by ml-build, then use
3298    TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).]
3299    
3300    ----------------------------------------------------------------------
3301    Name: Matthias Blume
3302    Date: 2001/09/20 17:28:00 EDT
3303    Tag: blume-20010920-slowfp
3304    Description:
3305    
3306    Allen says that x86-fast-fp is not safe yet, so I turned it off again...
3307    
3308    ----------------------------------------------------------------------
3309    Name: Matthias Blume
3310    Date: 2001/09/20 17:20:00 EDT
3311    Tag: blume-20010920-canonicalpaths
3312    Description:
3313    
3314    0. Updated the BOOT file (something that I forgot to do earlier).
3315    
3316    1. Small internal change to CM so that it avoids "/../" in filenames
3317       as much as possible (but only where it is safe).
3318    
3319    2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so
3320       that arguments that contain delimiters are passed through correctly.
3321       This change also means that all "special" arguments of the form
3322       @SMLxxx... must come first.
3323    
3324    3. Changed install script to put relative anchor names for tool commands
3325       into pathconfig.
3326    
3327    ----------------------------------------------------------------------
3328    Name: Matthias Blume
3329    Date: 2001/09/18 15:35:00 EDT
3330    Tag: blume-20010918-readme11036
3331    Description:
3332    
3333    Added README files.
3334    
3335    ----------------------------------------------------------------------
3336    Name: Matthias Blume
3337    Date: 2001/09/18 11:45:00 EDT
3338    Tag: Release_110_36 (retag)
3339    Description:
3340    
3341    Fixed mistake in config/preloads. Retagged as 110.36.
3342    
3343    ----------------------------------------------------------------------
3344    Name: Matthias Blume
3345    Date: 2001/09/18 09:40:00 EDT
3346    Tag: Release_110_36_orig (tag changed)
3347    Description:
3348    
3349    New version (110.36).  New bootfiles.
3350    
3351    ----------------------------------------------------------------------
3352    Name: Matthias Blume
3353    Date: 2001/09/14 16:15:00 EDT
3354    Tag: blume-20010914-x86fastfp
3355    Description:
3356    
3357    John committed some changes that Allen made, in particular a (hopefully)
3358    correctly working version of the x86-fp module.
3359    
3360    I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp"
3361    flag to "true".  Everything seems to compile to a fixpoint ok, and
3362    "mandelbrot" speeds up by about 15%.
3363    
3364    ----------------------------------------------------------------------
3365    Name: Matthias Blume
3366    Date: 2001/09/13 11:20:00 EDT
3367    Tag: blume-20010913-minimal
3368    Description:
3369    
3370    1. Stefan Monnier's patch to fix a miscompilation problem that
3371       was brought to light by John Reppy's work on Moby.
3372    
3373    2. Implemented a minimal "structure Compiler" that contains just
3374       "version" and "architecture".  The minimal version will be
3375       available when the full version is not.  This is for backward-
3376       compatibility with code that wants to test Compiler.version.
3377    
3378    ----------------------------------------------------------------------
3379    Name: Matthias Blume
3380    Date: 2001/08/28 14:03:00 EDT
3381    Tag: blume-20010828-ml-lex
3382    Description:
3383    
3384    Fix for bug 1581, received from Neophytos Michael.
3385    
3386    ----------------------------------------------------------------------
3387    Name: Matthias Blume
3388    Date: 2001/08/27 11:20:00 EDT
3389    Tag: blume-20010827-readme11035
3390    Description:
3391    
3392    Fleshed out the README file for 110.35.
3393    
3394    ----------------------------------------------------------------------
3395    Name: Matthias Blume
3396    Date: 2001/08/24 17:10:00 EDT
3397    Tag: Release_110_35
3398    Description:
3399    
3400    New version number (110.35).  New bootfiles.
3401    
3402    ----------------------------------------------------------------------
3403    Name: Lal George
3404    Date: 2001/08/24 13:47:18 EDT 2001
3405    Tag: george-20010824-MLRISC-graphs
3406    Description:
3407    
3408     removed clusters from MLRISC completely and replaced with graphs.
3409    
3410    ----------------------------------------------------------------------
3411    Name: Matthias Blume
3412    Date: 2001/08/23 17:50:00 EDT
3413    Tag: blume-20010823-toplevel
3414    Description:
3415    
3416    - some reorganization of the code that implements various kinds of
3417      environments in the compiler (static, dynamic, symbolic, combined)
3418    - re-implemented the EnvRef module so that evalStream works properly
3419      (if the stream contains references to "use", "CM.make", etc.)
3420    - cleaned up evalloop.sml and interact.sml (but they need more cleaning)
3421    
3422    ----------------------------------------------------------------------
3423    Name: Matthias Blume
3424    Date: 2001/08/20 15:50 EDT
3425    Tag: blume20010820-slipup
3426    Description:
3427    
3428    I forgot to commit a few files.  Here they are...
3429    
3430    ----------------------------------------------------------------------
3431    Name: Matthias Blume
3432    Date: 2001/08/20 15:35:00 EDT
3433    Tag: blume-20010820-debugprof
3434    Description:
3435    
3436    !!!! NEW BOOTFILES !!!!
3437    
3438    This is another round of reorganizing the compiler sources.  This
3439    time the main goal was to factor out all the "instrumentation"
3440    passes (for profiling and backtracing) into their own library.
3441    The difficulty was to do it in such a way that it does not depend
3442    on elaborate.cm but only on elabdata.cm.
3443    
3444    Therefore there have been further changes to both elaborate.cm and
3445    elabdata.cm -- more "generic" things have been moved from the former
3446    to the latter.  As a result, I was forced to split the assignment
3447    of numbers indicating "primtyc"s into two portions: SML-generic and
3448    SML/NJ-specific.  Since it would have been awkward to maintain,
3449    I bit the bullet and actually _changed_ the mapping between these
3450    numbers and primtycs.  The bottom line of this is that you need
3451    a new set of bin- and bootfiles.
3452    
3453    I have built new bootfiles for all architectures, so doing a fresh
3454    checkout and config/install.sh should be all you need.
3455    
3456    The newly created library's name is
3457    
3458        $smlnj/viscomp/debugprof.cm
3459    
3460    and its sources live under
3461    
3462        src/compiler/DebugProf
3463    
3464    ----------------------------------------------------------------------
3465    Name: Matthias Blume
3466    Date: 2001/08/15 17:15:00 EDT
3467    Tag: blume-20010815-compreorg
3468    Description:
3469    
3470    This is a first cut at reorganizing the CM libraries that make up the
3471    core of the compiler.  The idea is to separate out pieces that could
3472    be used independently by tools, e.g., the parser, the typechecker, etc.
3473    
3474    The current status is a step in this direction, but it is not quite
3475    satisfactory yet.  Expect more changes in the future.
3476    
3477    Here is the current (new) organization...
3478    
3479        What used to be $smlnj/viscomp/core.cm is now divided into
3480        six CM libraries:
3481    
3482             $smlnj/viscomp/basics.cm
3483                           /parser.cm
3484                           /elabdata.cm
3485                           /elaborate.cm
3486                           /execute.cm
3487                           /core.cm
3488    
3489        The CM files for these libraries live under src/system/smlnj/viscomp.
3490        All these libraries are proxy libraries that contain precisely
3491        one CM library component.  Here are the locations of the components
3492        (all within the src/compiler tree):
3493    
3494             Basics/basics.cm
3495             Parse/parser.cm
3496             ElabData/elabdata.cm
3497             Elaborator/elaborate.cm
3498             Execution/execute.cm
3499             core.cm
3500    
3501         [This organization is the same that has been used already
3502         for a while for the architecture-specific parts of the visible
3503         compiler and for the old version of core.cm.]
3504    
3505         As you will notice, many source files have been moved from their
3506         respective original locations to a new home in one of the above
3507         subtrees.
3508    
3509         The division of labor between the new libraries is the following:
3510    
3511             basics.cm:
3512                - Simple, basic definitions that pertain to many (or all) of
3513                  the other libraries.
3514             parser.cm:
3515                - The SML parser, producing output of type Ast.dec.
3516                - The type family for Ast is also defined and exported here.
3517             elabdata.cm:
3518                - The datatypes that describe input and output of the elaborator.
3519                  This includes types, absyn, and static environments.
3520             elaborator.cm:
3521                - The SML/NJ type checker and elaborator.
3522                  This maps an Ast.dec (with a given static environment) to
3523                  an Absyn.dec (with a new static environment).
3524                - This libraries implements certain modules that used to be
3525                  structures as functors (to remove dependencies on FLINT).
3526             execute.cm:
3527                - Everything having to do with executing binary code objects.
3528                - Dynamic environments.
3529             core.cm:
3530                - SML/NJ-specific instantiations of the elaborator and MLRISC.
3531                - Top-level modules.
3532                - FLINT (this should eventually become its own library)
3533    
3534    Notes:
3535    
3536    I am not 100% happy with the way I separated the elaborator (and its
3537    data structures) from FLINT.  Two instances of the same problem:
3538    
3539        1. Data structures contain certain fields that carry FLINT-specific
3540           information.  I hacked around this using exn and the property list
3541           module from smlnj-lib.  But the fact that there are middle-end
3542           specific fields around at all is a bit annoying.
3543    
3544        2. The elaborator calculates certain FLINT-related information.  I tried
3545           to make this as abstract as I could using functorization, but, again,
3546           the fact that the elaborator has to perform calculations on behalf
3547           of the middle-end at all is not nice.
3548    
3549        3. Having to used exn and property lists is unfortunate because it
3550           weakens type checking.  The other alternative (parameterizing
3551           nearly *everything*) is not appealing, though.
3552    
3553    I removed the "rebinding =" warning hack because due to the new organization
3554    it was awkward to maintain it.  As a result, the compiler now issues some of
3555    these warnings when compiling init.cmi during bootstrap compilation. On
3556    the plus side, you also get a warning when you do, for example:
3557       val op = = Int32.+
3558    which was not the case up to now.
3559    
3560    I placed "assign" and "deref" into the _Core structure so that the
3561    code that deals with the "lazy" keyword can find them there.  This
3562    removes the need for having access to the primitive environment
3563    during elaboration.
3564    
3565    ----------------------------------------------------------------------
3566    Name: Matthias Blume
3567    Date: 2001/08/13
3568    Tag: blume-20010813-closures
3569    Description:
3570    
3571    This fix was sent to us by Zhong Shao.  It is supposed to improve the
3572    performance of certain loops by avoiding needless closure allocation.
3573    
3574    ----------------------------------------------------------------------
3575    Name: Lal George
3576    Date: 2001/07/31 10:03:23 EDT 2001
3577    Tag: george-20010731-x86-fmalloc
3578    Description: Fixed bug in x86 calls
3579    
3580        There was a bug where call instructions would mysteriously
3581        vanish. The call instruction had to be one that returned
3582        a floating point value.
3583    
3584    ----------------------------------------------------------------------
3585    Name: Lal George
3586    Date: 2001/07/19 16:36:29 EDT 2001
3587    Tag: george-20010719-simple-cells
3588    Description:
3589    
3590    I have dramatically simplified the interface for CELLS in MLRISC.
3591    
3592    In summary, the cells interface is broken up into three parts:
3593    
3594      1. CellsBasis : CELLS_BASIS
3595    
3596            CellsBasis is a top level structure and common for all
3597            architectures.  it contains the definitions of basic datatypes
3598            and utility  functions over these types.
3599    
3600      2. functor Cells() : CELLS
3601    
3602            Cells generates an interface for CELLS that incorporates the
3603            specific resources on the target architecture, such as the
3604            presence of special register classes, their number and size,
3605            and various useful substructures.
3606    
3607      3. <ARCH>CELLS
3608    
3609            e.g. SparcCells: SPARCCELLS
3610    
3611            <ARCH>CELLS usually contains additional bindings for special
3612            registers  on the architecture, such as:
3613    
3614                    val r0 : cell           (* register zero *)
3615                    val y : cell            (* Y register *)
3616