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

SCM Repository

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

Annotation of /sml/trunk/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1496 - (view) (download)

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