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

SCM Repository

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

Annotation of /sml/trunk/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1573 - (view) (download)

1 : dbm 570 This is the HISTORY file for the Yale SML/NJ CVS repository.
2 :    
3 :     An entry should be made for _every_ commit to the repository.
4 :     The entries in this file will be used when creating the README
5 :     for new versions, so keep that in mind when writing the
6 :     description.
7 :    
8 :     The form of an entry should be:
9 :    
10 : mblume 1480 Name:
11 :     Date: yyyy/mm/dd
12 :     Tag: <post-commit CVS tag>
13 :     Description:
14 :    
15 :     ----------------------------------------------------------------------
16 : mblume 1548 Name: Matthias Blume (blume (at) tti - c (dot) org)
17 : mblume 1573 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 : mblume 1572 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 : mblume 1557 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 : mblume 1548 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 : allenleung 1539 Name: Allen Leung (leunga (at) reservoir (dot) com)
72 : allenleung 1546 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 : allenleung 1539 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 : mblume 1479 Name: Matthias Blume (blume (at) tti - c (dot) org)
98 : mblume 1537 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 : mblume 1532 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 : mblume 1515 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 : mblume 1507 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 : mblume 1506 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 : mblume 1500 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 : mblume 1498 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 : mblume 1505 "toplevel" library that owns groups which are not nested within a real
200 : mblume 1498 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 : mblume 1496 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 : mblume 1494 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 : mblume 1491 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 : mblume 1489 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 : mblume 1490 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 : mblume 1489 ----------------------------------------------------------------------
315 :     Name: Matthias Blume (blume (at) tti - c (dot) org)
316 : mblume 1488 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 : mblume 1487 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 : mblume 1486 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 : mblume 1485 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 : mblume 1482 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 : mblume 1480 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 : mblume 1479 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 : allenleung 1468 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 : mblume 1384 Name: Matthias Blume (blume (at) tti - c (dot) org)
411 : mblume 1465 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 : mblume 1464 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 : mblume 1455 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 : mblume 1448 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 : mblume 1446 Tag: blume-20040126-app
448 :     Description:
449 :    
450 :     Type of top-level "app" corrected.
451 : mblume 1447 Added code for setting vp_limitPtrMask to Win32-specific runtime.
452 : mblume 1446
453 :     ----------------------------------------------------------------------
454 :     Name: Matthias Blume (blume (at) tti - c (dot) org)
455 : mblume 1427 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 : mblume 1414 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 : mblume 1411 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 : mblume 1409 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 : mblume 1400 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 : mblume 1399 Date: 2003/09/30 16:10:00 CDT
505 :     Tag: blume-20030930-primio-bat
506 : mblume 1398 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 : mblume 1395 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 : mblume 1394 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 : mblume 1393 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 : mblume 1394 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 : mblume 1393 "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 : mblume 1391 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 : mblume 1390 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 : mblume 1389 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 : mblume 1387 Date: 2003/09/22 12:10:00 CDT
616 : mblume 1388 Tag: blume-20030922-110_43_2
617 : mblume 1387 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 : mblume 1385 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 : mblume 1384 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 : mblume 1383 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 : mblume 1384 Name: Matthias Blume (blume (at) tti - c (dot) org)
666 : mblume 1381 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 : mblume 1368 Name: Matthias Blume (blume (at) tti - c (dot) org)
683 : mblume 1375 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 : mblume 1369 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 : mblume 1368 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 : mblume 1356 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 : mblume 1368 Name: Matthias Blume (blume (at) tti - c (dot) org)
722 : mblume 1354 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 : mblume 1368 Name: Matthias Blume (blume (at) tti - c (dot) org)
749 : mblume 1353 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 : mblume 1368 Name: Matthias Blume (blume (at) tti - c (dot) org)
760 : mblume 1350 Date: 2003/09/04 16:30:00 CDT
761 : mblume 1352 Tag: blume-20030905-slices-etc
762 : mblume 1350 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 : mblume 1368 Name: Matthias Blume (blume (at) tti - c (dot) org)
801 : mblume 1347 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 : mblume 1348 - Added some missing Real64 operations, most notably Real.toLargeInt.
816 : mblume 1347 - 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 : mblume 1348 CPS contract, then the compiler must insert calls to Core functions.
839 : mblume 1347 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 : mblume 1348 to add new Core calls. For this reason, conversion primops
842 : mblume 1347 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 : mblume 1348 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 : mblume 1347
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 : mblume 1348 Started using IntInf.int literals and built-in operations
870 : mblume 1347 (e.g., comparison with 0) where this seems appropriate.
871 :    
872 :    
873 :     ----------------------------------------------------------------------
874 : macqueen 1343 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 : mblume 1368 Name: Matthias Blume (blume (at) tti - c (dot) org)
888 : mblume 1342 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 : macqueen 1337 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 : mblume 1368 Name: Matthias Blume (blume (at) tti - c (dot) org)
983 : mblume 1335 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 : mblume 1368 Name: Matthias Blume (blume (at) tti - c (dot) org)
991 : mblume 1334 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 : mblume 1368 Name: Matthias Blume (blume (at) tti - c (dot) org)
1004 : mblume 1332 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 : allenleung 1327 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 : mblume 1317 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 : leunga 1296 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 : blume 1229 Name: Matthias Blume
1062 : blume 1294 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 : blume 1291 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 : blume 1288 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 : blume 1282 Date: 2002/10/17 09:10:00 EDT
1096 : blume 1279 Tag: Release_110_42
1097 :     Description:
1098 :    
1099 : blume 1282 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 : blume 1279 New working release. New bootfiles.
1117 :    
1118 :     ----------------------------------------------------------------------
1119 :     Name: Matthias Blume
1120 : blume 1273 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 : blume 1261 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 : blume 1259 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 : blume 1253 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 : blume 1250 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 : blume 1249 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 : blume 1240 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 : blume 1238 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 : blume 1229 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 : george 1222 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 : blume 1204 Name: Matthias Blume
1221 : blume 1220 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 : blume 1215 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 : blume 1212 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 : blume 1211 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 : blume 1208 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 : blume 1204 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 : leunga 1203 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 : blume 1201 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 : george 1192 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 : blume 1175 Name: Matthias Blume
1338 : blume 1190 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 : blume 1189 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 : blume 1186 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 : blume 1185 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 : blume 1184 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 : blume 1183 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 : blume 1181 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 : blume 1180 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 : blume 1179 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 : blume 1178 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 : blume 1175 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 : leunga 1174 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 : george 1168 Name: Lal George
1646 :     Date: 2002/03/22 14:18:25 EST
1647 : george 1171 Tag: george-20020322-cps-branch-prob
1648 : george 1168 Description:
1649 :    
1650 : george 1171 Implemented the Ball-Larus branch prediction-heuristics, and
1651 : george 1168 incorporated graphical viewers for control flow graphs.
1652 :    
1653 : george 1171 Ball-Larus Heuristics:
1654 : george 1168 ---------------------
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 : george 1171 probability using the Dempster-Shafer theory.
1666 : george 1168
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 : blume 1159 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 : leunga 1156 Name: Allen Leung
1708 : leunga 1158 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 : leunga 1156 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 : blume 1145 Name: Matthias Blume
1761 : blume 1155 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 : blume 1152 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 : blume 1148 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 : blume 1145 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 : leunga 1142 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 : blume 1137 Name: Matthias Blume
1870 : blume 1140 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 : blume 1138 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 : blume 1137 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 : blume 1145 an interface, compile, then go back to the old interface, and
1908 : blume 1137 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 : george 1136 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 : leunga 1025
1934 : george 1003 ----------------------------------------------------------------------
1935 : george 1133 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 : blume 1132 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 : leunga 1130 Name: Allen Leung
1981 : leunga 1131 Date: 2002/03/11 10:30:00 EST
1982 : leunga 1142 Tag: leunga-20020311-runtime-string0
1983 : leunga 1131 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 : leunga 1130 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 : blume 1128 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 : leunga 1127 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 : blume 1126 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 : george 1116 Name: Lal George
2090 : george 1124 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 : george 1116 Date: 2002/03/05 17:24:48 EST
2105 :     Tag: george-20020305-linkage-cluster
2106 :    
2107 : george 1124 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 : george 1116
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 : george 1124 jmp L1
2120 : george 1116
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 : george 1124 above example, it contains the address of L0; before
2129 : george 1116 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 : george 1124 I have tested this on all architectures except the hppa.The increase
2135 :     in code size is of course negligible
2136 : george 1116
2137 :     ----------------------------------------------------------------------
2138 : leunga 1115 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 : blume 1096 Name: Matthias Blume
2146 : blume 1098 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 : blume 1096 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 : leunga 1080 Name: Allen Leung
2211 : leunga 1094 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 : leunga 1115 performance problem. But since I cannot decipher the old code fully,
2267 :     instead of patching the problems up, I'm reimplementing it
2268 : leunga 1094 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
2357 : leunga 1086 Date: 2002/02/22 01:02:00 EST
2358 :     Tag: leunga-20020222-mlrisc-tools
2359 :    
2360 :     Minor bug fixes in the parser and rewriter
2361 :    
2362 :     ----------------------------------------------------------------------
2363 :     Name: Allen Leung
2364 : leunga 1085 Date: 2002/02/21 20:20:00 EST
2365 :     Tag: leunga-20020221-peephole
2366 :    
2367 :     Regenerated the peephole files. Some contained typos in the specification
2368 :     and some didn't compile because of pretty printing bugs in the old version
2369 :     of 'nowhere'.
2370 :    
2371 :     ----------------------------------------------------------------------
2372 :     Name: Allen Leung
2373 : leunga 1079 Date: 2002/02/19 20:20:00 EST
2374 :     Tag: leunga-20020219-mlrisc-tools
2375 :     Description:
2376 :    
2377 :     Minor bug fixes to the mlrisc-tools library:
2378 :    
2379 :     1. Fixed up parsing colon suffixed keywords
2380 :     2. Added the ability to shut the error messages up
2381 :     3. Reimplemented the pretty printer and fixed up/improved
2382 :     the pretty printing of handle and -> types.
2383 :     4. Fixed up generation of literal symbols in the nowhere tool.
2384 :     5. Added some SML keywords to to sml.sty
2385 :    
2386 :     ----------------------------------------------------------------------
2387 :     Name: Matthias Blume
2388 : blume 1078 Date: 2002/02/19 16:20:00 EST
2389 :     Tag: blume-20020219-cmffi
2390 :     Description:
2391 :    
2392 :     A wild mix of changes, some minor, some major:
2393 :    
2394 :     * All C FFI-related libraries are now anchored under $c:
2395 :     $/c.cm --> $c/c.cm
2396 :     $/c-int.cm --> $c/internals/c-int.cm
2397 :     $/memory.cm --> $c/memory/memory.cm
2398 :    
2399 :     * "make" tool (in CM) now treats its argument pathname slightly
2400 :     differently:
2401 :     1. If the native expansion is an absolute name, then before invoking
2402 :     the "make" command on it, CM will apply OS.Path.mkRelative
2403 :     (with relativeTo = OS.FileSys.getDir()) to it.
2404 :     2. The argument will be passed through to subsequent phases of CM
2405 :     processing without "going native". In particular, if the argument
2406 :     was an anchored path, then "make" will not lose track of that anchor.
2407 :    
2408 :     * Compiler backends now "know" their respective C calling conventions
2409 :     instead of having to be told about it by ml-nlffigen. This relieves
2410 :     ml-nlffigen from one of its burdens.
2411 :    
2412 :     * The X86Backend has been split into X86CCallBackend and X86StdCallBackend.
2413 :    
2414 :     * Export C_DEBUG and C_Debug from $c/c.cm.
2415 :    
2416 :     * C type encoding in ml-nlffi-lib has been improved to model the conceptual
2417 :     subtyping relationship between incomplete pointers and their complete
2418 :     counterparts. For this, ('t, 'c) ptr has been changed to 'o ptr --
2419 :     with the convention of instantiating 'o with ('t, 'c) obj whenever
2420 :     the pointer target type is complete. In the incomplete case, 'o
2421 :     will be instantiated with some "'c iobj" -- a type obtained by
2422 :     using one of the functors PointerToIncompleteType or PointerToCompleteType.
2423 :    
2424 :     Operations that work on both incomplete and complete pointer types are
2425 :     typed as taking an 'o ptr while operations that require the target to
2426 :     be known are typed as taking some ('t, 'c) obj ptr.
2427 :    
2428 :     voidptr is now a bit "more concrete", namely "type voidptr = void ptr'"
2429 :     where void is an eqtype without any values. This makes it possible
2430 :     to work on voidptr values using functions meant to operate on light
2431 :     incomplete pointers.
2432 :    
2433 :     * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has
2434 :     been vastly simplified.
2435 :    
2436 :     ----------------------------------------------------------------------
2437 :     Name: Matthias Blume
2438 : blume 1076 Date: 2002/02/19 10:48:00 EST
2439 :     Tag: blume-20020219-pqfix
2440 :     Description:
2441 :    
2442 :     Applied Chris Okasaki's bug fix for priority queues.
2443 :    
2444 :     ----------------------------------------------------------------------
2445 :     Name: Matthias Blume
2446 : blume 1073 Date: 2002/02/15 17:05:00
2447 : blume 1069 Tag: Release_110_39
2448 :     Description:
2449 :    
2450 : blume 1073 Last-minute retagging is becoming a tradition... :-(
2451 :    
2452 :     This is the working release 110.39.
2453 :    
2454 :     ----------------------------------------------------------------------
2455 :     Name: Matthias Blume
2456 :     Date: 2002/02/15 16:00:00 EST
2457 :     Tag: Release_110_39-orig
2458 :     Description:
2459 :    
2460 : blume 1069 Working release 110.39. New bootfiles.
2461 :    
2462 : blume 1073 (Update: There was a small bug in the installer so it wouldn't work
2463 :     with all shells. So I retagged. -Matthias)
2464 :    
2465 : blume 1069 ----------------------------------------------------------------------
2466 :     Name: Matthias Blume
2467 : blume 1068 Date: 2002/02/15 14:17:00 EST
2468 :     Tag: blume-20020215-showbindings
2469 :     Description:
2470 :    
2471 :     Added EnvRef.listBoundSymbols and CM.State.showBindings. Especially
2472 :     the latter can be useful for exploring what bindings are available at
2473 :     the interactive prompt. (The first function returns only the list
2474 :     of symbols that are really bound, the second prints those but also the
2475 :     ones that CM's autoloading mechanism knows about.)
2476 :    
2477 :     ----------------------------------------------------------------------
2478 :     Name: Matthias Blume
2479 : blume 1067 Date: 2002/02/15 12:08:00 EST
2480 :     Tag: blume-20020215-iptrs
2481 :     Description:
2482 :    
2483 :     Two improvements to ml-nlffigen:
2484 :    
2485 :     1. Write files only if they do not exist or if their current contents
2486 :     do not coincide with what's being written. (That is, avoid messing
2487 :     with the time stamps unless absolutely necessary.)
2488 :    
2489 :     2. Implement a "repository" mechanism for generated files related
2490 :     to "incomplete pointer types". See the README file for details.
2491 :    
2492 :     ----------------------------------------------------------------------
2493 :     Name: Matthias Blume
2494 : blume 1066 Date: 2002/02/14 11:50:00 EST
2495 :     Tag: blume-20020214-quote
2496 :     Description:
2497 :    
2498 :     Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm). This is required
2499 :     because of the new and improved tag generation scheme. (Thanks to Allen
2500 :     Leung for pointing it out.)
2501 :    
2502 :     ----------------------------------------------------------------------
2503 : george 1065 Name: Lal George
2504 :     Date: 2002/02/14 09:55:27 EST 2002
2505 :     Tag: george-20020214-isabelle-bug
2506 :     Description:
2507 :    
2508 :     Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation
2509 :     of Isabelle on the x86.
2510 :    
2511 :     From Allen:
2512 :     -----------
2513 :     I've found the problem:
2514 :    
2515 :     in ra-core.sml, I use the counter "blocked" to keep track of the
2516 :     true number of elements in the freeze queue. When the counter goes
2517 :     to zero, I skip examining the queue. But I've messed up the
2518 :     bookkeeping in combine():
2519 :    
2520 :     else ();
2521 :     case !ucol of
2522 :     PSEUDO => (if !cntv > 0 then
2523 :     (if !cntu > 0 then blocked := !blocked - 1 else ();
2524 :     ^^^^^^^^^^^^^^^^^^^^^^^
2525 :     moveu := mergeMoveList(!movev, !moveu)
2526 :     )
2527 :     else ();
2528 :    
2529 :     combine() is called to coalesce two nodes u and v.
2530 :     I think I was thinking that if the move counts of u and v are both
2531 :     greater than zero then after they are coalesced then one node is
2532 :     removed from the freeze queue. Apparently I was thinking that
2533 :     both u and v are of low degree, but that's clearly not necessarily true.
2534 :    
2535 :    
2536 :     02/12/2002:
2537 :     Here's the patch. HOL now compiles.
2538 :    
2539 :     I don't know how this impact on performance (compile
2540 :     time or runtime). This bug caused the RA (especially on the x86)
2541 :     to go thru the potential spill phase when there are still nodes on the
2542 :     freeze queue.
2543 :    
2544 :    
2545 :    
2546 :    
2547 :     ----------------------------------------------------------------------
2548 : blume 1058 Name: Matthias Blume
2549 : blume 1064 Date: 2002/02/13 22:40:00 EST
2550 :     Tag: blume-20020213-fptr-rtti
2551 :     Description:
2552 :    
2553 :     Fixed a bug in ml-nlffigen that was introduced with one of the previous
2554 :     updates.
2555 :    
2556 :     ----------------------------------------------------------------------
2557 :     Name: Matthias Blume
2558 : blume 1063 Date: 2002/02/13 16:41:00 EST
2559 :     Tag: blume-20020213-cmlpq
2560 :     Description:
2561 :    
2562 :     Added new priority queue export symbols (which have just been added to
2563 :     smlnj-lib.cm) to CML's version of smlnj-lib.cm. (Otherwise CML would
2564 :     not compile and the installer would choke.)
2565 :    
2566 :     ----------------------------------------------------------------------
2567 :     Name: Matthias Blume
2568 : blume 1062 Date: 2002/02/13 16:15:00 EST
2569 :     Tag: blume-20020213-various
2570 :     Description:
2571 :    
2572 :     1. More tweaks to ml-nlffigen:
2573 :    
2574 :     - better internal datastructures (resulting in slight speedup)
2575 :     - "-match" option requires exact match
2576 :     - "localized" gensym counters (untagged structs/unions nested within
2577 :     other structs/unions or within typedefs get a fresh counter; their
2578 :     tag will be prefixed by a concatenation of their parents' tags)
2579 :     - bug fixes (related to calculation of transitive closure of types
2580 :     to be included in the output)
2581 :    
2582 :     2. Minor Basis updates:
2583 :    
2584 :     - added implementations for List.collate and Option.app
2585 :    
2586 :     ----------------------------------------------------------------------
2587 :     Name: Matthias Blume
2588 : blume 1060 Date: 2002/02/11 15:55:00 EST
2589 :     Tag: blume-20020211-gensym
2590 :     Description:
2591 :    
2592 :     Added a "-gensym" option to command line of ml-nlffigen. This can be
2593 :     used to specify a "stem" -- a string that is inserted in all "gensym'd"
2594 :     names (ML structure names that correspond to unnamed C structs, unions,
2595 :     and enums), so that separate runs of ml-nlffigen do not clash.
2596 :    
2597 :     ----------------------------------------------------------------------
2598 :     Name: Matthias Blume
2599 : blume 1059 Date: 2002/02/11 12:05:00 EST
2600 :     Tag: blume-20020211-gensml
2601 :     Description:
2602 :    
2603 :     A quick fix for a problem with GenSML (in the pgraph-util library):
2604 :     Make generation of toplevel "local" optional. (Strictly speaking,
2605 :     signature definitions within "local" are not legal SML.)
2606 :    
2607 :     Other than that: updates to INSTALL and cm/TODO.
2608 :    
2609 :     ----------------------------------------------------------------------
2610 :     Name: Matthias Blume
2611 : blume 1058 Date: 2002/02/08 15:00:00 EST
2612 :     Tag: blume-20020208-uniquepid
2613 :     Description:
2614 :    
2615 :     0. Version number has been bumped to 110.38.1. NEW BOOTFILES!!!
2616 :    
2617 :     1. The installer (config/install.sh) has gotten smarter:
2618 :    
2619 :     - Configuration options are a bit easier to specify now
2620 :     (in config/targets).
2621 :     - Bug in recognizing .tar.bz2 files fixed.
2622 :     - Installer automatically resolves dependencies between
2623 :     configuration options (e.g., if you ask for eXene, you will
2624 :     also get cml -- regardless whether you asked for it or not).
2625 :     - Installer can run in "quieter mode" by setting the environment
2626 :     variable INSTALL_QUIETLY to "true". "Quieter" does not mean
2627 :     "completely silent", though.
2628 :     - Build HashCons library as part of smlnj-lib.
2629 :    
2630 :     2. A new scheme for assigning persistent identifiers to compilation
2631 :     units (and, by extension, to types etc.) has been put into place.
2632 :     This fixes a long-standing bug where types and even dynamic values
2633 :     can get internally confused, thereby compromising type safety
2634 :     (abstraction) and dynamic correctness. See
2635 :    
2636 :     http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz
2637 :    
2638 :     for an example of how things could go wrong until now.
2639 :    
2640 :     The downside of the new scheme is that pids are not quite as
2641 :     persistent as they used to be: CM will generate a fresh pid
2642 :     for every compilation unit that it thinks it sees for the first
2643 :     time. That means that if you compile starting from a clean, fresh
2644 :     source tree at two different times, you end up with different
2645 :     binaries.
2646 :    
2647 :     Cutoff recompilation, however, has not been compromised because
2648 :     CM keeps pid information in special caches between runs.
2649 :    
2650 :     ----------------------------------------------------------------------
2651 : george 1053 Name: Lal George
2652 : george 1055 Date: 2002/02/07 15:34:13 EST 2002
2653 :     Tag: <none>
2654 :     Description:
2655 :    
2656 :     Compilers that generate assembly code may produce global labels
2657 :     whose value is resolved at link time. The various peephole optimization
2658 :     modules did not take this in account.
2659 :    
2660 :     TODO. The Labels.addrOf function should really return an option
2661 :     type so that clients are forced to deal with this issue, rather
2662 :     than an exception being raised.
2663 :    
2664 :     ----------------------------------------------------------------------
2665 :     Name: Lal George
2666 : george 1053 Date: 2002/02/06 13:55:02 EST
2667 :     Tag: george-20020206-ra-breakup
2668 :     Description:
2669 :    
2670 :     1. A bug fix from Allen.
2671 :    
2672 :     A typo causes extra fstp %st(0)'s to be generated at compensation
2673 :     edges, which might cause stack underflow traps at runtime. This
2674 :     occurs in fft where there are extraneous fstps right before the 'into'
2675 :     trap instruction (in this case they are harmless since none of the
2676 :     integers overflow.)
2677 :    
2678 : george 1054 2. Pulled out various utility modules that were embedded in the modules
2679 : george 1053 of the register allocator. I need these modules for other purposes, but
2680 : george 1054 they are not complete enough to put into a library (just yet).
2681 : george 1053 ----------------------------------------------------------------------
2682 : blume 1049 Name: Matthias Blume
2683 :     Date: 2002/01/31 16:05:00 EST
2684 :     Tag: blume-20020131-sparc-ccalls
2685 :     Description:
2686 :    
2687 :     1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes)
2688 :     of extra stack space by mistake. Fixed.
2689 :    
2690 :     2. Bug in logic of handling of command-line options in ml-nlffigen fixed.
2691 :    
2692 :     ----------------------------------------------------------------------
2693 : leunga 1048 Name: Allen Leung
2694 :     Date: 2002/01/30
2695 :     Tag: leunga-20020130-nowhere-bug-fix
2696 :     Description:
2697 :    
2698 :     MLRISC bug fixes:
2699 :     1. Fixed a bindings computation bug in the 'nowhere' program generator tool.
2700 :     2. MachineInt.fromString was negating its value.
2701 :    
2702 :     ----------------------------------------------------------------------
2703 : blume 1039 Name: Matthias Blume
2704 : blume 1047 Date: 2002/01/29
2705 :     Tag: blume-20020129-INSTALL
2706 :     Description:
2707 :    
2708 :     - Added somewhat detailed installation instructions (file INSTALL).
2709 :     - Fixed curl-detection bug in config/install.sh.
2710 :     - It is now possible to select the URL getter using the URLGETTER
2711 :     environment variable:
2712 :    
2713 :     not set / "unknown" --> automatic detection (script tries wget,
2714 :     curl, and lynx)
2715 :     "wget" / "curl" / "lynx" --> use the specified program (script "knows"
2716 :     how to properly invoke them)
2717 :     other --> use $URLGETTER directly, it must take
2718 :     precisely two command-line arguments
2719 :     (source URL and destination file name)
2720 :    
2721 :     ----------------------------------------------------------------------
2722 :     Name: Matthias Blume
2723 : blume 1044 Date: 2002/01/28
2724 : blume 1045 Tag: blume-20020128-sparc-ccalls
2725 :     Description:
2726 :    
2727 :     - Fixed problem with calculation of "used" registers in sparc-c-calls.
2728 :     - Make use of the allocParam argument in sparc-c-calls.
2729 :    
2730 :     ----------------------------------------------------------------------
2731 :     Name: Matthias Blume
2732 :     Date: 2002/01/28
2733 : blume 1044 Tag: blume-20020128-allocParam
2734 :     Description:
2735 :    
2736 :     John Reppy: Changes c-calls API to accept client-callback for
2737 :     allocating extra stack space.
2738 :     me: Corresponding changes to mlriscGen (using a dummy argument that
2739 :     does not change the current behavior).
2740 :    
2741 :     ----------------------------------------------------------------------
2742 :     Name: Matthias Blume
2743 : blume 1040 Date: 2002/01/28 12:00:00
2744 :     Tag: Release_110_38
2745 :     Description:
2746 :    
2747 :     This time for real!!!
2748 :    
2749 :     ----------------------------------------------------------------------
2750 :     Name: Matthias Blume
2751 : blume 1039 Date: 2002/01/28 10:56:00 EST
2752 :     Tag: blume-20020128-retraction
2753 :     Description:
2754 :    
2755 :     0. Retracted earlier 110.38. (The Release_110_38 tag has been replaced
2756 :     with blume-Release_110_38-retracted.)
2757 :    
2758 :     1. Fixed a problem with incorrect rounding modes in real64.sml.
2759 :     (Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.)
2760 :    
2761 :     2. A bug in ml-nlffigen related to the handling of unnamed structs, unions,
2762 :     and enums fixed. The naming of corresponding ML identifiers should
2763 :     now be consistent again.
2764 :    
2765 :     ----------------------------------------------------------------------
2766 : leunga 1038 Name: Allen Leung
2767 :     Date: 2002/01/27
2768 :     Tag: leunga-20020127-nowhere
2769 :     Description:
2770 :    
2771 :     Added a target called nowhere in the configuration scripts.
2772 :     Enabling this will build the MLRISC 'nowhere' tool (for translating
2773 :     programs with where-clauses into legal SML code) during installation.
2774 :    
2775 :     ----------------------------------------------------------------------
2776 : blume 1036 Name: Matthias Blume
2777 : leunga 1038 Date: 2002/01/25 21:27:00 EST
2778 : blume 1039 Tag: blume-Release_110_38-retracted
2779 : blume 1037 Description:
2780 :    
2781 :     Call it a (working) release! Version is 110.38. Bootfiles are ready.
2782 :    
2783 :     README will be added later.
2784 :    
2785 : blume 1039 !!! NOTE: Re-tagged as blume-Release_110_38-retracted. Original tag
2786 :     (Release_110_38) removed. Reason: Last-minute bug fixes.
2787 :    
2788 : blume 1037 ----------------------------------------------------------------------
2789 :     Name: Matthias Blume
2790 : blume 1036 Date: 2002/01/25
2791 :     Tag: blume-20020125-ffi
2792 :     Description:
2793 :    
2794 :     A large number of tweaks and improvements to ml-nlffi-lib and
2795 :     ml-nlffigen:
2796 :    
2797 :     - ML represenation types have been streamlined
2798 :     - getter and setter functions work with concrete values, not abstract
2799 :     ones where possible
2800 :     - ml-nlffigen command line more flexible (see README file there)
2801 :     - some bugs have been fixed (hopefully)
2802 :    
2803 :     ----------------------------------------------------------------------
2804 : george 1034 Name: Lal George
2805 :     Date: 2002/01/24
2806 :     Tag: george-20020124-risc-ra-interface
2807 :     Description:
2808 :    
2809 :     There is a dramatic simplification in the interface to the
2810 :     register allocator for RISC architectures as a result of making
2811 :     parallel copy instructions explicit.
2812 :    
2813 :     ----------------------------------------------------------------------
2814 : blume 1028 Name: Matthias Blume
2815 : blume 1032 Date: 2002/01/22
2816 :     Tag: blume-20020122-x86-ccalls
2817 :     Description:
2818 :    
2819 :     Bug fix for c-calls on x86 (having to do with how char- and
2820 :     short-arguments are being handled).
2821 :    
2822 :     ----------------------------------------------------------------------
2823 :     Name: Matthias Blume
2824 : blume 1031 Date: 2002/01/21
2825 :     Tag: blume-20020121-ff
2826 :     Description:
2827 :    
2828 :     Another day of fiddling with the FFI...
2829 :    
2830 :     1. Bug fix/workaround: CKIT does not complain about negative array
2831 :     dimensions, so ml-nlffigen has to guard itself against this possibility.
2832 :     (Otherwise a negative dimension would send it into an infinite loop.)
2833 :    
2834 :     2. Some of the abstract types (light objects, light pointers, most "base"
2835 :     types) in structure C are now eqtypes.
2836 :    
2837 :     3. Added constructors and test functions for NULL function pointers.
2838 :    
2839 :     ----------------------------------------------------------------------
2840 :     Name: Matthias Blume
2841 : blume 1028 Date: 2002/01/18
2842 : blume 1030 Tag: blume-20020118-ready-for-new-release
2843 :     Description:
2844 :    
2845 :     Made config/srcarchiveurl point to a new place. (Will provide boot
2846 :     files shortly.)
2847 :    
2848 :     Maybe we christen this to be 110.38?
2849 :    
2850 :     ----------------------------------------------------------------------
2851 :     Name: Matthias Blume
2852 :     Date: 2002/01/18
2853 : blume 1029 Tag: blume-20020118-more-ffifiddle
2854 :     Description:
2855 :    
2856 :     Today's FFI fiddling:
2857 :    
2858 :     - Provided a structure CGetSet with "convenient" versions of C.Get.* and
2859 :     C.Set.* that use concrete (MLRep.*) arguments and results instead
2860 :     of abstract ones.
2861 :    
2862 :     - Provided word-style bit operations etc. for "int" representation
2863 :     types in MLRep.S<Foo>Bitops where <Foo> ranges over Char, Int, Short,
2864 :     and Long.
2865 :    
2866 :     ----------------------------------------------------------------------
2867 :     Name: Matthias Blume
2868 :     Date: 2002/01/18
2869 : blume 1028 Tag: blume-20020118-use-x86-fp
2870 :     Description:
2871 :    
2872 :     Now that x86-fast-fp seems to be working, I turned it back on again
2873 :     by default. (Seems to work fine now, even with the FFI.)
2874 :    
2875 :     Other than that, I added some documentation about the FFI to
2876 :     src/ml-nlffigen/README and updated the FFI test examples in
2877 :     src/ml-nlffi-lib/Tests/*.
2878 :    
2879 :     ----------------------------------------------------------------------
2880 : leunga 1025 Name: Allen Leung
2881 :     Date: 2002/01/17
2882 :     Tag: leunga-20020117-x86-fast-fp-call
2883 :     Description:
2884 :    
2885 :     1. Fixed a problem with handling return fp values when x86's fast fp
2886 :     mode is turned on.
2887 :    
2888 :     2. Minor pretty printing fix for cellset. Print %st(0) as %st(0) instead
2889 :     of %f32.
2890 :    
2891 :     3. Added a constructor INT32lit to the ast of MLRISC tools.
2892 :    
2893 :     ----------------------------------------------------------------------
2894 : blume 1021 Name: Matthias Blume
2895 :     Date: 2002/01/16
2896 :     Tag: blume-20020116-ffifiddle
2897 :     Description:
2898 :    
2899 :     More fiddling with the FFI interface:
2900 :    
2901 :     - Make constness 'c instead of rw wherever possible. This eliminates
2902 :     the need for certain explicit coercions. (However, due to ML's
2903 :     value polymorphism, there will still be many cases where explicit
2904 :     coercions are necessary. Phantom types are not the whole answer
2905 :     to modeling a subtyping relationship in ML.)
2906 :    
2907 :     - ro/rw coersions for pointers added. (Avoids the detour through */&.)
2908 :    
2909 :     - "printf" test example added to src/ml-nlffi-lib/Tests. (Demonstrates
2910 :     clumsy workaround for varargs problem.)
2911 :    
2912 :     ----------------------------------------------------------------------
2913 : george 1016 Name: Lal George
2914 :     Date: 2002/01/15
2915 :     Tag: <none>
2916 :     Description:
2917 :    
2918 :     1. Since COPY instructions are no longer native to the architecture,
2919 :     a generic functor can be used to implement the expandCopies function.
2920 :    
2921 :     2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a
2922 :     TEXT segment.
2923 :    
2924 :     ----------------------------------------------------------------------
2925 : blume 1011 Name: Matthias Blume
2926 : blume 1015 Date: 2002/01/15
2927 :     Tag: blume-20020115-ffiupdates
2928 :     Description:
2929 :    
2930 :     1. Fix for bug resulting in single-precision float values being returned
2931 :     incorrectly from FFI calls.
2932 :    
2933 :     2. Small modifications to C FFI API:
2934 :    
2935 :     - memory-allocation routines return straight objects (no options)
2936 :     and raise an exception in out-of-memory situations
2937 :     - unsafe extensions to cast between function pointers and pointers
2938 :     from/to ints
2939 :     - added structure C_Debug as an alternative to structure C where
2940 :     pointer-dereferencing (|*| and |*!) always check for null-pointers
2941 :     - added open_lib' to DynLinkage; open_lib' works like open_lib
2942 :     but also takes a (possibly empty) list of existing library handles
2943 :     that the current library depends on
2944 :    
2945 :     ----------------------------------------------------------------------
2946 :     Name: Matthias Blume
2947 : blume 1011 Date: 2002/01/10
2948 :     Tag: blume-20020110-newffigen
2949 :     Description:
2950 :    
2951 :     1. Updates to portable graph code.
2952 :    
2953 :     2. Major update to ml-nlffigen and ml-nlffi-lib. Things are much
2954 :     more scalable now so that even huge interfaces such as the one
2955 :     for GTK compile in finite time and space. :-)
2956 :     See src/ml-nlffigen/README for details on what's new.
2957 :    
2958 :     ----------------------------------------------------------------------
2959 : george 1003 Name: Lal George
2960 : george 1009 Date: 2001/01/09 14:31:35 EST 2002
2961 :     Tag: george-20011206-rm-native-copy
2962 :     Description:
2963 :    
2964 :     Removed the native COPY and FCOPY instructions
2965 :     from all the architectures and replaced it with the
2966 :     explicit COPY instruction from the previous commit.
2967 :    
2968 :     It is now possible to simplify many of the optimizations
2969 :     modules that manipulate copies. This has not been
2970 :     done in this change.
2971 :    
2972 :     ----------------------------------------------------------------------
2973 :     Name: Lal George
2974 : george 1003 Date: 2001/12/06 16:50:13 EST 2001
2975 :     Tag: george-20011206-mlrisc-instruction
2976 :     Description:
2977 : george 824
2978 : george 1003 Changed the representation of instructions from being fully abstract
2979 :     to being partially concrete. That is to say:
2980 :    
2981 :     from
2982 :     type instruction
2983 :    
2984 :     to
2985 :     type instr (* machine instruction *)
2986 :    
2987 :     datatype instruction =
2988 :     LIVE of {regs: C.cellset, spilled: C.cellset}
2989 :     | KILL of {regs: C.cellset, spilled: C.cellset}
2990 :     | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
2991 :     | ANNOTATION of {i: instruction, a: Annotations.annotation}
2992 :     | INSTR of instr
2993 :    
2994 :     This makes the handling of certain special instructions that appear on
2995 :     all architectures easier and uniform.
2996 :    
2997 :     LIVE and KILL say that a list of registers are live or killed at the
2998 :     program point where they appear. No spill code is generated when an
2999 :     element of the 'regs' field is spilled, but the register is moved to
3000 :     the 'spilled' (which is present, more for debugging than anything else).
3001 :    
3002 :     LIVE replaces the (now deprecated) DEFFREG instruction on the alpha.
3003 :     We used to generate:
3004 :    
3005 :     DEFFREG f1
3006 :     f1 := f2 + f3
3007 :     trapb
3008 :    
3009 :     but now generate:
3010 :    
3011 :     f1 := f2 + f3
3012 :     trapb
3013 :     LIVE {regs=[f1,f2,f3], spilled=[]}
3014 :    
3015 :     Furthermore, the DEFFREG (hack) required that all floating point instruction
3016 :     use all registers mentioned in the instruction. Therefore f1 := f2 + f3,
3017 :     defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting
3018 :     in a cleaner alpha implementation. (Hopefully, intel will not get rid of
3019 :     this architecture).
3020 :    
3021 :     COPYXXX is intended to replace the parallel COPY and FCOPY available on
3022 :     all the architectures. This will result in further simplification of the
3023 :     register allocator that must be aware of them for coalescing purposes, and
3024 :     will also simplify certain aspects of the machine description that provides
3025 :     callbacks related to parallel copies.
3026 :    
3027 :     ANNOTATION should be obvious, and now INSTR represents the honest to God
3028 :     machine instruction set!
3029 :    
3030 :     The <arch>/instructions/<arch>Instr.sml files define certain utility
3031 :     functions for making porting easier -- essentially converting upper case
3032 :     to lower case. All machine instructions (of type instr) are in upper case,
3033 :     and the lower case form generates an MLRISC instruction. For example on
3034 :     the alpha we have:
3035 :    
3036 :     datatype instr =
3037 :     LDA of {r:cell, b:cell, d:operand}
3038 :     | ...
3039 :    
3040 :     val lda : {r:cell, b:cell, d:operand} -> instruction
3041 :     ...
3042 :    
3043 :     where lda is just (INSTR o LDA), etc.
3044 :    
3045 : leunga 815 ----------------------------------------------------------------------
3046 : blume 986 Name: Matthias Blume
3047 : blume 993 Date: 2001/11/22 21:40:00 EST
3048 :     Tag: Release_110_37
3049 :     Description:
3050 :    
3051 :     Release 110.37. This time for real.
3052 :    
3053 :     ----------------------------------------------------------------------
3054 :     Name: Matthias Blume
3055 : blume 988 Date: 2001/11/21 16:35:00 EST
3056 :     Tag: blume-20011121-foot-in-mouth
3057 :     Description:
3058 :    
3059 :     Removed the "Release_110_37" tag because of a serious bug.
3060 :     This will be re-tagged once the bug is fixed.
3061 :    
3062 :     ----------------------------------------------------------------------
3063 :     Name: Matthias Blume
3064 : blume 987 Date: 2001/11/21 16:14:00 EST
3065 :     Tag: blume-20011121-forgottenfile
3066 :     Description:
3067 :    
3068 :     Forgot to add a file. (Just a .tex-file -- part of
3069 :     the CM manual source.)
3070 :    
3071 :     ----------------------------------------------------------------------
3072 :     Name: Matthias Blume
3073 : blume 986 Date: 2001/11/21 16:10:00 EST
3074 : blume 988 Tag: blume-20011121-invalid_110_37
3075 : blume 986 Description:
3076 :    
3077 : blume 988 Note: I removed the original tag "Release_110_37" from this commit
3078 :     because we found a serious bug in all non-x86 backends.
3079 :     - Matthias
3080 :    
3081 : blume 986 1. Modifications to the SML/NJ code generator and to the runtime system
3082 :     so that code object name strings are directly inserted into code
3083 :     objects at code generation time. The only business the runtime system
3084 :     has with this is now to read the name strings on occasions.
3085 :     (The encoding of the name string has also changed somewhat.)
3086 :    
3087 :     2. CM now implements a simple "set calculus" for specifying export lists.
3088 :     In particular, it is now possible to refer to the export lists of
3089 :     other libraries/groups/sources and form unions as well as differences.
3090 :     See the latest CM manual for details.
3091 :    
3092 :     3. An separate notion of "proxy" libraries has again be eliminated from
3093 :     CM's model. (Proxy libraries are now simply a special case of using
3094 :     the export list calculus.)
3095 :    
3096 :     4. Some of the existing libraries now take advantage of the new set
3097 :     calculus.
3098 :     (Notice that not all libraries have been converted because some
3099 :     of the existing .cm-files are supposed to be backward compatible
3100 :     with 110.0.x.)
3101 :    
3102 :     5. Some cleanup in stand-alone programs. (Don't use "exnMessage" -- use
3103 :     "General.exnMessage"! The former relies on a certain hook to be
3104 :     initialized, and that often does not happen in the stand-alone case.)
3105 :    
3106 :     ----------------------------------------------------------------------
3107 : george 984 Name: Lal George
3108 :     Date: 2001/11/21 13:56:18 EST
3109 :     Tag: george-2001121-pseudo-ops
3110 :     Description:
3111 :    
3112 :     Implemented a complete redesign of MLRISC pseudo-ops. Now there
3113 :     ought to never be any question of incompatabilities with
3114 :     pseudo-op syntax expected by host assemblers.
3115 :    
3116 :     For now, only modules supporting GAS syntax are implemented
3117 :     but more should follow, such as MASM, and vendor assembler
3118 :     syntax, e.g. IBM as, Sun as, etc.
3119 :    
3120 :     ----------------------------------------------------------------------
3121 : blume 977 Name: Matthias Blume
3122 :     Date: 2001/11/14 11:52:00 EST
3123 :     Tag: blume-20011114-srcname
3124 :     Description:
3125 :    
3126 :     1. Routed the name of the current source file to mlriscgen where it
3127 :     should be directly emitted into the code object. (This last part
3128 :     is yet to be done.)
3129 :    
3130 :     2. Some cleanup of the pgraph code to make it match the proposal that
3131 :     I put out the other day. (The proposal notwithstanding, things are
3132 :     still in flux here.)
3133 :    
3134 :     ----------------------------------------------------------------------
3135 : george 976 Name: Lal George
3136 :     Date: 2001/11/14 09:44:04 EST
3137 :     Tag:
3138 :     Description:
3139 :    
3140 :     Fix for a backpatching bug reported by Allen.
3141 :    
3142 :     Because the boundary between short and long span-dependent
3143 :     instructions is +/- 128, there are an astounding number of
3144 :     span-dependent instructions whose size is over estimated.
3145 :    
3146 :     Allen came up with the idea of letting the size of span
3147 :     dependent instructions be non-monotonic, for a maxIter
3148 :     number of times, after which the size must be monotonically
3149 :     increasing.
3150 :    
3151 :     This table shows the number of span-dependent instructions
3152 :     whose size was over-estimated as a function of maxIter, for the
3153 :     file Parse/parse/ml.grm.sml:
3154 :    
3155 :     maxIter # of instructions:
3156 :     10 687
3157 :     20 438
3158 :     30 198
3159 :     40 0
3160 :    
3161 :     In compiling the compiler, there is no significant difference in
3162 :     compilation speed between maxIter=10 and maxIter=40. Actually,
3163 :     my measurements showed that maxIter=40 was a tad faster than
3164 :     maxIter=10! Also 96% of the files in the compiler reach a fix
3165 :     point within 13 iterations, so fixing maxIter at 40, while high,
3166 :     is okay.
3167 :    
3168 :     ----------------------------------------------------------------------
3169 : blume 975 Name: Matthias Blume
3170 :     Date: 2001/10/31 15:25:00 EST
3171 :     Tag: blume-20011031-pgraph
3172 :     Description:
3173 :    
3174 :     CKIT:
3175 :     * Changed the "Function" constructor of type Ast.ctype to carry optional
3176 :     argument identifiers.
3177 :     * Changed the return type of TypeUtil.getFunction accordingly.
3178 :     * Type equality ignores the argument names.
3179 :     * TypeUtil.composite tries to preserve argument names but gives up quickly
3180 :     if there is a mismatch.
3181 :    
3182 :     installation script:
3183 :     * attempts to use "curl" if available (unless "wget" is available as well)
3184 :    
3185 :     CM:
3186 :     * has an experimental implementation of "portable graphs" which I will
3187 :     soon propose as an implementation-independent library format
3188 :     * there are also new libraries $/pgraph.cm and $/pgraph-util.cm
3189 :    
3190 :     NLFFI-LIB:
3191 :     * some cleanup (all cosmetic)
3192 :    
3193 :     NLFFIGEN:
3194 :     * temporarily disabled the mechanism that suppresses ML output for
3195 :     C definitions whose identifiers start with an underscore character
3196 :     * generate val bindings for enum constants
3197 :     * user can request that only one style (light or heavy) is being used;
3198 :     default is to use both (command-line arguments: -heavy and -light)
3199 :     * fixed bug in handling of function types involving incomplete pointers
3200 :     * generate ML entry points that take record arguments (i.e., using
3201 :     named arguments) for C functions that have a prototype with named
3202 :     arguments
3203 :     (see changes to CKIT)
3204 :    
3205 :     ----------------------------------------------------------------------
3206 : leunga 972 Name: Allen Leung
3207 :     Date: 2001/10/27 20:34:00 EDT
3208 :     Tag: leunga-20011027-x86-fast-fp-call
3209 :     Description:
3210 :    
3211 :     Fixed the bug described in blume-20010920-slowfp.
3212 :    
3213 :     The fix involves
3214 :     1. generating FCOPYs in FSTP in ia32-svid
3215 :     2. marking a CALL with the appropriate annotation
3216 :    
3217 :     ----------------------------------------------------------------------
3218 : blume 961 Name: Matthias Blume
3219 :     Date: 2001/10/16 11:32:00 EDT
3220 :     Tag: blume-20011016-netbsd
3221 :     Description:
3222 :    
3223 :     Underscore patch from Chris Richards (fixing problem with compiling
3224 :     runtime system under recent NetBSD).
3225 :    
3226 :     ----------------------------------------------------------------------
3227 : george 959 Name: Allen Leung
3228 :     Date: 2001/10/12 17:18:32 EDT 2001
3229 :     Tag: leung-20011012-x86-printflowgraph
3230 :     Description:
3231 :    
3232 :     X86RA now uses a valid (instead of dummy) PrintFlowgraph module.
3233 :    
3234 :     ----------------------------------------------------------------------
3235 : george 952 Name: Lal George
3236 : george 958 Date: 2001/10/11 23:51:34 EDT
3237 :     Tag: george-20011011-too-many-instrs
3238 :     Description:
3239 :    
3240 :     The representation of a program point never expected to see more
3241 :     than 65536 instructions in a basic block!
3242 :    
3243 :     ----------------------------------------------------------------------
3244 :     Name: Lal George
3245 : george 952 Date: 2001/10/09 09:41:37 EDT
3246 :     Tag: george-20011008-mlrisc-labels
3247 :     Description:
3248 :    
3249 :     Changed the machine description files to support printing of
3250 :     local and global labels in assembly code, based on host assembler
3251 :     conventions.
3252 :    
3253 :     ----------------------------------------------------------------------
3254 : blume 916 Name: Matthias Blume
3255 : blume 939 Date: 2001/09/25 15:25:00 EDT
3256 :     Tag: blume-20010925-exninfo
3257 :     Description:
3258 :    
3259 :     I provided a non-hook implementation of exnName (at the toplevel) and
3260 :     made the "dummy" implementation of exnMessage (at the toplevel) more
3261 :     useful: if nothing gets "hooked in", then at least you are going to
3262 :     see the exception name and a message indicating why you don't see more.
3263 :    
3264 :     [For the time being, programs that need exnMessage and want to use
3265 :     ml-build should either use General.exnMessage (strongly recommended) or
3266 :     refer to structure General at some other point so that CM sees a
3267 :     static dependency.]
3268 :    
3269 :     [Similar remarks go for "print" and "use": If you want to use their
3270 :     functionality in stand-alone programs generated by ml-build, then use
3271 :     TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).]
3272 :    
3273 :     ----------------------------------------------------------------------
3274 :     Name: Matthias Blume
3275 : blume 938 Date: 2001/09/20 17:28:00 EDT
3276 :     Tag: blume-20010920-slowfp
3277 :     Description:
3278 :    
3279 :     Allen says that x86-fast-fp is not safe yet, so I turned it off again...
3280 :    
3281 :     ----------------------------------------------------------------------
3282 :     Name: Matthias Blume
3283 : blume 937 Date: 2001/09/20 17:20:00 EDT
3284 :     Tag: blume-20010920-canonicalpaths
3285 :     Description:
3286 :    
3287 :     0. Updated the BOOT file (something that I forgot to do earlier).
3288 :    
3289 :     1. Small internal change to CM so that it avoids "/../" in filenames
3290 :     as much as possible (but only where it is safe).
3291 :    
3292 :     2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so
3293 :     that arguments that contain delimiters are passed through correctly.
3294 :     This change also means that all "special" arguments of the form
3295 :     @SMLxxx... must come first.
3296 :    
3297 :     3. Changed install script to put relative anchor names for tool commands
3298 :     into pathconfig.
3299 :    
3300 :     ----------------------------------------------------------------------
3301 :     Name: Matthias Blume
3302 : blume 932 Date: 2001/09/18 15:35:00 EDT
3303 :     Tag: blume-20010918-readme11036
3304 :     Description:
3305 :    
3306 :     Added README files.
3307 :    
3308 :     ----------------------------------------------------------------------
3309 :     Name: Matthias Blume
3310 : blume 929 Date: 2001/09/18 11:45:00 EDT
3311 :     Tag: Release_110_36 (retag)
3312 :     Description:
3313 :    
3314 :     Fixed mistake in config/preloads. Retagged as 110.36.
3315 :    
3316 :     ----------------------------------------------------------------------
3317 :     Name: Matthias Blume
3318 : blume 928 Date: 2001/09/18 09:40:00 EDT
3319 : blume 929 Tag: Release_110_36_orig (tag changed)
3320 : blume 928 Description:
3321 :    
3322 :     New version (110.36). New bootfiles.
3323 :    
3324 :     ----------------------------------------------------------------------
3325 :     Name: Matthias Blume
3326 : blume 927 Date: 2001/09/14 16:15:00 EDT
3327 :     Tag: blume-20010914-x86fastfp
3328 :     Description:
3329 :    
3330 :     John committed some changes that Allen made, in particular a (hopefully)
3331 :     correctly working version of the x86-fp module.
3332 :    
3333 :     I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp"
3334 :     flag to "true". Everything seems to compile to a fixpoint ok, and
3335 :     "mandelbrot" speeds up by about 15%.
3336 :    
3337 :     ----------------------------------------------------------------------
3338 :     Name: Matthias Blume
3339 : blume 923 Date: 2001/09/13 11:20:00 EDT
3340 :     Tag: blume-20010913-minimal
3341 :     Description:
3342 :    
3343 :     1. Stefan Monnier's patch to fix a miscompilation problem that
3344 :     was brought to light by John Reppy's work on Moby.
3345 :    
3346 :     2. Implemented a minimal "structure Compiler" that contains just
3347 :     "version" and "architecture". The minimal version will be
3348 :     available when the full version is not. This is for backward-
3349 :     compatibility with code that wants to test Compiler.version.
3350 :    
3351 :     ----------------------------------------------------------------------
3352 :     Name: Matthias Blume
3353 : blume 920 Date: 2001/08/28 14:03:00 EDT
3354 :     Tag: blume-20010828-ml-lex
3355 :     Description:
3356 :    
3357 :     Fix for bug 1581, received from Neophytos Michael.
3358 :    
3359 :     ----------------------------------------------------------------------
3360 :     Name: Matthias Blume
3361 : blume 918 Date: 2001/08/27 11:20:00 EDT
3362 :     Tag: blume-20010827-readme11035
3363 :     Description:
3364 :    
3365 :     Fleshed out the README file for 110.35.
3366 :    
3367 :     ----------------------------------------------------------------------
3368 :     Name: Matthias Blume
3369 : blume 916 Date: 2001/08/24 17:10:00 EDT
3370 :     Tag: Release_110_35
3371 :     Description:
3372 :    
3373 :     New version number (110.35). New bootfiles.
3374 :    
3375 :     ----------------------------------------------------------------------
3376 : george 915 Name: Lal George
3377 : george 909 Date: 2001/08/24 13:47:18 EDT 2001
3378 :     Tag: george-20010824-MLRISC-graphs
3379 :     Description:
3380 :    
3381 :     removed clusters from MLRISC completely and replaced with graphs.
3382 :    
3383 :     ----------------------------------------------------------------------
3384 :     Name: Matthias Blume
3385 : blume 905 Date: 2001/08/23 17:50:00 EDT
3386 :     Tag: blume-20010823-toplevel
3387 :     Description:
3388 :    
3389 :     - some reorganization of the code that implements various kinds of
3390 :     environments in the compiler (static, dynamic, symbolic, combined)
3391 :     - re-implemented the EnvRef module so that evalStream works properly
3392 :     (if the stream contains references to "use", "CM.make", etc.)
3393 :     - cleaned up evalloop.sml and interact.sml (but they need more cleaning)
3394 :    
3395 :     ----------------------------------------------------------------------
3396 :     Name: Matthias Blume
3397 : blume 904 Date: 2001/08/20 15:50 EDT
3398 :     Tag: blume20010820-slipup
3399 :     Description:
3400 :    
3401 :     I forgot to commit a few files. Here they are...
3402 :    
3403 :     ----------------------------------------------------------------------
3404 :     Name: Matthias Blume
3405 : blume 903 Date: 2001/08/20 15:35:00 EDT
3406 :     Tag: blume-20010820-debugprof
3407 :     Description:
3408 :    
3409 :     !!!! NEW BOOTFILES !!!!
3410 :    
3411 :     This is another round of reorganizing the compiler sources. This
3412 :     time the main goal was to factor out all the "instrumentation"
3413 :     passes (for profiling and backtracing) into their own library.
3414 :     The difficulty was to do it in such a way that it does not depend
3415 :     on elaborate.cm but only on elabdata.cm.
3416 :    
3417 :     Therefore there have been further changes to both elaborate.cm and
3418 :     elabdata.cm -- more "generic" things have been moved from the former
3419 :     to the latter. As a result, I was forced to split the assignment
3420 :     of numbers indicating "primtyc"s into two portions: SML-generic and
3421 :     SML/NJ-specific. Since it would have been awkward to maintain,
3422 :     I bit the bullet and actually _changed_ the mapping between these
3423 :     numbers and primtycs. The bottom line of this is that you need
3424 :     a new set of bin- and bootfiles.
3425 :    
3426 :     I have built new bootfiles for all architectures, so doing a fresh
3427 :     checkout and config/install.sh should be all you need.
3428 :    
3429 :     The newly created library's name is
3430 :    
3431 :     $smlnj/viscomp/debugprof.cm
3432 :    
3433 :     and its sources live under
3434 :    
3435 :     src/compiler/DebugProf
3436 :    
3437 :     ----------------------------------------------------------------------
3438 :     Name: Matthias Blume
3439 : blume 902 Date: 2001/08/15 17:15:00 EDT
3440 :     Tag: blume-20010815-compreorg
3441 :     Description:
3442 :    
3443 :     This is a first cut at reorganizing the CM libraries that make up the
3444 :     core of the compiler. The idea is to separate out pieces that could
3445 :     be used independently by tools, e.g., the parser, the typechecker, etc.
3446 :    
3447 :     The current status is a step in this direction, but it is not quite
3448 :     satisfactory yet. Expect more changes in the future.
3449 :    
3450 :     Here is the current (new) organization...
3451 :    
3452 :     What used to be $smlnj/viscomp/core.cm is now divided into
3453 :     six CM libraries:
3454 :    
3455 :     $smlnj/viscomp/basics.cm
3456 :     /parser.cm
3457 :     /elabdata.cm
3458 :     /elaborate.cm
3459 :     /execute.cm
3460 :     /core.cm
3461 :    
3462 :     The CM files for these libraries live under src/system/smlnj/viscomp.
3463 :     All these libraries are proxy libraries that contain precisely
3464 :     one CM library component. Here are the locations of the components
3465 :     (all within the src/compiler tree):
3466 :    
3467 :     Basics/basics.cm
3468 :     Parse/parser.cm
3469 :     ElabData/elabdata.cm
3470 :     Elaborator/elaborate.cm
3471 :     Execution/execute.cm
3472 :     core.cm
3473 :    
3474 :     [This organization is the same that has been used already
3475 :     for a while for the architecture-specific parts of the visible
3476 :     compiler and for the old version of core.cm.]
3477 :    
3478 :     As you will notice, many source files have been moved from their
3479 :     respective original locations to a new home in one of the above
3480 :     subtrees.
3481 :    
3482 :     The division of labor between the new libraries is the following:
3483 :    
3484 :     basics.cm:
3485 :     - Simple, basic definitions that pertain to many (or all) of
3486 :     the other libraries.
3487 :     parser.cm:
3488 :     - The SML parser, producing output of type Ast.dec.
3489 :     - The type family for Ast is also defined and exported here.
3490 :     elabdata.cm:
3491 :     - The datatypes that describe input and output of the elaborator.
3492 :     This includes types, absyn, and static environments.
3493 :     elaborator.cm:
3494 :     - The SML/NJ type checker and elaborator.
3495 :     This maps an Ast.dec (with a given static environment) to
3496 :     an Absyn.dec (with a new static environment).
3497 :     - This libraries implements certain modules that used to be
3498 :     structures as functors (to remove dependencies on FLINT).
3499 :     execute.cm:
3500 :     - Everything having to do with executing binary code objects.
3501 :     - Dynamic environments.
3502 :     core.cm:
3503 :     - SML/NJ-specific instantiations of the elaborator and MLRISC.
3504 :     - Top-level modules.
3505 :     - FLINT (this should eventually become its own library)
3506 :    
3507 :     Notes:
3508 :    
3509 :     I am not 100% happy with the way I separated the elaborator (and its
3510 :     data structures) from FLINT. Two instances of the same problem:
3511 :    
3512 :     1. Data structures contain certain fields that carry FLINT-specific
3513 :     information. I hacked around this using exn and the property list
3514 :     module from smlnj-lib. But the fact that there are middle-end
3515 :     specific fields around at all is a bit annoying.
3516 :    
3517 :     2. The elaborator calculates certain FLINT-related information. I tried
3518 :     to make this as abstract as I could using functorization, but, again,
3519 :     the fact that the elaborator has to perform calculations on behalf
3520 :     of the middle-end at all is not nice.
3521 :    
3522 :     3. Having to used exn and property lists is unfortunate because it
3523 :     weakens type checking. The other alternative (parameterizing
3524 :     nearly *everything*) is not appealing, though.
3525 :    
3526 :     I removed the "rebinding =" warning hack because due to the new organization
3527 :     it was awkward to maintain it. As a result, the compiler now issues some of
3528 :     these warnings when compiling init.cmi during bootstrap compilation. On
3529 :     the plus side, you also get a warning when you do, for example:
3530 :     val op = = Int32.+
3531 :     which was not the case up to now.
3532 :    
3533 :     I placed "assign" and "deref" into the _Core structure so that the
3534 :     code that deals with the "lazy" keyword can find them there. This
3535 :     removes the need for having access to the primitive environment
3536 :     during elaboration.
3537 :    
3538 :     ----------------------------------------------------------------------
3539 :     Name: Matthias Blume
3540 : blume 898 Date: 2001/08/13
3541 :     Tag: blume-20010813-closures
3542 :     Description:
3543 :    
3544 :     This fix was sent to us by Zhong Shao. It is supposed to improve the
3545 :     performance of certain loops by avoiding needless closure allocation.
3546 :    
3547 :     ----------------------------------------------------------------------
3548 : george 890 Name: Lal George
3549 : george 896 Date: 2001/07/31 10:03:23 EDT 2001
3550 :     Tag: george-20010731-x86-fmalloc
3551 :     Description: Fixed bug in x86 calls
3552 :    
3553 :     There was a bug where call instructions would mysteriously
3554 :     vanish. The call instruction had to be one that returned
3555 :     a floating point value.
3556 :    
3557 :     ----------------------------------------------------------------------
3558 :     Name: Lal George
3559 : george 890 Date: 2001/07/19 16:36:29 EDT 2001
3560 :     Tag: george-20010719-simple-cells
3561 :     Description:
3562 :    
3563 :     I have dramatically simplified the interface for CELLS in MLRISC.
3564 :    
3565 :     In summary, the cells interface is broken up into three parts:
3566 :    
3567 :     1. CellsBasis : CELLS_BASIS
3568 :    
3569 :     CellsBasis is a top level structure and common for all
3570 :     architectures. it contains the definitions of basic datatypes
3571 :     and utility functions over these types.
3572 :    
3573 :     2. functor Cells() : CELLS
3574 :    
3575 :     Cells generates an interface for CELLS that incorporates the
3576 :     specific resources on the target architecture, such as the
3577 :     presence of special register classes, their number and size,
3578 :     and various useful substructures.
3579 :    
3580 :     3. <ARCH>CELLS
3581 :    
3582 :     e.g. SparcCells: SPARCCELLS
3583 :    
3584 :     <ARCH>CELLS usually contains additional bindings for special
3585 :     registers on the architecture, such as:
3586 :    
3587 :     val r0 : cell (* register zero *)
3588 :     val y : cell (* Y register *)
3589 :     val psr : cell (* processor status register *)
3590 :     ...
3591 :    
3592 :     The structure returned by applying the Cells functor is opened
3593 :     in this interface.
3594 :    
3595 :     The main implication of all this is that the datatypes for cells is
3596 :     split between CellsBasis and CELLS -- a fairly simple change for user
3597 :     code.
3598 :    
3599 :     In the old scheme the CELLS interface had a definitional binding of
3600 :     the form:
3601 :    
3602 :     signature CELLS = sig
3603 :    
3604 :     structure CellsBasis = CellsBasis
3605 :    
3606 :     ...
3607 :    
3608 :     end
3609 :    
3610 :     With all the sharing constraints that goes on in MLRISC, this old
3611 :     design quickly leads to errors such as:
3612 :    
3613 :     "structure definition spec inside of sharing ... "
3614 :    
3615 :    
3616 :     and appears to require an unacceptable amount of sharing and where
3617 :     constraint hackery.
3618 :    
3619 :     I think this error message (the interaction of definitional specs and
3620 :     sharing) requires more explanation on our web page.
3621 :    
3622 :     ----------------------------------------------------------------------
3623 : blume 826 Name: Matthias Blume
3624 : blume 879 Date: 2001/07/19 15:00:00 EDT
3625 :     Tag: blume-20010719-libreorg
3626 :     Description:
3627 :    
3628 :     This update puts together a fairly extensive but straightforward change
3629 :     to the way the libraries that implement the interactive system are
3630 :     organized:
3631 :    
3632 :     The biggest change is the elimination of structure Compiler. As a
3633 :     replacement for this structure, there is now a CM library
3634 :     (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm)
3635 :     that exports all the substructures of the original structure Compiler
3636 :     directly. So instead of saying Compiler.Foo.bar one now simply
3637 :     says Foo.bar. (The CM libraries actually export a collection of
3638 :     structures that is richer than the collection of substructures of
3639 :     structure Compiler.)
3640 :    
3641 :     To make the transition smooth, there is a separate library called
3642 :     $smlnj/compiler/compiler.cm which puts together and exports the
3643 :     original structure Compiler (or at least something very close to it).
3644 :    
3645 :     There are five members of the original structure Compiler
3646 :     that are not exported directly but which instead became members
3647 :     of a new structure Backend (described by signature BACKEND). These are:
3648 :     structure Profile (: PROFILE), structure Compile (: COMPILE), structure
3649 :     Interact (: INTERACT), structure Machine (: MACHINE), and val
3650 :     architecture (: string).
3651 :    
3652 :     Structure Compiler.Version has become structure CompilerVersion.
3653 :    
3654 :     Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided
3655 :     by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc,
3656 :     or x86, respectively.
3657 :     Each of these exports the same frontend structures that
3658 :     $smlnj/compiler.cm exports. But they do not have a structure Backend
3659 :     and instead export some structure <Arch>Backend where <Arch> is Alpha32,
3660 :     Hppa, PPC, Sparc, or X86, respectively.
3661 :    
3662 :     Library $smlnj/compiler/all.cm exports the union of the exports of
3663 :     $smlnj/compiler/<arch>.cm
3664 :    
3665 :     There are no structures <Arch>Compiler anymore, use
3666 :     $smlnj/compiler/<arch>.cm instead.
3667 :    
3668 :     Library host-compiler-0.cm is gone. Instead, the internal library
3669 :     that instantiates CM is now called cm0.cm. Selection of the host
3670 :     compiler (backend) is no longer done here but. (Responsibility for it
3671 :     now lies with $smlnj/compiler/current.cm. This seems to be more
3672 :     logical.)
3673 :    
3674 :     Many individual files have been moved or renamed. Some files have
3675 :     been split into multiple files, and some "dead" files have been deleted.
3676 :    
3677 :     Aside from these changes to library organization, there are also changes
3678 :     to the way the code itself is organized:
3679 :    
3680 :     Structure Binfile has been re-implemented in such a way that it no
3681 :     longer needs any knowledge of the compiler. It exclusively deals
3682 :     with the details of binfile layout. It no longer invokes the
3683 :     compiler (for the purpose of creating new prospective binfile
3684 :     content), and it no longer has any knowledge of how to interpret
3685 :     pickles.
3686 :    
3687 :     Structure Compile (: COMPILE) has been stripped down to the bare
3688 :     essentials of compilation. It no longer deals with linking/execution.
3689 :     The interface has been cleaned up considerably.
3690 :    
3691 :     Utility routines for dealing with linking and execution have been
3692 :     moved into their own substructures.
3693 :    
3694 :     (The ultimate goal of these changes is to provide a light-weight
3695 :     binfile loader/linker (at least for, e.g., stable libraries) that
3696 :     does not require CM or the compiler to be present.)
3697 :    
3698 :     CM documentation has been updated to reflect the changes to library
3699 :     organization.
3700 :    
3701 :     ----------------------------------------------------------------------
3702 :     Name: Matthias Blume
3703 : blume 875 Date: 2001/07/10 17:30:00 EDT
3704 :     Tag: Release_110_34
3705 :     Description:
3706 :    
3707 : blume 876 Minor tweak to 110.34 (re-tagged):
3708 :    
3709 :     - README.html file added to CVS repository
3710 :     - runtime compiles properly under FreeBSD 3.X and 4.X
3711 :    
3712 :     ----------------------------------------------------------------------
3713 :     Name: Matthias Blume
3714 :     Date: 2001/07/10 17:30:00 EDT
3715 :     Tag: Release_110_34
3716 :     Description:
3717 :    
3718 : blume 875 New version number (110.34). New bootfiles.
3719 :    
3720 :     ----------------------------------------------------------------------
3721 :     Name: Matthias Blume
3722 : blume 874 Date: 2001/07/09 16:00:00 EDT
3723 :     Tag: blume-20010709-more-varargs
3724 :     Description:
3725 :    
3726 :     I changed the handling of varargs in ml-nlffigen again:
3727 :     The ellipsis ... will now simply be ignored (with an accompanying warning).
3728 :    
3729 :     The immediate effect is that you can actually call a varargs function
3730 :     from ML -- but you can't actually supply any arguments beyond the ones
3731 :     specified explicitly. (For example, you can call printf with its format
3732 :     string, but you cannot pass additional arguments.)
3733 :    
3734 :     This behavior is only marginally more useful than the one before, but
3735 :     it has the advantage that a function or, more importantly, a function
3736 :     type never gets dropped on the floor, thus avoiding follow-up problems with
3737 :     other types that refer to the offending one.
3738 :    
3739 :     ----------------------------------------------------------------------
3740 :     Name: Matthias Blume
3741 : blume 873 Date: 2001/07/09 11:25:00 EDT
3742 :     Tag: blume-20010709-varargs
3743 :     Description:
3744 :    
3745 :     1. ckit-lib.cm now exports structure Error
3746 :     2. ml-nlffigen reports occurences of "..." (i.e., varargs function types)
3747 :     with a warning accompanied by a source location. Moreover, it
3748 :     merely skips the offending function or type and proceeds with the
3749 :     rest of its work.u As a result, one can safely feed C code containing
3750 :     "..." to ml-nlffigen.
3751 :     3. There are some internal improvements to CM, providing slightly
3752 :     more general string substitutions in the tools subsystem.
3753 :    
3754 :     ----------------------------------------------------------------------
3755 :     Name: Matthias Blume
3756 : blume 854 Date: 2001/06/27 15:10:00 EDT
3757 :     Tag: blume-20010627-concur
3758 :     Description:
3759 :    
3760 :     Fixed a small bug in CM's handling of parallel compilation.
3761 :     (You could observe the bug by Control-C-interrupting an ordinary
3762 :     CMB.make or CM.stabilize and then attaching some compile servers.
3763 :     The result was that all of a sudden the previously interrupted
3764 :     compilation would continue on its own. This was because of
3765 :     an over-optimization: CM did not bother to clean out certain queues
3766 :     when no servers were attached "anyway", resulting in the contents
3767 :     of these queues to grab control when new servers did get attached.)
3768 :    
3769 :     There is also another minor update to the CM manual.
3770 :    
3771 :     ----------------------------------------------------------------------
3772 :     Name: Matthias Blume
3773 : blume 853 Date: 2001/06/26 16:15:00 EDT
3774 :     Tag: blume-20010626-cmdoc
3775 :     Description:
3776 :    
3777 :     Minor typo fixed in CM manual (syntax diagram for libraries).
3778 :    
3779 :     ----------------------------------------------------------------------
3780 :     Name: Matthias Blume
3781 : blume 852 Date: 2001/06/25 22:55:00 EDT
3782 :     Tag: blume-20010625-x86pc
3783 :     Description:
3784 :    
3785 :     Fixed a nasty bug in the X86 assembly code that caused signal
3786 :     handlers to fail (crash) randomly.
3787 :    
3788 :     ----------------------------------------------------------------------
3789 :     Name: Matthias Blume
3790 : blume 846 Date: 2001/06/25 12:05:00 EDT
3791 :     Tag: blume-20010625-nlffigen
3792 :     Description:
3793 :    
3794 :     This update fixes a number of minor bugs in ml-nlffigen as reported by
3795 :     Nick Carter <nbc@andrew.cmu.edu>.
3796 :    
3797 :     1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted.
3798 :     2. Default names for generated files are now derived from the name of
3799 :     the C file *without its directory*. In particular, this causes generated
3800 :     files to be placed locally even if the C file is in some system directory.
3801 :     3. Default names for generated signatures and structures are also derived
3802 :     from the C file name without its directory. This avoids silly things
3803 :     like "structure GL/GL".
3804 :     (Other silly names are still possible because ml-nlffigen does not do
3805 : blume 847 a thorough check of whether generated names are legal ML identifiers.
3806 :     When in doubt, use command line arguments to force particular names.)
3807 : blume 846
3808 :     ----------------------------------------------------------------------
3809 :     Name: Matthias Blume
3810 : blume 845 Date: 2001/06/21 12:25:00 EDT
3811 :     Tag: blume-20010621-eXene
3812 :     Description:
3813 :    
3814 :     eXene now compiles and (sort of) works again.
3815 :    
3816 :     The library name (for version > 110.33) is $/eXene.cm.
3817 :    
3818 :     I also added an new example in src/eXene/examples/nbody. See the
3819 :     README file there for details.
3820 :    
3821 :     ----------------------------------------------------------------------
3822 :     Name: Matthias Blume
3823 : blume 844 Date: 2001/06/20 16:40:00 EDT
3824 :     Tag: blume-20010620-cml
3825 :     Description:
3826 :    
3827 :     CML now compiles and works again.
3828 :    
3829 :     Libraries (for version > 110.33):
3830 :    
3831 :     $cml/cml.cm Main CML library.
3832 :     $cml/basis.cm CML's version of $/basis.cm.
3833 :     $cml/cml-internal.cm Internal helper library.
3834 :     $cml/core-cml.cm Internal helper library.
3835 :     $cml-lib/trace-cml.cm Tracing facility.
3836 :     $cml-lib/smlnj-lib.cm CML's version of $/smlnj-lib.cm
3837 :    
3838 :     The installer (config/install.sh) has been taught how to properly
3839 :     install this stuff.
3840 :    
3841 :     ----------------------------------------------------------------------
3842 :     Name: Matthias Blume
3843 : blume 843 Date: 2001/06/19 17:55:00 EDT
3844 :     Tag: blume-20010619-instantiate
3845 :     Description:
3846 :    
3847 :     This un-breaks the fix for bug 1432.
3848 :     (The bug was originally fixed in 110.9 but I broke it again some
3849 :     time after that.)
3850 :    
3851 :     ----------------------------------------------------------------------
3852 :     Name: Matthias Blume
3853 : blume 842 Date: 2001/06/19 17:25:00 EDT
3854 :     Tag: blume-20010619-signals
3855 :     Description:
3856 :    
3857 :     This should (hopefully) fix the long-standing signal handling bug.
3858 :     (The runtime system was constructing a continuation record with an
3859 :     incorrect descriptor which would cause the GC to drop data on the floor...)
3860 :    
3861 :     ----------------------------------------------------------------------
3862 :     Name: Matthias Blume
3863 : blume 840 Date: 2001/06/15 15:05:00 EDT
3864 : blume 841 Tag: blume-20010615-moresparc
3865 :     Description:
3866 :    
3867 :     Here is a short late-hour update related to Sparc c-calls:
3868 :    
3869 :     -- made handling of double-word arguments a bit smarter
3870 :    
3871 :     -- instruction selection phase tries to collapse certain clumsily
3872 :     constructed ML-Trees; typical example:
3873 :    
3874 :     ADD(ty,ADD(_,e,LI d1),LI d2) -> ADD(ty,e,LI(d1+d2))
3875 :    
3876 :     This currently has no further impact on SML/NJ since mlriscGen does
3877 :     not seem to generate such patterns in the first place, and c-calls
3878 :     (which did generate them in the beginning) has meanwhile been fixed
3879 :     so as to avoid them as well.
3880 :    
3881 :     ----------------------------------------------------------------------
3882 :     Name: Matthias Blume
3883 :     Date: 2001/06/15 15:05:00 EDT
3884 : blume 840 Tag: blume-20010615-sparc
3885 :     Description:
3886 :    
3887 :     The purpose of this update is to provide an implementation of NLFFI
3888 :     on Sparc machines.
3889 :    
3890 :     Here are the changes in detail:
3891 :    
3892 :     * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing
3893 :     the Sparc implementation of the c-calls API.
3894 :     * The Sparc backend of SML/NJ has been modified to uniformely use %fp
3895 :     for accessing the ML frame. Thus, we have a real frame pointer and
3896 :     can freely modify %sp without need for an omit-frame-ptr phase.
3897 :     The vfp logic in src/compiler/CodeGen/* has been changed to accomodate
3898 :     this case.
3899 :     * ml-nlffigen has been taught to produce code for different architectures
3900 :     and calling conventions.
3901 :     * In a way similar to what was done in the x86 case, the Sparc
3902 :     backend uses its own specific extension to mltree. (For example,
3903 :     it needs to be able to generate UNIMP instructions which are part
3904 :     of the calling convention.)
3905 :     * ml-nlffi-lib was reorganized to make it more modular (in particular,
3906 :     to make it easier to plug in new machine- and os-dependent parts).
3907 :    
3908 :     There are some other fairly unrelated bug fixes and cleanups as well:
3909 :    
3910 :     * I further hacked the .cm files for MLRISC tools (like MDLGen) so
3911 :     that they properly share their libraries with existing SML/NJ libraries.
3912 :     * I fixed a minor cosmetic bug in CM, supressing certain spurious
3913 :     follow-up error messages.
3914 :     * Updates to CM/CMB documentation.
3915 :    
3916 :     TODO items:
3917 :    
3918 :     * MLRISC should use a different register as its asmTemp on the Sparc.
3919 :     (The current %o2 is a really bad choice because it is part of the
3920 :     calling conventions, so things might interfere in unexpected ways.)
3921 :    
3922 :     ----------------------------------------------------------------------
3923 :     Name: Matthias Blume
3924 : blume 839 Date: 2001/06/07
3925 :     Tag: blume-20010607-calls
3926 :     Description:
3927 :    
3928 :     A number of internal changes related to C calls and calling conventions:
3929 :    
3930 :     1. ML-Tree CALL statements now carry a "pops" field. It indicates the
3931 :     number of bytes popped implicitly (by the callee). In most cases
3932 :     this field is 0 but on x86/win32 it is some non-zero value. This
3933 :     is information provided for the benefit of the "omit-frameptr" pass.
3934 :     2. The CALL instruction on the x86 carries a similar "pops" field.
3935 :     The instruction selection phase copies its value from the ML-Tree
3936 :     CALL statement.
3937 :     3. On all other architectures, the instruction selection phase checks
3938 :     whether "pops=0" and complains if not.
3939 :     4. The c-calls implementation for x86 now accepts two calling conventions:
3940 :     "ccall" and "stdcall". When "ccall" is selected, the caller cleans
3941 :     up after the call and pops is set to 0. For "stdcall", the caller
3942 :     does nothing, leaving the cleanup to the callee; pops is set to
3943 :     the number of bytes that were pushed onto the stack.
3944 :     5. The cproto decoder (compiler/Semant/types/cproto.sml) now can
3945 :     distinguish between "ccall" and "stdcall".
3946 :     6. The UNIMP instruction has been added to the supported Sparc instruction
3947 :     set. (This is needed for implementing the official C calling convention
3948 :     on this architecture.)
3949 :     7. I fixed some of the .cm files under src/MLRISC/Tools to make them
3950 :     work with the latest CM.
3951 :    
3952 :     ----------------------------------------------------------------------
3953 :     Name: Matthias Blume
3954 : blume 838 Date: 2001/06/05 15:10:00 EDT
3955 :     Tag: blume-20010605-cm-index
3956 :     Description:
3957 :    
3958 :     0. The "lambdasplit" parameter for class "sml" in CM has been documented.
3959 :    
3960 :     1. CM can now generate "index files". These are human-readable files
3961 :     that list on a per-.cm-file basis each toplevel symbol defined or
3962 :     imported. The location of the index file for
3963 :     <p>/<d>.cm is <p>/CM/INDEX/<d>.cm.
3964 :     To enable index-file generation, set CM.Control.generate_index to true
3965 :     or export an environment-symbol: export CM_GENERATE_INDEX=true.
3966 :    
3967 :     The CM manual has been updated accordingly.
3968 :    
3969 :     2. I made some slight modifications to the c-calls API in MLRISC.
3970 :    
3971 :     a) There is now a callback to support saving/restoring of
3972 :     dedicated but caller-save registers around the actual call
3973 :     instruction.
3974 :     b) One can optionally specify a comment-annotation for the
3975 :     call instruction.
3976 :    
3977 :     3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop.
3978 :     (For example, the comment annotation shows the C prototype of
3979 :     the function being called.)
3980 :    
3981 :     ----------------------------------------------------------------------
3982 :     Name: Matthias Blume
3983 : blume 837 Date: 2001/06/01 13:30:00 EDT
3984 :     Tag: blume-20010601-nlffi-cleanup
3985 :     Description:
3986 :    
3987 :     This is mostly a cleanup of MLFFI stuff:
3988 :    
3989 :     - some signature files have been put into a more exposed place
3990 :     - the ugly 'f type parameter is gone (simplifies types tremendously!)
3991 :     - ml-nlffigen changed accordingly
3992 :     - tutorial updated
3993 :    
3994 :     Other changes:
3995 :    
3996 :     - author's affiliation in CM manual(s) updated
3997 :     - some more recognized keywords added to Allen's sml.sty
3998 :    
3999 :     ----------------------------------------------------------------------
4000 :     Name: Matthias Blume
4001 : blume 836 Date: 2001/05/25 15:30:00 EDT
4002 :     Tag: blume-20010525-iptr
4003 :     Description:
4004 :    
4005 :     - put the official 110.33-README (as it appears on the ftp server) under
4006 :     CVS
4007 :     - fixed a small bug related to incomplete pointer types in
4008 :     ml-nlffigen
4009 :     - small cosmetic change to the ml-nlffi-lib's "arr" type constructor
4010 :     (it does not need the 'f type parameter)
4011 :    
4012 :     ----------------------------------------------------------------------
4013 :     Name: Matthias Blume
4014 : blume 834 Date: 2001/05/23 14:30:00 EDT
4015 :     Tag: Release_110_33
4016 :     Description:
4017 :    
4018 :     New version number (110.33). New bootfiles.
4019 :    
4020 :     ----------------------------------------------------------------------
4021 :     Name: Matthias Blume
4022 : blume 833 Date: 2001/05/22 18:06:00 EDT
4023 :     Tag: blume-20010522-targets
4024 :     Description:
4025 :    
4026 :     Made install.sh use file config/targets.customized if it exists, falling
4027 :     back to config/targets if it doesn't. This way one can have a customized
4028 :     version of the targets file without touching the "real thing", thus
4029 :     eliminating the constant fear of accidentally checking something bogus
4030 :     back into the CVS repository... (File config/targets.customized must
4031 :     not be added to the repository!)
4032 :    
4033 :     ----------------------------------------------------------------------
4034 :     Name: Matthias Blume
4035 : blume 832 Date: 2001/05/22 16:30:00 EDT
4036 :     Tag: blume-20010522-minitut
4037 :     Description:
4038 :    
4039 :     1. Bug fix in ml-nlffigen; now (hopefully) correctly handling
4040 :     struct returns.
4041 :     2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt. This is some very
4042 :     incomplete, preliminary documentation for NLFFI.
4043 :    
4044 :     ----------------------------------------------------------------------
4045 :     Name: Matthias Blume
4046 : blume 829 Date: 2001/05/14 11:30:00 EDT
4047 :     Tag: blume-20010514-script
4048 :     Description:
4049 :    
4050 :     Some bugs in install script fixed.
4051 :    
4052 :     In addition to that I also made a slight change to the NLFFI API:
4053 :     Functors generated by ml-nlffigen now take the dynamic library as a
4054 :     straight functor argument, not as a suspended one. (The original
4055 :     functor code used to force the suspension right away anyway, so there
4056 :     was nothing gained by this complication of the interface.)
4057 :    
4058 :     ----------------------------------------------------------------------
4059 :     Name: Matthias Blume
4060 : blume 828 Date: 2001/05/11 14:35:00 EDT
4061 :     Tag: blume-20010511-ml-nlffi
4062 :     Description:
4063 :    
4064 :     I finally took the plunge and added my new FFI code to the main
4065 :     repository. For x86-linux it is now ready for prime-time.
4066 :    
4067 :     There are two new subdirectories of "src":
4068 :    
4069 :     - ml-nlffi-lib:
4070 :     The utility library for programs using the FFI interface.
4071 :     Here is the implementation of $/c.cm and its associated low-level
4072 :     partners $/c-int.cm and $/memory.cm.
4073 :     - ml-nlffigen:
4074 :     A stand-alone program for generating ML glue code from C source
4075 :     code.
4076 :    
4077 :     Building ml-nlffigen requires $/ckit-lib.cm.
4078 :    
4079 :     The config/install.sh script has been updates to do the Right Thing
4080 :     (hopefully).
4081 :    
4082 :     Notice that the source tree for the C-Kit will not be put under "src"
4083 :     but directly under the installation root directory. (This is the
4084 :     structure that currently exists on the CVS server when you check out
4085 :     module "sml".) Fortunately, config/install.sh knows about this oddity.
4086 :    
4087 :     Bugs: No documentation yet.
4088 :    
4089 :     ----------------------------------------------------------------------
4090 :     Name: Matthias Blume
4091 : blume 826 Date: 2001/05/09 16:35:00 EDT
4092 :     Tag: blume-20010509-cpscontract
4093 :     Description:
4094 :    
4095 :     Fixed a bug in the accounting code in cpsopt/contract.sml. (The
4096 :     wrapper/unwrapper elimination did not decrement usage counts and some
4097 :     dead variables got overlooked by the dead-up logic.)
4098 :    
4099 :     ----------------------------------------------------------------------
4100 : george 824 Name: Lal George
4101 :     Date: 2001/05/08 17:26:09 EDT
4102 :     Tag: george-20010508-omit-frameptr
4103 :     Description:
4104 :    
4105 :     Changes to implement the omit-frame-pointer optimization to support
4106 :     raw C calls. For now, there is only support on the Intel x86, but
4107 :     other architectures will follow as more experience is gained with this.
4108 :    
4109 :    
4110 :     ----------------------------------------------------------------------
4111 : blume 818 Name: Matthias Blume
4112 : blume 819 Date: 2001/05/07 14:40:00 EDT
4113 :     Tag: blume-20010507-proxies
4114 :     Description:
4115 :    
4116 :     I made into "proxy libraries" all libraries that qualify for such a
4117 :     change. (A qualifying library is a library that has another library or
4118 :     groups as its sole member and repeats that member's export list
4119 :     verbatim. A proxy library avoids this repetition by omitting its export
4120 :     list, effectively inheriting the list that its (only) member exports.
4121 :     See the CM manual for more explanation.)
4122 :     The main effect is that explicit export lists for these libraries
4123 :     do not have to be kepts in sync, making maintenance a bit easier.
4124 :    
4125 :     I also added copyright notices to many .cm-files.
4126 :    
4127 :     Last but not least, I made a new set of bootfiles.
4128 :    
4129 :     ----------------------------------------------------------------------
4130 :     Name: Matthias Blume
4131 : blume 818 Date: 2001/05/04 17:00:00 EDT
4132 :     Tag: blume-20010504-cm-lsplit
4133 :     Description:
4134 :    
4135 :     0. John merged pending changes to $/smlnj-lib.cm
4136 :    
4137 :     1. Allen's previous change accidentally backed out of one of Lal's
4138 :     earlier changes. I undid this mistake (re-introducing Lal's change).
4139 :    
4140 :     2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm)
4141 :     within the compiler where applicable. There is some code simplification
4142 :     because of that.
4143 :    
4144 :     3. The "split" phase (in FLINT) is now part of the default list of phases.
4145 :     Compiler.Control.LambdaSplitting.* can be used to globally control the
4146 :     lambda-splitting (cross-module-inlining) engine. In addition to that,
4147 :     it can now also be controlled on a per-source basis: CM has been taught
4148 :     a new tool parameter applicable to ML source files.
4149 :    
4150 :     - To turn lambda-splitting off completely:
4151 :     local open Compiler.Control.LambdaSplitting in
4152 :     val _ = set Off
4153 :     end
4154 :     - To make "no lambda-splitting" the global default (but allow per-source
4155 :     overriding); this is the initial setting:
4156 :     local open Compiler.Control.LambdaSplitting in
4157 :     val _ = set (Default NONE)
4158 :     end
4159 :     - To make "lambda-splitting with aggressiveness a" the global default
4160 :     (and allow per-source overriding):
4161 :     local open Compiler.Control.LambdaSplitting in
4162 :     val _ = set (Default (SOME a))
4163 :     end
4164 :    
4165 :     - To turn lambda-splitting off for a given ML souce file (say: a.sml)
4166 :     write (in the respective .cm-file):
4167 :     a.sml (lambdasplitting:off)
4168 :     - To turn lambda-splitting for a.sml on with minimal aggressiveness:
4169 :     a.sml (lambdasplitting:on)
4170 :     - To turn lambda-splitting for a.sml on with aggressiveness <a> (where
4171 :     <a> is a decimal non-negative integer):
4172 :     a.sml (lambdasplitting:<a>)
4173 :     - To turn lambda-splitting for a.sml on with maximal aggressiveness:
4174 :     a.sml (lambdasplitting:infinity)
4175 :     - To use the global default for a.sml:
4176 :     a.sml (lambdasplitting:default)
4177 :     or simply
4178 :     a.sml
4179 :    
4180 :     ----------------------------------------------------------------------
4181 : leunga 815 Name: Allen Leung
4182 :     Date: 2001/05/04 01:57:00 EDT
4183 :     Tag: leunga-20010504-sync
4184 :     Description:
4185 : leunga 788
4186 : leunga 815 MLRISC features.
4187 :    
4188 :     1. Fix to CMPXCHG instructions.
4189 :     2. Changed RA interface to allow annotations in callbacks.
4190 :     3. Added a new method to the stream interface to allow annotations updates.
4191 :    
4192 : george 749 ----------------------------------------------------------------------
4193 : blume 812 Name: Matthias Blume
4194 : blume 814 Date: 2001/05/01 11:45:00 EDT
4195 :     Tag: blume-20010501-pcedittmp
4196 :     Description:
4197 :    
4198 :     Changed install.sh to use the current working directory instead of
4199 :     /usr/tmp for a temporary file (pcedittmp). The previous choice
4200 :     of /usr/tmp caused trouble with MacOS X because of file premission
4201 :     problems.
4202 :    
4203 :     ----------------------------------------------------------------------
4204 :     Name: Matthias Blume
4205 : blume 812 Date: 2001/04/20 11:10:00 EDT
4206 :     Tag: blume-20010420-inMLflag
4207 :     Description:
4208 :    
4209 :     - added vp_limitPtrMask to vproc-state.h
4210 :     (for use by the raw-C-calls mechanism to implement proper interrupt
4211 :     handling)
4212 :     - made the ML compiler aware of various data-structure offsets so it
4213 :     can generate code for accessing the vp_inML flag and vp_limitPtrMask
4214 :     - tweaked mlriscGen.sml to have it emit interrupt-handling code for
4215 :     raw C-calls
4216 :    
4217 :     ----------------------------------------------------------------------
4218 : george 810 Name: Lal George
4219 :     Date: 2001/04/20 09:15:28 EDT
4220 :     Tag: george-20010420-macosX
4221 :     Description:
4222 :    
4223 :     - Changes to port to Mac OS X; Darwin.
4224 :    
4225 :     - In the process I found that sqrt was broken on the PPC, because the
4226 :     fsqrt instruction is not implemented.
4227 :    
4228 :     ----------------------------------------------------------------------
4229 : blume 799 Name: Matthias Blume
4230 : blume 808 Date: 2001/04/18 12:45:00 EDT
4231 :     Tag: blume-20010418-ccalls
4232 :     Description:
4233 :    
4234 :     - fixed two off-by-4 errors in the x86-specific c-calls implementation
4235 :     (this bug prevented structure arguments containing pointers from being
4236 :     passed correctly)
4237 :     - changed the raw-C-call code in mlriscGen.sml in such a way that
4238 :     structure arguments are represented as a pointer to the beginning
4239 :     of the structure (instead of having a series of synthesized arguments,
4240 :     one for each structure member)
4241 :    
4242 :     - made makeml script's verbosity level configurable via environment
4243 :     variable (MAKEML_VERBOSITY)
4244 :    
4245 : blume 813 - eliminated placeholder implementations for f32l, w16s, i16s, and f32s
4246 : blume 808 in rawmem-x86.sml; we are now using the real thing
4247 :    
4248 :     ----------------------------------------------------------------------
4249 :     Name: Matthias Blume
4250 : blume 806 Date: 2001/03/22 16:25:00 EST
4251 :     Tag: blume-20010322-bootfiles
4252 :     Description:
4253 :    
4254 :     Created a new set of bootfiles (for your automatic installation convenience).
4255 :    
4256 :     ----------------------------------------------------------------------
4257 :     Name: Matthias Blume
4258 : blume 805 Date: 2001/03/22 15:10:00 EST
4259 :     Tag: blume-20010322-rawmem-parcm
4260 :     Description:
4261 :    
4262 :     1. All "raw memory access" primitives for the new FFI are implemented now
4263 :     (at least on the x86).
4264 :     2. Some further cleanup of CM's parallel make mechanism.
4265 :    
4266 :     ----------------------------------------------------------------------
4267 :     Name: Matthias Blume
4268 : blume 801 Date: 2001/03/19 17:53:00 EST
4269 :     Tag: blume-20010319-parallel
4270 :     Description:
4271 :    
4272 :     Parallel make (using compile servers) now works again.
4273 :    
4274 :     To this end, CM.stabilize and CMB.make have been modified to work in
4275 :     two passes when compile servers are attached:
4276 :     1. Compile everything, do not perform stabilization; this pass
4277 :     uses compile servers
4278 :     2. Stabilize everything; this pass does not use compile servers
4279 :     If there are no compile servers, the two passes are combined into one
4280 :     (as before). Splitting the passes increases the inherent parallelism
4281 :     in the dependency graph because the entire graph including all
4282 :     libraries is available at the same time. This, in turn, improves
4283 :     server utilization. The downside is that the master process will
4284 :     have to do some extra work after compilation is done (because for
4285 :     technical reasons it must re-read all the binfiles during stabilization).
4286 :    
4287 :     ----------------------------------------------------------------------
4288 :     Name: Matthias Blume
4289 : blume 800 Date: 2001/03/16 12:22:00 EST
4290 :     Tag: blume-20010316-bootfiles
4291 :     Description:
4292 :    
4293 :     Created a new set of bootfiles (for your automatic installation convenience).
4294 :    
4295 :     ----------------------------------------------------------------------
4296 :     Name: Matthias Blume
4297 : blume 799 Date: 2001/03/16 11:00:00 EST
4298 :     Tag: blume-20010316-MLTREE-fixup
4299 :     Description:
4300 :    
4301 :     This is a minor fixup for an (untagged) earlier commit by Allen.
4302 :     (A file was missing).
4303 :    
4304 :     ----------------------------------------------------------------------
4305 : leunga 788 Name: Allen Leung
4306 : leunga 796 Date: Mon Mar 5 18:54:57 EST 2001
4307 :     Tag: leunga-20010305-cut-support
4308 :    
4309 :     1. New support for alternative control-flow in MLTREE.
4310 :     Currently we support
4311 :    
4312 :     FLOW_TO(CALL ...., [k1,...,kn])
4313 :    
4314 :     This is needed for 'cuts to' in C-- and try/handle-like constructs
4315 :     in Moby
4316 :    
4317 :     New assembler flag "asm-show-cutsto" to turn on control-flow debugging.
4318 :    
4319 :     2. Register Allocator
4320 :    
4321 :     Changes in interface [from Fermin, John]
4322 :    
4323 :     3. Alpha 8-bit SLL support [Fermin]
4324 :