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/branches/primop-branch-3/NOTES/HISTORY
ViewVC logotype

Annotation of /sml/branches/primop-branch-3/NOTES/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1616 - (view) (download)
Original Path: sml/trunk/HISTORY

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