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