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