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

Legend:
Removed from v.1086  
changed lines
  Added in v.1573

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