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