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/NOTES/HISTORY
ViewVC logotype

Annotation of /sml/trunk/NOTES/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : dbm 570 This is the HISTORY file for the Yale SML/NJ CVS repository.
2 :    
3 :     An entry should be made for _every_ commit to the repository.
4 :     The entries in this file will be used when creating the README
5 :     for new versions, so keep that in mind when writing the
6 :     description.
7 :    
8 :     The form of an entry should be:
9 :    
10 :     Name:
11 : george 1003 Date: yyyy/mm/dd
12 : dbm 570 Tag: <post-commit CVS tag>
13 :     Description:
14 : leunga 1025
15 : george 1003 ----------------------------------------------------------------------
16 : blume 1066 Name: Matthias Blume
17 : blume 1078 Date: 2002/02/19 16:20:00 EST
18 :     Tag: blume-20020219-cmffi
19 :     Description:
20 :    
21 :     A wild mix of changes, some minor, some major:
22 :    
23 :     * All C FFI-related libraries are now anchored under $c:
24 :     $/c.cm --> $c/c.cm
25 :     $/c-int.cm --> $c/internals/c-int.cm
26 :     $/memory.cm --> $c/memory/memory.cm
27 :    
28 :     * "make" tool (in CM) now treats its argument pathname slightly
29 :     differently:
30 :     1. If the native expansion is an absolute name, then before invoking
31 :     the "make" command on it, CM will apply OS.Path.mkRelative
32 :     (with relativeTo = OS.FileSys.getDir()) to it.
33 :     2. The argument will be passed through to subsequent phases of CM
34 :     processing without "going native". In particular, if the argument
35 :     was an anchored path, then "make" will not lose track of that anchor.
36 :    
37 :     * Compiler backends now "know" their respective C calling conventions
38 :     instead of having to be told about it by ml-nlffigen. This relieves
39 :     ml-nlffigen from one of its burdens.
40 :    
41 :     * The X86Backend has been split into X86CCallBackend and X86StdCallBackend.
42 :    
43 :     * Export C_DEBUG and C_Debug from $c/c.cm.
44 :    
45 :     * C type encoding in ml-nlffi-lib has been improved to model the conceptual
46 :     subtyping relationship between incomplete pointers and their complete
47 :     counterparts. For this, ('t, 'c) ptr has been changed to 'o ptr --
48 :     with the convention of instantiating 'o with ('t, 'c) obj whenever
49 :     the pointer target type is complete. In the incomplete case, 'o
50 :     will be instantiated with some "'c iobj" -- a type obtained by
51 :     using one of the functors PointerToIncompleteType or PointerToCompleteType.
52 :    
53 :     Operations that work on both incomplete and complete pointer types are
54 :     typed as taking an 'o ptr while operations that require the target to
55 :     be known are typed as taking some ('t, 'c) obj ptr.
56 :    
57 :     voidptr is now a bit "more concrete", namely "type voidptr = void ptr'"
58 :     where void is an eqtype without any values. This makes it possible
59 :     to work on voidptr values using functions meant to operate on light
60 :     incomplete pointers.
61 :    
62 :     * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has
63 :     been vastly simplified.
64 :    
65 :     ----------------------------------------------------------------------
66 :     Name: Matthias Blume
67 : blume 1076 Date: 2002/02/19 10:48:00 EST
68 :     Tag: blume-20020219-pqfix
69 :     Description:
70 :    
71 :     Applied Chris Okasaki's bug fix for priority queues.
72 :    
73 :     ----------------------------------------------------------------------
74 :     Name: Matthias Blume
75 : blume 1073 Date: 2002/02/15 17:05:00
76 : blume 1069 Tag: Release_110_39
77 :     Description:
78 :    
79 : blume 1073 Last-minute retagging is becoming a tradition... :-(
80 :    
81 :     This is the working release 110.39.
82 :    
83 :     ----------------------------------------------------------------------
84 :     Name: Matthias Blume
85 :     Date: 2002/02/15 16:00:00 EST
86 :     Tag: Release_110_39-orig
87 :     Description:
88 :    
89 : blume 1069 Working release 110.39. New bootfiles.
90 :    
91 : blume 1073 (Update: There was a small bug in the installer so it wouldn't work
92 :     with all shells. So I retagged. -Matthias)
93 :    
94 : blume 1069 ----------------------------------------------------------------------
95 :     Name: Matthias Blume
96 : blume 1068 Date: 2002/02/15 14:17:00 EST
97 :     Tag: blume-20020215-showbindings
98 :     Description:
99 :    
100 :     Added EnvRef.listBoundSymbols and CM.State.showBindings. Especially
101 :     the latter can be useful for exploring what bindings are available at
102 :     the interactive prompt. (The first function returns only the list
103 :     of symbols that are really bound, the second prints those but also the
104 :     ones that CM's autoloading mechanism knows about.)
105 :    
106 :     ----------------------------------------------------------------------
107 :     Name: Matthias Blume
108 : blume 1067 Date: 2002/02/15 12:08:00 EST
109 :     Tag: blume-20020215-iptrs
110 :     Description:
111 :    
112 :     Two improvements to ml-nlffigen:
113 :    
114 :     1. Write files only if they do not exist or if their current contents
115 :     do not coincide with what's being written. (That is, avoid messing
116 :     with the time stamps unless absolutely necessary.)
117 :    
118 :     2. Implement a "repository" mechanism for generated files related
119 :     to "incomplete pointer types". See the README file for details.
120 :    
121 :     ----------------------------------------------------------------------
122 :     Name: Matthias Blume
123 : blume 1066 Date: 2002/02/14 11:50:00 EST
124 :     Tag: blume-20020214-quote
125 :     Description:
126 :    
127 :     Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm). This is required
128 :     because of the new and improved tag generation scheme. (Thanks to Allen
129 :     Leung for pointing it out.)
130 :    
131 :     ----------------------------------------------------------------------
132 : george 1065 Name: Lal George
133 :     Date: 2002/02/14 09:55:27 EST 2002
134 :     Tag: george-20020214-isabelle-bug
135 :     Description:
136 :    
137 :     Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation
138 :     of Isabelle on the x86.
139 :    
140 :     From Allen:
141 :     -----------
142 :     I've found the problem:
143 :    
144 :     in ra-core.sml, I use the counter "blocked" to keep track of the
145 :     true number of elements in the freeze queue. When the counter goes
146 :     to zero, I skip examining the queue. But I've messed up the
147 :     bookkeeping in combine():
148 :    
149 :     else ();
150 :     case !ucol of
151 :     PSEUDO => (if !cntv > 0 then
152 :     (if !cntu > 0 then blocked := !blocked - 1 else ();
153 :     ^^^^^^^^^^^^^^^^^^^^^^^
154 :     moveu := mergeMoveList(!movev, !moveu)
155 :     )
156 :     else ();
157 :    
158 :     combine() is called to coalesce two nodes u and v.
159 :     I think I was thinking that if the move counts of u and v are both
160 :     greater than zero then after they are coalesced then one node is
161 :     removed from the freeze queue. Apparently I was thinking that
162 :     both u and v are of low degree, but that's clearly not necessarily true.
163 :    
164 :    
165 :     02/12/2002:
166 :     Here's the patch. HOL now compiles.
167 :    
168 :     I don't know how this impact on performance (compile
169 :     time or runtime). This bug caused the RA (especially on the x86)
170 :     to go thru the potential spill phase when there are still nodes on the
171 :     freeze queue.
172 :    
173 :    
174 :    
175 :    
176 :     ----------------------------------------------------------------------
177 : blume 1058 Name: Matthias Blume
178 : blume 1064 Date: 2002/02/13 22:40:00 EST
179 :     Tag: blume-20020213-fptr-rtti
180 :     Description:
181 :    
182 :     Fixed a bug in ml-nlffigen that was introduced with one of the previous
183 :     updates.
184 :    
185 :     ----------------------------------------------------------------------
186 :     Name: Matthias Blume
187 : blume 1063 Date: 2002/02/13 16:41:00 EST
188 :     Tag: blume-20020213-cmlpq
189 :     Description:
190 :    
191 :     Added new priority queue export symbols (which have just been added to
192 :     smlnj-lib.cm) to CML's version of smlnj-lib.cm. (Otherwise CML would
193 :     not compile and the installer would choke.)
194 :    
195 :     ----------------------------------------------------------------------
196 :     Name: Matthias Blume
197 : blume 1062 Date: 2002/02/13 16:15:00 EST
198 :     Tag: blume-20020213-various
199 :     Description:
200 :    
201 :     1. More tweaks to ml-nlffigen:
202 :    
203 :     - better internal datastructures (resulting in slight speedup)
204 :     - "-match" option requires exact match
205 :     - "localized" gensym counters (untagged structs/unions nested within
206 :     other structs/unions or within typedefs get a fresh counter; their
207 :     tag will be prefixed by a concatenation of their parents' tags)
208 :     - bug fixes (related to calculation of transitive closure of types
209 :     to be included in the output)
210 :    
211 :     2. Minor Basis updates:
212 :    
213 :     - added implementations for List.collate and Option.app
214 :    
215 :     ----------------------------------------------------------------------
216 :     Name: Matthias Blume
217 : blume 1060 Date: 2002/02/11 15:55:00 EST
218 :     Tag: blume-20020211-gensym
219 :     Description:
220 :    
221 :     Added a "-gensym" option to command line of ml-nlffigen. This can be
222 :     used to specify a "stem" -- a string that is inserted in all "gensym'd"
223 :     names (ML structure names that correspond to unnamed C structs, unions,
224 :     and enums), so that separate runs of ml-nlffigen do not clash.
225 :    
226 :     ----------------------------------------------------------------------
227 :     Name: Matthias Blume
228 : blume 1059 Date: 2002/02/11 12:05:00 EST
229 :     Tag: blume-20020211-gensml
230 :     Description:
231 :    
232 :     A quick fix for a problem with GenSML (in the pgraph-util library):
233 :     Make generation of toplevel "local" optional. (Strictly speaking,
234 :     signature definitions within "local" are not legal SML.)
235 :    
236 :     Other than that: updates to INSTALL and cm/TODO.
237 :    
238 :     ----------------------------------------------------------------------
239 :     Name: Matthias Blume
240 : blume 1058 Date: 2002/02/08 15:00:00 EST
241 :     Tag: blume-20020208-uniquepid
242 :     Description:
243 :    
244 :     0. Version number has been bumped to 110.38.1. NEW BOOTFILES!!!
245 :    
246 :     1. The installer (config/install.sh) has gotten smarter:
247 :    
248 :     - Configuration options are a bit easier to specify now
249 :     (in config/targets).
250 :     - Bug in recognizing .tar.bz2 files fixed.
251 :     - Installer automatically resolves dependencies between
252 :     configuration options (e.g., if you ask for eXene, you will
253 :     also get cml -- regardless whether you asked for it or not).
254 :     - Installer can run in "quieter mode" by setting the environment
255 :     variable INSTALL_QUIETLY to "true". "Quieter" does not mean
256 :     "completely silent", though.
257 :     - Build HashCons library as part of smlnj-lib.
258 :    
259 :     2. A new scheme for assigning persistent identifiers to compilation
260 :     units (and, by extension, to types etc.) has been put into place.
261 :     This fixes a long-standing bug where types and even dynamic values
262 :     can get internally confused, thereby compromising type safety
263 :     (abstraction) and dynamic correctness. See
264 :    
265 :     http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz
266 :    
267 :     for an example of how things could go wrong until now.
268 :    
269 :     The downside of the new scheme is that pids are not quite as
270 :     persistent as they used to be: CM will generate a fresh pid
271 :     for every compilation unit that it thinks it sees for the first
272 :     time. That means that if you compile starting from a clean, fresh
273 :     source tree at two different times, you end up with different
274 :     binaries.
275 :    
276 :     Cutoff recompilation, however, has not been compromised because
277 :     CM keeps pid information in special caches between runs.
278 :    
279 :     ----------------------------------------------------------------------
280 : george 1053 Name: Lal George
281 : george 1055 Date: 2002/02/07 15:34:13 EST 2002
282 :     Tag: <none>
283 :     Description:
284 :    
285 :     Compilers that generate assembly code may produce global labels
286 :     whose value is resolved at link time. The various peephole optimization
287 :     modules did not take this in account.
288 :    
289 :     TODO. The Labels.addrOf function should really return an option
290 :     type so that clients are forced to deal with this issue, rather
291 :     than an exception being raised.
292 :    
293 :     ----------------------------------------------------------------------
294 :     Name: Lal George
295 : george 1053 Date: 2002/02/06 13:55:02 EST
296 :     Tag: george-20020206-ra-breakup
297 :     Description:
298 :    
299 :     1. A bug fix from Allen.
300 :    
301 :     A typo causes extra fstp %st(0)'s to be generated at compensation
302 :     edges, which might cause stack underflow traps at runtime. This
303 :     occurs in fft where there are extraneous fstps right before the 'into'
304 :     trap instruction (in this case they are harmless since none of the
305 :     integers overflow.)
306 :    
307 : george 1054 2. Pulled out various utility modules that were embedded in the modules
308 : george 1053 of the register allocator. I need these modules for other purposes, but
309 : george 1054 they are not complete enough to put into a library (just yet).
310 : george 1053 ----------------------------------------------------------------------
311 : blume 1049 Name: Matthias Blume
312 :     Date: 2002/01/31 16:05:00 EST
313 :     Tag: blume-20020131-sparc-ccalls
314 :     Description:
315 :    
316 :     1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes)
317 :     of extra stack space by mistake. Fixed.
318 :    
319 :     2. Bug in logic of handling of command-line options in ml-nlffigen fixed.
320 :    
321 :     ----------------------------------------------------------------------
322 : leunga 1048 Name: Allen Leung
323 :     Date: 2002/01/30
324 :     Tag: leunga-20020130-nowhere-bug-fix
325 :     Description:
326 :    
327 :     MLRISC bug fixes:
328 :     1. Fixed a bindings computation bug in the 'nowhere' program generator tool.
329 :     2. MachineInt.fromString was negating its value.
330 :    
331 :     ----------------------------------------------------------------------
332 : blume 1039 Name: Matthias Blume
333 : blume 1047 Date: 2002/01/29
334 :     Tag: blume-20020129-INSTALL
335 :     Description:
336 :    
337 :     - Added somewhat detailed installation instructions (file INSTALL).
338 :     - Fixed curl-detection bug in config/install.sh.
339 :     - It is now possible to select the URL getter using the URLGETTER
340 :     environment variable:
341 :    
342 :     not set / "unknown" --> automatic detection (script tries wget,
343 :     curl, and lynx)
344 :     "wget" / "curl" / "lynx" --> use the specified program (script "knows"
345 :     how to properly invoke them)
346 :     other --> use $URLGETTER directly, it must take
347 :     precisely two command-line arguments
348 :     (source URL and destination file name)
349 :    
350 :     ----------------------------------------------------------------------
351 :     Name: Matthias Blume
352 : blume 1044 Date: 2002/01/28
353 : blume 1045 Tag: blume-20020128-sparc-ccalls
354 :     Description:
355 :    
356 :     - Fixed problem with calculation of "used" registers in sparc-c-calls.
357 :     - Make use of the allocParam argument in sparc-c-calls.
358 :    
359 :     ----------------------------------------------------------------------
360 :     Name: Matthias Blume
361 :     Date: 2002/01/28
362 : blume 1044 Tag: blume-20020128-allocParam
363 :     Description:
364 :    
365 :     John Reppy: Changes c-calls API to accept client-callback for
366 :     allocating extra stack space.
367 :     me: Corresponding changes to mlriscGen (using a dummy argument that
368 :     does not change the current behavior).
369 :    
370 :     ----------------------------------------------------------------------
371 :     Name: Matthias Blume
372 : blume 1040 Date: 2002/01/28 12:00:00
373 :     Tag: Release_110_38
374 :     Description:
375 :    
376 :     This time for real!!!
377 :    
378 :     ----------------------------------------------------------------------
379 :     Name: Matthias Blume
380 : blume 1039 Date: 2002/01/28 10:56:00 EST
381 :     Tag: blume-20020128-retraction
382 :     Description:
383 :    
384 :     0. Retracted earlier 110.38. (The Release_110_38 tag has been replaced
385 :     with blume-Release_110_38-retracted.)
386 :    
387 :     1. Fixed a problem with incorrect rounding modes in real64.sml.
388 :     (Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.)
389 :    
390 :     2. A bug in ml-nlffigen related to the handling of unnamed structs, unions,
391 :     and enums fixed. The naming of corresponding ML identifiers should
392 :     now be consistent again.
393 :    
394 :     ----------------------------------------------------------------------
395 : leunga 1038 Name: Allen Leung
396 :     Date: 2002/01/27
397 :     Tag: leunga-20020127-nowhere
398 :     Description:
399 :    
400 :     Added a target called nowhere in the configuration scripts.
401 :     Enabling this will build the MLRISC 'nowhere' tool (for translating
402 :     programs with where-clauses into legal SML code) during installation.
403 :    
404 :     ----------------------------------------------------------------------
405 : blume 1036 Name: Matthias Blume
406 : leunga 1038 Date: 2002/01/25 21:27:00 EST
407 : blume 1039 Tag: blume-Release_110_38-retracted
408 : blume 1037 Description:
409 :    
410 :     Call it a (working) release! Version is 110.38. Bootfiles are ready.
411 :    
412 :     README will be added later.
413 :    
414 : blume 1039 !!! NOTE: Re-tagged as blume-Release_110_38-retracted. Original tag
415 :     (Release_110_38) removed. Reason: Last-minute bug fixes.
416 :    
417 : blume 1037 ----------------------------------------------------------------------
418 :     Name: Matthias Blume
419 : blume 1036 Date: 2002/01/25
420 :     Tag: blume-20020125-ffi
421 :     Description:
422 :    
423 :     A large number of tweaks and improvements to ml-nlffi-lib and
424 :     ml-nlffigen:
425 :    
426 :     - ML represenation types have been streamlined
427 :     - getter and setter functions work with concrete values, not abstract
428 :     ones where possible
429 :     - ml-nlffigen command line more flexible (see README file there)
430 :     - some bugs have been fixed (hopefully)
431 :    
432 :     ----------------------------------------------------------------------
433 : george 1034 Name: Lal George
434 :     Date: 2002/01/24
435 :     Tag: george-20020124-risc-ra-interface
436 :     Description:
437 :    
438 :     There is a dramatic simplification in the interface to the
439 :     register allocator for RISC architectures as a result of making
440 :     parallel copy instructions explicit.
441 :    
442 :     ----------------------------------------------------------------------
443 : blume 1028 Name: Matthias Blume
444 : blume 1032 Date: 2002/01/22
445 :     Tag: blume-20020122-x86-ccalls
446 :     Description:
447 :    
448 :     Bug fix for c-calls on x86 (having to do with how char- and
449 :     short-arguments are being handled).
450 :    
451 :     ----------------------------------------------------------------------
452 :     Name: Matthias Blume
453 : blume 1031 Date: 2002/01/21
454 :     Tag: blume-20020121-ff
455 :     Description:
456 :    
457 :     Another day of fiddling with the FFI...
458 :    
459 :     1. Bug fix/workaround: CKIT does not complain about negative array
460 :     dimensions, so ml-nlffigen has to guard itself against this possibility.
461 :     (Otherwise a negative dimension would send it into an infinite loop.)
462 :    
463 :     2. Some of the abstract types (light objects, light pointers, most "base"
464 :     types) in structure C are now eqtypes.
465 :    
466 :     3. Added constructors and test functions for NULL function pointers.
467 :    
468 :     ----------------------------------------------------------------------
469 :     Name: Matthias Blume
470 : blume 1028 Date: 2002/01/18
471 : blume 1030 Tag: blume-20020118-ready-for-new-release
472 :     Description:
473 :    
474 :     Made config/srcarchiveurl point to a new place. (Will provide boot
475 :     files shortly.)
476 :    
477 :     Maybe we christen this to be 110.38?
478 :    
479 :     ----------------------------------------------------------------------
480 :     Name: Matthias Blume
481 :     Date: 2002/01/18
482 : blume 1029 Tag: blume-20020118-more-ffifiddle
483 :     Description:
484 :    
485 :     Today's FFI fiddling:
486 :    
487 :     - Provided a structure CGetSet with "convenient" versions of C.Get.* and
488 :     C.Set.* that use concrete (MLRep.*) arguments and results instead
489 :     of abstract ones.
490 :    
491 :     - Provided word-style bit operations etc. for "int" representation
492 :     types in MLRep.S<Foo>Bitops where <Foo> ranges over Char, Int, Short,
493 :     and Long.
494 :    
495 :     ----------------------------------------------------------------------
496 :     Name: Matthias Blume
497 :     Date: 2002/01/18
498 : blume 1028 Tag: blume-20020118-use-x86-fp
499 :     Description:
500 :    
501 :     Now that x86-fast-fp seems to be working, I turned it back on again
502 :     by default. (Seems to work fine now, even with the FFI.)
503 :    
504 :     Other than that, I added some documentation about the FFI to
505 :     src/ml-nlffigen/README and updated the FFI test examples in
506 :     src/ml-nlffi-lib/Tests/*.
507 :    
508 :     ----------------------------------------------------------------------
509 : leunga 1025 Name: Allen Leung
510 :     Date: 2002/01/17
511 :     Tag: leunga-20020117-x86-fast-fp-call
512 :     Description:
513 :    
514 :     1. Fixed a problem with handling return fp values when x86's fast fp
515 :     mode is turned on.
516 :    
517 :     2. Minor pretty printing fix for cellset. Print %st(0) as %st(0) instead
518 :     of %f32.
519 :    
520 :     3. Added a constructor INT32lit to the ast of MLRISC tools.
521 :    
522 :     ----------------------------------------------------------------------
523 : blume 1021 Name: Matthias Blume
524 :     Date: 2002/01/16
525 :     Tag: blume-20020116-ffifiddle
526 :     Description:
527 :    
528 :     More fiddling with the FFI interface:
529 :    
530 :     - Make constness 'c instead of rw wherever possible. This eliminates
531 :     the need for certain explicit coercions. (However, due to ML's
532 :     value polymorphism, there will still be many cases where explicit
533 :     coercions are necessary. Phantom types are not the whole answer
534 :     to modeling a subtyping relationship in ML.)
535 :    
536 :     - ro/rw coersions for pointers added. (Avoids the detour through */&.)
537 :    
538 :     - "printf" test example added to src/ml-nlffi-lib/Tests. (Demonstrates
539 :     clumsy workaround for varargs problem.)
540 :    
541 :     ----------------------------------------------------------------------
542 : george 1016 Name: Lal George
543 :     Date: 2002/01/15
544 :     Tag: <none>
545 :     Description:
546 :    
547 :     1. Since COPY instructions are no longer native to the architecture,
548 :     a generic functor can be used to implement the expandCopies function.
549 :    
550 :     2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a
551 :     TEXT segment.
552 :    
553 :     ----------------------------------------------------------------------
554 : blume 1011 Name: Matthias Blume
555 : blume 1015 Date: 2002/01/15
556 :     Tag: blume-20020115-ffiupdates
557 :     Description:
558 :    
559 :     1. Fix for bug resulting in single-precision float values being returned
560 :     incorrectly from FFI calls.
561 :    
562 :     2. Small modifications to C FFI API:
563 :    
564 :     - memory-allocation routines return straight objects (no options)
565 :     and raise an exception in out-of-memory situations
566 :     - unsafe extensions to cast between function pointers and pointers
567 :     from/to ints
568 :     - added structure C_Debug as an alternative to structure C where
569 :     pointer-dereferencing (|*| and |*!) always check for null-pointers
570 :     - added open_lib' to DynLinkage; open_lib' works like open_lib
571 :     but also takes a (possibly empty) list of existing library handles
572 :     that the current library depends on
573 :    
574 :     ----------------------------------------------------------------------
575 :     Name: Matthias Blume
576 : blume 1011 Date: 2002/01/10
577 :     Tag: blume-20020110-newffigen
578 :     Description:
579 :    
580 :     1. Updates to portable graph code.
581 :    
582 :     2. Major update to ml-nlffigen and ml-nlffi-lib. Things are much
583 :     more scalable now so that even huge interfaces such as the one
584 :     for GTK compile in finite time and space. :-)
585 :     See src/ml-nlffigen/README for details on what's new.
586 :    
587 :     ----------------------------------------------------------------------
588 : george 1003 Name: Lal George
589 : george 1009 Date: 2001/01/09 14:31:35 EST 2002
590 :     Tag: george-20011206-rm-native-copy
591 :     Description:
592 :    
593 :     Removed the native COPY and FCOPY instructions
594 :     from all the architectures and replaced it with the
595 :     explicit COPY instruction from the previous commit.
596 :    
597 :     It is now possible to simplify many of the optimizations
598 :     modules that manipulate copies. This has not been
599 :     done in this change.
600 :    
601 :     ----------------------------------------------------------------------
602 :     Name: Lal George
603 : george 1003 Date: 2001/12/06 16:50:13 EST 2001
604 :     Tag: george-20011206-mlrisc-instruction
605 :     Description:
606 : george 824
607 : george 1003 Changed the representation of instructions from being fully abstract
608 :     to being partially concrete. That is to say:
609 :    
610 :     from
611 :     type instruction
612 :    
613 :     to
614 :     type instr (* machine instruction *)
615 :    
616 :     datatype instruction =
617 :     LIVE of {regs: C.cellset, spilled: C.cellset}
618 :     | KILL of {regs: C.cellset, spilled: C.cellset}
619 :     | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
620 :     | ANNOTATION of {i: instruction, a: Annotations.annotation}
621 :     | INSTR of instr
622 :    
623 :     This makes the handling of certain special instructions that appear on
624 :     all architectures easier and uniform.
625 :    
626 :     LIVE and KILL say that a list of registers are live or killed at the
627 :     program point where they appear. No spill code is generated when an
628 :     element of the 'regs' field is spilled, but the register is moved to
629 :     the 'spilled' (which is present, more for debugging than anything else).
630 :    
631 :     LIVE replaces the (now deprecated) DEFFREG instruction on the alpha.
632 :     We used to generate:
633 :    
634 :     DEFFREG f1
635 :     f1 := f2 + f3
636 :     trapb
637 :    
638 :     but now generate:
639 :    
640 :     f1 := f2 + f3
641 :     trapb
642 :     LIVE {regs=[f1,f2,f3], spilled=[]}
643 :    
644 :     Furthermore, the DEFFREG (hack) required that all floating point instruction
645 :     use all registers mentioned in the instruction. Therefore f1 := f2 + f3,
646 :     defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting
647 :     in a cleaner alpha implementation. (Hopefully, intel will not get rid of
648 :     this architecture).
649 :    
650 :     COPYXXX is intended to replace the parallel COPY and FCOPY available on
651 :     all the architectures. This will result in further simplification of the
652 :     register allocator that must be aware of them for coalescing purposes, and
653 :     will also simplify certain aspects of the machine description that provides
654 :     callbacks related to parallel copies.
655 :    
656 :     ANNOTATION should be obvious, and now INSTR represents the honest to God
657 :     machine instruction set!
658 :    
659 :     The <arch>/instructions/<arch>Instr.sml files define certain utility
660 :     functions for making porting easier -- essentially converting upper case
661 :     to lower case. All machine instructions (of type instr) are in upper case,
662 :     and the lower case form generates an MLRISC instruction. For example on
663 :     the alpha we have:
664 :    
665 :     datatype instr =
666 :     LDA of {r:cell, b:cell, d:operand}
667 :     | ...
668 :    
669 :     val lda : {r:cell, b:cell, d:operand} -> instruction
670 :     ...
671 :    
672 :     where lda is just (INSTR o LDA), etc.
673 :    
674 : leunga 815 ----------------------------------------------------------------------
675 : blume 986 Name: Matthias Blume
676 : blume 993 Date: 2001/11/22 21:40:00 EST
677 :     Tag: Release_110_37
678 :     Description:
679 :    
680 :     Release 110.37. This time for real.
681 :    
682 :     ----------------------------------------------------------------------
683 :     Name: Matthias Blume
684 : blume 988 Date: 2001/11/21 16:35:00 EST
685 :     Tag: blume-20011121-foot-in-mouth
686 :     Description:
687 :    
688 :     Removed the "Release_110_37" tag because of a serious bug.
689 :     This will be re-tagged once the bug is fixed.
690 :    
691 :     ----------------------------------------------------------------------
692 :     Name: Matthias Blume
693 : blume 987 Date: 2001/11/21 16:14:00 EST
694 :     Tag: blume-20011121-forgottenfile
695 :     Description:
696 :    
697 :     Forgot to add a file. (Just a .tex-file -- part of
698 :     the CM manual source.)
699 :    
700 :     ----------------------------------------------------------------------
701 :     Name: Matthias Blume
702 : blume 986 Date: 2001/11/21 16:10:00 EST
703 : blume 988 Tag: blume-20011121-invalid_110_37
704 : blume 986 Description:
705 :    
706 : blume 988 Note: I removed the original tag "Release_110_37" from this commit
707 :     because we found a serious bug in all non-x86 backends.
708 :     - Matthias
709 :    
710 : blume 986 1. Modifications to the SML/NJ code generator and to the runtime system
711 :     so that code object name strings are directly inserted into code
712 :     objects at code generation time. The only business the runtime system
713 :     has with this is now to read the name strings on occasions.
714 :     (The encoding of the name string has also changed somewhat.)
715 :    
716 :     2. CM now implements a simple "set calculus" for specifying export lists.
717 :     In particular, it is now possible to refer to the export lists of
718 :     other libraries/groups/sources and form unions as well as differences.
719 :     See the latest CM manual for details.
720 :    
721 :     3. An separate notion of "proxy" libraries has again be eliminated from
722 :     CM's model. (Proxy libraries are now simply a special case of using
723 :     the export list calculus.)
724 :    
725 :     4. Some of the existing libraries now take advantage of the new set
726 :     calculus.
727 :     (Notice that not all libraries have been converted because some
728 :     of the existing .cm-files are supposed to be backward compatible
729 :     with 110.0.x.)
730 :    
731 :     5. Some cleanup in stand-alone programs. (Don't use "exnMessage" -- use
732 :     "General.exnMessage"! The former relies on a certain hook to be
733 :     initialized, and that often does not happen in the stand-alone case.)
734 :    
735 :     ----------------------------------------------------------------------
736 : george 984 Name: Lal George
737 :     Date: 2001/11/21 13:56:18 EST
738 :     Tag: george-2001121-pseudo-ops
739 :     Description:
740 :    
741 :     Implemented a complete redesign of MLRISC pseudo-ops. Now there
742 :     ought to never be any question of incompatabilities with
743 :     pseudo-op syntax expected by host assemblers.
744 :    
745 :     For now, only modules supporting GAS syntax are implemented
746 :     but more should follow, such as MASM, and vendor assembler
747 :     syntax, e.g. IBM as, Sun as, etc.
748 :    
749 :     ----------------------------------------------------------------------
750 : blume 977 Name: Matthias Blume
751 :     Date: 2001/11/14 11:52:00 EST
752 :     Tag: blume-20011114-srcname
753 :     Description:
754 :    
755 :     1. Routed the name of the current source file to mlriscgen where it
756 :     should be directly emitted into the code object. (This last part
757 :     is yet to be done.)
758 :    
759 :     2. Some cleanup of the pgraph code to make it match the proposal that
760 :     I put out the other day. (The proposal notwithstanding, things are
761 :     still in flux here.)
762 :    
763 :     ----------------------------------------------------------------------
764 : george 976 Name: Lal George
765 :     Date: 2001/11/14 09:44:04 EST
766 :     Tag:
767 :     Description:
768 :    
769 :     Fix for a backpatching bug reported by Allen.
770 :    
771 :     Because the boundary between short and long span-dependent
772 :     instructions is +/- 128, there are an astounding number of
773 :     span-dependent instructions whose size is over estimated.
774 :    
775 :     Allen came up with the idea of letting the size of span
776 :     dependent instructions be non-monotonic, for a maxIter
777 :     number of times, after which the size must be monotonically
778 :     increasing.
779 :    
780 :     This table shows the number of span-dependent instructions
781 :     whose size was over-estimated as a function of maxIter, for the
782 :     file Parse/parse/ml.grm.sml:
783 :    
784 :     maxIter # of instructions:
785 :     10 687
786 :     20 438
787 :     30 198
788 :     40 0
789 :    
790 :     In compiling the compiler, there is no significant difference in
791 :     compilation speed between maxIter=10 and maxIter=40. Actually,
792 :     my measurements showed that maxIter=40 was a tad faster than
793 :     maxIter=10! Also 96% of the files in the compiler reach a fix
794 :     point within 13 iterations, so fixing maxIter at 40, while high,
795 :     is okay.
796 :    
797 :     ----------------------------------------------------------------------
798 : blume 975 Name: Matthias Blume
799 :     Date: 2001/10/31 15:25:00 EST
800 :     Tag: blume-20011031-pgraph
801 :     Description:
802 :    
803 :     CKIT:
804 :     * Changed the "Function" constructor of type Ast.ctype to carry optional
805 :     argument identifiers.
806 :     * Changed the return type of TypeUtil.getFunction accordingly.
807 :     * Type equality ignores the argument names.
808 :     * TypeUtil.composite tries to preserve argument names but gives up quickly
809 :     if there is a mismatch.
810 :    
811 :     installation script:
812 :     * attempts to use "curl" if available (unless "wget" is available as well)
813 :    
814 :     CM:
815 :     * has an experimental implementation of "portable graphs" which I will
816 :     soon propose as an implementation-independent library format
817 :     * there are also new libraries $/pgraph.cm and $/pgraph-util.cm
818 :    
819 :     NLFFI-LIB:
820 :     * some cleanup (all cosmetic)
821 :    
822 :     NLFFIGEN:
823 :     * temporarily disabled the mechanism that suppresses ML output for
824 :     C definitions whose identifiers start with an underscore character
825 :     * generate val bindings for enum constants
826 :     * user can request that only one style (light or heavy) is being used;
827 :     default is to use both (command-line arguments: -heavy and -light)
828 :     * fixed bug in handling of function types involving incomplete pointers
829 :     * generate ML entry points that take record arguments (i.e., using
830 :     named arguments) for C functions that have a prototype with named
831 :     arguments
832 :     (see changes to CKIT)
833 :    
834 :     ----------------------------------------------------------------------
835 : leunga 972 Name: Allen Leung
836 :     Date: 2001/10/27 20:34:00 EDT
837 :     Tag: leunga-20011027-x86-fast-fp-call
838 :     Description:
839 :    
840 :     Fixed the bug described in blume-20010920-slowfp.
841 :    
842 :     The fix involves
843 :     1. generating FCOPYs in FSTP in ia32-svid
844 :     2. marking a CALL with the appropriate annotation
845 :    
846 :     ----------------------------------------------------------------------
847 : blume 961 Name: Matthias Blume
848 :     Date: 2001/10/16 11:32:00 EDT
849 :     Tag: blume-20011016-netbsd
850 :     Description:
851 :    
852 :     Underscore patch from Chris Richards (fixing problem with compiling
853 :     runtime system under recent NetBSD).
854 :    
855 :     ----------------------------------------------------------------------
856 : george 959 Name: Allen Leung
857 :     Date: 2001/10/12 17:18:32 EDT 2001
858 :     Tag: leung-20011012-x86-printflowgraph
859 :     Description:
860 :    
861 :     X86RA now uses a valid (instead of dummy) PrintFlowgraph module.
862 :    
863 :     ----------------------------------------------------------------------
864 : george 952 Name: Lal George
865 : george 958 Date: 2001/10/11 23:51:34 EDT
866 :     Tag: george-20011011-too-many-instrs
867 :     Description:
868 :    
869 :     The representation of a program point never expected to see more
870 :     than 65536 instructions in a basic block!
871 :    
872 :     ----------------------------------------------------------------------
873 :     Name: Lal George
874 : george 952 Date: 2001/10/09 09:41:37 EDT
875 :     Tag: george-20011008-mlrisc-labels
876 :     Description:
877 :    
878 :     Changed the machine description files to support printing of
879 :     local and global labels in assembly code, based on host assembler
880 :     conventions.
881 :    
882 :     ----------------------------------------------------------------------
883 : blume 916 Name: Matthias Blume
884 : blume 939 Date: 2001/09/25 15:25:00 EDT
885 :     Tag: blume-20010925-exninfo
886 :     Description:
887 :    
888 :     I provided a non-hook implementation of exnName (at the toplevel) and
889 :     made the "dummy" implementation of exnMessage (at the toplevel) more
890 :     useful: if nothing gets "hooked in", then at least you are going to
891 :     see the exception name and a message indicating why you don't see more.
892 :    
893 :     [For the time being, programs that need exnMessage and want to use
894 :     ml-build should either use General.exnMessage (strongly recommended) or
895 :     refer to structure General at some other point so that CM sees a
896 :     static dependency.]
897 :    
898 :     [Similar remarks go for "print" and "use": If you want to use their
899 :     functionality in stand-alone programs generated by ml-build, then use
900 :     TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).]
901 :    
902 :     ----------------------------------------------------------------------
903 :     Name: Matthias Blume
904 : blume 938 Date: 2001/09/20 17:28:00 EDT
905 :     Tag: blume-20010920-slowfp
906 :     Description:
907 :    
908 :     Allen says that x86-fast-fp is not safe yet, so I turned it off again...
909 :    
910 :     ----------------------------------------------------------------------
911 :     Name: Matthias Blume
912 : blume 937 Date: 2001/09/20 17:20:00 EDT
913 :     Tag: blume-20010920-canonicalpaths
914 :     Description:
915 :    
916 :     0. Updated the BOOT file (something that I forgot to do earlier).
917 :    
918 :     1. Small internal change to CM so that it avoids "/../" in filenames
919 :     as much as possible (but only where it is safe).
920 :    
921 :     2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so
922 :     that arguments that contain delimiters are passed through correctly.
923 :     This change also means that all "special" arguments of the form
924 :     @SMLxxx... must come first.
925 :    
926 :     3. Changed install script to put relative anchor names for tool commands
927 :     into pathconfig.
928 :    
929 :     ----------------------------------------------------------------------
930 :     Name: Matthias Blume
931 : blume 932 Date: 2001/09/18 15:35:00 EDT
932 :     Tag: blume-20010918-readme11036
933 :     Description:
934 :    
935 :     Added README files.
936 :    
937 :     ----------------------------------------------------------------------
938 :     Name: Matthias Blume
939 : blume 929 Date: 2001/09/18 11:45:00 EDT
940 :     Tag: Release_110_36 (retag)
941 :     Description:
942 :    
943 :     Fixed mistake in config/preloads. Retagged as 110.36.
944 :    
945 :     ----------------------------------------------------------------------
946 :     Name: Matthias Blume
947 : blume 928 Date: 2001/09/18 09:40:00 EDT
948 : blume 929 Tag: Release_110_36_orig (tag changed)
949 : blume 928 Description:
950 :    
951 :     New version (110.36). New bootfiles.
952 :    
953 :     ----------------------------------------------------------------------
954 :     Name: Matthias Blume
955 : blume 927 Date: 2001/09/14 16:15:00 EDT
956 :     Tag: blume-20010914-x86fastfp
957 :     Description:
958 :    
959 :     John committed some changes that Allen made, in particular a (hopefully)
960 :     correctly working version of the x86-fp module.
961 :    
962 :     I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp"
963 :     flag to "true". Everything seems to compile to a fixpoint ok, and
964 :     "mandelbrot" speeds up by about 15%.
965 :    
966 :     ----------------------------------------------------------------------
967 :     Name: Matthias Blume
968 : blume 923 Date: 2001/09/13 11:20:00 EDT
969 :     Tag: blume-20010913-minimal
970 :     Description:
971 :    
972 :     1. Stefan Monnier's patch to fix a miscompilation problem that
973 :     was brought to light by John Reppy's work on Moby.
974 :    
975 :     2. Implemented a minimal "structure Compiler" that contains just
976 :     "version" and "architecture". The minimal version will be
977 :     available when the full version is not. This is for backward-
978 :     compatibility with code that wants to test Compiler.version.
979 :    
980 :     ----------------------------------------------------------------------
981 :     Name: Matthias Blume
982 : blume 920 Date: 2001/08/28 14:03:00 EDT
983 :     Tag: blume-20010828-ml-lex
984 :     Description:
985 :    
986 :     Fix for bug 1581, received from Neophytos Michael.
987 :    
988 :     ----------------------------------------------------------------------
989 :     Name: Matthias Blume
990 : blume 918 Date: 2001/08/27 11:20:00 EDT
991 :     Tag: blume-20010827-readme11035
992 :     Description:
993 :    
994 :     Fleshed out the README file for 110.35.
995 :    
996 :     ----------------------------------------------------------------------
997 :     Name: Matthias Blume
998 : blume 916 Date: 2001/08/24 17:10:00 EDT
999 :     Tag: Release_110_35
1000 :     Description:
1001 :    
1002 :     New version number (110.35). New bootfiles.
1003 :    
1004 :     ----------------------------------------------------------------------
1005 : george 915 Name: Lal George
1006 : george 909 Date: 2001/08/24 13:47:18 EDT 2001
1007 :     Tag: george-20010824-MLRISC-graphs
1008 :     Description:
1009 :    
1010 :     removed clusters from MLRISC completely and replaced with graphs.
1011 :    
1012 :     ----------------------------------------------------------------------
1013 :     Name: Matthias Blume
1014 : blume 905 Date: 2001/08/23 17:50:00 EDT
1015 :     Tag: blume-20010823-toplevel
1016 :     Description:
1017 :    
1018 :     - some reorganization of the code that implements various kinds of
1019 :     environments in the compiler (static, dynamic, symbolic, combined)
1020 :     - re-implemented the EnvRef module so that evalStream works properly
1021 :     (if the stream contains references to "use", "CM.make", etc.)
1022 :     - cleaned up evalloop.sml and interact.sml (but they need more cleaning)
1023 :    
1024 :     ----------------------------------------------------------------------
1025 :     Name: Matthias Blume
1026 : blume 904 Date: 2001/08/20 15:50 EDT
1027 :     Tag: blume20010820-slipup
1028 :     Description:
1029 :    
1030 :     I forgot to commit a few files. Here they are...
1031 :    
1032 :     ----------------------------------------------------------------------
1033 :     Name: Matthias Blume
1034 : blume 903 Date: 2001/08/20 15:35:00 EDT
1035 :     Tag: blume-20010820-debugprof
1036 :     Description:
1037 :    
1038 :     !!!! NEW BOOTFILES !!!!
1039 :    
1040 :     This is another round of reorganizing the compiler sources. This
1041 :     time the main goal was to factor out all the "instrumentation"
1042 :     passes (for profiling and backtracing) into their own library.
1043 :     The difficulty was to do it in such a way that it does not depend
1044 :     on elaborate.cm but only on elabdata.cm.
1045 :    
1046 :     Therefore there have been further changes to both elaborate.cm and
1047 :     elabdata.cm -- more "generic" things have been moved from the former
1048 :     to the latter. As a result, I was forced to split the assignment
1049 :     of numbers indicating "primtyc"s into two portions: SML-generic and
1050 :     SML/NJ-specific. Since it would have been awkward to maintain,
1051 :     I bit the bullet and actually _changed_ the mapping between these
1052 :     numbers and primtycs. The bottom line of this is that you need
1053 :     a new set of bin- and bootfiles.
1054 :    
1055 :     I have built new bootfiles for all architectures, so doing a fresh
1056 :     checkout and config/install.sh should be all you need.
1057 :    
1058 :     The newly created library's name is
1059 :    
1060 :     $smlnj/viscomp/debugprof.cm
1061 :    
1062 :     and its sources live under
1063 :    
1064 :     src/compiler/DebugProf
1065 :    
1066 :     ----------------------------------------------------------------------
1067 :     Name: Matthias Blume
1068 : blume 902 Date: 2001/08/15 17:15:00 EDT
1069 :     Tag: blume-20010815-compreorg
1070 :     Description:
1071 :    
1072 :     This is a first cut at reorganizing the CM libraries that make up the
1073 :     core of the compiler. The idea is to separate out pieces that could
1074 :     be used independently by tools, e.g., the parser, the typechecker, etc.
1075 :    
1076 :     The current status is a step in this direction, but it is not quite
1077 :     satisfactory yet. Expect more changes in the future.
1078 :    
1079 :     Here is the current (new) organization...
1080 :    
1081 :     What used to be $smlnj/viscomp/core.cm is now divided into
1082 :     six CM libraries:
1083 :    
1084 :     $smlnj/viscomp/basics.cm
1085 :     /parser.cm
1086 :     /elabdata.cm
1087 :     /elaborate.cm
1088 :     /execute.cm
1089 :     /core.cm
1090 :    
1091 :     The CM files for these libraries live under src/system/smlnj/viscomp.
1092 :     All these libraries are proxy libraries that contain precisely
1093 :     one CM library component. Here are the locations of the components
1094 :     (all within the src/compiler tree):
1095 :    
1096 :     Basics/basics.cm
1097 :     Parse/parser.cm
1098 :     ElabData/elabdata.cm
1099 :     Elaborator/elaborate.cm
1100 :     Execution/execute.cm
1101 :     core.cm
1102 :    
1103 :     [This organization is the same that has been used already
1104 :     for a while for the architecture-specific parts of the visible
1105 :     compiler and for the old version of core.cm.]
1106 :    
1107 :     As you will notice, many source files have been moved from their
1108 :     respective original locations to a new home in one of the above
1109 :     subtrees.
1110 :    
1111 :     The division of labor between the new libraries is the following:
1112 :    
1113 :     basics.cm:
1114 :     - Simple, basic definitions that pertain to many (or all) of
1115 :     the other libraries.
1116 :     parser.cm:
1117 :     - The SML parser, producing output of type Ast.dec.
1118 :     - The type family for Ast is also defined and exported here.
1119 :     elabdata.cm:
1120 :     - The datatypes that describe input and output of the elaborator.
1121 :     This includes types, absyn, and static environments.
1122 :     elaborator.cm:
1123 :     - The SML/NJ type checker and elaborator.
1124 :     This maps an Ast.dec (with a given static environment) to
1125 :     an Absyn.dec (with a new static environment).
1126 :     - This libraries implements certain modules that used to be
1127 :     structures as functors (to remove dependencies on FLINT).
1128 :     execute.cm:
1129 :     - Everything having to do with executing binary code objects.
1130 :     - Dynamic environments.
1131 :     core.cm:
1132 :     - SML/NJ-specific instantiations of the elaborator and MLRISC.
1133 :     - Top-level modules.
1134 :     - FLINT (this should eventually become its own library)
1135 :    
1136 :     Notes:
1137 :    
1138 :     I am not 100% happy with the way I separated the elaborator (and its
1139 :     data structures) from FLINT. Two instances of the same problem:
1140 :    
1141 :     1. Data structures contain certain fields that carry FLINT-specific
1142 :     information. I hacked around this using exn and the property list
1143 :     module from smlnj-lib. But the fact that there are middle-end
1144 :     specific fields around at all is a bit annoying.
1145 :    
1146 :     2. The elaborator calculates certain FLINT-related information. I tried
1147 :     to make this as abstract as I could using functorization, but, again,
1148 :     the fact that the elaborator has to perform calculations on behalf
1149 :     of the middle-end at all is not nice.
1150 :    
1151 :     3. Having to used exn and property lists is unfortunate because it
1152 :     weakens type checking. The other alternative (parameterizing
1153 :     nearly *everything*) is not appealing, though.
1154 :    
1155 :     I removed the "rebinding =" warning hack because due to the new organization
1156 :     it was awkward to maintain it. As a result, the compiler now issues some of
1157 :     these warnings when compiling init.cmi during bootstrap compilation. On
1158 :     the plus side, you also get a warning when you do, for example:
1159 :     val op = = Int32.+
1160 :     which was not the case up to now.
1161 :    
1162 :     I placed "assign" and "deref" into the _Core structure so that the
1163 :     code that deals with the "lazy" keyword can find them there. This
1164 :     removes the need for having access to the primitive environment
1165 :     during elaboration.
1166 :    
1167 :     ----------------------------------------------------------------------
1168 :     Name: Matthias Blume
1169 : blume 898 Date: 2001/08/13
1170 :     Tag: blume-20010813-closures
1171 :     Description:
1172 :    
1173 :     This fix was sent to us by Zhong Shao. It is supposed to improve the
1174 :     performance of certain loops by avoiding needless closure allocation.
1175 :    
1176 :     ----------------------------------------------------------------------
1177 : george 890 Name: Lal George
1178 : george 896 Date: 2001/07/31 10:03:23 EDT 2001
1179 :     Tag: george-20010731-x86-fmalloc
1180 :     Description: Fixed bug in x86 calls
1181 :    
1182 :     There was a bug where call instructions would mysteriously
1183 :     vanish. The call instruction had to be one that returned
1184 :     a floating point value.
1185 :    
1186 :     ----------------------------------------------------------------------
1187 :     Name: Lal George
1188 : george 890 Date: 2001/07/19 16:36:29 EDT 2001
1189 :     Tag: george-20010719-simple-cells
1190 :     Description:
1191 :    
1192 :     I have dramatically simplified the interface for CELLS in MLRISC.
1193 :    
1194 :     In summary, the cells interface is broken up into three parts:
1195 :    
1196 :     1. CellsBasis : CELLS_BASIS
1197 :    
1198 :     CellsBasis is a top level structure and common for all
1199 :     architectures. it contains the definitions of basic datatypes
1200 :     and utility functions over these types.
1201 :    
1202 :     2. functor Cells() : CELLS
1203 :    
1204 :     Cells generates an interface for CELLS that incorporates the
1205 :     specific resources on the target architecture, such as the
1206 :     presence of special register classes, their number and size,
1207 :     and various useful substructures.
1208 :    
1209 :     3. <ARCH>CELLS
1210 :    
1211 :     e.g. SparcCells: SPARCCELLS
1212 :    
1213 :     <ARCH>CELLS usually contains additional bindings for special
1214 :     registers on the architecture, such as:
1215 :    
1216 :     val r0 : cell (* register zero *)
1217 :     val y : cell (* Y register *)
1218 :     val psr : cell (* processor status register *)
1219 :     ...
1220 :    
1221 :     The structure returned by applying the Cells functor is opened
1222 :     in this interface.
1223 :    
1224 :     The main implication of all this is that the datatypes for cells is
1225 :     split between CellsBasis and CELLS -- a fairly simple change for user
1226 :     code.
1227 :    
1228 :     In the old scheme the CELLS interface had a definitional binding of
1229 :     the form:
1230 :    
1231 :     signature CELLS = sig
1232 :    
1233 :     structure CellsBasis = CellsBasis
1234 :    
1235 :     ...
1236 :    
1237 :     end
1238 :    
1239 :     With all the sharing constraints that goes on in MLRISC, this old
1240 :     design quickly leads to errors such as:
1241 :    
1242 :     "structure definition spec inside of sharing ... "
1243 :    
1244 :    
1245 :     and appears to require an unacceptable amount of sharing and where
1246 :     constraint hackery.
1247 :    
1248 :     I think this error message (the interaction of definitional specs and
1249 :     sharing) requires more explanation on our web page.
1250 :    
1251 :     ----------------------------------------------------------------------
1252 : blume 826 Name: Matthias Blume
1253 : blume 879 Date: 2001/07/19 15:00:00 EDT
1254 :     Tag: blume-20010719-libreorg
1255 :     Description:
1256 :    
1257 :     This update puts together a fairly extensive but straightforward change
1258 :     to the way the libraries that implement the interactive system are
1259 :     organized:
1260 :    
1261 :     The biggest change is the elimination of structure Compiler. As a
1262 :     replacement for this structure, there is now a CM library
1263 :     (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm)
1264 :     that exports all the substructures of the original structure Compiler
1265 :     directly. So instead of saying Compiler.Foo.bar one now simply
1266 :     says Foo.bar. (The CM libraries actually export a collection of
1267 :     structures that is richer than the collection of substructures of
1268 :     structure Compiler.)
1269 :    
1270 :     To make the transition smooth, there is a separate library called
1271 :     $smlnj/compiler/compiler.cm which puts together and exports the
1272 :     original structure Compiler (or at least something very close to it).
1273 :    
1274 :     There are five members of the original structure Compiler
1275 :     that are not exported directly but which instead became members
1276 :     of a new structure Backend (described by signature BACKEND). These are:
1277 :     structure Profile (: PROFILE), structure Compile (: COMPILE), structure
1278 :     Interact (: INTERACT), structure Machine (: MACHINE), and val
1279 :     architecture (: string).
1280 :    
1281 :     Structure Compiler.Version has become structure CompilerVersion.
1282 :    
1283 :     Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided
1284 :     by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc,
1285 :     or x86, respectively.
1286 :     Each of these exports the same frontend structures that
1287 :     $smlnj/compiler.cm exports. But they do not have a structure Backend
1288 :     and instead export some structure <Arch>Backend where <Arch> is Alpha32,
1289 :     Hppa, PPC, Sparc, or X86, respectively.
1290 :    
1291 :     Library $smlnj/compiler/all.cm exports the union of the exports of
1292 :     $smlnj/compiler/<arch>.cm
1293 :    
1294 :     There are no structures <Arch>Compiler anymore, use
1295 :     $smlnj/compiler/<arch>.cm instead.
1296 :    
1297 :     Library host-compiler-0.cm is gone. Instead, the internal library
1298 :     that instantiates CM is now called cm0.cm. Selection of the host
1299 :     compiler (backend) is no longer done here but. (Responsibility for it
1300 :     now lies with $smlnj/compiler/current.cm. This seems to be more
1301 :     logical.)
1302 :    
1303 :     Many individual files have been moved or renamed. Some files have
1304 :     been split into multiple files, and some "dead" files have been deleted.
1305 :    
1306 :     Aside from these changes to library organization, there are also changes
1307 :     to the way the code itself is organized:
1308 :    
1309 :     Structure Binfile has been re-implemented in such a way that it no
1310 :     longer needs any knowledge of the compiler. It exclusively deals
1311 :     with the details of binfile layout. It no longer invokes the
1312 :     compiler (for the purpose of creating new prospective binfile
1313 :     content), and it no longer has any knowledge of how to interpret
1314 :     pickles.
1315 :    
1316 :     Structure Compile (: COMPILE) has been stripped down to the bare
1317 :     essentials of compilation. It no longer deals with linking/execution.
1318 :     The interface has been cleaned up considerably.
1319 :    
1320 :     Utility routines for dealing with linking and execution have been
1321 :     moved into their own substructures.
1322 :    
1323 :     (The ultimate goal of these changes is to provide a light-weight
1324 :     binfile loader/linker (at least for, e.g., stable libraries) that
1325 :     does not require CM or the compiler to be present.)
1326 :    
1327 :     CM documentation has been updated to reflect the changes to library
1328 :     organization.
1329 :    
1330 :     ----------------------------------------------------------------------
1331 :     Name: Matthias Blume
1332 : blume 875 Date: 2001/07/10 17:30:00 EDT
1333 :     Tag: Release_110_34
1334 :     Description:
1335 :    
1336 : blume 876 Minor tweak to 110.34 (re-tagged):
1337 :    
1338 :     - README.html file added to CVS repository
1339 :     - runtime compiles properly under FreeBSD 3.X and 4.X
1340 :    
1341 :     ----------------------------------------------------------------------
1342 :     Name: Matthias Blume
1343 :     Date: 2001/07/10 17:30:00 EDT
1344 :     Tag: Release_110_34
1345 :     Description:
1346 :    
1347 : blume 875 New version number (110.34). New bootfiles.
1348 :    
1349 :     ----------------------------------------------------------------------
1350 :     Name: Matthias Blume
1351 : blume 874 Date: 2001/07/09 16:00:00 EDT
1352 :     Tag: blume-20010709-more-varargs
1353 :     Description:
1354 :    
1355 :     I changed the handling of varargs in ml-nlffigen again:
1356 :     The ellipsis ... will now simply be ignored (with an accompanying warning).
1357 :    
1358 :     The immediate effect is that you can actually call a varargs function
1359 :     from ML -- but you can't actually supply any arguments beyond the ones
1360 :     specified explicitly. (For example, you can call printf with its format
1361 :     string, but you cannot pass additional arguments.)
1362 :    
1363 :     This behavior is only marginally more useful than the one before, but
1364 :     it has the advantage that a function or, more importantly, a function
1365 :     type never gets dropped on the floor, thus avoiding follow-up problems with
1366 :     other types that refer to the offending one.
1367 :    
1368 :     ----------------------------------------------------------------------
1369 :     Name: Matthias Blume
1370 : blume 873 Date: 2001/07/09 11:25:00 EDT
1371 :     Tag: blume-20010709-varargs
1372 :     Description:
1373 :    
1374 :     1. ckit-lib.cm now exports structure Error
1375 :     2. ml-nlffigen reports occurences of "..." (i.e., varargs function types)
1376 :     with a warning accompanied by a source location. Moreover, it
1377 :     merely skips the offending function or type and proceeds with the
1378 :     rest of its work.u As a result, one can safely feed C code containing
1379 :     "..." to ml-nlffigen.
1380 :     3. There are some internal improvements to CM, providing slightly
1381 :     more general string substitutions in the tools subsystem.
1382 :    
1383 :     ----------------------------------------------------------------------
1384 :     Name: Matthias Blume
1385 : blume 854 Date: 2001/06/27 15:10:00 EDT
1386 :     Tag: blume-20010627-concur
1387 :     Description:
1388 :    
1389 :     Fixed a small bug in CM's handling of parallel compilation.
1390 :     (You could observe the bug by Control-C-interrupting an ordinary
1391 :     CMB.make or CM.stabilize and then attaching some compile servers.
1392 :     The result was that all of a sudden the previously interrupted
1393 :     compilation would continue on its own. This was because of
1394 :     an over-optimization: CM did not bother to clean out certain queues
1395 :     when no servers were attached "anyway", resulting in the contents
1396 :     of these queues to grab control when new servers did get attached.)
1397 :    
1398 :     There is also another minor update to the CM manual.
1399 :    
1400 :     ----------------------------------------------------------------------
1401 :     Name: Matthias Blume
1402 : blume 853 Date: 2001/06/26 16:15:00 EDT
1403 :     Tag: blume-20010626-cmdoc
1404 :     Description:
1405 :    
1406 :     Minor typo fixed in CM manual (syntax diagram for libraries).
1407 :    
1408 :     ----------------------------------------------------------------------
1409 :     Name: Matthias Blume
1410 : blume 852 Date: 2001/06/25 22:55:00 EDT
1411 :     Tag: blume-20010625-x86pc
1412 :     Description:
1413 :    
1414 :     Fixed a nasty bug in the X86 assembly code that caused signal
1415 :     handlers to fail (crash) randomly.
1416 :    
1417 :     ----------------------------------------------------------------------
1418 :     Name: Matthias Blume
1419 : blume 846 Date: 2001/06/25 12:05:00 EDT
1420 :     Tag: blume-20010625-nlffigen
1421 :     Description:
1422 :    
1423 :     This update fixes a number of minor bugs in ml-nlffigen as reported by
1424 :     Nick Carter <nbc@andrew.cmu.edu>.
1425 :    
1426 :     1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted.
1427 :     2. Default names for generated files are now derived from the name of
1428 :     the C file *without its directory*. In particular, this causes generated
1429 :     files to be placed locally even if the C file is in some system directory.
1430 :     3. Default names for generated signatures and structures are also derived
1431 :     from the C file name without its directory. This avoids silly things
1432 :     like "structure GL/GL".
1433 :     (Other silly names are still possible because ml-nlffigen does not do
1434 : blume 847 a thorough check of whether generated names are legal ML identifiers.
1435 :     When in doubt, use command line arguments to force particular names.)
1436 : blume 846
1437 :     ----------------------------------------------------------------------
1438 :     Name: Matthias Blume
1439 : blume 845 Date: 2001/06/21 12:25:00 EDT
1440 :     Tag: blume-20010621-eXene
1441 :     Description:
1442 :    
1443 :     eXene now compiles and (sort of) works again.
1444 :    
1445 :     The library name (for version > 110.33) is $/eXene.cm.
1446 :    
1447 :     I also added an new example in src/eXene/examples/nbody. See the
1448 :     README file there for details.
1449 :    
1450 :     ----------------------------------------------------------------------
1451 :     Name: Matthias Blume
1452 : blume 844 Date: 2001/06/20 16:40:00 EDT
1453 :     Tag: blume-20010620-cml
1454 :     Description:
1455 :    
1456 :     CML now compiles and works again.
1457 :    
1458 :     Libraries (for version > 110.33):
1459 :    
1460 :     $cml/cml.cm Main CML library.
1461 :     $cml/basis.cm CML's version of $/basis.cm.
1462 :     $cml/cml-internal.cm Internal helper library.
1463 :     $cml/core-cml.cm Internal helper library.
1464 :     $cml-lib/trace-cml.cm Tracing facility.
1465 :     $cml-lib/smlnj-lib.cm CML's version of $/smlnj-lib.cm
1466 :    
1467 :     The installer (config/install.sh) has been taught how to properly
1468 :     install this stuff.
1469 :    
1470 :     ----------------------------------------------------------------------
1471 :     Name: Matthias Blume
1472 : blume 843 Date: 2001/06/19 17:55:00 EDT
1473 :     Tag: blume-20010619-instantiate
1474 :     Description:
1475 :    
1476 :     This un-breaks the fix for bug 1432.
1477 :     (The bug was originally fixed in 110.9 but I broke it again some
1478 :     time after that.)
1479 :    
1480 :     ----------------------------------------------------------------------
1481 :     Name: Matthias Blume
1482 : blume 842 Date: 2001/06/19 17:25:00 EDT
1483 :     Tag: blume-20010619-signals
1484 :     Description:
1485 :    
1486 :     This should (hopefully) fix the long-standing signal handling bug.
1487 :     (The runtime system was constructing a continuation record with an
1488 :     incorrect descriptor which would cause the GC to drop data on the floor...)
1489 :    
1490 :     ----------------------------------------------------------------------
1491 :     Name: Matthias Blume
1492 : blume 840 Date: 2001/06/15 15:05:00 EDT
1493 : blume 841 Tag: blume-20010615-moresparc
1494 :     Description:
1495 :    
1496 :     Here is a short late-hour update related to Sparc c-calls:
1497 :    
1498 :     -- made handling of double-word arguments a bit smarter
1499 :    
1500 :     -- instruction selection phase tries to collapse certain clumsily
1501 :     constructed ML-Trees; typical example:
1502 :    
1503 :     ADD(ty,ADD(_,e,LI d1),LI d2) -> ADD(ty,e,LI(d1+d2))
1504 :    
1505 :     This currently has no further impact on SML/NJ since mlriscGen does
1506 :     not seem to generate such patterns in the first place, and c-calls
1507 :     (which did generate them in the beginning) has meanwhile been fixed
1508 :     so as to avoid them as well.
1509 :    
1510 :     ----------------------------------------------------------------------
1511 :     Name: Matthias Blume
1512 :     Date: 2001/06/15 15:05:00 EDT
1513 : blume 840 Tag: blume-20010615-sparc
1514 :     Description:
1515 :    
1516 :     The purpose of this update is to provide an implementation of NLFFI
1517 :     on Sparc machines.
1518 :    
1519 :     Here are the changes in detail:
1520 :    
1521 :     * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing
1522 :     the Sparc implementation of the c-calls API.
1523 :     * The Sparc backend of SML/NJ has been modified to uniformely use %fp
1524 :     for accessing the ML frame. Thus, we have a real frame pointer and
1525 :     can freely modify %sp without need for an omit-frame-ptr phase.
1526 :     The vfp logic in src/compiler/CodeGen/* has been changed to accomodate
1527 :     this case.
1528 :     * ml-nlffigen has been taught to produce code for different architectures
1529 :     and calling conventions.
1530 :     * In a way similar to what was done in the x86 case, the Sparc
1531 :     backend uses its own specific extension to mltree. (For example,
1532 :     it needs to be able to generate UNIMP instructions which are part
1533 :     of the calling convention.)
1534 :     * ml-nlffi-lib was reorganized to make it more modular (in particular,
1535 :     to make it easier to plug in new machine- and os-dependent parts).
1536 :    
1537 :     There are some other fairly unrelated bug fixes and cleanups as well:
1538 :    
1539 :     * I further hacked the .cm files for MLRISC tools (like MDLGen) so
1540 :     that they properly share their libraries with existing SML/NJ libraries.
1541 :     * I fixed a minor cosmetic bug in CM, supressing certain spurious
1542 :     follow-up error messages.
1543 :     * Updates to CM/CMB documentation.
1544 :    
1545 :     TODO items:
1546 :    
1547 :     * MLRISC should use a different register as its asmTemp on the Sparc.
1548 :     (The current %o2 is a really bad choice because it is part of the
1549 :     calling conventions, so things might interfere in unexpected ways.)
1550 :    
1551 :     ----------------------------------------------------------------------
1552 :     Name: Matthias Blume
1553 : blume 839 Date: 2001/06/07
1554 :     Tag: blume-20010607-calls
1555 :     Description:
1556 :    
1557 :     A number of internal changes related to C calls and calling conventions:
1558 :    
1559 :     1. ML-Tree CALL statements now carry a "pops" field. It indicates the
1560 :     number of bytes popped implicitly (by the callee). In most cases
1561 :     this field is 0 but on x86/win32 it is some non-zero value. This
1562 :     is information provided for the benefit of the "omit-frameptr" pass.
1563 :     2. The CALL instruction on the x86 carries a similar "pops" field.
1564 :     The instruction selection phase copies its value from the ML-Tree
1565 :     CALL statement.
1566 :     3. On all other architectures, the instruction selection phase checks
1567 :     whether "pops=0" and complains if not.
1568 :     4. The c-calls implementation for x86 now accepts two calling conventions:
1569 :     "ccall" and "stdcall". When "ccall" is selected, the caller cleans
1570 :     up after the call and pops is set to 0. For "stdcall", the caller
1571 :     does nothing, leaving the cleanup to the callee; pops is set to
1572 :     the number of bytes that were pushed onto the stack.
1573 :     5. The cproto decoder (compiler/Semant/types/cproto.sml) now can
1574 :     distinguish between "ccall" and "stdcall".
1575 :     6. The UNIMP instruction has been added to the supported Sparc instruction
1576 :     set. (This is needed for implementing the official C calling convention
1577 :     on this architecture.)
1578 :     7. I fixed some of the .cm files under src/MLRISC/Tools to make them
1579 :     work with the latest CM.
1580 :    
1581 :     ----------------------------------------------------------------------
1582 :     Name: Matthias Blume
1583 : blume 838 Date: 2001/06/05 15:10:00 EDT
1584 :     Tag: blume-20010605-cm-index
1585 :     Description:
1586 :    
1587 :     0. The "lambdasplit" parameter for class "sml" in CM has been documented.
1588 :    
1589 :     1. CM can now generate "index files". These are human-readable files
1590 :     that list on a per-.cm-file basis each toplevel symbol defined or
1591 :     imported. The location of the index file for
1592 :     <p>/<d>.cm is <p>/CM/INDEX/<d>.cm.
1593 :     To enable index-file generation, set CM.Control.generate_index to true
1594 :     or export an environment-symbol: export CM_GENERATE_INDEX=true.
1595 :    
1596 :     The CM manual has been updated accordingly.
1597 :    
1598 :     2. I made some slight modifications to the c-calls API in MLRISC.
1599 :    
1600 :     a) There is now a callback to support saving/restoring of
1601 :     dedicated but caller-save registers around the actual call
1602 :     instruction.
1603 :     b) One can optionally specify a comment-annotation for the
1604 :     call instruction.
1605 :    
1606 :     3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop.
1607 :     (For example, the comment annotation shows the C prototype of
1608 :     the function being called.)
1609 :    
1610 :     ----------------------------------------------------------------------
1611 :     Name: Matthias Blume
1612 : blume 837 Date: 2001/06/01 13:30:00 EDT
1613 :     Tag: blume-20010601-nlffi-cleanup
1614 :     Description:
1615 :    
1616 :     This is mostly a cleanup of MLFFI stuff:
1617 :    
1618 :     - some signature files have been put into a more exposed place
1619 :     - the ugly 'f type parameter is gone (simplifies types tremendously!)
1620 :     - ml-nlffigen changed accordingly
1621 :     - tutorial updated
1622 :    
1623 :     Other changes:
1624 :    
1625 :     - author's affiliation in CM manual(s) updated
1626 :     - some more recognized keywords added to Allen's sml.sty
1627 :    
1628 :     ----------------------------------------------------------------------
1629 :     Name: Matthias Blume
1630 : blume 836 Date: 2001/05/25 15:30:00 EDT
1631 :     Tag: blume-20010525-iptr
1632 :     Description:
1633 :    
1634 :     - put the official 110.33-README (as it appears on the ftp server) under
1635 :     CVS
1636 :     - fixed a small bug related to incomplete pointer types in
1637 :     ml-nlffigen
1638 :     - small cosmetic change to the ml-nlffi-lib's "arr" type constructor
1639 :     (it does not need the 'f type parameter)
1640 :    
1641 :     ----------------------------------------------------------------------
1642 :     Name: Matthias Blume
1643 : blume 834 Date: 2001/05/23 14:30:00 EDT
1644 :     Tag: Release_110_33
1645 :     Description:
1646 :    
1647 :     New version number (110.33). New bootfiles.
1648 :    
1649 :     ----------------------------------------------------------------------
1650 :     Name: Matthias Blume
1651 : blume 833 Date: 2001/05/22 18:06:00 EDT
1652 :     Tag: blume-20010522-targets
1653 :     Description:
1654 :    
1655 :     Made install.sh use file config/targets.customized if it exists, falling
1656 :     back to config/targets if it doesn't. This way one can have a customized
1657 :     version of the targets file without touching the "real thing", thus
1658 :     eliminating the constant fear of accidentally checking something bogus
1659 :     back into the CVS repository... (File config/targets.customized must
1660 :     not be added to the repository!)
1661 :    
1662 :     ----------------------------------------------------------------------
1663 :     Name: Matthias Blume
1664 : blume 832 Date: 2001/05/22 16:30:00 EDT
1665 :     Tag: blume-20010522-minitut
1666 :     Description:
1667 :    
1668 :     1. Bug fix in ml-nlffigen; now (hopefully) correctly handling
1669 :     struct returns.
1670 :     2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt. This is some very
1671 :     incomplete, preliminary documentation for NLFFI.
1672 :    
1673 :     ----------------------------------------------------------------------
1674 :     Name: Matthias Blume
1675 : blume 829 Date: 2001/05/14 11:30:00 EDT
1676 :     Tag: blume-20010514-script
1677 :     Description:
1678 :    
1679 :     Some bugs in install script fixed.
1680 :    
1681 :     In addition to that I also made a slight change to the NLFFI API:
1682 :     Functors generated by ml-nlffigen now take the dynamic library as a
1683 :     straight functor argument, not as a suspended one. (The original
1684 :     functor code used to force the suspension right away anyway, so there
1685 :     was nothing gained by this complication of the interface.)
1686 :    
1687 :     ----------------------------------------------------------------------
1688 :     Name: Matthias Blume
1689 : blume 828 Date: 2001/05/11 14:35:00 EDT
1690 :     Tag: blume-20010511-ml-nlffi
1691 :     Description:
1692 :    
1693 :     I finally took the plunge and added my new FFI code to the main
1694 :     repository. For x86-linux it is now ready for prime-time.
1695 :    
1696 :     There are two new subdirectories of "src":
1697 :    
1698 :     - ml-nlffi-lib:
1699 :     The utility library for programs using the FFI interface.
1700 :     Here is the implementation of $/c.cm and its associated low-level
1701 :     partners $/c-int.cm and $/memory.cm.
1702 :     - ml-nlffigen:
1703 :     A stand-alone program for generating ML glue code from C source
1704 :     code.
1705 :    
1706 :     Building ml-nlffigen requires $/ckit-lib.cm.
1707 :    
1708 :     The config/install.sh script has been updates to do the Right Thing
1709 :     (hopefully).
1710 :    
1711 :     Notice that the source tree for the C-Kit will not be put under "src"
1712 :     but directly under the installation root directory. (This is the
1713 :     structure that currently exists on the CVS server when you check out
1714 :     module "sml".) Fortunately, config/install.sh knows about this oddity.
1715 :    
1716 :     Bugs: No documentation yet.
1717 :    
1718 :     ----------------------------------------------------------------------
1719 :     Name: Matthias Blume
1720 : blume 826 Date: 2001/05/09 16:35:00 EDT
1721 :     Tag: blume-20010509-cpscontract
1722 :     Description:
1723 :    
1724 :     Fixed a bug in the accounting code in cpsopt/contract.sml. (The
1725 :     wrapper/unwrapper elimination did not decrement usage counts and some
1726 :     dead variables got overlooked by the dead-up logic.)
1727 :    
1728 :     ----------------------------------------------------------------------
1729 : george 824 Name: Lal George
1730 :     Date: 2001/05/08 17:26:09 EDT
1731 :     Tag: george-20010508-omit-frameptr
1732 :     Description:
1733 :    
1734 :     Changes to implement the omit-frame-pointer optimization to support
1735 :     raw C calls. For now, there is only support on the Intel x86, but
1736 :     other architectures will follow as more experience is gained with this.
1737 :    
1738 :    
1739 :     ----------------------------------------------------------------------
1740 : blume 818 Name: Matthias Blume
1741 : blume 819 Date: 2001/05/07 14:40:00 EDT
1742 :     Tag: blume-20010507-proxies
1743 :     Description:
1744 :    
1745 :     I made into "proxy libraries" all libraries that qualify for such a
1746 :     change. (A qualifying library is a library that has another library or
1747 :     groups as its sole member and repeats that member's export list
1748 :     verbatim. A proxy library avoids this repetition by omitting its export
1749 :     list, effectively inheriting the list that its (only) member exports.
1750 :     See the CM manual for more explanation.)
1751 :     The main effect is that explicit export lists for these libraries
1752 :     do not have to be kepts in sync, making maintenance a bit easier.
1753 :    
1754 :     I also added copyright notices to many .cm-files.
1755 :    
1756 :     Last but not least, I made a new set of bootfiles.
1757 :    
1758 :     ----------------------------------------------------------------------
1759 :     Name: Matthias Blume
1760 : blume 818 Date: 2001/05/04 17:00:00 EDT
1761 :     Tag: blume-20010504-cm-lsplit
1762 :     Description:
1763 :    
1764 :     0. John merged pending changes to $/smlnj-lib.cm
1765 :    
1766 :     1. Allen's previous change accidentally backed out of one of Lal's
1767 :     earlier changes. I undid this mistake (re-introducing Lal's change).
1768 :    
1769 :     2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm)
1770 :     within the compiler where applicable. There is some code simplification
1771 :     because of that.
1772 :    
1773 :     3. The "split" phase (in FLINT) is now part of the default list of phases.
1774 :     Compiler.Control.LambdaSplitting.* can be used to globally control the
1775 :     lambda-splitting (cross-module-inlining) engine. In addition to that,
1776 :     it can now also be controlled on a per-source basis: CM has been taught
1777 :     a new tool parameter applicable to ML source files.
1778 :    
1779 :     - To turn lambda-splitting off completely:
1780 :     local open Compiler.Control.LambdaSplitting in
1781 :     val _ = set Off
1782 :     end
1783 :     - To make "no lambda-splitting" the global default (but allow per-source
1784 :     overriding); this is the initial setting:
1785 :     local open Compiler.Control.LambdaSplitting in
1786 :     val _ = set (Default NONE)
1787 :     end
1788 :     - To make "lambda-splitting with aggressiveness a" the global default
1789 :     (and allow per-source overriding):
1790 :     local open Compiler.Control.LambdaSplitting in
1791 :     val _ = set (Default (SOME a))
1792 :     end
1793 :    
1794 :     - To turn lambda-splitting off for a given ML souce file (say: a.sml)
1795 :     write (in the respective .cm-file):
1796 :     a.sml (lambdasplitting:off)
1797 :     - To turn lambda-splitting for a.sml on with minimal aggressiveness:
1798 :     a.sml (lambdasplitting:on)
1799 :     - To turn lambda-splitting for a.sml on with aggressiveness <a> (where
1800 :     <a> is a decimal non-negative integer):
1801 :     a.sml (lambdasplitting:<a>)
1802 :     - To turn lambda-splitting for a.sml on with maximal aggressiveness:
1803 :     a.sml (lambdasplitting:infinity)
1804 :     - To use the global default for a.sml:
1805 :     a.sml (lambdasplitting:default)
1806 :     or simply
1807 :     a.sml
1808 :    
1809 :     ----------------------------------------------------------------------
1810 : leunga 815 Name: Allen Leung
1811 :     Date: 2001/05/04 01:57:00 EDT
1812 :     Tag: leunga-20010504-sync
1813 :     Description:
1814 : leunga 788
1815 : leunga 815 MLRISC features.
1816 :    
1817 :     1. Fix to CMPXCHG instructions.
1818 :     2. Changed RA interface to allow annotations in callbacks.
1819 :     3. Added a new method to the stream interface to allow annotations updates.
1820 :    
1821 : george 749 ----------------------------------------------------------------------
1822 : blume 812 Name: Matthias Blume
1823 : blume 814 Date: 2001/05/01 11:45:00 EDT
1824 :     Tag: blume-20010501-pcedittmp
1825 :     Description:
1826 :    
1827 :     Changed install.sh to use the current working directory instead of
1828 :     /usr/tmp for a temporary file (pcedittmp). The previous choice
1829 :     of /usr/tmp caused trouble with MacOS X because of file premission
1830 :     problems.
1831 :    
1832 :     ----------------------------------------------------------------------
1833 :     Name: Matthias Blume
1834 : blume 812 Date: 2001/04/20 11:10:00 EDT
1835 :     Tag: blume-20010420-inMLflag
1836 :     Description:
1837 :    
1838 :     - added vp_limitPtrMask to vproc-state.h
1839 :     (for use by the raw-C-calls mechanism to implement proper interrupt
1840 :     handling)
1841 :     - made the ML compiler aware of various data-structure offsets so it
1842 :     can generate code for accessing the vp_inML flag and vp_limitPtrMask
1843 :     - tweaked mlriscGen.sml to have it emit interrupt-handling code for
1844 :     raw C-calls
1845 :    
1846 :     ----------------------------------------------------------------------
1847 : george 810 Name: Lal George
1848 :     Date: 2001/04/20 09:15:28 EDT
1849 :     Tag: george-20010420-macosX
1850 :     Description:
1851 :    
1852 :     - Changes to port to Mac OS X; Darwin.
1853 :    
1854 :     - In the process I found that sqrt was broken on the PPC, because the
1855 :     fsqrt instruction is not implemented.
1856 :    
1857 :     ----------------------------------------------------------------------
1858 : blume 799 Name: Matthias Blume
1859 : blume 808 Date: 2001/04/18 12:45:00 EDT
1860 :     Tag: blume-20010418-ccalls
1861 :     Description:
1862 :    
1863 :     - fixed two off-by-4 errors in the x86-specific c-calls implementation
1864 :     (this bug prevented structure arguments containing pointers from being
1865 :     passed correctly)
1866 :     - changed the raw-C-call code in mlriscGen.sml in such a way that
1867 :     structure arguments are represented as a pointer to the beginning
1868 :     of the structure (instead of having a series of synthesized arguments,
1869 :     one for each structure member)
1870 :    
1871 :     - made makeml script's verbosity level configurable via environment
1872 :     variable (MAKEML_VERBOSITY)
1873 :    
1874 : blume 813 - eliminated placeholder implementations for f32l, w16s, i16s, and f32s
1875 : blume 808 in rawmem-x86.sml; we are now using the real thing
1876 :    
1877 :     ----------------------------------------------------------------------
1878 :     Name: Matthias Blume
1879 : blume 806 Date: 2001/03/22 16:25:00 EST
1880 :     Tag: blume-20010322-bootfiles
1881 :     Description:
1882 :    
1883 :     Created a new set of bootfiles (for your automatic installation convenience).
1884 :    
1885 :     ----------------------------------------------------------------------
1886 :     Name: Matthias Blume
1887 : blume 805 Date: 2001/03/22 15:10:00 EST
1888 :     Tag: blume-20010322-rawmem-parcm
1889 :     Description:
1890 :    
1891 :     1. All "raw memory access" primitives for the new FFI are implemented now
1892 :     (at least on the x86).
1893 :     2. Some further cleanup of CM's parallel make mechanism.
1894 :    
1895 :     ----------------------------------------------------------------------
1896 :     Name: Matthias Blume
1897 : blume 801 Date: 2001/03/19 17:53:00 EST
1898 :     Tag: blume-20010319-parallel
1899 :     Description:
1900 :    
1901 :     Parallel make (using compile servers) now works again.
1902 :    
1903 :     To this end, CM.stabilize and CMB.make have been modified to work in
1904 :     two passes when compile servers are attached:
1905 :     1. Compile everything, do not perform stabilization; this pass
1906 :     uses compile servers
1907 :     2. Stabilize everything; this pass does not use compile servers
1908 :     If there are no compile servers, the two passes are combined into one
1909 :     (as before). Splitting the passes increases the inherent parallelism
1910 :     in the dependency graph because the entire graph including all
1911 :     libraries is available at the same time. This, in turn, improves
1912 :     server utilization. The downside is that the master process will
1913 :     have to do some extra work after compilation is done (because for
1914 :     technical reasons it must re-read all the binfiles during stabilization).
1915 :    
1916 :     ----------------------------------------------------------------------
1917 :     Name: Matthias Blume
1918 : blume 800 Date: 2001/03/16 12:22:00 EST
1919 :     Tag: blume-20010316-bootfiles
1920 :     Description:
1921 :    
1922 :     Created a new set of bootfiles (for your automatic installation convenience).
1923 :    
1924 :     ----------------------------------------------------------------------
1925 :     Name: Matthias Blume
1926 : blume 799 Date: 2001/03/16 11:00:00 EST
1927 :     Tag: blume-20010316-MLTREE-fixup
1928 :     Description:
1929 :    
1930 :     This is a minor fixup for an (untagged) earlier commit by Allen.
1931 :     (A file was missing).
1932 :    
1933 :     ----------------------------------------------------------------------
1934 : leunga 788 Name: Allen Leung
1935 : leunga 796 Date: Mon Mar 5 18:54:57 EST 2001
1936 :     Tag: leunga-20010305-cut-support
1937 :    
1938 :     1. New support for alternative control-flow in MLTREE.
1939 :     Currently we support
1940 :    
1941 :     FLOW_TO(CALL ...., [k1,...,kn])
1942 :    
1943 :     This is needed for 'cuts to' in C-- and try/handle-like constructs
1944 :     in Moby
1945 :    
1946 :     New assembler flag "asm-show-cutsto" to turn on control-flow debugging.
1947 :    
1948 :     2. Register Allocator
1949 :    
1950 :     Changes in interface [from Fermin, John]
1951 :    
1952 :     3. Alpha 8-bit SLL support [Fermin]
1953 :    
1954 :     4. All architectures
1955 :    
1956 :     A new module (ClusterExpandCopies) for expanding parallel copies.
1957 :    
1958 :     ----------------------------------------------------------------------
1959 :     Name: Allen Leung
1960 : leunga 788 Date: 2001/02/27 23:07:00 EST
1961 :     Tag: leunga-20010227-minor-stuff
1962 :    
1963 :     1. Alpha bug fix for CMOVNE
1964 :     2. Handle mltree COND(..,FCMP ...,...)
1965 :     3. Bug fix in simplifier
1966 :    
1967 :     ----------------------------------------------------------------------
1968 : blume 777 Name: Matthias Blume
1969 : blume 781 Date: 2001/01/30 17:50:00 EST
1970 :     Tag: blume-20010130-sync
1971 :     Description:
1972 :    
1973 :     This is just a minor update to sync my devel branch with the main brach.
1974 :     The only visible change is the addition of some README files.
1975 :    
1976 :     ----------------------------------------------------------------------
1977 :     Name: Matthias Blume
1978 : blume 778 Date: 2001/01/12 23:30:00 JST
1979 :     Tag: blume-20010112-bootfiles
1980 :     Description:
1981 :    
1982 :     Made a new set of bootfiles that goes with the current state of the
1983 :     repository.
1984 :    
1985 :     ----------------------------------------------------------------------
1986 :     Name: Matthias Blume
1987 : blume 777 Date: 2001/01/12 21:20:00 JST
1988 :     Tag: blume-20010112-sync
1989 :     Description:
1990 :    
1991 :     I am just flushing out some minor changes that had accumulated in
1992 :     my private branch in order to sync with the main tree. (This is
1993 :     mainly because I had CVS trouble when trying to merge _into_ my
1994 :     private branch.)
1995 :    
1996 :     Most people should be completely unaffected by this.
1997 :    
1998 :     ----------------------------------------------------------------------
1999 : leunga 775 Name: Allen Leung
2000 :     Date: Thu Jan 11 21:03:00 EST 2001
2001 :     Tag: leunga-20010111-labexp=mltree
2002 :     Description:
2003 :    
2004 :     1. Removed the type LabelExp and replace it by MLTree.
2005 :     2. Rewritten mltree-simplify with the pattern matcher tool.
2006 :     3. There were some bugs in alpha code generator which would break
2007 :     64-bit code generation.
2008 :     4. Redo the tools to generate code with the
2009 :     5. The CM files in MLRISC (and in src/system/smlnj/MLRISC)
2010 :     are now generated by perl scripts.
2011 :    
2012 :     ----------------------------------------------------------------------
2013 : blume 771 Name: Matthias Blume
2014 : blume 774 Date: 2001/01/10 21:55:00 JST
2015 :     Tag: blume-20010110-rcc
2016 :     Description:
2017 :    
2018 :     The RCC stuff now seems to work (but only on the x86).
2019 :     This required hacking of the c-calls interface (and -implementation) in
2020 :     MLRISC.
2021 :    
2022 :     Normal compiler users should be unaffected.
2023 :    
2024 :     ----------------------------------------------------------------------
2025 :     Name: Matthias Blume
2026 : blume 773 Date: 2001/01/09 01:20:00 JST
2027 :     Tag: blume-20010109-rcc
2028 :     Description:
2029 :    
2030 :     This is a fairly big patch, flushing out a large number of pending
2031 :     changes that I made to my development copy over the last couple of days.
2032 :    
2033 :     Of practical relevance at this moment is a workaround for a pickling
2034 :     bug that Allen ran into the other day. The cause of the bug itself is
2035 :     still unknown and it might be hard to fix it properly, but the
2036 :     workaround has some merits of its own (namely somewhat reducing pickling
2037 :     overhead for certain libraries). Therefore, I think this solution should
2038 :     be satisfactory at this time.
2039 :    
2040 :     The rest of the changes (i.e., the vast majority) has to do with my
2041 :     ongoing efforts of providing direct support for C function calls from
2042 :     ML. At the moment there is a new primop "RAW_CCALL", typing magic
2043 :     in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new
2044 :     case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to
2045 :     translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to
2046 :     handle RCC.
2047 :    
2048 :     The last part (the changes to mlriscGen.sml) are still known to be
2049 :     wrong on the x86 and not implemented on all other architectures. But
2050 :     the infrastructure is in place. I had to change a few functor
2051 :     signatures in the backend to be able to route the CCalls interface
2052 :     from MLRISC there, and I had to specialize the mltree type (on the
2053 :     x86) to include the necessary extensions. (The extensions themselves
2054 :     were already there and redy to go in MLRISC/x86).
2055 :    
2056 :     Everything should be very happy as soon as someone helps me with
2057 :     mlriscGen.sml...
2058 :    
2059 :     In any case, nothing of this should matter to anyone as long as the
2060 :     new primop is not being used (which is going to be the case unless you
2061 :     find it where I hid it :). The rest of the compiler is completely
2062 :     unaffected.
2063 :    
2064 :     ----------------------------------------------------------------------
2065 :     Name: Matthias Blume
2066 : blume 772 Date: 2001/01/05 00:30:00 JST
2067 :     Tag: blume-20010105-primops
2068 :     Description:
2069 :    
2070 :     Added some experimental support for work that I am doing right now.
2071 :     These changes mostly concern added primops, but there is also a new
2072 :     experimental C library in the runtime system (but currently not enabled
2073 :     anywhere except on Linux/X86).
2074 :    
2075 :     In the course of adding primops (and playing with them), I discovered that
2076 :     Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly
2077 :     broken. (Zhong was very right he labeled this stuff as "major gross hack".)
2078 :     To recover, I made type information in INL_PRIM mandatory and changed
2079 :     prim.sml as well as built-in.sml accordingly. The InLine structure now
2080 :     has complete, correct type information (i.e., no bottom types).
2081 :    
2082 :     Since all these changes mean that we need new binfiles, I also bumped the
2083 :     version number to 110.32.1.
2084 :    
2085 :     ----------------------------------------------------------------------
2086 :     Name: Matthias Blume
2087 : blume 771 Date: 2000/12/30 22:10:00 JST
2088 :     Tag: blume-20001230-various
2089 :     Description:
2090 :    
2091 :     Added proxy libraries for MLRISC and let MLRISC libraries refer
2092 :     to each other using path anchors. (See CM manual for explanation.)
2093 :    
2094 :     Updated CM documentation.
2095 :    
2096 :     Fixed some bugs in CM.
2097 :    
2098 :     Implemented "proxy" libraries (= syntactic sugar for CM).
2099 :    
2100 :     Added "-quiet" option to makeml and changed runtime system accordingly.
2101 :    
2102 :     Added cleanup handler for exportML to reset timers and compiler stats.
2103 :    
2104 :     ----------------------------------------------------------------------
2105 : george 761 Name: Lal George
2106 :     Date: 2000/12/22 22:22:58 EST 2000
2107 :     Tag: Release_110_32
2108 :     Description:
2109 :    
2110 :     Infinite precision used throughout MLRISC.
2111 :     see MLRISC/mltree/machine-int.sig
2112 :    
2113 :     ----------------------------------------------------------------------
2114 : blume 756 Name: Matthias Blume
2115 : blume 760 Date: 2000/12/22 23:16:00 JST
2116 :     Tag: blume-20001222-warn
2117 :     Description:
2118 : blume 759
2119 : blume 760 Corrected wording and formatting of some CM warning message which I
2120 :     broke in my previous patch.
2121 : blume 759
2122 :     ----------------------------------------------------------------------
2123 :     Name: Matthias Blume
2124 : blume 763 Date: 2000/12/22 21:20:00 JST
2125 :     Tag: blume-20001222-anchorenv
2126 :     Description:
2127 :    
2128 :     Fixed CM's handling of anchor environments in connection with CMB.make.
2129 :    
2130 :     ----------------------------------------------------------------------
2131 :     Name: Matthias Blume
2132 : blume 758 Date: 2000/12/22 13:15:00 JST
2133 :     Tag: blume-20001222-cleanup
2134 :     Description:
2135 :    
2136 :     Removed src/cm/ffi which does not (and did not) belong here.
2137 :    
2138 :     ----------------------------------------------------------------------
2139 :     Name: Matthias Blume
2140 : blume 757 Date: 2000/12/21 23:55:00 JST
2141 :     Tag: blume-20001221-exn
2142 :     Description:
2143 :    
2144 :     Probably most important: CM no longer silently swallows all exceptions
2145 :     in the compiler.
2146 :     Plus: some other minor CM changes. For example, CM now reports some
2147 :     sizes for generated binfiles (code, data, envpickle, lambdapickle).
2148 :    
2149 :     ----------------------------------------------------------------------
2150 :     Name: Matthias Blume
2151 : blume 756 Date: 2000/12/15 00:01:05 JST
2152 :     Tag: blume-20001215-dirtool
2153 :     Description:
2154 :    
2155 :     - "dir" tool added.
2156 :     - improvements and cleanup to Tools structure
2157 :     - documentation updates
2158 :    
2159 :     ----------------------------------------------------------------------
2160 : leunga 752 Name: Allen Leung
2161 : leunga 755 Date: Thu Dec 14 03:45:24 EST 2000
2162 :     Description:
2163 :     Tag: leunga-20001214-int-inf
2164 :     Description:
2165 :    
2166 :     In IntInf, added these standard functions, which are missing from our
2167 :     implementation:
2168 :    
2169 :     andb : int * int -> int
2170 :     xorb : int * int -> int
2171 :     orb : int * int -> int
2172 :     notb : int -> int
2173 :     << : int * word -> int
2174 :     ~>> : int * word -> int
2175 :    
2176 :     Not tested, I hope they are correct.
2177 :    
2178 :     ----------------------------------------------------------------------
2179 :     Name: Allen Leung
2180 : leunga 752 Date: Fri Dec 8 19:23:26 EST 2000
2181 :     Description:
2182 :     Tag: leunga-20001208-nowhere
2183 :     Description:
2184 :    
2185 :     Slight improvements to the 'nowhere' tool to handle OR-patterns,
2186 :     to generate better error messages etc. Plus a brief manual.
2187 :    
2188 :     ----------------------------------------------------------------------
2189 : george 749 Name: Lal George
2190 :     Date: 2000/12/08 09:54:02 EST 2000
2191 :     Tag: Release_110_31
2192 :     Description:
2193 : george 705
2194 : george 749 - Version 110.31
2195 : leunga 591 ----------------------------------------------------------------------
2196 : leunga 744 Name: Allen Leung
2197 :     Date: Thu Dec 7 22:01:04 EST 2000
2198 :     Tag: leunga-20001207-cell-monster-hack
2199 :     Description:
2200 :    
2201 :     Major MLRISC internal changes. Affect all clients.
2202 :     Summary:
2203 :    
2204 :     1. Type CELLS.cell = int is now replaced by a datatype.
2205 :     As a result, the old regmap is now gone. Almost all interfaces
2206 :     in MLRISC change as a consequence.
2207 :    
2208 :     2. A new brand version of machine description tool (v3.0) that generates
2209 :     modules expecting the new interface. The old version is removed.
2210 :    
2211 :     3. The RA interface has been further abstracted into two new functors.
2212 :     RISC_RA and X86RA. These functors have much simpler interfaces.
2213 :     [See also directory MLRISC/demo.]
2214 :    
2215 :     4. Some other new source->source code generation tools are available:
2216 :    
2217 :     a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
2218 :     b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
2219 :     I use this tool to generate the peephole optimizers---with the new
2220 :     cell type changes, peephole rules are becoming difficult to write
2221 :     without conditional pattern matching.
2222 :    
2223 :     5. More Intmap -> IntHashTable change. Previous changes by Matthias didn't
2224 :     cover the entire MLRISC source tree so many things broke.
2225 :    
2226 :     6. CM files have been moved to the subdirectory MLRISC/cm.
2227 :     They are moved because there are a lot of them and they clutter up the
2228 :     root dir.
2229 :    
2230 :     7. More detailed documentation to come...
2231 :    
2232 :     NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
2233 :     a makeml -rebuild first. This is because of other other
2234 :     changes that Matthias has made (see below).
2235 :    
2236 :    
2237 :     ----------------------------------------------------------------------
2238 : blume 733 Name: Matthias Blume
2239 : blume 742 Date: 2000/11/30 23:12:00 JST
2240 :     Tag: blume-20001130-filereorg
2241 :     Description:
2242 :    
2243 :     Some manual updates and some file reorganizations in CM.
2244 :    
2245 :     ----------------------------------------------------------------------
2246 :     Name: Matthias Blume
2247 : blume 737 Date: 2000/11/24 17:45:00 JST
2248 :     Tag: blume-20001124-link
2249 :     Description:
2250 :    
2251 :     Drastically improved link traversal code for the case that the dynamic
2252 :     value was already loaded at bootstrap time. As a result, CM and CMB
2253 :     now both load blazingly fast -- even on a very slow machine. Also,
2254 :     memory consumption has been further reduced by this.
2255 :    
2256 :     Warning: The format of the PIDMAP file has changed. THerefore, to
2257 :     bootstrap you have to do this:
2258 :    
2259 :     1. Run CMB.make
2260 :     2. Make a symbolic link for the boot directory:
2261 :     ln -s sml.boot.ARCH-OS xxx
2262 :     3. "Rebuild" the boot directory:
2263 :     ./makeml -boot xxx -rebuild sml ; rm xxx
2264 :     4. Boot normally:
2265 :     ./makeml
2266 :    
2267 :     ----------------------------------------------------------------------
2268 :     Name: Matthias Blume
2269 : blume 735 Date: 2000/11/21 21:20:00 JST
2270 :     Tag: blume-20001121-tools
2271 :     Description:
2272 :    
2273 :     Continued hacking on autoloading problem -- with success this time.
2274 :     Also changed tool-plugin mechanism. See new CM manual.
2275 :    
2276 :     ----------------------------------------------------------------------
2277 :     Name: Matthias Blume
2278 : blume 734 Date: 2000/11/19 14:30:00 JST
2279 :     Tag: blume-20001119-autoload
2280 :     Description:
2281 :    
2282 :     Some hacking to make autoloading faster. Success for CMB, no success
2283 :     so far for CM. There is a reduced structure CM' that autoloads faster.
2284 :     (This is a temporary, non-documented hack to be eliminated again when
2285 :     the general problem is solved.)
2286 :    
2287 :     ----------------------------------------------------------------------
2288 :     Name: Matthias Blume
2289 : blume 733 Date: 2000/11/17 14:10:00 JST
2290 :     Tag: blume-20001117-pickle-lib
2291 :     Description:
2292 :    
2293 :     1. Eliminated comp-lib.cm
2294 :     2. Made pickle-lib.cm
2295 :     3. Eliminated all uses of intset.sml (from comp-lib.cm)
2296 :     4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
2297 :     equivalent constructs from smlnj-lib.cm (INtHashTable).
2298 :     5. Point 4. also goes for those uses of intmap.* in MLRISC.
2299 :     Duplicated intmap modules thrown out.
2300 :     6. Hunted down all duplicated SCC code and replaced it with
2301 :     equivalent stuff (GraphSCCFn from smlnj-lib.cm).
2302 :     7. Rewrote Feedback module.
2303 :     8. Moved sortedlist.sml into viscomp-lib.cm. Eventually it
2304 :     should be thrown out and equivalent modules from smlnj-lib.cm
2305 :     should be used (IntRedBlackSet, IntListSet, ...).
2306 :    
2307 :     Confirmed that compiler compiles to fixpoint.
2308 :    
2309 :     ----------------------------------------------------------------------
2310 : leunga 731 Name: Allen Leung
2311 :     Date: 2000/11/10 18:00:00
2312 :     Tag: leunga-20001110-new-x86-fp
2313 :    
2314 :     A new x86 floating point code generator has been added.
2315 :     By default this is turned off. To turn this on, do:
2316 :    
2317 :     CM.autoload "$smlnj/compiler.cm";
2318 :     Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
2319 :    
2320 :     Changes:
2321 :    
2322 :     1. Changed FTAN to FPTAN so that the assembly output is correct.
2323 :     2. Changed the extension callback for FTANGENT to generate:
2324 :    
2325 :     fptan
2326 :     fstp %st(0)
2327 :     instead of
2328 :     fptan
2329 :     fstpl ftempmem
2330 :    
2331 :     3. Numerous assembly fixes for x86.
2332 :    
2333 :     5. Cleaned up the machine code output module x86/x86MC.sml and added
2334 :     support for a whole bunch of instructions and addressing modes:
2335 :    
2336 :     fadd/fsub/fsubr/fmul/fdiv/fdivr %st, %st(n)
2337 :     faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp %st, %st(n)
2338 :     fadd/fsub/fsubr/fmul/fdiv/fdivr %st(n), %st
2339 :     fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
2340 :     fxch %st(n)
2341 :     fld %st(n)
2342 :     fst %st(n)
2343 :     fst mem
2344 :     fstp %st(n)
2345 :     fucom %st(n)
2346 :     fucomp %st(n)
2347 :    
2348 :     All these are now generated when the fast fp mode is turned on.
2349 :    
2350 :     6. Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
2351 :    
2352 :     ----------------------------------------------------------------------
2353 : blume 729 Name: Matthias Blume
2354 :     Date: 2000/11/09 11:20:00 JST
2355 :     Tag: blume-20001109-scc
2356 :     Description:
2357 :    
2358 :     Eliminated some code duplication:
2359 :    
2360 :     1. Added "where" clause to GraphSCCFn in SML/NJ Library.
2361 :     (Otherwise the functor is useless.)
2362 :     2. Used GraphSCCFn where SCCUtilFun was used previously.
2363 :     3. Got rid of SCCUtilFun (in comp-lib.cm).
2364 :    
2365 :     ----------------------------------------------------------------------
2366 : george 721 Name: Lal George
2367 :     Date: 2000/11/06 09:02:21 EST 2000
2368 :     Tag: Release_110_30
2369 :     Description:
2370 :    
2371 :     - Version 110.30
2372 :     ----------------------------------------------------------------------
2373 : blume 715 Name: Matthias Blume
2374 : blume 716 Date: 2000/11/04 14:45:00
2375 :     Tag: blume-20001104-mlbuild
2376 :     Description:
2377 :    
2378 :     - Made ml-build faster on startup.
2379 :     - Documentation fixes.
2380 :    
2381 :     ----------------------------------------------------------------------
2382 :     Name: Matthias Blume
2383 : blume 715 Date: 2000/11/02 17:00:00 JST
2384 :     Tag: blume-20001102-condcomp
2385 :     Description:
2386 :    
2387 :     - Small tweaks to pickler -- new BOOTFILES!
2388 :     - Version bumped to 110.29.2.
2389 :     - Added conditional compilation facility to init.cmi (see comment there).
2390 :     ----------------------------------------------------------------------
2391 : leunga 713 Name: Allen Leung
2392 :     Date: 2000/10/23 19:31:00
2393 :     Tag: leunga-20001023-demo-ra
2394 :    
2395 :     1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
2396 :     2. Test programs for the graph library updated
2397 :     3. Some new MLRISC demo programs added
2398 :    
2399 :     ----------------------------------------------------------------------
2400 : blume 710 Name: Matthias Blume
2401 : blume 711 Date: 2000/08/31 22:15:00 JST
2402 :     Tag: blume-20001017-errmsg
2403 :     Description:
2404 :    
2405 :     More error message grief: Where there used to be no messages, there
2406 :     now were some that had bogus error regions. Fixed.
2407 :    
2408 :     ----------------------------------------------------------------------
2409 :     Name: Matthias Blume
2410 : blume 710 Date: 2000/08/31 17:30:00 JST
2411 :     Tag: blume-20001017-v110p29p1
2412 :     Description:
2413 :    
2414 :     I made a version 110.29.1 with new bootfiles.
2415 :    
2416 :     Changes: Modified pickler/unpickler for faster and leaner unpickling.
2417 :     CM documentation changes and a small bugfix in CM's error reporting.
2418 :    
2419 :     ----------------------------------------------------------------------
2420 : george 705 Name: Lal George
2421 :     Date: 2000/09/27 14:42:35 EDT
2422 :     Tag: george-20000927-nodestatus
2423 :     Description:
2424 :    
2425 :     Changed the type of the nodestatus, so that:
2426 :    
2427 :     SPILLED(~1) is now SPILLED
2428 :     SPILLED(m) where m>=0 is now MEMREG(m)
2429 :     SPILLED(s) where s<~1 is now SPILL_LOC(~s)
2430 :    
2431 :     ----------------------------------------------------------------------
2432 : blume 697 Name: Matthias Blume
2433 : blume 703 Date: 2000/09/07 14:45:00 JST
2434 :     Tag: blume-20000907-cmerrmsg
2435 :     Description:
2436 :    
2437 :     Small tweak to CM to avoid getting ML syntax error messages twice.
2438 :    
2439 :     ----------------------------------------------------------------------
2440 :     Name: Matthias Blume
2441 : blume 701 Date: 2000/08/31 18:00:00 JST
2442 :     Tag: blume-20000831-cvsbootfiles
2443 :     Description:
2444 :    
2445 :     New URL for boot files (because the 110.29 files on the BL server do
2446 :     now work correctly with my updated install scripts for yacc and lex).
2447 :    
2448 :     ----------------------------------------------------------------------
2449 :     Name: Matthias Blume
2450 : blume 697 Date: 2000/08/08 12:33:00 JST
2451 :     Tag: blume-20000808-manual
2452 :     Description:
2453 :    
2454 :     Tiny update to CM manual.
2455 :    
2456 :     ----------------------------------------------------------------------
2457 : leunga 695 Name: Allen Leung
2458 :     Date: 2000/08/7 19:31:00
2459 :     Tag: leunga-20000807-a-whole-bunch-of-stuff
2460 :    
2461 :     Moby, C--, SSA, x86, machine descriptions etc. Should only affect C--
2462 :     and Mobdy.
2463 :    
2464 :     1. x86
2465 :    
2466 :     a. Fixes to peephole module by John and Dan.
2467 :     b. Assembly fix to SETcc by Allen.
2468 :     c. Fix to c-call by John.
2469 :     d. Fix to spilling by John. (This one deals with the missing FSTPT case)
2470 :     e. Instruction selection optimization to SETcc as suggested by John.
2471 :    
2472 :     For example,
2473 :    
2474 :     MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
2475 :    
2476 :     should generate:
2477 :    
2478 :     MOVL a, x
2479 :     SUBL b, x
2480 :     SHRL 31, x
2481 :    
2482 :     2. IR stuff
2483 :    
2484 :     A bunch of new DJ-graph related algorithms added. These
2485 :     speed up SSA construction.
2486 :    
2487 :     3. SSA + Scheduling
2488 :    
2489 :     Added code for SSA and scheduling to the repository
2490 :    
2491 :     ----------------------------------------------------------------------
2492 : george 694 Name: Lal George
2493 :     Date: 2000/07/27 11:53:14 EDT
2494 :    
2495 :     Tag: lal-20000727-linux-ppc
2496 :     Description:
2497 :    
2498 :     Made changes to support Linux PPC.
2499 :     p.s. I have confirmation that the 110.29 boot files work fine.
2500 :    
2501 :     ----------------------------------------------------------------------
2502 : blume 684 Name: Matthias Blume
2503 : blume 692 Date: 2000/07/27 17:40:00 JST
2504 :     Tag: blume-20000727-scripts
2505 :     Description:
2506 :    
2507 :     !!!! WARNING !!!!
2508 :     You must recompile the runtime system!
2509 :     !!!! WARNING !!!!
2510 :    
2511 :     This is basically another round of script-enhancements:
2512 :    
2513 :     1. sml, ml-build, and ml-makedepend accept options -D and -U to define
2514 :     and undefine CM preprocessor symbols.
2515 :    
2516 :     2. ml-build avoids generating a new heap image if it finds that the
2517 :     existing one is still ok. (The condition is that no ML file had to
2518 :     be recompiled and all ML files are found to be older that the heap
2519 :     file.)
2520 :    
2521 :     To make this work smoothly, I also hacked the runtime system as
2522 :     well as SMLofNJ.SysInfo to get access to the heap image suffix
2523 :     (.sparc-solaris, ...) that is currently being used.
2524 :    
2525 :     Moreover, the signature of CM.mk_standalone has changed. See the
2526 :     CM manual.
2527 :    
2528 :     3. ml-makedepend accepts additional options -n, -a, and -o. (See the
2529 :     CM manual for details.)
2530 :    
2531 :     4. More CM manual updates:
2532 :     - all of the above has been documented.
2533 :     - there is now a section describing the (CM-related) command line
2534 :     arguments that are accepted by the "sml" command
2535 :    
2536 :     ----------------------------------------------------------------------
2537 :     Name: Matthias Blume
2538 : blume 691 Date: 2000/07/25 16:20:00 JST
2539 :     Tag: blume-20000725-makedepend
2540 :     Description:
2541 :    
2542 :     Added a script called ml-makedepend. This can be used in makefiles
2543 :     for Unix' make in a way very similar to the "makedepend" command for
2544 :     C.
2545 :    
2546 :     The script internally uses function CM.sources.
2547 :    
2548 :     Synopsis:
2549 :    
2550 :     ml-makedepend [-f makefile] cmfile targetname
2551 :    
2552 :     The default for the makefile is "makefile" (or "Makefile" should
2553 :     "makefile" not exist).
2554 :    
2555 :     ml-makedepend adds a cmfile/targetname-specific section to this
2556 :     makefile (after removing the previous version of this section). The
2557 :     section contains a single dependency specification with targetname on
2558 :     the LHS (targetname is an arbitrary name), and a list of files derived
2559 :     from the cmfile on the RHS. Some of the files on the RHS are
2560 :     ARCH/OPSYS-specific. Therefore, ml-makedepend inserts references to
2561 :     "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
2562 :     path names. The makefile writer is responsible for making sure that
2563 :     these variables have correct at the time "make" is invoked.
2564 :    
2565 :     ----------------------------------------------------------------------
2566 :     Name: Matthias Blume
2567 : blume 690 Date: 2000/07/22 23:30:00 JST
2568 :     Tag: blume-20000722-urlupdate
2569 :     Description:
2570 :    
2571 :     Changed BOOT and config/srcarchiveurl to point to BL server:
2572 :    
2573 :     ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
2574 :    
2575 :     ----------------------------------------------------------------------
2576 :     Name: Matthias Blume
2577 : blume 686 Date: 2000/07/18 18:00:00 JST
2578 :     Tag: blume-20000718-Version_110_29
2579 :     Description:
2580 :    
2581 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
2582 :    
2583 :     2. Updated config/version to 110.29
2584 :    
2585 :     3. Updated config/srcarchiveurl
2586 :    
2587 :     3. New boot files!
2588 :     ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
2589 :    
2590 :     ----------------------------------------------------------------------
2591 :     Name: Matthias Blume
2592 : blume 684 Date: 2000/07/11 13:58:00 JST
2593 :     Tag: blume-20000711-doctypo
2594 :     Description:
2595 :    
2596 :     Fixed a few typos in CM manual.
2597 :    
2598 :     ----------------------------------------------------------------------
2599 : leunga 683 Name: Allen Leung
2600 :     Date: 2000/06/15 00:38:00
2601 :     Tag: leunga-20000704-sparc-x86
2602 :    
2603 :     1. x86 peephole improvement sp += k; sp -= k => nop [from John]
2604 :     2. fix to x86 RET bug [found by Dan Grossman]
2605 :     3. sparc assembly bug fix for ticc instructions [found by Fermin]
2606 :    
2607 :     Affects c-- and moby only
2608 :    
2609 :     ----------------------------------------------------------------------
2610 : blume 680 Name: Matthias Blume
2611 : blume 682 Date: 2000/07/04 15:26:00
2612 :     Tag: blume-20000704-trigger
2613 :     Description:
2614 :    
2615 :     1. Improvements to CM manual.
2616 :     2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
2617 :     of getting a back-trace. The function, when called, raises an
2618 :     internal exception which explicitly carries the full back-trace history,
2619 :     so it is unaffected by any intervening handle-raise pairs ("trivial"
2620 :     or not). The interactive loop will print that history once it arrives
2621 :     at top level.
2622 :     Short of having all exceptions implicitly carry the full history, the
2623 :     recommended way of using this facility is:
2624 :     - compile your program with instrumentation "on"
2625 :     - run it, when it raises an exception, look at the history
2626 :     - if the history is "cut off" because of some handler, go and modify
2627 :     your program so that it explicitly calls BTrace.trigger
2628 :     - recompile (still instrumented), and rerun; look at the full history
2629 :    
2630 :     ----------------------------------------------------------------------
2631 :     Name: Matthias Blume
2632 :     Date: 2000/07/03 15:36:00 JST
2633 : blume 680 Tag: blume-20000702-manual
2634 :     Description:
2635 :    
2636 :     Small corrections and updates to CM manual.
2637 :    
2638 :     ----------------------------------------------------------------------
2639 : blume 682 Name: Matthias Blume
2640 : blume 679 Date: 2000/06/29 16:04:00 JST
2641 :     Tag: blume-20000629-yacctool
2642 :     Description:
2643 :    
2644 :     Changes:
2645 :    
2646 :     1. Class "mlyacc" now takes separate arguments to pass options to
2647 :     generated .sml- and .sig-files independently.
2648 :     2. Corresponding CM manual updates.
2649 :     3. BTrace module now also reports call sites. (However, for loop clusters
2650 :     it only shows from where the cluster was entered.) There are associated
2651 :     modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
2652 :    
2653 :     ----------------------------------------------------------------------
2654 : blume 675 Name: Matthias Blume
2655 : blume 678 Date: 2000/06/27 16:51:00 JST
2656 :     Tag: blume-20000627-noweb
2657 :     Description:
2658 :    
2659 :     Changes:
2660 :    
2661 :     1. Implemented "subdir" and "witness" options for noweb tool.
2662 :     This caused some slight internal changes in CM's tool implementation.
2663 :     2. Fixed bug in "tool plugin" mechanism. This is essentially cleaning
2664 :     some remaining issues from earlier path anchor changes.
2665 :     3. Updated CM manual accordingly.
2666 :    
2667 :     4. Changed implementation of back-tracing so that I now consider it
2668 :     ready for prime-time.
2669 :    
2670 :     In particular, you don't have to explicitly trigger the back-trace
2671 :     anymore. Instead, if you are running BTrace-instrumented code and
2672 :     there is an uncaught exception (regardless of whether or not it was
2673 :     raised in instrumented code), the top-level evalloop will print
2674 :     the back-trace.
2675 :    
2676 :     Features:
2677 :    
2678 :     - Instrumented and uninstrumented code work together seemlessly.
2679 :     (Of course, uninstrumented code is never mentioned in actual
2680 :     back-traces.)
2681 :    
2682 :     - Asymptotic time- and space-complexity of instrumented code is
2683 :     equal to that of uninstrumented code. (This means that
2684 :     tail-recursion is preserved by the instrumentation phase.)
2685 :    
2686 :     - Modules whose code has been instrumented in different sessions
2687 :     work together without problem.
2688 :    
2689 :     - There is no penalty whatsoever on uninstrumented code.
2690 :    
2691 :     - There is no penalty on "raise" expressions, even in
2692 :     instrumented code.
2693 :    
2694 :     A potential bug (or perhaps it is a feature, too):
2695 :    
2696 :     A back-trace reaches no further than the outermost instrumented
2697 :     non-trivial "raise". Here, a "trivial" raise is one that is the
2698 :     sole RHS of a "handle" rule. Thus, back-traces reach trough
2699 :    
2700 :     <exp> handle e => raise e
2701 :    
2702 :     and even
2703 :    
2704 :     <exp> handle Foo => raise Bar
2705 :    
2706 :     and, of course, through
2707 :    
2708 :     <exp> handle Foo => ...
2709 :    
2710 :     if the exception was not Foo.
2711 :    
2712 :     Back-traces always reach right through any un-instrumented code
2713 :     including any of its "handle" expressions, trivial or not.
2714 :    
2715 :     To try this out, do the following:
2716 :    
2717 :     - Erase all existing binfiles for your program.
2718 :     (You may keep binfiles for those modules where you think you
2719 :     definitely don't need back-tracing.)
2720 :     - Turn on back-trace instrumentation:
2721 :     SMLofNJ.Internals.BTrace.mode (SOME true);
2722 :     - Recompile your program. (I.e., run "CM.make" or "use".)
2723 :     - You may now turn instrumentation off again (if you want):
2724 :     SMLofNJ.Internals.BTrace.mode (SOME false);
2725 :     - Run your program as usual. If it raises an exception that
2726 :     reaches the interactive toplevel, then a back-trace will
2727 :     automatically be printed. After that, the toplevel loop
2728 :     will print the exception history as usual.
2729 :    
2730 :     ----------------------------------------------------------------------
2731 :     Name: Matthias Blume
2732 : blume 677 Date: 2000/06/26 09:56:46 JST
2733 :     Tag: blume-20000626-setup
2734 :     Description:
2735 :    
2736 :     CM: - setup-parameter to "sml" added; this can be used to run arbitrary
2737 :     ML code before and after compiling a file (e.g., to set compiler
2738 :     flags)
2739 :    
2740 :     Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
2741 :     - associated changes to btrace.sml (BTrace instrumentation pass)
2742 :     - cleaner implementation of btimp.sml (BTrace tracing and report
2743 :     module)
2744 :    
2745 :     CM manual: * new path encoding documented
2746 :     * description of setup-parameter to "sml" added
2747 :    
2748 :     The biggest user-visible change to back-tracing is that it is no
2749 :     longer necessary to compile all traced modules within the same
2750 :     session. (This was a real limitation.)
2751 :    
2752 :     ----------------------------------------------------------------------
2753 :     Name: Matthias Blume
2754 : blume 676 Date: 2000/06/24 12:40:00 JST
2755 :     Tag: blume-20000624-startup
2756 :     Description:
2757 :    
2758 :     Fixes startup slowdown problem. (I was calling SrcPath.sync a _tad_
2759 :     bit too often -- to put it mildly. :)
2760 :    
2761 :     ----------------------------------------------------------------------
2762 :     Name: Matthias Blume
2763 : blume 675 Date: 2000/06/23 18:20:00 JST
2764 :     Tag: blume-20000623-btrace
2765 :     Description:
2766 :    
2767 :     This updates adds a backtrace facility to aid programmers in debugging
2768 :     their programs. This involves the following changes:
2769 :    
2770 :     1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
2771 :     keeping track of the current call stack. When programs are compiled
2772 :     in a special mode, the compiler will insert calls to these hooks
2773 :     into the user program.
2774 :     "Hook" means that it is possible for different implementations of
2775 :     back-tracing to register themselves (at different times).
2776 :    
2777 :     2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
2778 :     as an Absyn.dec->Absyn.dec rewrite. Normally this phase is turned off.
2779 :     It can be turned on using this call:
2780 :     SMLofNJ.Internals.BTrace.mode (SOME true);
2781 :     Turning it off again:
2782 :     SMLofNJ.Internals.BTrace.mode (SOME false);
2783 :     Querying the current status:
2784 :     SMLofNJ.Internals.BTrace.mode NONE;
2785 :     Annotated programs are about twice as big as normal ones, and they
2786 :     run a factor of 2 to 4 slower with a dummy back-trace plugin (one
2787 :     where all hooks do nothing). The slowdown with a plugin that is
2788 :     actually useful (such as the one supplied by default) is even greater,
2789 :     but in the case of the default plugin it is still only an constant
2790 :     factor (amortized).
2791 :    
2792 :     3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
2793 :     with a sub-structure BTrace for controlling back-tracing. In particular,
2794 :     the above-mentioned function "mode" controls whether the annotation
2795 :     phase is invoked by the compiler. Another important function is
2796 :     "trigger": when called it aborts the current execution and causes
2797 :     the top-level loop to print a full back-trace.
2798 :    
2799 :     4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
2800 :     for back-tracing. It keeps track of the dynamic call stack and in
2801 :     addition to that it keeps a partial history at each "level" of that
2802 :     stack. For example, if a tail-calls b, b tail-calls c, and c tail-calls
2803 :     d and b (at separate times, dynamically), then the report will show:
2804 :    
2805 :     GOTO d
2806 :     /c
2807 :     GOTO \b
2808 :     CALL a
2809 :    
2810 :     This shows that there was an initial non-tail call of a, then a
2811 :     tail-call to b or c, looping behavior in a cluster of functions that
2812 :     consist of b and c, and then a goto from that cluster (i.e., either from
2813 :     b or from c) to d.
2814 :    
2815 :     Note that (depending on the user program) the amount of information
2816 :     that the back-trace module has to keep track of at each level is bounded
2817 :     by a constant. Thus, the whole implementation has the same asymptotical
2818 :     complexity as the original program (both in space and in time).
2819 :    
2820 :     5. compiler/TopLevel/interact/evalloop.sml has been modified to
2821 :     handle the special exception SMLofNJ.Internals.BTrace.BTrace
2822 :     which is raised by the "trigger" function mentioned above.
2823 :    
2824 :     Notes on usage:
2825 :    
2826 :     - Annotated code works well together with unannotated code:
2827 :     Unannotated calls simply do not show up at all in the backtrace.
2828 :    
2829 :     - It is not a good idea to let modules that were annotated during
2830 :     different sessions run at the same time. This is because the compiler
2831 :     chooses small integers to identify individual functions, and there
2832 :     will be clashes if different modules were compiled in separate sessions.
2833 :     (Nothing will crash, and you will even be told about the clashes, but
2834 :     back-trace information will in general not be useful.)
2835 :    
2836 :     - Back-tracing can be confused by callcc and capture.
2837 :    
2838 :     - The only way of getting a back-trace right now is to explicitly
2839 :     invoke the "trigger" function from your user program. Eventually, we
2840 :     should make every exception carry back-trace information (if
2841 :     available). But since this creates more overhead at "raise"-time
2842 :     (similar to the current exnHistory overhead), I have not yet
2843 :     implemented this. (The implementation will be rather easy.) With
2844 :     exceptions carrying back-trace information, this facility will be even
2845 :     more useful because users don't need to modify their programs...
2846 :    
2847 :     - While it is possible to compile the compiler with back-trace
2848 :     annotations turned on (I did it to get some confidence in
2849 :     correctness), you must make absolutely sure that core.sml and
2850 :     btimp.sml are compiled WITHOUT annotation! (core.sml cannot actually
2851 :     be compiled with annotation because there is no core access yet, but
2852 :     if you compile btimp.sml with annotation, then the system will go into
2853 :     an infinite recursion and crash.)
2854 :     Since CM currently does not know about BTrace, the only way to turn
2855 :     annotations on and off for different modules of the compiler is to
2856 :     interrupt CMB.make, change the settings, and re-invoke it. Of course,
2857 :     this is awkward and clumsy.
2858 :    
2859 :     Sample sessions:
2860 :    
2861 :     Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
2862 :     - SMLofNJ.Internals.BTrace.mode (SOME true);
2863 :     [autoloading]
2864 :     [autoloading done]
2865 :     val it = false : bool
2866 :     - structure X = struct
2867 :     - fun main n = let
2868 :     - fun a (x, 0) = d x
2869 :     - | a (x, n) = b (x, n - 1)
2870 :     - and b (x, n) = c (x, n)
2871 :     - and c (x, n) = a (x, n)
2872 :     - and d x = e (x, 3)
2873 :     - and e (x, 0) = f x
2874 :     - | e (x, n) = e (x, n - 1)
2875 :     - and f 0 = SMLofNJ.Internals.BTrace.trigger ()
2876 :     - | f n = n * g (n - 1)
2877 :     - and g n = a (n, 3)
2878 :     - in
2879 :     - f n
2880 :     - end
2881 :     - end;
2882 :     structure X : sig val main : int -> int end
2883 :     - X.main 3;
2884 :     *** BACK-TRACE ***
2885 :     GOTO stdIn:4.2-13.20: X.main[2].f
2886 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
2887 :     GOTO stdIn:4.2-13.20: X.main[2].d
2888 :     / stdIn:4.2-13.20: X.main[2].a
2889 :     | stdIn:4.2-13.20: X.main[2].b
2890 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
2891 :     CALL stdIn:4.2-13.20: X.main[2].g
2892 :     GOTO stdIn:4.2-13.20: X.main[2].f
2893 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
2894 :     GOTO stdIn:4.2-13.20: X.main[2].d
2895 :     / stdIn:4.2-13.20: X.main[2].a
2896 :     | stdIn:4.2-13.20: X.main[2].b
2897 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
2898 :     CALL stdIn:4.2-13.20: X.main[2].g
2899 :     GOTO stdIn:4.2-13.20: X.main[2].f
2900 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
2901 :     GOTO stdIn:4.2-13.20: X.main[2].d
2902 :     / stdIn:4.2-13.20: X.main[2].a
2903 :     | stdIn:4.2-13.20: X.main[2].b
2904 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
2905 :     CALL stdIn:4.2-13.20: X.main[2].g
2906 :     GOTO stdIn:4.2-13.20: X.main[2].f
2907 :     CALL stdIn:2.15-17.4: X.main[2]
2908 :     -
2909 :    
2910 :     (Note that because of a FLINt bug the above code currently does not
2911 :     compile without BTrace turned on.)
2912 :    
2913 :     Here is another example, using my modified Tiger compiler:
2914 :    
2915 :     Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
2916 :     - SMLofNJ.Internals.BTrace.mode (SOME true);
2917 :     [autoloading]
2918 :     [autoloading done]
2919 :     val it = false : bool
2920 :     - CM.make "sources.cm";
2921 :     [autoloading]
2922 :     ...
2923 :     [autoloading done]
2924 :     [scanning sources.cm]
2925 :     [parsing (sources.cm):parse.sml]
2926 :     [creating directory CM/SKEL ...]
2927 :     [parsing (sources.cm):tiger.lex.sml]
2928 :     ...
2929 :     [wrote CM/sparc-unix/semant.sml]
2930 :     [compiling (sources.cm):main.sml]
2931 :     [wrote CM/sparc-unix/main.sml]
2932 :     [New bindings added.]
2933 :     val it = true : bool
2934 :     - Main.compile ("../testcases/merge.tig", "foo.out");
2935 :     *** BACK-TRACE ***
2936 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
2937 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2938 :     CALL lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
2939 :     GOTO lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
2940 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2941 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2942 :     CALL lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
2943 :     / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
2944 :     CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
2945 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2946 :     CALL lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
2947 :     CALL main.sml:1.18-118.4: Main.compile[2]
2948 :     -
2949 :    
2950 :     ----------------------------------------------------------------------
2951 : blume 673 Name: Matthias Blumen
2952 :     Date: 2000/06/21 18:00:00 JST
2953 :     Tag: blume-20000621-manual
2954 :     Description:
2955 :    
2956 :     CM manual update: Path environments documented.
2957 :    
2958 :     ----------------------------------------------------------------------
2959 : blume 666 Name: Matthias Blume
2960 : blume 672 Date: 2000/06/19 13:40:00
2961 :     Tag: blume-20000619-manual
2962 :     Description:
2963 :    
2964 :     CM manual and system/README update. This only covers the fact that
2965 :     there are no more implicit anchors. (Path environments and the "bind"
2966 :     option to "cm" have yet to be documented.)
2967 :    
2968 :     ----------------------------------------------------------------------
2969 :     Name: Matthias Blume
2970 : blume 671 Date: 2000/06/19 11:05:00 JST
2971 :     Tag: blume-20000619-chdir-bugfix
2972 :     Description:
2973 :    
2974 :     Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
2975 :    
2976 :     ----------------------------------------------------------------------
2977 :     Name: Matthias Blume
2978 : blume 670 Date: 2000/06/18 22:00:10 JST
2979 :     Tag: blume-20000618-implicit-anchors-really-gone
2980 :     Description:
2981 :    
2982 :     I updates the previous HISTORY entry where I forgot to mention that
2983 :     implicit anchors are no longer with us.
2984 :    
2985 :     The current update also gets rid of the (now useless) controller
2986 :     CM.Control.implicit_anchors.
2987 :    
2988 :     ----------------------------------------------------------------------
2989 :     Name: Matthias Blume
2990 : blume 666 Date: 2000/06/16 17:30:00 JST
2991 :     Tag: blume-20000616-anchorenv
2992 :     Description:
2993 :    
2994 :     This patch implements the long anticipated (just kidding :) "anchor
2995 :     environment" mechanism. In the course of doing this, I also
2996 :     re-implemented CM's internal "SrcPath" module from scratch. The new
2997 :     one should be more robust in certain boundary cases. In any case, it
2998 :     is a lot cleaner than its predecessor (IMHO).
2999 :    
3000 :     This time, although there is yet another boot file format change, I
3001 :     kept the unpickler backward-compatible. As a result, no new bootfiles
3002 :     are necessary and bootstrapping is straightforward. (You cannot read
3003 :     new bootfiles into an old system, but the other way around is no
3004 :     problem.)
3005 :    
3006 :     Visible changes:
3007 :    
3008 : blume 670 ** 0. Implicit path anchors (without the leading $-symbol) are no
3009 :     longer recognized at all. This means that such path names are not
3010 :     illegal either. For example, the name basis.cm simply refers to a
3011 :     local file called "basis.cm" (i.e, the name is an ordinary path
3012 :     relative to .cm-files directory). Or, to put it differently, only
3013 :     names that start with $ are anchored paths.
3014 : blume 666
3015 : blume 670 ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
3016 :     vanished.
3017 :    
3018 :     John (Reppy) had critizised this as soon as I originally proposed and
3019 : blume 666 implemented it, but at that time I did not really deeply believe
3020 :     him. :) Now I came full-circle because I need the $<singlearc> syntax
3021 :     in another place where it cannot be seen as an abbreviation for
3022 :     $/<singlearc>. To avoid the confusion, $<singlearc> now means what it
3023 :     seems to mean (i.e., it "expands" into the corresponding anchor
3024 :     value).
3025 :    
3026 :     However, when paths are used as members in CM description files, it
3027 :     continues to be true that there must be at least another arc after the
3028 :     anchor. This is now enforced separately during semantic analysis
3029 : blume 670 (i.e., from a lexical/syntactical point of view, the notation is ok.)
3030 : blume 666
3031 :     ** 2. The "cm" class now accepts an option "bind". The option's value
3032 :     is a sub-option list of precisely two items -- one labeled "anchor"
3033 :     and the other one labeled "value". As you might expect, "anchor" is
3034 :     used to specify an anchor name to be bound, and "value" specifies what
3035 :     the anchor is being bound to.
3036 :    
3037 :     The value must be a directory name and can be given in either standard
3038 :     syntax (including the possibility that it is itself an anchored path)
3039 :     or native syntax.
3040 :    
3041 :     Examples:
3042 :    
3043 :     foo.cm (bind:(anchor:bar value:$mystuff/bar))
3044 :     lib.cm (bind:(anchor:a value:"H:\\x\\y\\z")) (* only works under windows *)
3045 :    
3046 :     and so on.
3047 :    
3048 :     The meaning of this is that the .cm-file will be processed with an
3049 :     augmented anchor environment where the given anchor(s) is/are bound to
3050 :     the given values(s).
3051 :    
3052 :     The rationale for having this feature is this: Suppose you are trying
3053 :     to use two different (already stable) libraries a.cm and b.cm (that
3054 :     you perhaps didn't write yourself). Further, suppose each of these
3055 :     two libraries internally uses its own auxiliary library $aux/lib.cm.
3056 :     Normally you would now have a problem because the anchor "lib" can not
3057 :     be bound to more than one value globally. Therefore, the project that
3058 :     uses both a.cm and b.cm must locally redirect the anchor to some other
3059 :     place:
3060 :    
3061 :     a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
3062 :     b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
3063 :    
3064 :     This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
3065 :     /usr/lib/smlnj/b-stuff/aux.cm, respectively.
3066 :    
3067 :     Hard-wiring path names is a bit inflexible (and CM will verbosely warn
3068 :     you when you do so at the time of CM.stabilize). Therefore, you can
3069 :     also use an anchored path as the value:
3070 :    
3071 :     a.cm (bind:(anchor:lib value:$a-lib))
3072 :     b.cm (bind:(anchor:lib value:$b-lib))
3073 :    
3074 :     Now you can globally configure (using the usual CM.Anchor.anchor or
3075 :     pathconfig machinery) bindings for "a-lib" and "b-lib". Since "lib"
3076 :     itself is always locally bound, setting it globally is no longer
3077 :     meaningful or necessary (but it does not hurt either). In fact, "lib"
3078 :     can still be used as a global anchor for separate purposes. As a
3079 :     matter of fact, one can locally define "lib" in terms of a global
3080 :     "lib":
3081 :    
3082 :     a.cm (bind:(anchor:lib value:$lib/a))
3083 :     b.cm (bind:(anchor:lib value:$lib/b))
3084 :    
3085 :     ** 3: The encoding of path names has changed. This affects the way
3086 :     path names are shown in CM's progress report and also the internal
3087 :     protocol encoding used for parallel make.
3088 :    
3089 :     The encoding now uses one or more ':'-separated segments. Each
3090 :     segments corresponds to a file that has been specified relative to the
3091 :     file given by its preceding segment. The first segment is either
3092 :     relative to the CWD, absolute, or anchored. Each segment itself is
3093 :     basically a Unix pathname; all segments but the first are relative.
3094 :    
3095 :     Example:
3096 :    
3097 :     $foo/bar/baz.cm:a/b/c.sml
3098 :    
3099 :     This path denotes the file bar/a/b/c.sml relative to the directory
3100 :     denoted by anchor "foo". Notice that the encoding also includes
3101 :     baz.cm which is the .cm-file that listed a/b/c.sml. As usual, such
3102 :     paths are resolved relative to the .cm-files directory, so baz.cm must
3103 :     be ignored to get the "real" pathname.
3104 :    
3105 :     To make this fact more obvious, CM puts the names of such "virtual
3106 :     arcs" into parentheses when they appear in progress reports. (No
3107 :     parentheses will appear in the internal protocol encoding.) Thus,
3108 :     what you really see is:
3109 :    
3110 :     $foo/bar/(baz.cm):a/b/c.sml
3111 :    
3112 :     I find this notation to be much more informative than before.
3113 :    
3114 :     Another new feature of the encoding is that special characters
3115 :     including parentheses, colons, (back)slashes, and white space are
3116 :     written as \ddd (where ddd is the decimal encoding of the character).
3117 :    
3118 : blume 670 *** The CM manual still needs to be updated.
3119 :    
3120 : blume 666 ----------------------------------------------------------------------
3121 : leunga 660 Name: Allen Leung
3122 :     Date: 2000/06/15 00:38:00
3123 :     Tag: leunga-20000615-x86-peephole
3124 :    
3125 :     x86 Peephole fix by Fermin. Affects c-- and moby only.
3126 :    
3127 :     ----------------------------------------------------------------------
3128 : blume 658 Name: Matthias Blume
3129 :     Date: 2000/06/12 11:40:00
3130 :     Tag: blume-20000612-parmakefix
3131 :     Description:
3132 :    
3133 :     More cleanup after changing the file naming scheme: This time I
3134 :     repaired the parallel make mechanism for CMB.make which I broke earlier.
3135 :    
3136 :     ----------------------------------------------------------------------
3137 : leunga 657 Name: Allen Leung
3138 :     Date: 2000/06/09 01:25:00
3139 :     Tag: leunga-20000609-various
3140 :    
3141 :     None of these things should affect normal SML/NJ operations
3142 :    
3143 :     1. Peephole improvements provided by Fermin (c--)
3144 :     2. New annotation DEFUSE for adding extra dependence (moby)
3145 :     3. New X86 LOCK instructions (moby)
3146 :     4. New machine description language for reservation tables (scheduling)
3147 :     5. Fixes to various optimization/analysis modules (branch chaining, dominator
3148 :     trees etc.)
3149 :     6. I've changed the CM files so that they can work with versions
3150 :     110.0.6, 110.25 and 110.28
3151 :    
3152 :     ----------------------------------------------------------------------
3153 : blume 652 Name: Matthias Blume
3154 : blume 656 Date: 2000/06/09 12:40:00
3155 :     Tag: blume-20000609-log
3156 :     Description:
3157 :    
3158 :     - Removed all(?) remaining RCS Log entries from sources.
3159 :    
3160 :     - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
3161 :     anchored paths).
3162 :    
3163 :     ----------------------------------------------------------------------
3164 :     Name: Matthias Blume
3165 : blume 653 Date: 2000/06/07 17:00:00 JST
3166 :     Tag: blume-20000607-no-implicit-anchors
3167 :     Description:
3168 :    
3169 :     1. This update changes the default setting for
3170 :     CM.Control.implicit_anchors from true to false. This means that
3171 :     implicit anchors are no longer permitted by default. I also tried to
3172 :     make sure that nothing else still relies on implicit anchors.
3173 :     (This is the next step on the schedule towards a CM that does not even
3174 :     have the notion of implicit anchors anymore.)
3175 :    
3176 :     2. More CM manual updates.
3177 :    
3178 :     3. I managed to track down and fix the pickling bug I mentioned last
3179 :     time. Because of the previously existing workaround, this entails no
3180 :     immediate practical changes.
3181 :    
3182 :     ----------------------------------------------------------------------
3183 :     Name: Matthias Blume
3184 : blume 652 Date: 2000/06/06 11:15:00 JST
3185 :     Tag: blume-20000606-lazierpickle
3186 :     Description:
3187 :    
3188 :     !!!! NEW BOOT FILES !!!!
3189 :    
3190 :     * The main purpose of this update is to make library pickles lazier in
3191 :     order to reduce the initial space penalty for autoloading a library.
3192 :     As a result, it is now possible to have $smlnj/compiler.cm
3193 :     pre-registered. This should take care of the many complaints or
3194 :     inquiries about missing structure Compiler. This required changes to
3195 :     CM's internal data structures and small tweaks to some algorithms.
3196 :    
3197 :     As a neat additional effect, it is no longer necessary (for the sake
3198 :     of lean heap image files) to distinguish between a "minimal" CM and a
3199 :     "full" CM. Now, there is only one CM (i.e., the "full" version:
3200 :     $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
3201 :     interactive top level. ($smlnj/cm/minimal.cm is gone.)
3202 :    
3203 :     To make the life of compiler-hackers easier, "makeml" now also
3204 :     pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm). In other
3205 :     words, after you bootstrap a new sml for the first time, you will not
3206 :     have to autoload $smlnj/cmb.cm again afterwards. (The first time
3207 :     around you will still have to do it, though.)
3208 :    
3209 :     * A second change consists of major updates to the CM manual. There
3210 :     are now several appendices with summary information and also a full
3211 :     specification of the CM description file syntax.
3212 :    
3213 :     * In directory src/system I added the script "allcross". This script
3214 :     invokes sml and cross-compiles the compiler for all supported
3215 :     architectures. (Useful when providing a new set of boot files.)
3216 :    
3217 :     * There seems to be a latent bug in my "lazy pickles" mechanism. I
3218 :     added a small tweak to pickle-util.sml to work around this problem,
3219 :     but it is not a proper fix yet. I will investigate further. (The
3220 :     effect of the bug was an inflation of library pickle size.)
3221 :    
3222 :     * Version number increased to 110.28.1 (to avoid compatibility problems).
3223 :    
3224 :     ----------------------------------------------------------------------
3225 : leunga 646 Name: Allen Leung
3226 : leunga 648 Date: 2000/05/25 17:28 EDT
3227 :     Tag: leunga-20000525-ra
3228 :     Description:
3229 :    
3230 :     Fixed a bug in freezing phase of the register allocator.
3231 :    
3232 :     ----------------------------------------------------------------------
3233 :     Name: Allen Leung
3234 : leunga 647 Date: 2000/05/15 22:53 EDT
3235 : leunga 646 Tag: leunga-20000515-alpha-x86-ra
3236 :     Description:
3237 :    
3238 :     1. Alpha
3239 :    
3240 :     Slight cleanup. Removed the instruction SGNXL
3241 :    
3242 :     2. X86
3243 :    
3244 :     Added the following instructions to the instruction set:
3245 :    
3246 :     ROLx, RORx,
3247 :     BTx, BTSx, BTLx, BTRx,
3248 :     XCHGx, and variants with the LOCK prefix
3249 :    
3250 :     3. Register Allocation
3251 :    
3252 :     The module ra-rewrite-with-renaming has been improved.
3253 :    
3254 : leunga 647 These have no effect on SML/NJ.
3255 :    
3256 : leunga 646 ----------------------------------------------------------------------
3257 : blume 642 Name: Matthias Blume
3258 : blume 645 Date: 2000/05/15 16:20:00 JST
3259 :     Tag: blume-20000515-lightrebuild
3260 :     Description:
3261 :    
3262 :     1. I added an alternative to "-rebuild" to "makeml". The difference is
3263 :     that prior to calling CMB.make' the CM-variable "LIGHT" will be
3264 :     defined. In effect, the command will not build any cross-compiler
3265 :     backends and therefore finish more quickly.
3266 :    
3267 :     The "fixpt" script also takes a "-light" switch to be able to use
3268 :     this new facility while compiling for a fixpoint.
3269 :    
3270 :     2. I replaced all mentions of anchored paths in group owner specifications
3271 :     with simple relative paths (usually starting with "..").
3272 :     The rationale is that a library's internal workings should not be
3273 :     compromised by the lack of some anchor. (An anchor is necessary
3274 :     for someone who wants to refer to the library by an anchored path,
3275 :     but it should not be necessary to build the same library in the first
3276 :     place.)
3277 :    
3278 :     3. I changed the way CM's tool mechanism determines the shell command
3279 :     string used for things like ml-yacc etc. so that it does not break
3280 :     when CM.Control.implicit_anchors is turned off.
3281 :    
3282 :     ----------------------------------------------------------------------
3283 :     Name: Matthias Blume
3284 : blume 644 Date: 2000/05/12 18:20:00 JST
3285 :     Tag: blume-20000512-ml-build
3286 :     Description:
3287 :    
3288 :     Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from
3289 :     getting installed properly (by config/install.sh).
3290 :    
3291 :     ----------------------------------------------------------------------
3292 :     Name: Matthias Blume
3293 : blume 643 Date: 2000/05/12 17:30:00 JST
3294 :     Tag: blume-20000512-anchors
3295 :     Description:
3296 :    
3297 :     !!! NEW BOOT FILES !!!
3298 :    
3299 :     This change is in preparation of fading out support for "implicitly
3300 :     anchored path names". I went through all sources and used the
3301 :     explicit (and relatively new) $-notation. See system/README and the
3302 :     CM manual for more info on this.
3303 :    
3304 :     I also modified the anchoring scheme for some things such as "smlnj",
3305 :     "MLRISC", "cm", etc. to take advantage of the fact that explicit
3306 :     anchors are more expressive: anchor name and first arc do not have to
3307 :     coincide. This entails the following user-visible change:
3308 :    
3309 :     You have to write $smlnj/foo/bar instead of smlnj/foo/bar. In
3310 :     particular, when you fire up sml with a command-line argument, say,
3311 :     e.g.:
3312 :    
3313 :     sml '$smlnj/cmb.cm'
3314 :    
3315 :     At the ML toplevel prompt:
3316 :    
3317 :     CM.autoload "$smlnj/cmb.cm";
3318 :    
3319 :     There is also a new controller in CM.Control that can be used to turn
3320 :     off all remaining support for implicit anchors by saying:
3321 :    
3322 :     CM.autoload "$smlnj/
3323 :     #set CM.Control.implicit_anchors false;
3324 :    
3325 :     This causes CM to reject implicitly anchored paths. This is (for the
3326 :     time being) less permissive than the "final" version where there will
3327 :     be no more such implicit anchors and relative paths will be just that:
3328 :     relative.
3329 :    
3330 :     The next step (version after next version?) will be to make the
3331 :     default for CM.Control.implicit_anchors false. After the dust has
3332 :     settled, I can then produce the "final" version of this...
3333 :    
3334 :     Note: Since bootstrapping is a bit tricky, I provided new boot files.
3335 :    
3336 :     ----------------------------------------------------------------------
3337 :     Name: Matthias Blume
3338 : blume 642 Date: 2000/05/11 16:30:00 JST
3339 :     Tag: blume-20000511-sources
3340 :     Description:
3341 :    
3342 :     The main change is that I added function CM.sources as a generalized
3343 :     version of the earlier CM.makedepend. This entails the following
3344 :     additional changes:
3345 :    
3346 :     - CM.makedepend has been dropped.
3347 :    
3348 :     - CM manual has been updated.
3349 :    
3350 :     - TOOLS signature and API have been changed.
3351 :    
3352 :     ----------------------------------------------------------------------
3353 : leunga 640 Name: Allen Leung
3354 : leunga 641 Date: 2000/05/10 21:17 EDT
3355 :     Tag: leunga-20000510-moby-c--ssa
3356 :     Description:
3357 :    
3358 :     Various bug fixes and new features for C--, Moby and MLRISC optimizations.
3359 :     None of these affect SML/NJ.
3360 :    
3361 :     1. Register Allocation
3362 :    
3363 :     a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented.
3364 :     This module tries to remove local (i.e. basic block level) redundancies
3365 :     during spilling.
3366 :    
3367 :     b. A new framework for performing region based register allocation.
3368 :     Not yet entirely functional.
3369 :    
3370 :     2. X86
3371 :    
3372 :     a. DefUse for POP was missing the stack pointer [found by Lal]
3373 :     b. Reload for CALL was incorrect in X86Spill [found by John]
3374 :     c. Various fixes in X86Spill so that it can be used correctly for
3375 :     the new spilling module.
3376 :    
3377 :     3. SSA/IR
3378 :    
3379 :     a. New module ir/dj-dataflow.sml implements elimination based
3380 :     data flow analysis.
3381 :    
3382 :     4. MLRiscGen
3383 :    
3384 :     a. Fix for gc type annotation
3385 :    
3386 :     5. MDGen
3387 :    
3388 :     Various fixes for machine description -> ml code translation. For ssa
3389 :     only.
3390 :    
3391 :     ----------------------------------------------------------------------
3392 :     Name: Allen Leung
3393 : leunga 640 Date: 2000/05/08 22:17 EDT
3394 :     Tag: leunga-20000508-labexp
3395 :     Description:
3396 :    
3397 :     Fermin has found a few assembly problems with constant expressions
3398 :     generated in LabelExp. Mostly, the problems involve extra parentheses,
3399 :     which choke on dumb assemblers. This is his fix.
3400 :    
3401 :     ----------------------------------------------------------------------
3402 : dbm 635 Name: Dave MacQueen
3403 :     Date: 2000/04/09 14:00 EDT
3404 :     Tag: dbm-20000502-Version_110_28
3405 :     Description:
3406 :    
3407 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.28
3408 :    
3409 :     2. Updated config/version to 110.28
3410 :    
3411 :     3. Updated config/srcarchiveurl
3412 :    
3413 :     3. New boot files!
3414 :     ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/
3415 :    
3416 :     ----------------------------------------------------------------------
3417 : blume 634 Name: Matthias Blume
3418 :     Date: 2000/05/01 19:05:00 JST
3419 :     Tag: blume-20000501-noweb
3420 :     Description:
3421 :    
3422 :     A new noweb tool has been added. The existing system is entirely
3423 :     unaffected by this, but some CM users have asked for renewed noweb
3424 :     support. Everything is documented in the CM manual.
3425 :    
3426 :     New (plugin) libraries:
3427 :    
3428 :     noweb-tool.cm
3429 :     nw-ext.cm
3430 :    
3431 :     ----------------------------------------------------------------------
3432 : dbm 633 Name: Dave MacQueen
3433 :     Date: 2000/04/30 12:40PM EDT
3434 :     Tag: dbm-20000430-bug_fixes
3435 :     Description:
3436 :    
3437 :     1. Fix for bug 1498
3438 :     smlnj/src/system/Basis/Implementation/Unsafe/object.sig
3439 :     smlnj/src/system/Basis/Implementation/Unsafe/object.sml
3440 :     added toRealArray function
3441 :     smlnj/src/compiler/MiscUtil/print/ppobj.sml
3442 :     added check for tag Obj.RealArray to array printing case in ppObj
3443 :    
3444 :     2. Fix for bug 1510
3445 :     smlnj/src/compiler/Semant/types/typesutil.sml
3446 :     fixed definition of dummyargs (used by equalTycon) so that
3447 :     dummy args are distinct types
3448 :    
3449 :     ----------------------------------------------------------------------
3450 : blume 629 Name: Matthias Blume
3451 : blume 632 Date: 2000/04/30 01:00:00 JST
3452 :     Tag: blume-20000430-versions
3453 :     Description:
3454 :    
3455 :     1. CM version numbering added. This is an implementation of Lal's
3456 :     proposal for adding version numbers and version checking to .cm
3457 :     files. Lal said that his proposal was just that -- a proposal.
3458 :     For the time being I went ahead and implemented it so that people
3459 :     can comment on it. Everything is completely backward-compatible
3460 :     (except for the stable library format, i.e., new bootfiles!).
3461 :    
3462 :     As usual, see the CM manual for details.
3463 :    
3464 :     2. An alternative syntax for anchored paths has been implemented.
3465 :     Dave has recently voiced the same concerns that I had when I did
3466 :     this, so there should be some support. My take is that eventually
3467 :     I will let support for the current syntax (where anchors are
3468 :     "implicit") fade out in favor of the new, explicit syntax.
3469 :     In order to be backward-compatible, both old and new syntax are
3470 :     currently supported.
3471 :    
3472 :     Again, see the CM manual for details.
3473 :    
3474 :     3. Parallel make is trying to be slightly smarter: When the master
3475 :     process finds a "bottleneck", i.e., when there is only one
3476 :     compilation unit that can be compiled and everybody else is
3477 :     waiting on it, then it will simply compile it directly instead
3478 :     of clumsily telling one of the slaves to do it.
3479 :    
3480 :     4. Support for "unsharing" added. This is necessary in order to be
3481 :     able to have two different versions of the same library running
3482 :     at the same time (e.g., for trying out a new MLRISC while still
3483 :     having the old MLRISC linked into the current compiler, etc.)
3484 :     See the CM manual.
3485 :    
3486 :     5. Simple "makedepend" functionality added for generating Makefile
3487 :     dependency information. (This is rather crude at the moment.
3488 :     Expect some changes here in the future.)
3489 :    
3490 :     6. ".fun" added as a recognized suffix for ML files. Also documented
3491 :     explicitly in the manual that the fallback behavior (unknown suffix
3492 :     -> ML file) is not an official feature!
3493 :    
3494 :     7. Small changes to the pickler for stable libraries.
3495 :    
3496 :     8. Several internal changes to CM (for cleanup/improvement).
3497 :    
3498 :    
3499 :     !!!! NEW BINFILES !!!!
3500 :    
3501 :     ----------------------------------------------------------------------
3502 :     Name: Matthias Blume
3503 : blume 631 Date: 2000/04/28 17:30:00 JST
3504 :     Tag: blume-20000428-pathconfig
3505 :     Description:
3506 :    
3507 :     1. I changed config/install.sh to remove duplicate entries from the
3508 :     lib/pathconfig file at the end. Moreover, the final version of
3509 :     lib/pathconfig is sorted alphabetically. The same (sorting) is done
3510 :     in src/system/installml.
3511 :    
3512 :     2. The config/install.sh script now consistently uses relative
3513 :     pathnames in lib/pathconfig whenever the anchor is in the lib
3514 :     directory. (So far this was true for the libraries that come
3515 :     pre-compiled and bundled as part of the bootfiles but not for
3516 :     libraries that are compiled by the script itself.)
3517 :    
3518 :     ----------------------------------------------------------------------
3519 :     Name: Matthias Blume
3520 : blume 629 Date: 2000/04/26 13:10:00 JST
3521 :     Tag: blume-20000426-fun_suffix
3522 :     Description:
3523 :    
3524 :     Added ".fun" as a recognized file name suffix (for ML code).
3525 :    
3526 :     ----------------------------------------------------------------------
3527 : leunga 628 Name: Allen Leung
3528 :     Date: 2000/04/25 17:00:00 EST
3529 :     Tag: leunga-20000425-alpha-ra
3530 :     Description:
3531 :    
3532 :     1. Alpha
3533 :    
3534 :     PSEUDOARITH was missing in AlphaRewrite. This causes an endless loop
3535 :     in C--.
3536 :    
3537 :     2. RA
3538 :    
3539 :     Added a flag "ra-dump-size" to print out the size of the flowgraph
3540 :     and the interference graph.
3541 :    
3542 :     ----------------------------------------------------------------------
3543 : dbm 627 Name: Dave MacQueen
3544 :     Date: 2000/04/25/
3545 :     Tag: dbm-20000425-mlyacc_doc_examples
3546 :     Description:
3547 :     Updated mlyacc.tex sections 5 and 7 for SML '97 and CM.
3548 :     Updated all three examples in src/ml-yacc/examples to run
3549 :     under 110.* using CM.make.
3550 :    
3551 :     ----------------------------------------------------------------------
3552 : leunga 624 Name: Allen Leung
3553 :     Date: 2000/04/20 23:04:00 EST
3554 :     Tag: leunga-20000420-ssa-c---stuff
3555 :     Description:
3556 :    
3557 :     This update synchronizes my repository with Yale's. Most of these
3558 :     changes, however, do not affect SML/NJ at all (the RA is an exception).
3559 :    
3560 :     1. Register Allocator
3561 :    
3562 :     a. An improvement in the interference graph construction:
3563 :     Given a copy
3564 :    
3565 :     s <- t
3566 :    
3567 : leunga 628 no interference edge between s and t is added for this definition of s.
3568 : leunga 624
3569 :     b. I've added two new spill heuristic modules that Fermin and I developed
3570 :     (in the new library RA.cm). These are unused in SML/NJ but maybe
3571 :     useful for others (Moby?)
3572 :    
3573 :     2. X86
3574 :    
3575 :     a. Various fixes in the backend provided by Fermin [C--] and Lal.
3576 :    
3577 :     3. Alpha
3578 :    
3579 :     a. Added the BSR instruction and code generation that goes with it [C--]
3580 :     b. Other fixes too numerous to recount provided by Fermin [C--]
3581 :    
3582 :     4. Regmaps
3583 :    
3584 :     a. The regmaps are not initialized with the identity physical bindings
3585 :     at creation time. This is unneeded.
3586 :    
3587 :     5. MLRISC Optimizations
3588 :    
3589 :     a. The DJ-Graph module can now compute the iterated dominance frontiers
3590 :     intersects with liveness incrementally in linear time! Woohoo!
3591 :     This is now used in my new SSA construction algorithm.
3592 :    
3593 :     b. THe branch reorganization module is now smarter about linear chains of
3594 :     basic blocks.
3595 :    
3596 :    
3597 :     ----------------------------------------------------------------------
3598 : blume 615 Name: Matthias Blume
3599 :     Date: 2000/04/12 13:52:00 JST
3600 :     Tag: blume_main_v110p27_1
3601 :     Description:
3602 :    
3603 :     Changed install.sh script to handle archive files without version number
3604 :     and to use "boot.<arch>-<os>" instead of "sml.boot.<arch>-<os>" for the
3605 :     name of the boot file archive.
3606 :    
3607 :     ----------------------------------------------------------------------
3608 : dbm 607 Name: Dave MacQueen
3609 :     Date: 2000/04/09 14:00 EDT
3610 :     Tag: dbm-20000410-Version_110_27
3611 :     Description:
3612 :    
3613 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.27
3614 :    
3615 :     2. Updated src/config/version to 110.27
3616 :    
3617 :     3. New boot files!
3618 :    
3619 :     ----------------------------------------------------------------------
3620 : leunga 606 Name: Allen Leung
3621 :     Date: 2000/04/09 19:09:00 EST
3622 :     Tag: leunga-20000409-misc
3623 :     Description:
3624 :    
3625 :     1. Yet another fix for x86 assembly for idivl, imull, mull and friends.
3626 :    
3627 :     2. Miscellaneous improvements to MLRISC (unused in sml/nj)
3628 :    
3629 :     ----------------------------------------------------------------------
3630 : monnier 605 Name: Stefan
3631 :     Date: 2000/04/07 10:00:00 EDT
3632 :     Tag: monnier-20000406-branch-handling
3633 :     Description:
3634 :    
3635 :     Improved handling of branches (mostly those generated from
3636 :     polymorphic equality), removed switchoff and changed the
3637 :     default optimization settings (more cpsopt and less flintopt).
3638 :    
3639 :     ----------------------------------------------------------------------
3640 : leunga 601 Name: Allen Leung
3641 : leunga 602 Date: 2000/04/06 01:30:00 EST
3642 :     Tag: leunga-20000406-peephole-x86-SSA-2
3643 :     Description:
3644 :    
3645 :     Forgot a few files.
3646 :    
3647 :     ----------------------------------------------------------------------
3648 :     Name: Allen Leung
3649 : leunga 601 Date: 2000/04/06 00:36:00 EST
3650 :     Tag: leunga-20000406-peephole-x86-SSA
3651 :     Description:
3652 :    
3653 :     1. New Peephole code
3654 :    
3655 :     2. Minor improvement to X86 instruction selection
3656 :    
3657 :     3. Various fixes to SSA and machine description -> code translator
3658 :    
3659 :     ----------------------------------------------------------------------
3660 : blume 595 Name: Matthias Blume
3661 :     Date: 2000/04/05 12:30:00 JST
3662 :     Tag: blume_main_v110p26p2_3
3663 :     Description:
3664 :    
3665 :     This update just merges three minor cosmetic updates to CM's sources
3666 :     to get ready for the 110.27 code freeze on Friday. No functionality
3667 :     has changed.
3668 :    
3669 :     ----------------------------------------------------------------------
3670 : leunga 593 Name: Allen Leung
3671 : leunga 594 Date: 2000/04/04 19:39:00 EST
3672 :     Tag: leunga-20000404-x86-asm
3673 :     Description:
3674 :    
3675 :     1. Fixed a problem in X86 assembly.
3676 :    
3677 :     Things like
3678 :    
3679 :     jmp %eax
3680 :     jmp (%eax)
3681 :    
3682 :     should be output as
3683 :    
3684 :     jmp *%eax
3685 :     jmp *(%eax)
3686 :    
3687 :     2. Assembly output
3688 :    
3689 :     Added a new flag
3690 :    
3691 :     "asm-indent-copies" (default to false)
3692 :    
3693 :     When this flag is on, parallel copies will be indented an extra level.
3694 :    
3695 :     ----------------------------------------------------------------------
3696 :     Name: Allen Leung
3697 : leunga 593 Date: 2000/04/04 03:18:00 EST
3698 :     Tag: leunga-20000404-C--Moby
3699 :     Description:
3700 :    
3701 :     All of these fixes are related to C--, Moby, and my own optimization
3702 :     stuff; so they shouldn't affect SML/NJ.
3703 :    
3704 :     1. X86
3705 :    
3706 :     Various fixes related floating point, and extensions.
3707 :    
3708 :     2. Alpha
3709 :    
3710 :     Some extra patterns related to loads with signed/zero extension
3711 :     provided by Fermin.
3712 :    
3713 :     3. Assembly
3714 :    
3715 : monnier 659 When generating assembly, resolve the value of client defined constants,
3716 : leunga 593 instead of generating symbolic values. This is controlled by the
3717 :     new flag "asm-resolve-constants", which is default to true.
3718 :    
3719 :     4. Machine Descriptions
3720 :    
3721 :     a. The precedence parser was slightly broken when parsing infixr symbols.
3722 :     b. The type generalizing code had the bound variables reversed, resulting
3723 :     in a problem during arity raising.
3724 :     c. Various fixes in machine descriptions.
3725 :    
3726 :     ----------------------------------------------------------------------
3727 : blume 592 Name: Matthias Blume
3728 :     Date: 2000/04/03 16:05:00 JST
3729 :     Tag: blume_main_v110p26p2_2
3730 :     Description:
3731 :    
3732 :     I eliminated coreEnv from compInfo. Access to the "Core" structure is
3733 :     now done via the ordinary static environment that is context to each
3734 :     compilation unit.
3735 :    
3736 :     To this end, I arranged that instead of "structure Core" as "structure
3737 :     _Core" is bound in the pervasive environment. Core access is done via
3738 : monnier 659 _Core (which can never be accidentally rebound because _Core is not a
3739 : blume 592 legal surface-syntax symbol).
3740 :    
3741 :     The current solution is much cleaner because the core environment is
3742 :     now simply part of the pervasive environment which is part of every
3743 :     compilation unit's context anyway. In particular, this eliminates all
3744 :     special-case handling that was necessary until now in order to deal
3745 :     with dynamic and symbolic parts of the core environment.
3746 :    
3747 :     Remaining hackery (to bind the "magic" symbol _Core) is localized in the
3748 : monnier 659 compilation manager's bootstrap compiler (actually: in the "init group"
3749 : blume 592 handling). See the comments in src/system/smlnj/init/init.cmi for
3750 :     more details.
3751 :    
3752 :     I also tried to track down all mentions of "Core" (as string argument
3753 :     to Symbol.strSymbol) in the compiler and replaced them with a
3754 :     reference to the new CoreSym.coreSym. Seems cleaner since the actual
3755 :     name appears in one place only.
3756 :    
3757 :     Binfile and bootfile format have not changed, but the switchover from
3758 :     the old "init.cmi" to the new one is a bit tricky, so I supplied new
3759 :     bootfiles anyway.
3760 :    
3761 :     ----------------------------------------------------------------------
3762 : leunga 591 Name: Allen Leung
3763 :     Date: 2000/04/02 21:17:00 EST
3764 :     Tag: leunga-20000402-mltree
3765 :     Description:
3766 : leunga 585
3767 : leunga 591 1. Renamed the constructor CALL in MLTREE by popular demand.
3768 :     2. Added a bunch of files from my repository. These are currently
3769 :     used by other non-SMLNJ backends.
3770 :    
3771 : leunga 576 ----------------------------------------------------------------------
3772 : leunga 590 Name: Allen Leung
3773 :     Date: 2000/03/31 21:15:00 EST
3774 :     Tag: leunga-20000331-aliasing
3775 :     Description:
3776 :    
3777 :     This update contains a rewritten (and hopefully more correct) module
3778 :     for extracting aliasing information from CPS.
3779 :    
3780 :     To turn on this feature:
3781 :    
3782 :     Compiler.Control.CG.memDisambiguate := true
3783 :    
3784 :     To pretty print the region information with assembly
3785 :    
3786 :     Compiler.Control.MLRISC.getFlag "asm-show-region" := true;
3787 :    
3788 :     To control how many levels of aliasing information are printed, use:
3789 :    
3790 :     Compiler.Control.MLRISC.getInt "points-to-show-level" := n
3791 :    
3792 :     The default of n is 3.
3793 :    
3794 :     ----------------------------------------------------------------------
3795 : dbm 589 Name: David MacQueen
3796 :     Date: 2000/03/31 11:15:00 EST
3797 :     Tag: dbm-20000331-runtime_fix
3798 :     Description:
3799 :    
3800 :     This update contains:
3801 :    
3802 :     1. runtime/c-lib/c-libraries.c
3803 :     includes added in revision 1.2 caused compilation errors on hppa-hpux
3804 :    
3805 :     2. fix for bug 1556
3806 :     system/Basis/Implementation/NJ/internal-signals.sml
3807 :    
3808 :     ----------------------------------------------------------------------
3809 : blume 587 Name: Matthias Blume
3810 : blume 588 Date: 2000/03/31 18:00:00 JST
3811 :     Tag: blume_main_v110p26p2_1
3812 :     Description:
3813 :    
3814 :     This update contains:
3815 :    
3816 :     1. A small change to CM's handling of stable libraries:
3817 :     CM now maintains one "global" modmap that is used for all stable
3818 :     libraries. The use of such a global modmap maximizes sharing and
3819 :     minimizes the need for re-traversing parts of environments during
3820 :     modmap construction. (However, this has minor impact since modmap
3821 :     construction seems to account for just one percent or less of total
3822 :     compile time.)
3823 :    
3824 :     2. I added a "genmap" phase to the statistics. This is where I got the
3825 :     "one percent" number (see above).
3826 :    
3827 :     3. CM's new tool parameter mechanism just became _even_ better. :)
3828 :     - The parser understands named parameters and recursive options.
3829 :     - The "make" and "shell" tools use these new features.
3830 :     (This makes it a lot easier to cascade these tools.)
3831 :     - There is a small syntax change: named parameters use a
3832 :    
3833 :     <name> : ( <option> ... ) or
3834 :     <name> : <string>
3835 :    
3836 :     syntax. Previously, named parameters were implemented in an
3837 :     ad-hoc fashion by each tool individually (by parsing strings)
3838 :     and had the form
3839 :    
3840 :     <name>=<string>
3841 :    
3842 :     See the CM manual for a full description of these issues.
3843 :    
3844 :     ----------------------------------------------------------------------
3845 :     Name: Matthias Blume
3846 : blume 587 Date: 2000/03/30 18:00:00 JST
3847 :     Tag: blume_main_v110p26p2_0
3848 :     Description:
3849 :    
3850 :     !!!!! WARNING !!!!!!
3851 :     !! New binfiles !!
3852 :     !!!!!!!!!!!!!!!!!!!!
3853 :    
3854 :     This update contains:
3855 :    
3856 :     1. Moderate changes to CM:
3857 :    
3858 :     - Changes to CM's tools mechanism. In particular, it is now possible
3859 :     to have tools that accept additional "command line" parameters
3860 :     (specified in the .cm file at each instance where the tool's class is
3861 :     used).
3862 :    
3863 : monnier 659 This was done to accommodate the new "make" and "shell" tools which
3864 :     facilitate fairly seamless hookup to portions of code managed using
3865 : blume 587 Makefiles or Shell scripts.
3866 :    
3867 :     There are no classes "shared" or "private" anymore. Instead, the
3868 :     sharing annotation is now a parameter to the "sml" class.
3869 :    
3870 :     There is a bit of generic machinery for implementing one's own
3871 :     tools that accept command-line parameters. However, I am not yet fully
3872 :     satisfied with that part, so expect changes here in the future.
3873 :    
3874 :     All existing tools are described in the CM manual.
3875 :    
3876 : monnier 659 - Slightly better error handling. (CM now suppresses many followup
3877 : blume 587 error messages that tended to be more annoying than helpful.)
3878 :    
3879 :     2. Major changes to the compiler's static environment data structures.
3880 :    
3881 :     - no CMStaticEnv anymore.
3882 :     - no CMEnv, no "BareEnvironment" (actually, _only_ BareEnvironment,
3883 :     but it is called Environment), no conversions between different
3884 :     kinds of static environments
3885 :    
3886 :     - There is still a notion of a "modmap", but such modmaps are generated
3887 :     on demand at the time when they are needed. This sounds slow, but I
3888 :     sped up the code that generates modmaps enough for this not to lead to
3889 :     a slowdown of the compiler (at least I didn't detect any).
3890 :    
3891 :     - To facilitate rapid modmap generation, static environments now
3892 :     contain an (optional) "modtree" structure. Modtree annotations are
3893 :     constructed by the unpickler during unpickling. (This means that
3894 :     the elaborator does not have to worry about modtrees at all.)
3895 :     Modtrees have the advantage that they are compositional in the same
3896 :     way as the environment data structure itself is compositional.
3897 :     As a result, modtrees never hang on to parts of an environment that
3898 :     has already been rendered "stale" by filtering or rebinding.
3899 :    
3900 :     - I went through many, many trials and errors before arriving at the
3901 :     current solution. (The initial idea of "linkpaths" did not work.)
3902 :     But the result of all this is that I have touched a lot of files that
3903 :     depend on the "modules" and "types" data structures (most of the
3904 :     elaborator). There were a lot of changes during my "linkpath" trials
3905 :     that could have been reverted to their original state but weren't.
3906 :     Please, don't be too harsh on me for messing with this code a bit more
3907 : monnier 921 than what was strictly necessary... (I _did_ resist the temptation
3908 : blume 587 of doing any "global reformatting" to avoid an untimely death at
3909 :     Dave's hands. :)
3910 :    
3911 :     - One positive aspect of the previous point: At least I made sure that
3912 :     all files that I touched now compile without warnings (other than
3913 :     "polyEqual").
3914 :    
3915 :     - compiler now tends to run "leaner" (i.e., ties up less memory in
3916 :     redundant modmaps)
3917 :    
3918 :     ----------------------------------------------------------------------
3919 : leunga 580 Name: Allen Leung
3920 : leunga 585 Date: 2000/03/29 18:00:00
3921 :     Tag: leunga-20000327-mlriscGen_hppa_alpha_x86
3922 : leunga 586 Boot files (optional): ftp://react-ilp.cs.nyu.edu/leunga/110.26.1-sml.boot.x86-unix-20000330.tar.gz
3923 : leunga 585 Description:
3924 :    
3925 :     This update contains *MAJOR* changes to the way code is generated from CPS
3926 :     in the module mlriscGen, and in various backend modules.
3927 :    
3928 :     CHANGES
3929 :     =======
3930 :    
3931 :     1. MLRiscGen: forward propagation fix.
3932 :    
3933 :     There was a bug in forward propagation introduced at about the same time
3934 :     as the MLRISC x86 backend, which prohibits coalescing to be
3935 :     performed effectively in loops.
3936 :    
3937 :     Effect: speed up of loops in RISC architectures.
3938 :     By itself, this actually slowed down certain benchmarks on the x86.
3939 :    
3940 :     2. MLRiscGen: forward propagating addresses from consing.
3941 :    
3942 :     I've changed the way consing code is generated. Basically I separated
3943 :     out the initialization part:
3944 :    
3945 :     store tag, offset(allocptr)
3946 :     store elem1, offset+4(allocptr)
3947 :     store elem2, offset+8(allocptr)
3948 :     ...
3949 :     store elemn, offset+4n(allocptr)
3950 :    
3951 :     and the address computation part:
3952 :    
3953 :     celladdr <- offset+4+alloctpr
3954 :    
3955 :     and move the address computation part
3956 :    
3957 :     Effect: register pressure is generally lower as a result. This
3958 :     makes compilation of certain expressions much faster, such as
3959 :     long lists with non-trivial elements.
3960 :    
3961 :     [(0,0), (0,0), .... (0,0)]
3962 :    
3963 :     3. MLRiscGen: base pointer elimination.
3964 :    
3965 :     As part of the linkage mechanism, we generate the sequence:
3966 :    
3967 :     L: ... <- start of the code fragment
3968 :    
3969 :     L1:
3970 :     base pointer <- linkreg - L1 + L
3971 :    
3972 :     The base pointer was then used for computing relocatable addresses
3973 :     in the code fragment. Frequently (such as in lots of continuations)
3974 :     this is not needed. We now eliminate this sequence whenever possible.
3975 :    
3976 :     For compile time efficiency, I'm using a very stupid local heuristic.
3977 :     But in general, this should be done as a control flow analysis.
3978 :    
3979 :     Effect: Smaller code size. Speed up of most programs.
3980 :    
3981 :     4. Hppa back end
3982 :    
3983 :     Long jumps in span dependence resolution used to depend on the existence
3984 :     of the base pointer.
3985 :    
3986 :     A jump to a long label L was expanded into the following sequence:
3987 :    
3988 :     LDIL %hi(L-8192), %r29
3989 :     LDO %lo(L-8192)(%r29), %r29
3990 :     ADD %r29, baseptr, %r29
3991 :     BV,n %r0(%r29)
3992 :    
3993 :     In the presence of change (3) above, this will not work. I've changed
3994 :     it so that the following sequence of instructions are generated, which
3995 :     doesn't mention the base pointer at all:
3996 :    
3997 :     BL,n L', %r29 /* branch and link, L' + 4 -> %r29 */
3998 :     L': ADDIL L-(L'+4), %r29 /* Compute address of L */
3999 :     BV,n %r0(%r29) /* Jump */
4000 :    
4001 :     5. Alpha back end
4002 :    
4003 :     New alpha instructions LDB/LDW have been added, as per Fermin's
4004 :     suggestions. This is unrelated to all other changes.
4005 :    
4006 :     6. X86 back end
4007 :    
4008 :     I've changed andl to testl in the floating point test sequence
4009 :     whenever appropriate. The Intel optimization guide states that
4010 : monnier 659 testl is preferable to andl.
4011 : leunga 585
4012 :     7. RA (x86 only)
4013 :    
4014 :     I've improved the spill propagation algorithm, using an approximation
4015 :     of maximal weighted independent sets. This seems to be necessary to
4016 :     alleviate the negative effect in light of the slow down in (1).
4017 :    
4018 :     I'll write down the algorithm one of these days.
4019 :    
4020 :     8. MLRiscGen: frequencies
4021 :    
4022 :     I've added an annotation that states that all call gc blocks have zero
4023 :     execution frequencies. This improves register allocation on the x86.
4024 :    
4025 :     BENCHMARKS
4026 :     ==========
4027 :    
4028 :     I've only perform the comparison on 110.25.
4029 :    
4030 :     The platforms are:
4031 :    
4032 :     HPPA A four processor HP machine (E9000) with 5G of memory.
4033 :     X86 A 300Hhz Pentium II with 128M of memory, and
4034 :     SPARC An Ultra sparc 2 with 512M of memory.
4035 :    
4036 :     I used the following parameters for the SML benchmarks:
4037 :    
4038 :     @SMLalloc
4039 :     HPPA 256k
4040 :     SPARC 512k
4041 :     X86 256k
4042 :    
4043 :     COMPILATION TIME
4044 :     ----------------
4045 :     Here are the numbers comparing the compilation times of the compilers.
4046 :     I've only compared 110.25 compiling the new sources versus
4047 :     a fixpoint version of the new compiler compiling the same.
4048 :    
4049 :     110.25 New
4050 :     Total Time in RA Spill+Reload Total Time In RA Spill+Reload
4051 :     HPPA 627s 116s 2684+3584 599s 95s 1003+1879
4052 :     SPARC 892s 173s 2891+3870 708s 116s 1004+1880
4053 :     X86 999s 315s 94006+130691 987s 296s 108877+141957
4054 :    
4055 :     110.25 New
4056 :     Code Size Code Size
4057 :     HPPA 8596736 8561421
4058 :     SPARC 8974299 8785143
4059 :     X86 9029180 8716783
4060 :    
4061 :     So in summary, things are at least as good as before. Dramatic
4062 :     reduction in compilation is obtained on the Sparc; I can't explain it,
4063 :     but it is reproducible. Perhaps someone should try to reproduce this
4064 :     on their own machines.
4065 :    
4066 :     SML BENCHMARKS
4067 :     --------------
4068 :    
4069 :     On the average, all benchmarks perform at least as well as before.
4070 :    
4071 :     HPPA Compilation Time Spill+Reload Run Time
4072 :     110.25 New 110.25 New 110.25 New
4073 :    
4074 :     barnesHut 3.158 3.015 4.75% 1+1 0+0 2.980 2.922 2.00%
4075 :     boyer 6.152 5.708 7.77% 0+0 0+0 0.218 0.213 2.34%
4076 :     count-graphs 1.168 1.120 4.32% 0+0 0+0 22.705 23.073 -1.60%
4077 :     fft 0.877 0.792 10.74% 1+3 1+3 0.602 0.587 2.56%
4078 :     knuthBendix 3.180 2.857 11.32% 0+0 0+0 0.675 0.662 2.02%
4079 :     lexgen 6.190 5.290 17.01% 0+0 0+0 0.913 0.788 15.86%
4080 :     life 0.803 0.703 14.22% 25+25 0+0 0.153 0.140 9.52%
4081 :     logic 2.048 2.007 2.08% 6+6 1+1 4.133 4.008 3.12%
4082 :     mandelbrot 0.077 0.080 -4.17% 0+0 0+0 0.765 0.712 7.49%
4083 :     mlyacc 22.932 20.937 9.53% 154+181 32+57 0.468 0.430 8.91%
4084 :     nucleic 5.183 5.060 2.44% 2+2 0+0 0.125 0.120 4.17%
4085 :     ratio-regions 3.357 3.142 6.84% 0+0 0+0 116.225 113.173 2.70%
4086 :     ray 1.283 1.290 -0.52% 0+0 0+0 2.887 2.855 1.11%
4087 :     simple 6.307 6.032 4.56% 28+30 5+7 3.705 3.658 1.28%
4088 :     tsp 0.888 0.862 3.09% 0+0 0+0 7.040 6.893 2.13%
4089 :     vliw 24.378 23.455 3.94% 106+127 25+45 2.758 2.707 1.91%
4090 :     --------------------------------------------------------------------------
4091 :     Average 6.12% 4.09%
4092 :    
4093 :     SPARC Compilation Time Spill+Reload Run Time
4094 :     110.25 New 110.25 New 110.25 New
4095 :    
4096 :     barnesHut 3.778 3.592 5.20% 2+2 0+0 3.648 3.453 5.65%
4097 :     boyer 6.632 6.110 8.54% 0+0 0+0 0.258 0.242 6.90%
4098 :     count-graphs 1.435 1.325 8.30% 0+0 0+0 33.672 34.737 -3.07%
4099 :     fft 0.980 0.940 4.26% 3+9 2+6 0.838 0.827 1.41%
4100 :     knuthBendix 3.590 3.138 14.39% 0+0 0+0 0.962 0.967 -0.52%
4101 :     lexgen 6.593 6.072 8.59% 1+1 0+0 1.077 1.078 -0.15%
4102 :     life 0.972 0.868 11.90% 26+26 0+0 0.143 0.140 2.38%
4103 :     logic 2.525 2.387 5.80% 7+7 1+1 5.625 5.158 9.05%
4104 :     mandelbrot 0.090 0.093 -3.57% 0+0 0+0 0.855 0.728 17.39%
4105 :     mlyacc 26.732 23.827 12.19% 162+189 32+57 0.550 0.560 -1.79%
4106 :     nucleic 6.233 6.197 0.59% 3+3 0+0 0.163 0.173 -5.77%
4107 :     ratio-regions 3.780 3.507 7.79% 0+0 0+0 133.993 131.035 2.26%
4108 :     ray 1.595 1.550 2.90% 1+1 0+0 3.440 3.418 0.63%
4109 :     simple 6.972 6.487 7.48% 29+32 5+7 3.523 3.525 -0.05%
4110 :     tsp 1.115 1.063 4.86% 0+0 0+0 7.393 7.265 1.77%
4111 :     vliw 27.765 24.818 11.87% 110+135 25+45 2.265 2.135 6.09%
4112 :     ----------------------------------------------------------------------------
4113 :     Average 6.94% 2.64%
4114 :    
4115 :     X86 Compilation Time Spill+Reload Run Time
4116 :     110.25 New 110.25 New 110.25 New
4117 :    
4118 :     barnesHut 5.530 5.420 2.03% 593+893 597+915 3.532 3.440 2.66%
4119 :     boyer 8.768 7.747 13.19% 493+199 301+289 0.327 0.297 10.11%
4120 :     count-graphs 2.040 2.010 1.49% 298+394 315+457 26.578 28.660 -7.26%
4121 :     fft 1.327 1.302 1.92% 112+209 115+210 1.055 0.962 9.71%
4122 :     knuthBendix 5.218 5.475 -4.69% 451+598 510+650 0.928 0.932 -0.36%
4123 :     lexgen 9.970 9.623 3.60% 1014+841 1157+885 0.947 0.928 1.97%
4124 :     life 1.183 1.183 0.00% 162+182 145+148 0.127 0.103 22.58%
4125 :     logic 3.285 3.512 -6.45% 514+684 591+836 5.682 5.577 1.88%
4126 :     mandelbrot 0.147 0.143 2.33% 38+41 33+54 0.703 0.690 1.93%
4127 :     mlyacc 35.457 32.763 8.22% 3496+4564 3611+4860 0.552 0.550 0.30%
4128 :     nucleic 7.100 6.888 3.07% 239+168 201+158 0.175 0.173 0.96%
4129 :     ratio-regions 6.388 6.843 -6.65% 1182+257 981+300 120.142 120.345 -0.17%
4130 :     ray 2.332 2.338 -0.29% 346+398 402+494 3.593 3.540 1.51%
4131 :     simple 9.912 9.903 0.08% 1475+941 1579+1168 3.057 3.178 -3.83%
4132 :     tsp 1.623 1.532 5.98% 266+200 250+211 8.045 7.878 2.12%
4133 :     vliw 33.947 35.470 -4.29% 2629+2774 2877+3171 2.072 1.890 9.61%
4134 :     ----------------------------------------------------------------------------
4135 :     Average 1.22% 3.36%
4136 :    
4137 :     ----------------------------------------------------------------------
4138 :     Name: Allen Leung
4139 : leunga 583 Date: 2000/03/23 16:25:00
4140 :     Tag: leunga-20000323-fix_x86_alpha
4141 :     Description:
4142 :    
4143 :     1. X86 fixes/changes
4144 :    
4145 :     a. The old code generated for SETcc was completely wrong.
4146 :     The Intel optimization guide is VERY misleading.
4147 :    
4148 :     2. ALPHA fixes/changes
4149 :    
4150 :     a. Added the instructions LDBU, LDWU, STB, STW as per Fermin's suggestion.
4151 :     b. Added a new mode byteWordLoadStores to the functor parameter to Alpha()
4152 :     c. Added reassociation code for address computation.
4153 :    
4154 :     ----------------------------------------------------------------------
4155 :     Name: Allen Leung
4156 : leunga 580 Date: 2000/03/22 01:23:00
4157 :     Tag: leunga-20000322-fix_x86_hppa_ra
4158 :     Description:
4159 :    
4160 :     1. X86 fixes/changes
4161 :    
4162 :     a. x86Rewrite bug with MUL3 (found by Lal)
4163 :     b. Added the instructions FSTS, FSTL
4164 :    
4165 :     2. PA-RISC fixes/changes
4166 :    
4167 :     a. B label should not be a delay slot candidate! Why did this work?
4168 :     b. ADDT(32, REG(32, r), LI n) now generates one instruction instead of two,
4169 :     as it should be.
4170 :     c. The assembly syntax for fstds and fstdd was wrong.
4171 :     d. Added the composite instruction COMICLR/LDO, which is the immediate
4172 :     operand variant of COMCLR/LDO.
4173 :    
4174 :     3. Generic MLRISC
4175 :    
4176 :     a. shuffle.sml rewritten to be slightly more efficient
4177 :     b. DIV bug in mltree-simplify fixed (found by Fermin)
4178 :    
4179 :     4. Register Allocator
4180 :    
4181 :     a. I now release the interference graph earlier during spilling.
4182 :     May improve memory usage.
4183 :    
4184 :     ----------------------------------------------------------------------
4185 : blume 577 Name: Matthias Blume
4186 : blume 578 Date: 2000/03/14 14:15:32
4187 :     Tag: blume_main_v110p26p1_2
4188 :     Description:
4189 :    
4190 :     1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
4191 :     additional argument called "template" which is an optional string that
4192 : monnier 659 specifies the layout of the tool command line. See the CM manual for
4193 : blume 578 explanation.
4194 :    
4195 : monnier 659 2. A special-purpose tool can be "registered" by simply dropping the
4196 : blume 578 corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
4197 :     directory where the .cm file lives that uses this tool. (The
4198 :     behavior/misfeature until now was to look for the tool description
4199 :     files in the current working directory.) As before, tool description
4200 :     files could also be anchored -- in which case they can live anywhere
4201 :     they like. Following the recent e-mail discussion, this change should
4202 :     make it easier to have special-purpose tools that are shipped together
4203 :     with the sources of the program that uses them.
4204 :    
4205 :     ----------------------------------------------------------------------
4206 :     Name: Matthias Blume
4207 : blume 577 Date: 2000/03/10 07:48:34
4208 :     Tag: blume_main_v110p26p1_1
4209 :     Description:
4210 :    
4211 :     I added a re-written version of Dave's fixpt script to src/system.
4212 :     Changes relative to the original version:
4213 :     - sh-ified (not everybody has ksh)
4214 :     - automatically figures out which architecture it runs on
4215 :     - uses ./makeml a bit more cleverly
4216 :     - never invokes ./installml (and, thus, does not clobber your
4217 :     good and working installation of sml in case something goes wrong)
4218 :     - accepts max iteration count using option "-iter <n>"
4219 :     - accepts a "base" name using option "-base <base>"
4220 :    
4221 :     It does not build any extraneous heap images but directly rebuilds
4222 :     bin- and boot-hierarchies using makeml's "-rebuild" switch. Finally,
4223 :     it can incorporate existing bin- and boot- hierarchies. For example,
4224 :     suppose the base is set to "sml" (which is the default). Then it
4225 :     successively builds
4226 :    
4227 :     sml.bin.<arch>-unix and sml.boot.<arch>-unix
4228 :     then sml1.bin.<arch>-unix and sml1.boot.<arch>-unix
4229 :     then sml2.bin.<arch>-unix and sml2.boot.<arch>-unix
4230 :     ...
4231 :     then sml<n>.bin.<arch>-unix and sml<n>.boot.<arch>-unix
4232 :    
4233 :     and so on. If any of these already exist, it will just use what's
4234 :     there. In particular, many people will have the initial set of bin
4235 :     and boot files around, so this saves time for at least one full
4236 :     rebuild. Having sets of the form <base><k>.{bin,boot}.<arch>-unix for
4237 :     <k>=1,2,... is normally not a good idea when invoking fixpt. However,
4238 :     they might be the result of an earlier partial run of fixpt (which
4239 : monnier 659 perhaps got accidentally killed). In this case, fixpt will quickly
4240 : blume 577 move through what exists before continuing where it left off earlier,
4241 :     and, thus, saves a lot of time.
4242 :    
4243 :     ----------------------------------------------------------------------
4244 : leunga 576 Name: Allen Leung
4245 :     Date: 00/03/10 02:20:00
4246 :     Tag: leunga-20000310-fix_x86_asm_ra
4247 :     Description:
4248 : dbm 570
4249 : leunga 576 More assembly output problems involving the indexed addressing mode
4250 :     on the x86 have been found and corrected. Thanks to Fermin Reig for the
4251 :     fix.
4252 :    
4253 :     The interface and implementation of the register allocator have been changed
4254 :     slightly to accommodate the possibility to skip the register allocation
4255 :     phases completely and go directly to memory allocation. This is needed
4256 :     for C-- use.
4257 :    
4258 : dbm 570 ----------------------------------------------------------------------
4259 : blume 572 Name: Matthias Blume
4260 : blume 575 Date: 00/03/09 10:23:53
4261 :     Tag: blume_main_v110p26p1_0
4262 :     Description:
4263 :    
4264 :     * Complete re-organization of library names. Many libraries have been
4265 :     consolidated so that they share the same path anchor. For example,
4266 :     all MLRISC-related libraries are anchored at MLRISC, most libraries that
4267 :     are SML/NJ-specific are under "smlnj". Notice that names like
4268 :     host-cmb.cm or host-compiler.cm no longer exist. See system/README
4269 :     for a complete description of the new naming scheme. Quick reference:
4270 :    
4271 :     host-cmb.cm -> smlnj/cmb.cm
4272 :     host-compiler.cm -> smlnj/compiler.cm
4273 :     full-cm.cm -> smlnj/cm.cm
4274 :     <arch>-<os>.cm -> smlnj/cmb/<arch>-<os>.cm
4275 :     <arch>-compiler.cm -> smlnj/compiler/<arch>.cm
4276 :    
4277 :     * Bug fixes in CM.
4278 :     - exceptions in user code are being passed through (i.e., reach top level)
4279 :     - more bugs in paranoia mode fixed
4280 :     - bug related to checking group owners fixed
4281 :    
4282 :     * New install.sh script that automagically fetches archive files:
4283 :     The new file config/srcarchiveurl must contain the URL of the
4284 :     (remote) directory that contains bin files (or other source archives).
4285 :     If install.sh does not find the archive locally, it tries to get
4286 :     it from that remote directory.
4287 :     This should simplify installation further: For machines that have
4288 :     access to the internet, just fetch <version>-config.tgz, unpack it,
4289 : monnier 659 edit config/targets, and go (run config/install.sh). The script will
4290 : blume 575 fetch everything else that it might need all by itself.
4291 :    
4292 :     For CVS users, this mechanism is not relevant for source archives, but
4293 :     it is convenient for getting new sets of binfiles.
4294 :    
4295 :     Archives should be tar files compressed with either gzip, compress, or
4296 :     bzip2. The script recognizes .tgz, .tar, tar.gz, tz, .tar.Z, and .tar.bz2.
4297 :    
4298 :     ----------------------------------------------------------------------
4299 :     Name: Matthias Blume
4300 : blume 572 Date: 2000/03/07 04:01:04
4301 :     Tag: blume_main_v110_26_2
4302 : dbm 570 Description:
4303 : blume 572 - size info in BOOTLIST
4304 :     * no fixed upper limits for number of bootfiles or length of
4305 :     bootfile names in runtime
4306 :     * falling back to old behavior if no BOOTLIST size info found
4307 :     - allocation size heuristics in .run-sml
4308 :