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