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

SCM Repository

[smlnj] Annotation of /sml/branches/primop-branch-3/NOTES/HISTORY
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 832 - (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 :     Date:
12 :     Tag: <post-commit CVS tag>
13 :     Description:
14 : george 824
15 : leunga 815 ----------------------------------------------------------------------
16 : blume 826 Name: Matthias Blume
17 : blume 832 Date: 2001/05/22 16:30:00 EDT
18 :     Tag: blume-20010522-minitut
19 :     Description:
20 :    
21 :     1. Bug fix in ml-nlffigen; now (hopefully) correctly handling
22 :     struct returns.
23 :     2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt. This is some very
24 :     incomplete, preliminary documentation for NLFFI.
25 :    
26 :     ----------------------------------------------------------------------
27 :     Name: Matthias Blume
28 : blume 829 Date: 2001/05/14 11:30:00 EDT
29 :     Tag: blume-20010514-script
30 :     Description:
31 :    
32 :     Some bugs in install script fixed.
33 :    
34 :     In addition to that I also made a slight change to the NLFFI API:
35 :     Functors generated by ml-nlffigen now take the dynamic library as a
36 :     straight functor argument, not as a suspended one. (The original
37 :     functor code used to force the suspension right away anyway, so there
38 :     was nothing gained by this complication of the interface.)
39 :    
40 :     ----------------------------------------------------------------------
41 :     Name: Matthias Blume
42 : blume 828 Date: 2001/05/11 14:35:00 EDT
43 :     Tag: blume-20010511-ml-nlffi
44 :     Description:
45 :    
46 :     I finally took the plunge and added my new FFI code to the main
47 :     repository. For x86-linux it is now ready for prime-time.
48 :    
49 :     There are two new subdirectories of "src":
50 :    
51 :     - ml-nlffi-lib:
52 :     The utility library for programs using the FFI interface.
53 :     Here is the implementation of $/c.cm and its associated low-level
54 :     partners $/c-int.cm and $/memory.cm.
55 :     - ml-nlffigen:
56 :     A stand-alone program for generating ML glue code from C source
57 :     code.
58 :    
59 :     Building ml-nlffigen requires $/ckit-lib.cm.
60 :    
61 :     The config/install.sh script has been updates to do the Right Thing
62 :     (hopefully).
63 :    
64 :     Notice that the source tree for the C-Kit will not be put under "src"
65 :     but directly under the installation root directory. (This is the
66 :     structure that currently exists on the CVS server when you check out
67 :     module "sml".) Fortunately, config/install.sh knows about this oddity.
68 :    
69 :     Bugs: No documentation yet.
70 :    
71 :     ----------------------------------------------------------------------
72 :     Name: Matthias Blume
73 : blume 826 Date: 2001/05/09 16:35:00 EDT
74 :     Tag: blume-20010509-cpscontract
75 :     Description:
76 :    
77 :     Fixed a bug in the accounting code in cpsopt/contract.sml. (The
78 :     wrapper/unwrapper elimination did not decrement usage counts and some
79 :     dead variables got overlooked by the dead-up logic.)
80 :    
81 :     ----------------------------------------------------------------------
82 : george 824 Name: Lal George
83 :     Date: 2001/05/08 17:26:09 EDT
84 :     Tag: george-20010508-omit-frameptr
85 :     Description:
86 :    
87 :     Changes to implement the omit-frame-pointer optimization to support
88 :     raw C calls. For now, there is only support on the Intel x86, but
89 :     other architectures will follow as more experience is gained with this.
90 :    
91 :    
92 :     ----------------------------------------------------------------------
93 : blume 818 Name: Matthias Blume
94 : blume 819 Date: 2001/05/07 14:40:00 EDT
95 :     Tag: blume-20010507-proxies
96 :     Description:
97 :    
98 :     I made into "proxy libraries" all libraries that qualify for such a
99 :     change. (A qualifying library is a library that has another library or
100 :     groups as its sole member and repeats that member's export list
101 :     verbatim. A proxy library avoids this repetition by omitting its export
102 :     list, effectively inheriting the list that its (only) member exports.
103 :     See the CM manual for more explanation.)
104 :     The main effect is that explicit export lists for these libraries
105 :     do not have to be kepts in sync, making maintenance a bit easier.
106 :    
107 :     I also added copyright notices to many .cm-files.
108 :    
109 :     Last but not least, I made a new set of bootfiles.
110 :    
111 :     ----------------------------------------------------------------------
112 :     Name: Matthias Blume
113 : blume 818 Date: 2001/05/04 17:00:00 EDT
114 :     Tag: blume-20010504-cm-lsplit
115 :     Description:
116 :    
117 :     0. John merged pending changes to $/smlnj-lib.cm
118 :    
119 :     1. Allen's previous change accidentally backed out of one of Lal's
120 :     earlier changes. I undid this mistake (re-introducing Lal's change).
121 :    
122 :     2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm)
123 :     within the compiler where applicable. There is some code simplification
124 :     because of that.
125 :    
126 :     3. The "split" phase (in FLINT) is now part of the default list of phases.
127 :     Compiler.Control.LambdaSplitting.* can be used to globally control the
128 :     lambda-splitting (cross-module-inlining) engine. In addition to that,
129 :     it can now also be controlled on a per-source basis: CM has been taught
130 :     a new tool parameter applicable to ML source files.
131 :    
132 :     - To turn lambda-splitting off completely:
133 :     local open Compiler.Control.LambdaSplitting in
134 :     val _ = set Off
135 :     end
136 :     - To make "no lambda-splitting" the global default (but allow per-source
137 :     overriding); this is the initial setting:
138 :     local open Compiler.Control.LambdaSplitting in
139 :     val _ = set (Default NONE)
140 :     end
141 :     - To make "lambda-splitting with aggressiveness a" the global default
142 :     (and allow per-source overriding):
143 :     local open Compiler.Control.LambdaSplitting in
144 :     val _ = set (Default (SOME a))
145 :     end
146 :    
147 :     - To turn lambda-splitting off for a given ML souce file (say: a.sml)
148 :     write (in the respective .cm-file):
149 :     a.sml (lambdasplitting:off)
150 :     - To turn lambda-splitting for a.sml on with minimal aggressiveness:
151 :     a.sml (lambdasplitting:on)
152 :     - To turn lambda-splitting for a.sml on with aggressiveness <a> (where
153 :     <a> is a decimal non-negative integer):
154 :     a.sml (lambdasplitting:<a>)
155 :     - To turn lambda-splitting for a.sml on with maximal aggressiveness:
156 :     a.sml (lambdasplitting:infinity)
157 :     - To use the global default for a.sml:
158 :     a.sml (lambdasplitting:default)
159 :     or simply
160 :     a.sml
161 :    
162 :     ----------------------------------------------------------------------
163 : leunga 815 Name: Allen Leung
164 :     Date: 2001/05/04 01:57:00 EDT
165 :     Tag: leunga-20010504-sync
166 :     Description:
167 : leunga 788
168 : leunga 815 MLRISC features.
169 :    
170 :     1. Fix to CMPXCHG instructions.
171 :     2. Changed RA interface to allow annotations in callbacks.
172 :     3. Added a new method to the stream interface to allow annotations updates.
173 :    
174 : george 749 ----------------------------------------------------------------------
175 : blume 812 Name: Matthias Blume
176 : blume 814 Date: 2001/05/01 11:45:00 EDT
177 :     Tag: blume-20010501-pcedittmp
178 :     Description:
179 :    
180 :     Changed install.sh to use the current working directory instead of
181 :     /usr/tmp for a temporary file (pcedittmp). The previous choice
182 :     of /usr/tmp caused trouble with MacOS X because of file premission
183 :     problems.
184 :    
185 :     ----------------------------------------------------------------------
186 :     Name: Matthias Blume
187 : blume 812 Date: 2001/04/20 11:10:00 EDT
188 :     Tag: blume-20010420-inMLflag
189 :     Description:
190 :    
191 :     - added vp_limitPtrMask to vproc-state.h
192 :     (for use by the raw-C-calls mechanism to implement proper interrupt
193 :     handling)
194 :     - made the ML compiler aware of various data-structure offsets so it
195 :     can generate code for accessing the vp_inML flag and vp_limitPtrMask
196 :     - tweaked mlriscGen.sml to have it emit interrupt-handling code for
197 :     raw C-calls
198 :    
199 :     ----------------------------------------------------------------------
200 : george 810 Name: Lal George
201 :     Date: 2001/04/20 09:15:28 EDT
202 :     Tag: george-20010420-macosX
203 :     Description:
204 :    
205 :     - Changes to port to Mac OS X; Darwin.
206 :    
207 :     - In the process I found that sqrt was broken on the PPC, because the
208 :     fsqrt instruction is not implemented.
209 :    
210 :     ----------------------------------------------------------------------
211 : blume 799 Name: Matthias Blume
212 : blume 808 Date: 2001/04/18 12:45:00 EDT
213 :     Tag: blume-20010418-ccalls
214 :     Description:
215 :    
216 :     - fixed two off-by-4 errors in the x86-specific c-calls implementation
217 :     (this bug prevented structure arguments containing pointers from being
218 :     passed correctly)
219 :     - changed the raw-C-call code in mlriscGen.sml in such a way that
220 :     structure arguments are represented as a pointer to the beginning
221 :     of the structure (instead of having a series of synthesized arguments,
222 :     one for each structure member)
223 :    
224 :     - made makeml script's verbosity level configurable via environment
225 :     variable (MAKEML_VERBOSITY)
226 :    
227 : blume 813 - eliminated placeholder implementations for f32l, w16s, i16s, and f32s
228 : blume 808 in rawmem-x86.sml; we are now using the real thing
229 :    
230 :     ----------------------------------------------------------------------
231 :     Name: Matthias Blume
232 : blume 806 Date: 2001/03/22 16:25:00 EST
233 :     Tag: blume-20010322-bootfiles
234 :     Description:
235 :    
236 :     Created a new set of bootfiles (for your automatic installation convenience).
237 :    
238 :     ----------------------------------------------------------------------
239 :     Name: Matthias Blume
240 : blume 805 Date: 2001/03/22 15:10:00 EST
241 :     Tag: blume-20010322-rawmem-parcm
242 :     Description:
243 :    
244 :     1. All "raw memory access" primitives for the new FFI are implemented now
245 :     (at least on the x86).
246 :     2. Some further cleanup of CM's parallel make mechanism.
247 :    
248 :     ----------------------------------------------------------------------
249 :     Name: Matthias Blume
250 : blume 801 Date: 2001/03/19 17:53:00 EST
251 :     Tag: blume-20010319-parallel
252 :     Description:
253 :    
254 :     Parallel make (using compile servers) now works again.
255 :    
256 :     To this end, CM.stabilize and CMB.make have been modified to work in
257 :     two passes when compile servers are attached:
258 :     1. Compile everything, do not perform stabilization; this pass
259 :     uses compile servers
260 :     2. Stabilize everything; this pass does not use compile servers
261 :     If there are no compile servers, the two passes are combined into one
262 :     (as before). Splitting the passes increases the inherent parallelism
263 :     in the dependency graph because the entire graph including all
264 :     libraries is available at the same time. This, in turn, improves
265 :     server utilization. The downside is that the master process will
266 :     have to do some extra work after compilation is done (because for
267 :     technical reasons it must re-read all the binfiles during stabilization).
268 :    
269 :     ----------------------------------------------------------------------
270 :     Name: Matthias Blume
271 : blume 800 Date: 2001/03/16 12:22:00 EST
272 :     Tag: blume-20010316-bootfiles
273 :     Description:
274 :    
275 :     Created a new set of bootfiles (for your automatic installation convenience).
276 :    
277 :     ----------------------------------------------------------------------
278 :     Name: Matthias Blume
279 : blume 799 Date: 2001/03/16 11:00:00 EST
280 :     Tag: blume-20010316-MLTREE-fixup
281 :     Description:
282 :    
283 :     This is a minor fixup for an (untagged) earlier commit by Allen.
284 :     (A file was missing).
285 :    
286 :     ----------------------------------------------------------------------
287 : leunga 788 Name: Allen Leung
288 : leunga 796 Date: Mon Mar 5 18:54:57 EST 2001
289 :     Tag: leunga-20010305-cut-support
290 :    
291 :     1. New support for alternative control-flow in MLTREE.
292 :     Currently we support
293 :    
294 :     FLOW_TO(CALL ...., [k1,...,kn])
295 :    
296 :     This is needed for 'cuts to' in C-- and try/handle-like constructs
297 :     in Moby
298 :    
299 :     New assembler flag "asm-show-cutsto" to turn on control-flow debugging.
300 :    
301 :     2. Register Allocator
302 :    
303 :     Changes in interface [from Fermin, John]
304 :    
305 :     3. Alpha 8-bit SLL support [Fermin]
306 :    
307 :     4. All architectures
308 :    
309 :     A new module (ClusterExpandCopies) for expanding parallel copies.
310 :    
311 :     ----------------------------------------------------------------------
312 :     Name: Allen Leung
313 : leunga 788 Date: 2001/02/27 23:07:00 EST
314 :     Tag: leunga-20010227-minor-stuff
315 :    
316 :     1. Alpha bug fix for CMOVNE
317 :     2. Handle mltree COND(..,FCMP ...,...)
318 :     3. Bug fix in simplifier
319 :    
320 :     ----------------------------------------------------------------------
321 : blume 777 Name: Matthias Blume
322 : blume 781 Date: 2001/01/30 17:50:00 EST
323 :     Tag: blume-20010130-sync
324 :     Description:
325 :    
326 :     This is just a minor update to sync my devel branch with the main brach.
327 :     The only visible change is the addition of some README files.
328 :    
329 :     ----------------------------------------------------------------------
330 :     Name: Matthias Blume
331 : blume 778 Date: 2001/01/12 23:30:00 JST
332 :     Tag: blume-20010112-bootfiles
333 :     Description:
334 :    
335 :     Made a new set of bootfiles that goes with the current state of the
336 :     repository.
337 :    
338 :     ----------------------------------------------------------------------
339 :     Name: Matthias Blume
340 : blume 777 Date: 2001/01/12 21:20:00 JST
341 :     Tag: blume-20010112-sync
342 :     Description:
343 :    
344 :     I am just flushing out some minor changes that had accumulated in
345 :     my private branch in order to sync with the main tree. (This is
346 :     mainly because I had CVS trouble when trying to merge _into_ my
347 :     private branch.)
348 :    
349 :     Most people should be completely unaffected by this.
350 :    
351 :     ----------------------------------------------------------------------
352 : leunga 775 Name: Allen Leung
353 :     Date: Thu Jan 11 21:03:00 EST 2001
354 :     Tag: leunga-20010111-labexp=mltree
355 :     Description:
356 :    
357 :     1. Removed the type LabelExp and replace it by MLTree.
358 :     2. Rewritten mltree-simplify with the pattern matcher tool.
359 :     3. There were some bugs in alpha code generator which would break
360 :     64-bit code generation.
361 :     4. Redo the tools to generate code with the
362 :     5. The CM files in MLRISC (and in src/system/smlnj/MLRISC)
363 :     are now generated by perl scripts.
364 :    
365 :     ----------------------------------------------------------------------
366 : blume 771 Name: Matthias Blume
367 : blume 774 Date: 2001/01/10 21:55:00 JST
368 :     Tag: blume-20010110-rcc
369 :     Description:
370 :    
371 :     The RCC stuff now seems to work (but only on the x86).
372 :     This required hacking of the c-calls interface (and -implementation) in
373 :     MLRISC.
374 :    
375 :     Normal compiler users should be unaffected.
376 :    
377 :     ----------------------------------------------------------------------
378 :     Name: Matthias Blume
379 : blume 773 Date: 2001/01/09 01:20:00 JST
380 :     Tag: blume-20010109-rcc
381 :     Description:
382 :    
383 :     This is a fairly big patch, flushing out a large number of pending
384 :     changes that I made to my development copy over the last couple of days.
385 :    
386 :     Of practical relevance at this moment is a workaround for a pickling
387 :     bug that Allen ran into the other day. The cause of the bug itself is
388 :     still unknown and it might be hard to fix it properly, but the
389 :     workaround has some merits of its own (namely somewhat reducing pickling
390 :     overhead for certain libraries). Therefore, I think this solution should
391 :     be satisfactory at this time.
392 :    
393 :     The rest of the changes (i.e., the vast majority) has to do with my
394 :     ongoing efforts of providing direct support for C function calls from
395 :     ML. At the moment there is a new primop "RAW_CCALL", typing magic
396 :     in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new
397 :     case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to
398 :     translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to
399 :     handle RCC.
400 :    
401 :     The last part (the changes to mlriscGen.sml) are still known to be
402 :     wrong on the x86 and not implemented on all other architectures. But
403 :     the infrastructure is in place. I had to change a few functor
404 :     signatures in the backend to be able to route the CCalls interface
405 :     from MLRISC there, and I had to specialize the mltree type (on the
406 :     x86) to include the necessary extensions. (The extensions themselves
407 :     were already there and redy to go in MLRISC/x86).
408 :    
409 :     Everything should be very happy as soon as someone helps me with
410 :     mlriscGen.sml...
411 :    
412 :     In any case, nothing of this should matter to anyone as long as the
413 :     new primop is not being used (which is going to be the case unless you
414 :     find it where I hid it :). The rest of the compiler is completely
415 :     unaffected.
416 :    
417 :     ----------------------------------------------------------------------
418 :     Name: Matthias Blume
419 : blume 772 Date: 2001/01/05 00:30:00 JST
420 :     Tag: blume-20010105-primops
421 :     Description:
422 :    
423 :     Added some experimental support for work that I am doing right now.
424 :     These changes mostly concern added primops, but there is also a new
425 :     experimental C library in the runtime system (but currently not enabled
426 :     anywhere except on Linux/X86).
427 :    
428 :     In the course of adding primops (and playing with them), I discovered that
429 :     Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly
430 :     broken. (Zhong was very right he labeled this stuff as "major gross hack".)
431 :     To recover, I made type information in INL_PRIM mandatory and changed
432 :     prim.sml as well as built-in.sml accordingly. The InLine structure now
433 :     has complete, correct type information (i.e., no bottom types).
434 :    
435 :     Since all these changes mean that we need new binfiles, I also bumped the
436 :     version number to 110.32.1.
437 :    
438 :     ----------------------------------------------------------------------
439 :     Name: Matthias Blume
440 : blume 771 Date: 2000/12/30 22:10:00 JST
441 :     Tag: blume-20001230-various
442 :     Description:
443 :    
444 :     Added proxy libraries for MLRISC and let MLRISC libraries refer
445 :     to each other using path anchors. (See CM manual for explanation.)
446 :    
447 :     Updated CM documentation.
448 :    
449 :     Fixed some bugs in CM.
450 :    
451 :     Implemented "proxy" libraries (= syntactic sugar for CM).
452 :    
453 :     Added "-quiet" option to makeml and changed runtime system accordingly.
454 :    
455 :     Added cleanup handler for exportML to reset timers and compiler stats.
456 :    
457 :     ----------------------------------------------------------------------
458 : george 761 Name: Lal George
459 :     Date: 2000/12/22 22:22:58 EST 2000
460 :     Tag: Release_110_32
461 :     Description:
462 :    
463 :     Infinite precision used throughout MLRISC.
464 :     see MLRISC/mltree/machine-int.sig
465 :    
466 :     ----------------------------------------------------------------------
467 : blume 756 Name: Matthias Blume
468 : blume 760 Date: 2000/12/22 23:16:00 JST
469 :     Tag: blume-20001222-warn
470 :     Description:
471 : blume 759
472 : blume 760 Corrected wording and formatting of some CM warning message which I
473 :     broke in my previous patch.
474 : blume 759
475 :     ----------------------------------------------------------------------
476 :     Name: Matthias Blume
477 : blume 763 Date: 2000/12/22 21:20:00 JST
478 :     Tag: blume-20001222-anchorenv
479 :     Description:
480 :    
481 :     Fixed CM's handling of anchor environments in connection with CMB.make.
482 :    
483 :     ----------------------------------------------------------------------
484 :     Name: Matthias Blume
485 : blume 758 Date: 2000/12/22 13:15:00 JST
486 :     Tag: blume-20001222-cleanup
487 :     Description:
488 :    
489 :     Removed src/cm/ffi which does not (and did not) belong here.
490 :    
491 :     ----------------------------------------------------------------------
492 :     Name: Matthias Blume
493 : blume 757 Date: 2000/12/21 23:55:00 JST
494 :     Tag: blume-20001221-exn
495 :     Description:
496 :    
497 :     Probably most important: CM no longer silently swallows all exceptions
498 :     in the compiler.
499 :     Plus: some other minor CM changes. For example, CM now reports some
500 :     sizes for generated binfiles (code, data, envpickle, lambdapickle).
501 :    
502 :     ----------------------------------------------------------------------
503 :     Name: Matthias Blume
504 : blume 756 Date: 2000/12/15 00:01:05 JST
505 :     Tag: blume-20001215-dirtool
506 :     Description:
507 :    
508 :     - "dir" tool added.
509 :     - improvements and cleanup to Tools structure
510 :     - documentation updates
511 :    
512 :     ----------------------------------------------------------------------
513 : leunga 752 Name: Allen Leung
514 : leunga 755 Date: Thu Dec 14 03:45:24 EST 2000
515 :     Description:
516 :     Tag: leunga-20001214-int-inf
517 :     Description:
518 :    
519 :     In IntInf, added these standard functions, which are missing from our
520 :     implementation:
521 :    
522 :     andb : int * int -> int
523 :     xorb : int * int -> int
524 :     orb : int * int -> int
525 :     notb : int -> int
526 :     << : int * word -> int
527 :     ~>> : int * word -> int
528 :    
529 :     Not tested, I hope they are correct.
530 :    
531 :     ----------------------------------------------------------------------
532 :     Name: Allen Leung
533 : leunga 752 Date: Fri Dec 8 19:23:26 EST 2000
534 :     Description:
535 :     Tag: leunga-20001208-nowhere
536 :     Description:
537 :    
538 :     Slight improvements to the 'nowhere' tool to handle OR-patterns,
539 :     to generate better error messages etc. Plus a brief manual.
540 :    
541 :     ----------------------------------------------------------------------
542 : george 749 Name: Lal George
543 :     Date: 2000/12/08 09:54:02 EST 2000
544 :     Tag: Release_110_31
545 :     Description:
546 : george 705
547 : george 749 - Version 110.31
548 : leunga 591 ----------------------------------------------------------------------
549 : leunga 744 Name: Allen Leung
550 :     Date: Thu Dec 7 22:01:04 EST 2000
551 :     Tag: leunga-20001207-cell-monster-hack
552 :     Description:
553 :    
554 :     Major MLRISC internal changes. Affect all clients.
555 :     Summary:
556 :    
557 :     1. Type CELLS.cell = int is now replaced by a datatype.
558 :     As a result, the old regmap is now gone. Almost all interfaces
559 :     in MLRISC change as a consequence.
560 :    
561 :     2. A new brand version of machine description tool (v3.0) that generates
562 :     modules expecting the new interface. The old version is removed.
563 :    
564 :     3. The RA interface has been further abstracted into two new functors.
565 :     RISC_RA and X86RA. These functors have much simpler interfaces.
566 :     [See also directory MLRISC/demo.]
567 :    
568 :     4. Some other new source->source code generation tools are available:
569 :    
570 :     a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
571 :     b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
572 :     I use this tool to generate the peephole optimizers---with the new
573 :     cell type changes, peephole rules are becoming difficult to write
574 :     without conditional pattern matching.
575 :    
576 :     5. More Intmap -> IntHashTable change. Previous changes by Matthias didn't
577 :     cover the entire MLRISC source tree so many things broke.
578 :    
579 :     6. CM files have been moved to the subdirectory MLRISC/cm.
580 :     They are moved because there are a lot of them and they clutter up the
581 :     root dir.
582 :    
583 :     7. More detailed documentation to come...
584 :    
585 :     NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
586 :     a makeml -rebuild first. This is because of other other
587 :     changes that Matthias has made (see below).
588 :    
589 :    
590 :     ----------------------------------------------------------------------
591 : blume 733 Name: Matthias Blume
592 : blume 742 Date: 2000/11/30 23:12:00 JST
593 :     Tag: blume-20001130-filereorg
594 :     Description:
595 :    
596 :     Some manual updates and some file reorganizations in CM.
597 :    
598 :     ----------------------------------------------------------------------
599 :     Name: Matthias Blume
600 : blume 737 Date: 2000/11/24 17:45:00 JST
601 :     Tag: blume-20001124-link
602 :     Description:
603 :    
604 :     Drastically improved link traversal code for the case that the dynamic
605 :     value was already loaded at bootstrap time. As a result, CM and CMB
606 :     now both load blazingly fast -- even on a very slow machine. Also,
607 :     memory consumption has been further reduced by this.
608 :    
609 :     Warning: The format of the PIDMAP file has changed. THerefore, to
610 :     bootstrap you have to do this:
611 :    
612 :     1. Run CMB.make
613 :     2. Make a symbolic link for the boot directory:
614 :     ln -s sml.boot.ARCH-OS xxx
615 :     3. "Rebuild" the boot directory:
616 :     ./makeml -boot xxx -rebuild sml ; rm xxx
617 :     4. Boot normally:
618 :     ./makeml
619 :    
620 :     ----------------------------------------------------------------------
621 :     Name: Matthias Blume
622 : blume 735 Date: 2000/11/21 21:20:00 JST
623 :     Tag: blume-20001121-tools
624 :     Description:
625 :    
626 :     Continued hacking on autoloading problem -- with success this time.
627 :     Also changed tool-plugin mechanism. See new CM manual.
628 :    
629 :     ----------------------------------------------------------------------
630 :     Name: Matthias Blume
631 : blume 734 Date: 2000/11/19 14:30:00 JST
632 :     Tag: blume-20001119-autoload
633 :     Description:
634 :    
635 :     Some hacking to make autoloading faster. Success for CMB, no success
636 :     so far for CM. There is a reduced structure CM' that autoloads faster.
637 :     (This is a temporary, non-documented hack to be eliminated again when
638 :     the general problem is solved.)
639 :    
640 :     ----------------------------------------------------------------------
641 :     Name: Matthias Blume
642 : blume 733 Date: 2000/11/17 14:10:00 JST
643 :     Tag: blume-20001117-pickle-lib
644 :     Description:
645 :    
646 :     1. Eliminated comp-lib.cm
647 :     2. Made pickle-lib.cm
648 :     3. Eliminated all uses of intset.sml (from comp-lib.cm)
649 :     4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
650 :     equivalent constructs from smlnj-lib.cm (INtHashTable).
651 :     5. Point 4. also goes for those uses of intmap.* in MLRISC.
652 :     Duplicated intmap modules thrown out.
653 :     6. Hunted down all duplicated SCC code and replaced it with
654 :     equivalent stuff (GraphSCCFn from smlnj-lib.cm).
655 :     7. Rewrote Feedback module.
656 :     8. Moved sortedlist.sml into viscomp-lib.cm. Eventually it
657 :     should be thrown out and equivalent modules from smlnj-lib.cm
658 :     should be used (IntRedBlackSet, IntListSet, ...).
659 :    
660 :     Confirmed that compiler compiles to fixpoint.
661 :    
662 :     ----------------------------------------------------------------------
663 : leunga 731 Name: Allen Leung
664 :     Date: 2000/11/10 18:00:00
665 :     Tag: leunga-20001110-new-x86-fp
666 :    
667 :     A new x86 floating point code generator has been added.
668 :     By default this is turned off. To turn this on, do:
669 :    
670 :     CM.autoload "$smlnj/compiler.cm";
671 :     Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
672 :    
673 :     Changes:
674 :    
675 :     1. Changed FTAN to FPTAN so that the assembly output is correct.
676 :     2. Changed the extension callback for FTANGENT to generate:
677 :    
678 :     fptan
679 :     fstp %st(0)
680 :     instead of
681 :     fptan
682 :     fstpl ftempmem
683 :    
684 :     3. Numerous assembly fixes for x86.
685 :    
686 :     5. Cleaned up the machine code output module x86/x86MC.sml and added
687 :     support for a whole bunch of instructions and addressing modes:
688 :    
689 :     fadd/fsub/fsubr/fmul/fdiv/fdivr %st, %st(n)
690 :     faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp %st, %st(n)
691 :     fadd/fsub/fsubr/fmul/fdiv/fdivr %st(n), %st
692 :     fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
693 :     fxch %st(n)
694 :     fld %st(n)
695 :     fst %st(n)
696 :     fst mem
697 :     fstp %st(n)
698 :     fucom %st(n)
699 :     fucomp %st(n)
700 :    
701 :     All these are now generated when the fast fp mode is turned on.
702 :    
703 :     6. Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
704 :    
705 :     ----------------------------------------------------------------------
706 : blume 729 Name: Matthias Blume
707 :     Date: 2000/11/09 11:20:00 JST
708 :     Tag: blume-20001109-scc
709 :     Description:
710 :    
711 :     Eliminated some code duplication:
712 :    
713 :     1. Added "where" clause to GraphSCCFn in SML/NJ Library.
714 :     (Otherwise the functor is useless.)
715 :     2. Used GraphSCCFn where SCCUtilFun was used previously.
716 :     3. Got rid of SCCUtilFun (in comp-lib.cm).
717 :    
718 :     ----------------------------------------------------------------------
719 : george 721 Name: Lal George
720 :     Date: 2000/11/06 09:02:21 EST 2000
721 :     Tag: Release_110_30
722 :     Description:
723 :    
724 :     - Version 110.30
725 :     ----------------------------------------------------------------------
726 : blume 715 Name: Matthias Blume
727 : blume 716 Date: 2000/11/04 14:45:00
728 :     Tag: blume-20001104-mlbuild
729 :     Description:
730 :    
731 :     - Made ml-build faster on startup.
732 :     - Documentation fixes.
733 :    
734 :     ----------------------------------------------------------------------
735 :     Name: Matthias Blume
736 : blume 715 Date: 2000/11/02 17:00:00 JST
737 :     Tag: blume-20001102-condcomp
738 :     Description:
739 :    
740 :     - Small tweaks to pickler -- new BOOTFILES!
741 :     - Version bumped to 110.29.2.
742 :     - Added conditional compilation facility to init.cmi (see comment there).
743 :     ----------------------------------------------------------------------
744 : leunga 713 Name: Allen Leung
745 :     Date: 2000/10/23 19:31:00
746 :     Tag: leunga-20001023-demo-ra
747 :    
748 :     1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
749 :     2. Test programs for the graph library updated
750 :     3. Some new MLRISC demo programs added
751 :    
752 :     ----------------------------------------------------------------------
753 : blume 710 Name: Matthias Blume
754 : blume 711 Date: 2000/08/31 22:15:00 JST
755 :     Tag: blume-20001017-errmsg
756 :     Description:
757 :    
758 :     More error message grief: Where there used to be no messages, there
759 :     now were some that had bogus error regions. Fixed.
760 :    
761 :     ----------------------------------------------------------------------
762 :     Name: Matthias Blume
763 : blume 710 Date: 2000/08/31 17:30:00 JST
764 :     Tag: blume-20001017-v110p29p1
765 :     Description:
766 :    
767 :     I made a version 110.29.1 with new bootfiles.
768 :    
769 :     Changes: Modified pickler/unpickler for faster and leaner unpickling.
770 :     CM documentation changes and a small bugfix in CM's error reporting.
771 :    
772 :     ----------------------------------------------------------------------
773 : george 705 Name: Lal George
774 :     Date: 2000/09/27 14:42:35 EDT
775 :     Tag: george-20000927-nodestatus
776 :     Description:
777 :    
778 :     Changed the type of the nodestatus, so that:
779 :    
780 :     SPILLED(~1) is now SPILLED
781 :     SPILLED(m) where m>=0 is now MEMREG(m)
782 :     SPILLED(s) where s<~1 is now SPILL_LOC(~s)
783 :    
784 :     ----------------------------------------------------------------------
785 : blume 697 Name: Matthias Blume
786 : blume 703 Date: 2000/09/07 14:45:00 JST
787 :     Tag: blume-20000907-cmerrmsg
788 :     Description:
789 :    
790 :     Small tweak to CM to avoid getting ML syntax error messages twice.
791 :    
792 :     ----------------------------------------------------------------------
793 :     Name: Matthias Blume
794 : blume 701 Date: 2000/08/31 18:00:00 JST
795 :     Tag: blume-20000831-cvsbootfiles
796 :     Description:
797 :    
798 :     New URL for boot files (because the 110.29 files on the BL server do
799 :     now work correctly with my updated install scripts for yacc and lex).
800 :    
801 :     ----------------------------------------------------------------------
802 :     Name: Matthias Blume
803 : blume 697 Date: 2000/08/08 12:33:00 JST
804 :     Tag: blume-20000808-manual
805 :     Description:
806 :    
807 :     Tiny update to CM manual.
808 :    
809 :     ----------------------------------------------------------------------
810 : leunga 695 Name: Allen Leung
811 :     Date: 2000/08/7 19:31:00
812 :     Tag: leunga-20000807-a-whole-bunch-of-stuff
813 :    
814 :     Moby, C--, SSA, x86, machine descriptions etc. Should only affect C--
815 :     and Mobdy.
816 :    
817 :     1. x86
818 :    
819 :     a. Fixes to peephole module by John and Dan.
820 :     b. Assembly fix to SETcc by Allen.
821 :     c. Fix to c-call by John.
822 :     d. Fix to spilling by John. (This one deals with the missing FSTPT case)
823 :     e. Instruction selection optimization to SETcc as suggested by John.
824 :    
825 :     For example,
826 :    
827 :     MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
828 :    
829 :     should generate:
830 :    
831 :     MOVL a, x
832 :     SUBL b, x
833 :     SHRL 31, x
834 :    
835 :     2. IR stuff
836 :    
837 :     A bunch of new DJ-graph related algorithms added. These
838 :     speed up SSA construction.
839 :    
840 :     3. SSA + Scheduling
841 :    
842 :     Added code for SSA and scheduling to the repository
843 :    
844 :     ----------------------------------------------------------------------
845 : george 694 Name: Lal George
846 :     Date: 2000/07/27 11:53:14 EDT
847 :    
848 :     Tag: lal-20000727-linux-ppc
849 :     Description:
850 :    
851 :     Made changes to support Linux PPC.
852 :     p.s. I have confirmation that the 110.29 boot files work fine.
853 :    
854 :     ----------------------------------------------------------------------
855 : blume 684 Name: Matthias Blume
856 : blume 692 Date: 2000/07/27 17:40:00 JST
857 :     Tag: blume-20000727-scripts
858 :     Description:
859 :    
860 :     !!!! WARNING !!!!
861 :     You must recompile the runtime system!
862 :     !!!! WARNING !!!!
863 :    
864 :     This is basically another round of script-enhancements:
865 :    
866 :     1. sml, ml-build, and ml-makedepend accept options -D and -U to define
867 :     and undefine CM preprocessor symbols.
868 :    
869 :     2. ml-build avoids generating a new heap image if it finds that the
870 :     existing one is still ok. (The condition is that no ML file had to
871 :     be recompiled and all ML files are found to be older that the heap
872 :     file.)
873 :    
874 :     To make this work smoothly, I also hacked the runtime system as
875 :     well as SMLofNJ.SysInfo to get access to the heap image suffix
876 :     (.sparc-solaris, ...) that is currently being used.
877 :    
878 :     Moreover, the signature of CM.mk_standalone has changed. See the
879 :     CM manual.
880 :    
881 :     3. ml-makedepend accepts additional options -n, -a, and -o. (See the
882 :     CM manual for details.)
883 :    
884 :     4. More CM manual updates:
885 :     - all of the above has been documented.
886 :     - there is now a section describing the (CM-related) command line
887 :     arguments that are accepted by the "sml" command
888 :    
889 :     ----------------------------------------------------------------------
890 :     Name: Matthias Blume
891 : blume 691 Date: 2000/07/25 16:20:00 JST
892 :     Tag: blume-20000725-makedepend
893 :     Description:
894 :    
895 :     Added a script called ml-makedepend. This can be used in makefiles
896 :     for Unix' make in a way very similar to the "makedepend" command for
897 :     C.
898 :    
899 :     The script internally uses function CM.sources.
900 :    
901 :     Synopsis:
902 :    
903 :     ml-makedepend [-f makefile] cmfile targetname
904 :    
905 :     The default for the makefile is "makefile" (or "Makefile" should
906 :     "makefile" not exist).
907 :    
908 :     ml-makedepend adds a cmfile/targetname-specific section to this
909 :     makefile (after removing the previous version of this section). The
910 :     section contains a single dependency specification with targetname on
911 :     the LHS (targetname is an arbitrary name), and a list of files derived
912 :     from the cmfile on the RHS. Some of the files on the RHS are
913 :     ARCH/OPSYS-specific. Therefore, ml-makedepend inserts references to
914 :     "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
915 :     path names. The makefile writer is responsible for making sure that
916 :     these variables have correct at the time "make" is invoked.
917 :    
918 :     ----------------------------------------------------------------------
919 :     Name: Matthias Blume
920 : blume 690 Date: 2000/07/22 23:30:00 JST
921 :     Tag: blume-20000722-urlupdate
922 :     Description:
923 :    
924 :     Changed BOOT and config/srcarchiveurl to point to BL server:
925 :    
926 :     ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
927 :    
928 :     ----------------------------------------------------------------------
929 :     Name: Matthias Blume
930 : blume 686 Date: 2000/07/18 18:00:00 JST
931 :     Tag: blume-20000718-Version_110_29
932 :     Description:
933 :    
934 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
935 :    
936 :     2. Updated config/version to 110.29
937 :    
938 :     3. Updated config/srcarchiveurl
939 :    
940 :     3. New boot files!
941 :     ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
942 :    
943 :     ----------------------------------------------------------------------
944 :     Name: Matthias Blume
945 : blume 684 Date: 2000/07/11 13:58:00 JST
946 :     Tag: blume-20000711-doctypo
947 :     Description:
948 :    
949 :     Fixed a few typos in CM manual.
950 :    
951 :     ----------------------------------------------------------------------
952 : leunga 683 Name: Allen Leung
953 :     Date: 2000/06/15 00:38:00
954 :     Tag: leunga-20000704-sparc-x86
955 :    
956 :     1. x86 peephole improvement sp += k; sp -= k => nop [from John]
957 :     2. fix to x86 RET bug [found by Dan Grossman]
958 :     3. sparc assembly bug fix for ticc instructions [found by Fermin]
959 :    
960 :     Affects c-- and moby only
961 :    
962 :     ----------------------------------------------------------------------
963 : blume 680 Name: Matthias Blume
964 : blume 682 Date: 2000/07/04 15:26:00
965 :     Tag: blume-20000704-trigger
966 :     Description:
967 :    
968 :     1. Improvements to CM manual.
969 :     2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
970 :     of getting a back-trace. The function, when called, raises an
971 :     internal exception which explicitly carries the full back-trace history,
972 :     so it is unaffected by any intervening handle-raise pairs ("trivial"
973 :     or not). The interactive loop will print that history once it arrives
974 :     at top level.
975 :     Short of having all exceptions implicitly carry the full history, the
976 :     recommended way of using this facility is:
977 :     - compile your program with instrumentation "on"
978 :     - run it, when it raises an exception, look at the history
979 :     - if the history is "cut off" because of some handler, go and modify
980 :     your program so that it explicitly calls BTrace.trigger
981 :     - recompile (still instrumented), and rerun; look at the full history
982 :    
983 :     ----------------------------------------------------------------------
984 :     Name: Matthias Blume
985 :     Date: 2000/07/03 15:36:00 JST
986 : blume 680 Tag: blume-20000702-manual
987 :     Description:
988 :    
989 :     Small corrections and updates to CM manual.
990 :    
991 :     ----------------------------------------------------------------------
992 : blume 682 Name: Matthias Blume
993 : blume 679 Date: 2000/06/29 16:04:00 JST
994 :     Tag: blume-20000629-yacctool
995 :     Description:
996 :    
997 :     Changes:
998 :    
999 :     1. Class "mlyacc" now takes separate arguments to pass options to
1000 :     generated .sml- and .sig-files independently.
1001 :     2. Corresponding CM manual updates.
1002 :     3. BTrace module now also reports call sites. (However, for loop clusters
1003 :     it only shows from where the cluster was entered.) There are associated
1004 :     modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
1005 :    
1006 :     ----------------------------------------------------------------------
1007 : blume 675 Name: Matthias Blume
1008 : blume 678 Date: 2000/06/27 16:51:00 JST
1009 :     Tag: blume-20000627-noweb
1010 :     Description:
1011 :    
1012 :     Changes:
1013 :    
1014 :     1. Implemented "subdir" and "witness" options for noweb tool.
1015 :     This caused some slight internal changes in CM's tool implementation.
1016 :     2. Fixed bug in "tool plugin" mechanism. This is essentially cleaning
1017 :     some remaining issues from earlier path anchor changes.
1018 :     3. Updated CM manual accordingly.
1019 :    
1020 :     4. Changed implementation of back-tracing so that I now consider it
1021 :     ready for prime-time.
1022 :    
1023 :     In particular, you don't have to explicitly trigger the back-trace
1024 :     anymore. Instead, if you are running BTrace-instrumented code and
1025 :     there is an uncaught exception (regardless of whether or not it was
1026 :     raised in instrumented code), the top-level evalloop will print
1027 :     the back-trace.
1028 :    
1029 :     Features:
1030 :    
1031 :     - Instrumented and uninstrumented code work together seemlessly.
1032 :     (Of course, uninstrumented code is never mentioned in actual
1033 :     back-traces.)
1034 :    
1035 :     - Asymptotic time- and space-complexity of instrumented code is
1036 :     equal to that of uninstrumented code. (This means that
1037 :     tail-recursion is preserved by the instrumentation phase.)
1038 :    
1039 :     - Modules whose code has been instrumented in different sessions
1040 :     work together without problem.
1041 :    
1042 :     - There is no penalty whatsoever on uninstrumented code.
1043 :    
1044 :     - There is no penalty on "raise" expressions, even in
1045 :     instrumented code.
1046 :    
1047 :     A potential bug (or perhaps it is a feature, too):
1048 :    
1049 :     A back-trace reaches no further than the outermost instrumented
1050 :     non-trivial "raise". Here, a "trivial" raise is one that is the
1051 :     sole RHS of a "handle" rule. Thus, back-traces reach trough
1052 :    
1053 :     <exp> handle e => raise e
1054 :    
1055 :     and even
1056 :    
1057 :     <exp> handle Foo => raise Bar
1058 :    
1059 :     and, of course, through
1060 :    
1061 :     <exp> handle Foo => ...
1062 :    
1063 :     if the exception was not Foo.
1064 :    
1065 :     Back-traces always reach right through any un-instrumented code
1066 :     including any of its "handle" expressions, trivial or not.
1067 :    
1068 :     To try this out, do the following:
1069 :    
1070 :     - Erase all existing binfiles for your program.
1071 :     (You may keep binfiles for those modules where you think you
1072 :     definitely don't need back-tracing.)
1073 :     - Turn on back-trace instrumentation:
1074 :     SMLofNJ.Internals.BTrace.mode (SOME true);
1075 :     - Recompile your program. (I.e., run "CM.make" or "use".)
1076 :     - You may now turn instrumentation off again (if you want):
1077 :     SMLofNJ.Internals.BTrace.mode (SOME false);
1078 :     - Run your program as usual. If it raises an exception that
1079 :     reaches the interactive toplevel, then a back-trace will
1080 :     automatically be printed. After that, the toplevel loop
1081 :     will print the exception history as usual.
1082 :    
1083 :     ----------------------------------------------------------------------
1084 :     Name: Matthias Blume
1085 : blume 677 Date: 2000/06/26 09:56:46 JST
1086 :     Tag: blume-20000626-setup
1087 :     Description:
1088 :    
1089 :     CM: - setup-parameter to "sml" added; this can be used to run arbitrary
1090 :     ML code before and after compiling a file (e.g., to set compiler
1091 :     flags)
1092 :    
1093 :     Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
1094 :     - associated changes to btrace.sml (BTrace instrumentation pass)
1095 :     - cleaner implementation of btimp.sml (BTrace tracing and report
1096 :     module)
1097 :    
1098 :     CM manual: * new path encoding documented
1099 :     * description of setup-parameter to "sml" added
1100 :    
1101 :     The biggest user-visible change to back-tracing is that it is no
1102 :     longer necessary to compile all traced modules within the same
1103 :     session. (This was a real limitation.)
1104 :    
1105 :     ----------------------------------------------------------------------
1106 :     Name: Matthias Blume
1107 : blume 676 Date: 2000/06/24 12:40:00 JST
1108 :     Tag: blume-20000624-startup
1109 :     Description:
1110 :    
1111 :     Fixes startup slowdown problem. (I was calling SrcPath.sync a _tad_
1112 :     bit too often -- to put it mildly. :)
1113 :    
1114 :     ----------------------------------------------------------------------
1115 :     Name: Matthias Blume
1116 : blume 675 Date: 2000/06/23 18:20:00 JST
1117 :     Tag: blume-20000623-btrace
1118 :     Description:
1119 :    
1120 :     This updates adds a backtrace facility to aid programmers in debugging
1121 :     their programs. This involves the following changes:
1122 :    
1123 :     1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
1124 :     keeping track of the current call stack. When programs are compiled
1125 :     in a special mode, the compiler will insert calls to these hooks
1126 :     into the user program.
1127 :     "Hook" means that it is possible for different implementations of
1128 :     back-tracing to register themselves (at different times).
1129 :    
1130 :     2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
1131 :     as an Absyn.dec->Absyn.dec rewrite. Normally this phase is turned off.
1132 :     It can be turned on using this call:
1133 :     SMLofNJ.Internals.BTrace.mode (SOME true);
1134 :     Turning it off again:
1135 :     SMLofNJ.Internals.BTrace.mode (SOME false);
1136 :     Querying the current status:
1137 :     SMLofNJ.Internals.BTrace.mode NONE;
1138 :     Annotated programs are about twice as big as normal ones, and they
1139 :     run a factor of 2 to 4 slower with a dummy back-trace plugin (one
1140 :     where all hooks do nothing). The slowdown with a plugin that is
1141 :     actually useful (such as the one supplied by default) is even greater,
1142 :     but in the case of the default plugin it is still only an constant
1143 :     factor (amortized).
1144 :    
1145 :     3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
1146 :     with a sub-structure BTrace for controlling back-tracing. In particular,
1147 :     the above-mentioned function "mode" controls whether the annotation
1148 :     phase is invoked by the compiler. Another important function is
1149 :     "trigger": when called it aborts the current execution and causes
1150 :     the top-level loop to print a full back-trace.
1151 :    
1152 :     4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
1153 :     for back-tracing. It keeps track of the dynamic call stack and in
1154 :     addition to that it keeps a partial history at each "level" of that
1155 :     stack. For example, if a tail-calls b, b tail-calls c, and c tail-calls
1156 :     d and b (at separate times, dynamically), then the report will show:
1157 :    
1158 :     GOTO d
1159 :     /c
1160 :     GOTO \b
1161 :     CALL a
1162 :    
1163 :     This shows that there was an initial non-tail call of a, then a
1164 :     tail-call to b or c, looping behavior in a cluster of functions that
1165 :     consist of b and c, and then a goto from that cluster (i.e., either from
1166 :     b or from c) to d.
1167 :    
1168 :     Note that (depending on the user program) the amount of information
1169 :     that the back-trace module has to keep track of at each level is bounded
1170 :     by a constant. Thus, the whole implementation has the same asymptotical
1171 :     complexity as the original program (both in space and in time).
1172 :    
1173 :     5. compiler/TopLevel/interact/evalloop.sml has been modified to
1174 :     handle the special exception SMLofNJ.Internals.BTrace.BTrace
1175 :     which is raised by the "trigger" function mentioned above.
1176 :    
1177 :     Notes on usage:
1178 :    
1179 :     - Annotated code works well together with unannotated code:
1180 :     Unannotated calls simply do not show up at all in the backtrace.
1181 :    
1182 :     - It is not a good idea to let modules that were annotated during
1183 :     different sessions run at the same time. This is because the compiler
1184 :     chooses small integers to identify individual functions, and there
1185 :     will be clashes if different modules were compiled in separate sessions.
1186 :     (Nothing will crash, and you will even be told about the clashes, but
1187 :     back-trace information will in general not be useful.)
1188 :    
1189 :     - Back-tracing can be confused by callcc and capture.
1190 :    
1191 :     - The only way of getting a back-trace right now is to explicitly
1192 :     invoke the "trigger" function from your user program. Eventually, we
1193 :     should make every exception carry back-trace information (if
1194 :     available). But since this creates more overhead at "raise"-time
1195 :     (similar to the current exnHistory overhead), I have not yet
1196 :     implemented this. (The implementation will be rather easy.) With
1197 :     exceptions carrying back-trace information, this facility will be even
1198 :     more useful because users don't need to modify their programs...
1199 :    
1200 :     - While it is possible to compile the compiler with back-trace
1201 :     annotations turned on (I did it to get some confidence in
1202 :     correctness), you must make absolutely sure that core.sml and
1203 :     btimp.sml are compiled WITHOUT annotation! (core.sml cannot actually
1204 :     be compiled with annotation because there is no core access yet, but
1205 :     if you compile btimp.sml with annotation, then the system will go into
1206 :     an infinite recursion and crash.)
1207 :     Since CM currently does not know about BTrace, the only way to turn
1208 :     annotations on and off for different modules of the compiler is to
1209 :     interrupt CMB.make, change the settings, and re-invoke it. Of course,
1210 :     this is awkward and clumsy.
1211 :    
1212 :     Sample sessions:
1213 :    
1214 :     Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
1215 :     - SMLofNJ.Internals.BTrace.mode (SOME true);
1216 :     [autoloading]
1217 :     [autoloading done]
1218 :     val it = false : bool
1219 :     - structure X = struct
1220 :     - fun main n = let
1221 :     - fun a (x, 0) = d x
1222 :     - | a (x, n) = b (x, n - 1)
1223 :     - and b (x, n) = c (x, n)
1224 :     - and c (x, n) = a (x, n)
1225 :     - and d x = e (x, 3)
1226 :     - and e (x, 0) = f x
1227 :     - | e (x, n) = e (x, n - 1)
1228 :     - and f 0 = SMLofNJ.Internals.BTrace.trigger ()
1229 :     - | f n = n * g (n - 1)
1230 :     - and g n = a (n, 3)
1231 :     - in
1232 :     - f n
1233 :     - end
1234 :     - end;
1235 :     structure X : sig val main : int -> int end
1236 :     - X.main 3;
1237 :     *** BACK-TRACE ***
1238 :     GOTO stdIn:4.2-13.20: X.main[2].f
1239 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
1240 :     GOTO stdIn:4.2-13.20: X.main[2].d
1241 :     / stdIn:4.2-13.20: X.main[2].a
1242 :     | stdIn:4.2-13.20: X.main[2].b
1243 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
1244 :     CALL stdIn:4.2-13.20: X.main[2].g
1245 :     GOTO stdIn:4.2-13.20: X.main[2].f
1246 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
1247 :     GOTO stdIn:4.2-13.20: X.main[2].d
1248 :     / stdIn:4.2-13.20: X.main[2].a
1249 :     | stdIn:4.2-13.20: X.main[2].b
1250 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
1251 :     CALL stdIn:4.2-13.20: X.main[2].g
1252 :     GOTO stdIn:4.2-13.20: X.main[2].f
1253 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
1254 :     GOTO stdIn:4.2-13.20: X.main[2].d
1255 :     / stdIn:4.2-13.20: X.main[2].a
1256 :     | stdIn:4.2-13.20: X.main[2].b
1257 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
1258 :     CALL stdIn:4.2-13.20: X.main[2].g
1259 :     GOTO stdIn:4.2-13.20: X.main[2].f
1260 :     CALL stdIn:2.15-17.4: X.main[2]
1261 :     -
1262 :    
1263 :     (Note that because of a FLINt bug the above code currently does not
1264 :     compile without BTrace turned on.)
1265 :    
1266 :     Here is another example, using my modified Tiger compiler:
1267 :    
1268 :     Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
1269 :     - SMLofNJ.Internals.BTrace.mode (SOME true);
1270 :     [autoloading]
1271 :     [autoloading done]
1272 :     val it = false : bool
1273 :     - CM.make "sources.cm";
1274 :     [autoloading]
1275 :     ...
1276 :     [autoloading done]
1277 :     [scanning sources.cm]
1278 :     [parsing (sources.cm):parse.sml]
1279 :     [creating directory CM/SKEL ...]
1280 :     [parsing (sources.cm):tiger.lex.sml]
1281 :     ...
1282 :     [wrote CM/sparc-unix/semant.sml]
1283 :     [compiling (sources.cm):main.sml]
1284 :     [wrote CM/sparc-unix/main.sml]
1285 :     [New bindings added.]
1286 :     val it = true : bool
1287 :     - Main.compile ("../testcases/merge.tig", "foo.out");
1288 :     *** BACK-TRACE ***
1289 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
1290 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
1291 :     CALL lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
1292 :     GOTO lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
1293 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
1294 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
1295 :     CALL lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
1296 :     / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
1297 :     CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
1298 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
1299 :     CALL lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
1300 :     CALL main.sml:1.18-118.4: Main.compile[2]
1301 :     -
1302 :    
1303 :     ----------------------------------------------------------------------
1304 : blume 673 Name: Matthias Blumen
1305 :     Date: 2000/06/21 18:00:00 JST
1306 :     Tag: blume-20000621-manual
1307 :     Description:
1308 :    
1309 :     CM manual update: Path environments documented.
1310 :    
1311 :     ----------------------------------------------------------------------
1312 : blume 666 Name: Matthias Blume
1313 : blume 672 Date: 2000/06/19 13:40:00
1314 :     Tag: blume-20000619-manual
1315 :     Description:
1316 :    
1317 :     CM manual and system/README update. This only covers the fact that
1318 :     there are no more implicit anchors. (Path environments and the "bind"
1319 :     option to "cm" have yet to be documented.)
1320 :    
1321 :     ----------------------------------------------------------------------
1322 :     Name: Matthias Blume
1323 : blume 671 Date: 2000/06/19 11:05:00 JST
1324 :     Tag: blume-20000619-chdir-bugfix
1325 :     Description:
1326 :    
1327 :     Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
1328 :    
1329 :     ----------------------------------------------------------------------
1330 :     Name: Matthias Blume
1331 : blume 670 Date: 2000/06/18 22:00:10 JST
1332 :     Tag: blume-20000618-implicit-anchors-really-gone
1333 :     Description:
1334 :    
1335 :     I updates the previous HISTORY entry where I forgot to mention that
1336 :     implicit anchors are no longer with us.
1337 :    
1338 :     The current update also gets rid of the (now useless) controller
1339 :     CM.Control.implicit_anchors.
1340 :    
1341 :     ----------------------------------------------------------------------
1342 :     Name: Matthias Blume
1343 : blume 666 Date: 2000/06/16 17:30:00 JST
1344 :     Tag: blume-20000616-anchorenv
1345 :     Description:
1346 :    
1347 :     This patch implements the long anticipated (just kidding :) "anchor
1348 :     environment" mechanism. In the course of doing this, I also
1349 :     re-implemented CM's internal "SrcPath" module from scratch. The new
1350 :     one should be more robust in certain boundary cases. In any case, it
1351 :     is a lot cleaner than its predecessor (IMHO).
1352 :    
1353 :     This time, although there is yet another boot file format change, I
1354 :     kept the unpickler backward-compatible. As a result, no new bootfiles
1355 :     are necessary and bootstrapping is straightforward. (You cannot read
1356 :     new bootfiles into an old system, but the other way around is no
1357 :     problem.)
1358 :    
1359 :     Visible changes:
1360 :    
1361 : blume 670 ** 0. Implicit path anchors (without the leading $-symbol) are no
1362 :     longer recognized at all. This means that such path names are not
1363 :     illegal either. For example, the name basis.cm simply refers to a
1364 :     local file called "basis.cm" (i.e, the name is an ordinary path
1365 :     relative to .cm-files directory). Or, to put it differently, only
1366 :     names that start with $ are anchored paths.
1367 : blume 666
1368 : blume 670 ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
1369 :     vanished.
1370 :    
1371 :     John (Reppy) had critizised this as soon as I originally proposed and
1372 : blume 666 implemented it, but at that time I did not really deeply believe
1373 :     him. :) Now I came full-circle because I need the $<singlearc> syntax
1374 :     in another place where it cannot be seen as an abbreviation for
1375 :     $/<singlearc>. To avoid the confusion, $<singlearc> now means what it
1376 :     seems to mean (i.e., it "expands" into the corresponding anchor
1377 :     value).
1378 :    
1379 :     However, when paths are used as members in CM description files, it
1380 :     continues to be true that there must be at least another arc after the
1381 :     anchor. This is now enforced separately during semantic analysis
1382 : blume 670 (i.e., from a lexical/syntactical point of view, the notation is ok.)
1383 : blume 666
1384 :     ** 2. The "cm" class now accepts an option "bind". The option's value
1385 :     is a sub-option list of precisely two items -- one labeled "anchor"
1386 :     and the other one labeled "value". As you might expect, "anchor" is
1387 :     used to specify an anchor name to be bound, and "value" specifies what
1388 :     the anchor is being bound to.
1389 :    
1390 :     The value must be a directory name and can be given in either standard
1391 :     syntax (including the possibility that it is itself an anchored path)
1392 :     or native syntax.
1393 :    
1394 :     Examples:
1395 :    
1396 :     foo.cm (bind:(anchor:bar value:$mystuff/bar))
1397 :     lib.cm (bind:(anchor:a value:"H:\\x\\y\\z")) (* only works under windows *)
1398 :    
1399 :     and so on.
1400 :    
1401 :     The meaning of this is that the .cm-file will be processed with an
1402 :     augmented anchor environment where the given anchor(s) is/are bound to
1403 :     the given values(s).
1404 :    
1405 :     The rationale for having this feature is this: Suppose you are trying
1406 :     to use two different (already stable) libraries a.cm and b.cm (that
1407 :     you perhaps didn't write yourself). Further, suppose each of these
1408 :     two libraries internally uses its own auxiliary library $aux/lib.cm.
1409 :     Normally you would now have a problem because the anchor "lib" can not
1410 :     be bound to more than one value globally. Therefore, the project that
1411 :     uses both a.cm and b.cm must locally redirect the anchor to some other
1412 :     place:
1413 :    
1414 :     a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
1415 :     b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
1416 :    
1417 :     This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
1418 :     /usr/lib/smlnj/b-stuff/aux.cm, respectively.
1419 :    
1420 :     Hard-wiring path names is a bit inflexible (and CM will verbosely warn
1421 :     you when you do so at the time of CM.stabilize). Therefore, you can
1422 :     also use an anchored path as the value:
1423 :    
1424 :     a.cm (bind:(anchor:lib value:$a-lib))
1425 :     b.cm (bind:(anchor:lib value:$b-lib))
1426 :    
1427 :     Now you can globally configure (using the usual CM.Anchor.anchor or
1428 :     pathconfig machinery) bindings for "a-lib" and "b-lib". Since "lib"
1429 :     itself is always locally bound, setting it globally is no longer
1430 :     meaningful or necessary (but it does not hurt either). In fact, "lib"
1431 :     can still be used as a global anchor for separate purposes. As a
1432 :     matter of fact, one can locally define "lib" in terms of a global
1433 :     "lib":
1434 :    
1435 :     a.cm (bind:(anchor:lib value:$lib/a))
1436 :     b.cm (bind:(anchor:lib value:$lib/b))
1437 :    
1438 :     ** 3: The encoding of path names has changed. This affects the way
1439 :     path names are shown in CM's progress report and also the internal
1440 :     protocol encoding used for parallel make.
1441 :    
1442 :     The encoding now uses one or more ':'-separated segments. Each
1443 :     segments corresponds to a file that has been specified relative to the
1444 :     file given by its preceding segment. The first segment is either
1445 :     relative to the CWD, absolute, or anchored. Each segment itself is
1446 :     basically a Unix pathname; all segments but the first are relative.
1447 :    
1448 :     Example:
1449 :    
1450 :     $foo/bar/baz.cm:a/b/c.sml
1451 :    
1452 :     This path denotes the file bar/a/b/c.sml relative to the directory
1453 :     denoted by anchor "foo". Notice that the encoding also includes
1454 :     baz.cm which is the .cm-file that listed a/b/c.sml. As usual, such
1455 :     paths are resolved relative to the .cm-files directory, so baz.cm must
1456 :     be ignored to get the "real" pathname.
1457 :    
1458 :     To make this fact more obvious, CM puts the names of such "virtual
1459 :     arcs" into parentheses when they appear in progress reports. (No
1460 :     parentheses will appear in the internal protocol encoding.) Thus,
1461 :     what you really see is:
1462 :    
1463 :     $foo/bar/(baz.cm):a/b/c.sml
1464 :    
1465 :     I find this notation to be much more informative than before.
1466 :    
1467 :     Another new feature of the encoding is that special characters
1468 :     including parentheses, colons, (back)slashes, and white space are
1469 :     written as \ddd (where ddd is the decimal encoding of the character).
1470 :    
1471 : blume 670 *** The CM manual still needs to be updated.
1472 :    
1473 : blume 666 ----------------------------------------------------------------------
1474 : leunga 660 Name: Allen Leung
1475 :     Date: 2000/06/15 00:38:00
1476 :     Tag: leunga-20000615-x86-peephole
1477 :    
1478 :     x86 Peephole fix by Fermin. Affects c-- and moby only.
1479 :    
1480 :     ----------------------------------------------------------------------
1481 : blume 658 Name: Matthias Blume
1482 :     Date: 2000/06/12 11:40:00
1483 :     Tag: blume-20000612-parmakefix
1484 :     Description:
1485 :    
1486 :     More cleanup after changing the file naming scheme: This time I
1487 :     repaired the parallel make mechanism for CMB.make which I broke earlier.
1488 :    
1489 :     ----------------------------------------------------------------------
1490 : leunga 657 Name: Allen Leung
1491 :     Date: 2000/06/09 01:25:00
1492 :     Tag: leunga-20000609-various
1493 :    
1494 :     None of these things should affect normal SML/NJ operations
1495 :    
1496 :     1. Peephole improvements provided by Fermin (c--)
1497 :     2. New annotation DEFUSE for adding extra dependence (moby)
1498 :     3. New X86 LOCK instructions (moby)
1499 :     4. New machine description language for reservation tables (scheduling)
1500 :     5. Fixes to various optimization/analysis modules (branch chaining, dominator
1501 :     trees etc.)
1502 :     6. I've changed the CM files so that they can work with versions
1503 :     110.0.6, 110.25 and 110.28
1504 :    
1505 :     ----------------------------------------------------------------------
1506 : blume 652 Name: Matthias Blume
1507 : blume 656 Date: 2000/06/09 12:40:00
1508 :     Tag: blume-20000609-log
1509 :     Description:
1510 :    
1511 :     - Removed all(?) remaining RCS Log entries from sources.
1512 :    
1513 :     - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
1514 :     anchored paths).
1515 :    
1516 :     ----------------------------------------------------------------------
1517 :     Name: Matthias Blume
1518 : blume 653 Date: 2000/06/07 17:00:00 JST
1519 :     Tag: blume-20000607-no-implicit-anchors
1520 :     Description:
1521 :    
1522 :     1. This update changes the default setting for
1523 :     CM.Control.implicit_anchors from true to false. This means that
1524 :     implicit anchors are no longer permitted by default. I also tried to
1525 :     make sure that nothing else still relies on implicit anchors.
1526 :     (This is the next step on the schedule towards a CM that does not even
1527 :     have the notion of implicit anchors anymore.)
1528 :    
1529 :     2. More CM manual updates.
1530 :    
1531 :     3. I managed to track down and fix the pickling bug I mentioned last
1532 :     time. Because of the previously existing workaround, this entails no
1533 :     immediate practical changes.
1534 :    
1535 :     ----------------------------------------------------------------------
1536 :     Name: Matthias Blume
1537 : blume 652 Date: 2000/06/06 11:15:00 JST
1538 :     Tag: blume-20000606-lazierpickle
1539 :     Description:
1540 :    
1541 :     !!!! NEW BOOT FILES !!!!
1542 :    
1543 :     * The main purpose of this update is to make library pickles lazier in
1544 :     order to reduce the initial space penalty for autoloading a library.
1545 :     As a result, it is now possible to have $smlnj/compiler.cm
1546 :     pre-registered. This should take care of the many complaints or
1547 :     inquiries about missing structure Compiler. This required changes to
1548 :     CM's internal data structures and small tweaks to some algorithms.
1549 :    
1550 :     As a neat additional effect, it is no longer necessary (for the sake
1551 :     of lean heap image files) to distinguish between a "minimal" CM and a
1552 :     "full" CM. Now, there is only one CM (i.e., the "full" version:
1553 :     $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
1554 :     interactive top level. ($smlnj/cm/minimal.cm is gone.)
1555 :    
1556 :     To make the life of compiler-hackers easier, "makeml" now also
1557 :     pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm). In other
1558 :     words, after you bootstrap a new sml for the first time, you will not
1559 :     have to autoload $smlnj/cmb.cm again afterwards. (The first time
1560 :     around you will still have to do it, though.)
1561 :    
1562 :     * A second change consists of major updates to the CM manual. There
1563 :     are now several appendices with summary information and also a full
1564 :     specification of the CM description file syntax.
1565 :    
1566 :     * In directory src/system I added the script "allcross". This script
1567 :     invokes sml and cross-compiles the compiler for all supported
1568 :     architectures. (Useful when providing a new set of boot files.)
1569 :    
1570 :     * There seems to be a latent bug in my "lazy pickles" mechanism. I
1571 :     added a small tweak to pickle-util.sml to work around this problem,
1572 :     but it is not a proper fix yet. I will investigate further. (The
1573 :     effect of the bug was an inflation of library pickle size.)
1574 :    
1575 :     * Version number increased to 110.28.1 (to avoid compatibility problems).
1576 :    
1577 :     ----------------------------------------------------------------------
1578 : leunga 646 Name: Allen Leung
1579 : leunga 648 Date: 2000/05/25 17:28 EDT
1580 :     Tag: leunga-20000525-ra
1581 :     Description:
1582 :    
1583 :     Fixed a bug in freezing phase of the register allocator.
1584 :    
1585 :     ----------------------------------------------------------------------
1586 :     Name: Allen Leung
1587 : leunga 647 Date: 2000/05/15 22:53 EDT
1588 : leunga 646 Tag: leunga-20000515-alpha-x86-ra
1589 :     Description:
1590 :    
1591 :     1. Alpha
1592 :    
1593 :     Slight cleanup. Removed the instruction SGNXL
1594 :    
1595 :     2. X86
1596 :    
1597 :     Added the following instructions to the instruction set:
1598 :    
1599 :     ROLx, RORx,
1600 :     BTx, BTSx, BTLx, BTRx,
1601 :     XCHGx, and variants with the LOCK prefix
1602 :    
1603 :     3. Register Allocation
1604 :    
1605 :     The module ra-rewrite-with-renaming has been improved.
1606 :    
1607 : leunga 647 These have no effect on SML/NJ.
1608 :    
1609 : leunga 646 ----------------------------------------------------------------------
1610 : blume 642 Name: Matthias Blume
1611 : blume 645 Date: 2000/05/15 16:20:00 JST
1612 :     Tag: blume-20000515-lightrebuild
1613 :     Description:
1614 :    
1615 :     1. I added an alternative to "-rebuild" to "makeml". The difference is
1616 :     that prior to calling CMB.make' the CM-variable "LIGHT" will be
1617 :     defined. In effect, the command will not build any cross-compiler
1618 :     backends and therefore finish more quickly.
1619 :    
1620 :     The "fixpt" script also takes a "-light" switch to be able to use
1621 :     this new facility while compiling for a fixpoint.
1622 :    
1623 :     2. I replaced all mentions of anchored paths in group owner specifications
1624 :     with simple relative paths (usually starting with "..").
1625 :     The rationale is that a library's internal workings should not be
1626 :     compromised by the lack of some anchor. (An anchor is necessary
1627 :     for someone who wants to refer to the library by an anchored path,
1628 :     but it should not be necessary to build the same library in the first
1629 :     place.)
1630 :    
1631 :     3. I changed the way CM's tool mechanism determines the shell command
1632 :     string used for things like ml-yacc etc. so that it does not break
1633 :     when CM.Control.implicit_anchors is turned off.
1634 :    
1635 :     ----------------------------------------------------------------------
1636 :     Name: Matthias Blume
1637 : blume 644 Date: 2000/05/12 18:20:00 JST
1638 :     Tag: blume-20000512-ml-build
1639 :     Description:
1640 :    
1641 :     Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from
1642 :     getting installed properly (by config/install.sh).
1643 :    
1644 :     ----------------------------------------------------------------------
1645 :     Name: Matthias Blume
1646 : blume 643 Date: 2000/05/12 17:30:00 JST
1647 :     Tag: blume-20000512-anchors
1648 :     Description:
1649 :    
1650 :     !!! NEW BOOT FILES !!!
1651 :    
1652 :     This change is in preparation of fading out support for "implicitly
1653 :     anchored path names". I went through all sources and used the
1654 :     explicit (and relatively new) $-notation. See system/README and the
1655 :     CM manual for more info on this.
1656 :    
1657 :     I also modified the anchoring scheme for some things such as "smlnj",
1658 :     "MLRISC", "cm", etc. to take advantage of the fact that explicit
1659 :     anchors are more expressive: anchor name and first arc do not have to
1660 :     coincide. This entails the following user-visible change:
1661 :    
1662 :     You have to write $smlnj/foo/bar instead of smlnj/foo/bar. In
1663 :     particular, when you fire up sml with a command-line argument, say,
1664 :     e.g.:
1665 :    
1666 :     sml '$smlnj/cmb.cm'
1667 :    
1668 :     At the ML toplevel prompt:
1669 :    
1670 :     CM.autoload "$smlnj/cmb.cm";
1671 :    
1672 :     There is also a new controller in CM.Control that can be used to turn
1673 :     off all remaining support for implicit anchors by saying:
1674 :    
1675 :     CM.autoload "$smlnj/
1676 :     #set CM.Control.implicit_anchors false;
1677 :    
1678 :     This causes CM to reject implicitly anchored paths. This is (for the
1679 :     time being) less permissive than the "final" version where there will
1680 :     be no more such implicit anchors and relative paths will be just that:
1681 :     relative.
1682 :    
1683 :     The next step (version after next version?) will be to make the
1684 :     default for CM.Control.implicit_anchors false. After the dust has
1685 :     settled, I can then produce the "final" version of this...
1686 :    
1687 :     Note: Since bootstrapping is a bit tricky, I provided new boot files.
1688 :    
1689 :     ----------------------------------------------------------------------
1690 :     Name: Matthias Blume
1691 : blume 642 Date: 2000/05/11 16:30:00 JST
1692 :     Tag: blume-20000511-sources
1693 :     Description:
1694 :    
1695 :     The main change is that I added function CM.sources as a generalized
1696 :     version of the earlier CM.makedepend. This entails the following
1697 :     additional changes:
1698 :    
1699 :     - CM.makedepend has been dropped.
1700 :    
1701 :     - CM manual has been updated.
1702 :    
1703 :     - TOOLS signature and API have been changed.
1704 :    
1705 :     ----------------------------------------------------------------------
1706 : leunga 640 Name: Allen Leung
1707 : leunga 641 Date: 2000/05/10 21:17 EDT
1708 :     Tag: leunga-20000510-moby-c--ssa
1709 :     Description:
1710 :    
1711 :     Various bug fixes and new features for C--, Moby and MLRISC optimizations.
1712 :     None of these affect SML/NJ.
1713 :    
1714 :     1. Register Allocation
1715 :    
1716 :     a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented.
1717 :     This module tries to remove local (i.e. basic block level) redundancies
1718 :     during spilling.
1719 :    
1720 :     b. A new framework for performing region based register allocation.
1721 :     Not yet entirely functional.
1722 :    
1723 :     2. X86
1724 :    
1725 :     a. DefUse for POP was missing the stack pointer [found by Lal]
1726 :     b. Reload for CALL was incorrect in X86Spill [found by John]
1727 :     c. Various fixes in X86Spill so that it can be used correctly for
1728 :     the new spilling module.
1729 :    
1730 :     3. SSA/IR
1731 :    
1732 :     a. New module ir/dj-dataflow.sml implements elimination based
1733 :     data flow analysis.
1734 :    
1735 :     4. MLRiscGen
1736 :    
1737 :     a. Fix for gc type annotation
1738 :    
1739 :     5. MDGen
1740 :    
1741 :     Various fixes for machine description -> ml code translation. For ssa
1742 :     only.
1743 :    
1744 :     ----------------------------------------------------------------------
1745 :     Name: Allen Leung
1746 : leunga 640 Date: 2000/05/08 22:17 EDT
1747 :     Tag: leunga-20000508-labexp
1748 :     Description:
1749 :    
1750 :     Fermin has found a few assembly problems with constant expressions
1751 :     generated in LabelExp. Mostly, the problems involve extra parentheses,
1752 :     which choke on dumb assemblers. This is his fix.
1753 :    
1754 :     ----------------------------------------------------------------------
1755 : dbm 635 Name: Dave MacQueen
1756 :     Date: 2000/04/09 14:00 EDT
1757 :     Tag: dbm-20000502-Version_110_28
1758 :     Description:
1759 :    
1760 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.28
1761 :    
1762 :     2. Updated config/version to 110.28
1763 :    
1764 :     3. Updated config/srcarchiveurl
1765 :    
1766 :     3. New boot files!
1767 :     ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/
1768 :    
1769 :     ----------------------------------------------------------------------
1770 : blume 634 Name: Matthias Blume
1771 :     Date: 2000/05/01 19:05:00 JST
1772 :     Tag: blume-20000501-noweb
1773 :     Description:
1774 :    
1775 :     A new noweb tool has been added. The existing system is entirely
1776 :     unaffected by this, but some CM users have asked for renewed noweb
1777 :     support. Everything is documented in the CM manual.
1778 :    
1779 :     New (plugin) libraries:
1780 :    
1781 :     noweb-tool.cm
1782 :     nw-ext.cm
1783 :    
1784 :     ----------------------------------------------------------------------
1785 : dbm 633 Name: Dave MacQueen
1786 :     Date: 2000/04/30 12:40PM EDT
1787 :     Tag: dbm-20000430-bug_fixes
1788 :     Description:
1789 :    
1790 :     1. Fix for bug 1498
1791 :     smlnj/src/system/Basis/Implementation/Unsafe/object.sig
1792 :     smlnj/src/system/Basis/Implementation/Unsafe/object.sml
1793 :     added toRealArray function
1794 :     smlnj/src/compiler/MiscUtil/print/ppobj.sml
1795 :     added check for tag Obj.RealArray to array printing case in ppObj
1796 :    
1797 :     2. Fix for bug 1510
1798 :     smlnj/src/compiler/Semant/types/typesutil.sml
1799 :     fixed definition of dummyargs (used by equalTycon) so that
1800 :     dummy args are distinct types
1801 :    
1802 :     ----------------------------------------------------------------------
1803 : blume 629 Name: Matthias Blume
1804 : blume 632 Date: 2000/04/30 01:00:00 JST
1805 :     Tag: blume-20000430-versions
1806 :     Description:
1807 :    
1808 :     1. CM version numbering added. This is an implementation of Lal's
1809 :     proposal for adding version numbers and version checking to .cm
1810 :     files. Lal said that his proposal was just that -- a proposal.
1811 :     For the time being I went ahead and implemented it so that people
1812 :     can comment on it. Everything is completely backward-compatible
1813 :     (except for the stable library format, i.e., new bootfiles!).
1814 :    
1815 :     As usual, see the CM manual for details.
1816 :    
1817 :     2. An alternative syntax for anchored paths has been implemented.
1818 :     Dave has recently voiced the same concerns that I had when I did
1819 :     this, so there should be some support. My take is that eventually
1820 :     I will let support for the current syntax (where anchors are
1821 :     "implicit") fade out in favor of the new, explicit syntax.
1822 :     In order to be backward-compatible, both old and new syntax are
1823 :     currently supported.
1824 :    
1825 :     Again, see the CM manual for details.
1826 :    
1827 :     3. Parallel make is trying to be slightly smarter: When the master
1828 :     process finds a "bottleneck", i.e., when there is only one
1829 :     compilation unit that can be compiled and everybody else is
1830 :     waiting on it, then it will simply compile it directly instead
1831 :     of clumsily telling one of the slaves to do it.
1832 :    
1833 :     4. Support for "unsharing" added. This is necessary in order to be
1834 :     able to have two different versions of the same library running
1835 :     at the same time (e.g., for trying out a new MLRISC while still
1836 :     having the old MLRISC linked into the current compiler, etc.)
1837 :     See the CM manual.
1838 :    
1839 :     5. Simple "makedepend" functionality added for generating Makefile
1840 :     dependency information. (This is rather crude at the moment.
1841 :     Expect some changes here in the future.)
1842 :    
1843 :     6. ".fun" added as a recognized suffix for ML files. Also documented
1844 :     explicitly in the manual that the fallback behavior (unknown suffix
1845 :     -> ML file) is not an official feature!
1846 :    
1847 :     7. Small changes to the pickler for stable libraries.
1848 :    
1849 :     8. Several internal changes to CM (for cleanup/improvement).
1850 :    
1851 :    
1852 :     !!!! NEW BINFILES !!!!
1853 :    
1854 :     ----------------------------------------------------------------------
1855 :     Name: Matthias Blume
1856 : blume 631 Date: 2000/04/28 17:30:00 JST
1857 :     Tag: blume-20000428-pathconfig
1858 :     Description:
1859 :    
1860 :     1. I changed config/install.sh to remove duplicate entries from the
1861 :     lib/pathconfig file at the end. Moreover, the final version of
1862 :     lib/pathconfig is sorted alphabetically. The same (sorting) is done
1863 :     in src/system/installml.
1864 :    
1865 :     2. The config/install.sh script now consistently uses relative
1866 :     pathnames in lib/pathconfig whenever the anchor is in the lib
1867 :     directory. (So far this was true for the libraries that come
1868 :     pre-compiled and bundled as part of the bootfiles but not for
1869 :     libraries that are compiled by the script itself.)
1870 :    
1871 :     ----------------------------------------------------------------------
1872 :     Name: Matthias Blume
1873 : blume 629 Date: 2000/04/26 13:10:00 JST
1874 :     Tag: blume-20000426-fun_suffix
1875 :     Description:
1876 :    
1877 :     Added ".fun" as a recognized file name suffix (for ML code).
1878 :    
1879 :     ----------------------------------------------------------------------
1880 : leunga 628 Name: Allen Leung
1881 :     Date: 2000/04/25 17:00:00 EST
1882 :     Tag: leunga-20000425-alpha-ra
1883 :     Description:
1884 :    
1885 :     1. Alpha
1886 :    
1887 :     PSEUDOARITH was missing in AlphaRewrite. This causes an endless loop
1888 :     in C--.
1889 :    
1890 :     2. RA
1891 :    
1892 :     Added a flag "ra-dump-size" to print out the size of the flowgraph
1893 :     and the interference graph.
1894 :    
1895 :     ----------------------------------------------------------------------
1896 : dbm 627 Name: Dave MacQueen
1897 :     Date: 2000/04/25/
1898 :     Tag: dbm-20000425-mlyacc_doc_examples
1899 :     Description:
1900 :     Updated mlyacc.tex sections 5 and 7 for SML '97 and CM.
1901 :     Updated all three examples in src/ml-yacc/examples to run
1902 :     under 110.* using CM.make.
1903 :    
1904 :     ----------------------------------------------------------------------
1905 : leunga 624 Name: Allen Leung
1906 :     Date: 2000/04/20 23:04:00 EST
1907 :     Tag: leunga-20000420-ssa-c---stuff
1908 :     Description:
1909 :    
1910 :     This update synchronizes my repository with Yale's. Most of these
1911 :     changes, however, do not affect SML/NJ at all (the RA is an exception).
1912 :    
1913 :     1. Register Allocator
1914 :    
1915 :     a. An improvement in the interference graph construction:
1916 :     Given a copy
1917 :    
1918 :     s <- t
1919 :    
1920 : leunga 628 no interference edge between s and t is added for this definition of s.
1921 : leunga 624
1922 :     b. I've added two new spill heuristic modules that Fermin and I developed
1923 :     (in the new library RA.cm). These are unused in SML/NJ but maybe
1924 :     useful for others (Moby?)
1925 :    
1926 :     2. X86
1927 :    
1928 :     a. Various fixes in the backend provided by Fermin [C--] and Lal.
1929 :    
1930 :     3. Alpha
1931 :    
1932 :     a. Added the BSR instruction and code generation that goes with it [C--]
1933 :     b. Other fixes too numerous to recount provided by Fermin [C--]
1934 :    
1935 :     4. Regmaps
1936 :    
1937 :     a. The regmaps are not initialized with the identity physical bindings
1938 :     at creation time. This is unneeded.
1939 :    
1940 :     5. MLRISC Optimizations
1941 :    
1942 :     a. The DJ-Graph module can now compute the iterated dominance frontiers
1943 :     intersects with liveness incrementally in linear time! Woohoo!
1944 :     This is now used in my new SSA construction algorithm.
1945 :    
1946 :     b. THe branch reorganization module is now smarter about linear chains of
1947 :     basic blocks.
1948 :    
1949 :    
1950 :     ----------------------------------------------------------------------
1951 : blume 615 Name: Matthias Blume
1952 :     Date: 2000/04/12 13:52:00 JST
1953 :     Tag: blume_main_v110p27_1
1954 :     Description:
1955 :    
1956 :     Changed install.sh script to handle archive files without version number
1957 :     and to use "boot.<arch>-<os>" instead of "sml.boot.<arch>-<os>" for the
1958 :     name of the boot file archive.
1959 :    
1960 :     ----------------------------------------------------------------------
1961 : dbm 607 Name: Dave MacQueen
1962 :     Date: 2000/04/09 14:00 EDT
1963 :     Tag: dbm-20000410-Version_110_27
1964 :     Description:
1965 :    
1966 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.27
1967 :    
1968 :     2. Updated src/config/version to 110.27
1969 :    
1970 :     3. New boot files!
1971 :    
1972 :     ----------------------------------------------------------------------
1973 : leunga 606 Name: Allen Leung
1974 :     Date: 2000/04/09 19:09:00 EST
1975 :     Tag: leunga-20000409-misc
1976 :     Description:
1977 :    
1978 :     1. Yet another fix for x86 assembly for idivl, imull, mull and friends.
1979 :    
1980 :     2. Miscellaneous improvements to MLRISC (unused in sml/nj)
1981 :    
1982 :     ----------------------------------------------------------------------
1983 : monnier 605 Name: Stefan
1984 :     Date: 2000/04/07 10:00:00 EDT
1985 :     Tag: monnier-20000406-branch-handling
1986 :     Description:
1987 :    
1988 :     Improved handling of branches (mostly those generated from
1989 :     polymorphic equality), removed switchoff and changed the
1990 :     default optimization settings (more cpsopt and less flintopt).
1991 :    
1992 :     ----------------------------------------------------------------------
1993 : leunga 601 Name: Allen Leung
1994 : leunga 602 Date: 2000/04/06 01:30:00 EST
1995 :     Tag: leunga-20000406-peephole-x86-SSA-2
1996 :     Description:
1997 :    
1998 :     Forgot a few files.
1999 :    
2000 :     ----------------------------------------------------------------------
2001 :     Name: Allen Leung
2002 : leunga 601 Date: 2000/04/06 00:36:00 EST
2003 :     Tag: leunga-20000406-peephole-x86-SSA
2004 :     Description:
2005 :    
2006 :     1. New Peephole code
2007 :    
2008 :     2. Minor improvement to X86 instruction selection
2009 :    
2010 :     3. Various fixes to SSA and machine description -> code translator
2011 :    
2012 :     ----------------------------------------------------------------------
2013 : blume 595 Name: Matthias Blume
2014 :     Date: 2000/04/05 12:30:00 JST
2015 :     Tag: blume_main_v110p26p2_3
2016 :     Description:
2017 :    
2018 :     This update just merges three minor cosmetic updates to CM's sources
2019 :     to get ready for the 110.27 code freeze on Friday. No functionality
2020 :     has changed.
2021 :    
2022 :     ----------------------------------------------------------------------
2023 : leunga 593 Name: Allen Leung
2024 : leunga 594 Date: 2000/04/04 19:39:00 EST
2025 :     Tag: leunga-20000404-x86-asm
2026 :     Description:
2027 :    
2028 :     1. Fixed a problem in X86 assembly.
2029 :    
2030 :     Things like
2031 :    
2032 :     jmp %eax
2033 :     jmp (%eax)
2034 :    
2035 :     should be output as
2036 :    
2037 :     jmp *%eax
2038 :     jmp *(%eax)
2039 :    
2040 :     2. Assembly output
2041 :    
2042 :     Added a new flag
2043 :    
2044 :     "asm-indent-copies" (default to false)
2045 :    
2046 :     When this flag is on, parallel copies will be indented an extra level.
2047 :    
2048 :     ----------------------------------------------------------------------
2049 :     Name: Allen Leung
2050 : leunga 593 Date: 2000/04/04 03:18:00 EST
2051 :     Tag: leunga-20000404-C--Moby
2052 :     Description:
2053 :    
2054 :     All of these fixes are related to C--, Moby, and my own optimization
2055 :     stuff; so they shouldn't affect SML/NJ.
2056 :    
2057 :     1. X86
2058 :    
2059 :     Various fixes related floating point, and extensions.
2060 :    
2061 :     2. Alpha
2062 :    
2063 :     Some extra patterns related to loads with signed/zero extension
2064 :     provided by Fermin.
2065 :    
2066 :     3. Assembly
2067 :    
2068 : monnier 659 When generating assembly, resolve the value of client defined constants,
2069 : leunga 593 instead of generating symbolic values. This is controlled by the
2070 :     new flag "asm-resolve-constants", which is default to true.
2071 :    
2072 :     4. Machine Descriptions
2073 :    
2074 :     a. The precedence parser was slightly broken when parsing infixr symbols.
2075 :     b. The type generalizing code had the bound variables reversed, resulting
2076 :     in a problem during arity raising.
2077 :     c. Various fixes in machine descriptions.
2078 :    
2079 :     ----------------------------------------------------------------------
2080 : blume 592 Name: Matthias Blume
2081 :     Date: 2000/04/03 16:05:00 JST
2082 :     Tag: blume_main_v110p26p2_2
2083 :     Description:
2084 :    
2085 :     I eliminated coreEnv from compInfo. Access to the "Core" structure is
2086 :     now done via the ordinary static environment that is context to each
2087 :     compilation unit.
2088 :    
2089 :     To this end, I arranged that instead of "structure Core" as "structure
2090 :     _Core" is bound in the pervasive environment. Core access is done via
2091 : monnier 659 _Core (which can never be accidentally rebound because _Core is not a
2092 : blume 592 legal surface-syntax symbol).
2093 :    
2094 :     The current solution is much cleaner because the core environment is
2095 :     now simply part of the pervasive environment which is part of every
2096 :     compilation unit's context anyway. In particular, this eliminates all
2097 :     special-case handling that was necessary until now in order to deal
2098 :     with dynamic and symbolic parts of the core environment.
2099 :    
2100 :     Remaining hackery (to bind the "magic" symbol _Core) is localized in the
2101 : monnier 659 compilation manager's bootstrap compiler (actually: in the "init group"
2102 : blume 592 handling). See the comments in src/system/smlnj/init/init.cmi for
2103 :     more details.
2104 :    
2105 :     I also tried to track down all mentions of "Core" (as string argument
2106 :     to Symbol.strSymbol) in the compiler and replaced them with a
2107 :     reference to the new CoreSym.coreSym. Seems cleaner since the actual
2108 :     name appears in one place only.
2109 :    
2110 :     Binfile and bootfile format have not changed, but the switchover from
2111 :     the old "init.cmi" to the new one is a bit tricky, so I supplied new
2112 :     bootfiles anyway.
2113 :    
2114 :     ----------------------------------------------------------------------
2115 : leunga 591 Name: Allen Leung
2116 :     Date: 2000/04/02 21:17:00 EST
2117 :     Tag: leunga-20000402-mltree
2118 :     Description:
2119 : leunga 585
2120 : leunga 591 1. Renamed the constructor CALL in MLTREE by popular demand.
2121 :     2. Added a bunch of files from my repository. These are currently
2122 :     used by other non-SMLNJ backends.
2123 :    
2124 : leunga 576 ----------------------------------------------------------------------
2125 : leunga 590 Name: Allen Leung
2126 :     Date: 2000/03/31 21:15:00 EST
2127 :     Tag: leunga-20000331-aliasing
2128 :     Description:
2129 :    
2130 :     This update contains a rewritten (and hopefully more correct) module
2131 :     for extracting aliasing information from CPS.
2132 :    
2133 :     To turn on this feature:
2134 :    
2135 :     Compiler.Control.CG.memDisambiguate := true
2136 :    
2137 :     To pretty print the region information with assembly
2138 :    
2139 :     Compiler.Control.MLRISC.getFlag "asm-show-region" := true;
2140 :    
2141 :     To control how many levels of aliasing information are printed, use:
2142 :    
2143 :     Compiler.Control.MLRISC.getInt "points-to-show-level" := n
2144 :    
2145 :     The default of n is 3.
2146 :    
2147 :     ----------------------------------------------------------------------
2148 : dbm 589 Name: David MacQueen
2149 :     Date: 2000/03/31 11:15:00 EST
2150 :     Tag: dbm-20000331-runtime_fix
2151 :     Description:
2152 :    
2153 :     This update contains:
2154 :    
2155 :     1. runtime/c-lib/c-libraries.c
2156 :     includes added in revision 1.2 caused compilation errors on hppa-hpux
2157 :    
2158 :     2. fix for bug 1556
2159 :     system/Basis/Implementation/NJ/internal-signals.sml
2160 :    
2161 :     ----------------------------------------------------------------------
2162 : blume 587 Name: Matthias Blume
2163 : blume 588 Date: 2000/03/31 18:00:00 JST
2164 :     Tag: blume_main_v110p26p2_1
2165 :     Description:
2166 :    
2167 :     This update contains:
2168 :    
2169 :     1. A small change to CM's handling of stable libraries:
2170 :     CM now maintains one "global" modmap that is used for all stable
2171 :     libraries. The use of such a global modmap maximizes sharing and
2172 :     minimizes the need for re-traversing parts of environments during
2173 :     modmap construction. (However, this has minor impact since modmap
2174 :     construction seems to account for just one percent or less of total
2175 :     compile time.)
2176 :    
2177 :     2. I added a "genmap" phase to the statistics. This is where I got the
2178 :     "one percent" number (see above).
2179 :    
2180 :     3. CM's new tool parameter mechanism just became _even_ better. :)
2181 :     - The parser understands named parameters and recursive options.
2182 :     - The "make" and "shell" tools use these new features.
2183 :     (This makes it a lot easier to cascade these tools.)
2184 :     - There is a small syntax change: named parameters use a
2185 :    
2186 :     <name> : ( <option> ... ) or
2187 :     <name> : <string>
2188 :    
2189 :     syntax. Previously, named parameters were implemented in an
2190 :     ad-hoc fashion by each tool individually (by parsing strings)
2191 :     and had the form
2192 :    
2193 :     <name>=<string>
2194 :    
2195 :     See the CM manual for a full description of these issues.
2196 :    
2197 :     ----------------------------------------------------------------------
2198 :     Name: Matthias Blume
2199 : blume 587 Date: 2000/03/30 18:00:00 JST
2200 :     Tag: blume_main_v110p26p2_0
2201 :     Description:
2202 :    
2203 :     !!!!! WARNING !!!!!!
2204 :     !! New binfiles !!
2205 :     !!!!!!!!!!!!!!!!!!!!
2206 :    
2207 :     This update contains:
2208 :    
2209 :     1. Moderate changes to CM:
2210 :    
2211 :     - Changes to CM's tools mechanism. In particular, it is now possible
2212 :     to have tools that accept additional "command line" parameters
2213 :     (specified in the .cm file at each instance where the tool's class is
2214 :     used).
2215 :    
2216 : monnier 659 This was done to accommodate the new "make" and "shell" tools which
2217 :     facilitate fairly seamless hookup to portions of code managed using
2218 : blume 587 Makefiles or Shell scripts.
2219 :    
2220 :     There are no classes "shared" or "private" anymore. Instead, the
2221 :     sharing annotation is now a parameter to the "sml" class.
2222 :    
2223 :     There is a bit of generic machinery for implementing one's own
2224 :     tools that accept command-line parameters. However, I am not yet fully
2225 :     satisfied with that part, so expect changes here in the future.
2226 :    
2227 :     All existing tools are described in the CM manual.
2228 :    
2229 : monnier 659 - Slightly better error handling. (CM now suppresses many followup
2230 : blume 587 error messages that tended to be more annoying than helpful.)
2231 :    
2232 :     2. Major changes to the compiler's static environment data structures.
2233 :    
2234 :     - no CMStaticEnv anymore.
2235 :     - no CMEnv, no "BareEnvironment" (actually, _only_ BareEnvironment,
2236 :     but it is called Environment), no conversions between different
2237 :     kinds of static environments
2238 :    
2239 :     - There is still a notion of a "modmap", but such modmaps are generated
2240 :     on demand at the time when they are needed. This sounds slow, but I
2241 :     sped up the code that generates modmaps enough for this not to lead to
2242 :     a slowdown of the compiler (at least I didn't detect any).
2243 :    
2244 :     - To facilitate rapid modmap generation, static environments now
2245 :     contain an (optional) "modtree" structure. Modtree annotations are
2246 :     constructed by the unpickler during unpickling. (This means that
2247 :     the elaborator does not have to worry about modtrees at all.)
2248 :     Modtrees have the advantage that they are compositional in the same
2249 :     way as the environment data structure itself is compositional.
2250 :     As a result, modtrees never hang on to parts of an environment that
2251 :     has already been rendered "stale" by filtering or rebinding.
2252 :    
2253 :     - I went through many, many trials and errors before arriving at the
2254 :     current solution. (The initial idea of "linkpaths" did not work.)
2255 :     But the result of all this is that I have touched a lot of files that
2256 :     depend on the "modules" and "types" data structures (most of the
2257 :     elaborator). There were a lot of changes during my "linkpath" trials
2258 :     that could have been reverted to their original state but weren't.
2259 :     Please, don't be too harsh on me for messing with this code a bit more
2260 :     than what was strictly necessary... (I _did_ resist the tempation
2261 :     of doing any "global reformatting" to avoid an untimely death at
2262 :     Dave's hands. :)
2263 :    
2264 :     - One positive aspect of the previous point: At least I made sure that
2265 :     all files that I touched now compile without warnings (other than
2266 :     "polyEqual").
2267 :    
2268 :     - compiler now tends to run "leaner" (i.e., ties up less memory in
2269 :     redundant modmaps)
2270 :    
2271 :     ----------------------------------------------------------------------
2272 : leunga 580 Name: Allen Leung
2273 : leunga 585 Date: 2000/03/29 18:00:00
2274 :     Tag: leunga-20000327-mlriscGen_hppa_alpha_x86
2275 : leunga 586 Boot files (optional): ftp://react-ilp.cs.nyu.edu/leunga/110.26.1-sml.boot.x86-unix-20000330.tar.gz
2276 : leunga 585 Description:
2277 :    
2278 :     This update contains *MAJOR* changes to the way code is generated from CPS
2279 :     in the module mlriscGen, and in various backend modules.
2280 :    
2281 :     CHANGES
2282 :     =======
2283 :    
2284 :     1. MLRiscGen: forward propagation fix.
2285 :    
2286 :     There was a bug in forward propagation introduced at about the same time
2287 :     as the MLRISC x86 backend, which prohibits coalescing to be
2288 :     performed effectively in loops.
2289 :    
2290 :     Effect: speed up of loops in RISC architectures.
2291 :     By itself, this actually slowed down certain benchmarks on the x86.
2292 :    
2293 :     2. MLRiscGen: forward propagating addresses from consing.
2294 :    
2295 :     I've changed the way consing code is generated. Basically I separated
2296 :     out the initialization part:
2297 :    
2298 :     store tag, offset(allocptr)
2299 :     store elem1, offset+4(allocptr)
2300 :     store elem2, offset+8(allocptr)
2301 :     ...
2302 :     store elemn, offset+4n(allocptr)
2303 :    
2304 :     and the address computation part:
2305 :    
2306 :     celladdr <- offset+4+alloctpr
2307 :    
2308 :     and move the address computation part
2309 :    
2310 :     Effect: register pressure is generally lower as a result. This
2311 :     makes compilation of certain expressions much faster, such as
2312 :     long lists with non-trivial elements.
2313 :    
2314 :     [(0,0), (0,0), .... (0,0)]
2315 :    
2316 :     3. MLRiscGen: base pointer elimination.
2317 :    
2318 :     As part of the linkage mechanism, we generate the sequence:
2319 :    
2320 :     L: ... <- start of the code fragment
2321 :    
2322 :     L1:
2323 :     base pointer <- linkreg - L1 + L
2324 :    
2325 :     The base pointer was then used for computing relocatable addresses
2326 :     in the code fragment. Frequently (such as in lots of continuations)
2327 :     this is not needed. We now eliminate this sequence whenever possible.
2328 :    
2329 :     For compile time efficiency, I'm using a very stupid local heuristic.
2330 :     But in general, this should be done as a control flow analysis.
2331 :    
2332 :     Effect: Smaller code size. Speed up of most programs.
2333 :    
2334 :     4. Hppa back end
2335 :    
2336 :     Long jumps in span dependence resolution used to depend on the existence
2337 :     of the base pointer.
2338 :    
2339 :     A jump to a long label L was expanded into the following sequence:
2340 :    
2341 :     LDIL %hi(L-8192), %r29
2342 :     LDO %lo(L-8192)(%r29), %r29
2343 :     ADD %r29, baseptr, %r29
2344 :     BV,n %r0(%r29)
2345 :    
2346 :     In the presence of change (3) above, this will not work. I've changed
2347 :     it so that the following sequence of instructions are generated, which
2348 :     doesn't mention the base pointer at all:
2349 :    
2350 :     BL,n L', %r29 /* branch and link, L' + 4 -> %r29 */
2351 :     L': ADDIL L-(L'+4), %r29 /* Compute address of L */
2352 :     BV,n %r0(%r29) /* Jump */
2353 :    
2354 :     5. Alpha back end
2355 :    
2356 :     New alpha instructions LDB/LDW have been added, as per Fermin's
2357 :     suggestions. This is unrelated to all other changes.
2358 :    
2359 :     6. X86 back end
2360 :    
2361 :     I've changed andl to testl in the floating point test sequence
2362 :     whenever appropriate. The Intel optimization guide states that
2363 : monnier 659 testl is preferable to andl.
2364 : leunga 585
2365 :     7. RA (x86 only)
2366 :    
2367 :     I've improved the spill propagation algorithm, using an approximation
2368 :     of maximal weighted independent sets. This seems to be necessary to
2369 :     alleviate the negative effect in light of the slow down in (1).
2370 :    
2371 :     I'll write down the algorithm one of these days.
2372 :    
2373 :     8. MLRiscGen: frequencies
2374 :    
2375 :     I've added an annotation that states that all call gc blocks have zero
2376 :     execution frequencies. This improves register allocation on the x86.
2377 :    
2378 :     BENCHMARKS
2379 :     ==========
2380 :    
2381 :     I've only perform the comparison on 110.25.
2382 :    
2383 :     The platforms are:
2384 :    
2385 :     HPPA A four processor HP machine (E9000) with 5G of memory.
2386 :     X86 A 300Hhz Pentium II with 128M of memory, and
2387 :     SPARC An Ultra sparc 2 with 512M of memory.
2388 :    
2389 :     I used the following parameters for the SML benchmarks:
2390 :    
2391 :     @SMLalloc
2392 :     HPPA 256k
2393 :     SPARC 512k
2394 :     X86 256k
2395 :    
2396 :     COMPILATION TIME
2397 :     ----------------
2398 :     Here are the numbers comparing the compilation times of the compilers.
2399 :     I've only compared 110.25 compiling the new sources versus
2400 :     a fixpoint version of the new compiler compiling the same.
2401 :    
2402 :     110.25 New
2403 :     Total Time in RA Spill+Reload Total Time In RA Spill+Reload
2404 :     HPPA 627s 116s 2684+3584 599s 95s 1003+1879
2405 :     SPARC 892s 173s 2891+3870 708s 116s 1004+1880
2406 :     X86 999s 315s 94006+130691 987s 296s 108877+141957
2407 :    
2408 :     110.25 New
2409 :     Code Size Code Size
2410 :     HPPA 8596736 8561421
2411 :     SPARC 8974299 8785143
2412 :     X86 9029180 8716783
2413 :    
2414 :     So in summary, things are at least as good as before. Dramatic
2415 :     reduction in compilation is obtained on the Sparc; I can't explain it,
2416 :     but it is reproducible. Perhaps someone should try to reproduce this
2417 :     on their own machines.
2418 :    
2419 :     SML BENCHMARKS
2420 :     --------------
2421 :    
2422 :     On the average, all benchmarks perform at least as well as before.
2423 :    
2424 :     HPPA Compilation Time Spill+Reload Run Time
2425 :     110.25 New 110.25 New 110.25 New
2426 :    
2427 :     barnesHut 3.158 3.015 4.75% 1+1 0+0 2.980 2.922 2.00%
2428 :     boyer 6.152 5.708 7.77% 0+0 0+0 0.218 0.213 2.34%
2429 :     count-graphs 1.168 1.120 4.32% 0+0 0+0 22.705 23.073 -1.60%
2430 :     fft 0.877 0.792 10.74% 1+3 1+3 0.602 0.587 2.56%
2431 :     knuthBendix 3.180 2.857 11.32% 0+0 0+0 0.675 0.662 2.02%
2432 :     lexgen 6.190 5.290 17.01% 0+0 0+0 0.913 0.788 15.86%
2433 :     life 0.803 0.703 14.22% 25+25 0+0 0.153 0.140 9.52%
2434 :     logic 2.048 2.007 2.08% 6+6 1+1 4.133 4.008 3.12%
2435 :     mandelbrot 0.077 0.080 -4.17% 0+0 0+0 0.765 0.712 7.49%
2436 :     mlyacc 22.932 20.937 9.53% 154+181 32+57 0.468 0.430 8.91%
2437 :     nucleic 5.183 5.060 2.44% 2+2 0+0 0.125 0.120 4.17%
2438 :     ratio-regions 3.357 3.142 6.84% 0+0 0+0 116.225 113.173 2.70%
2439 :     ray 1.283 1.290 -0.52% 0+0 0+0 2.887 2.855 1.11%
2440 :     simple 6.307 6.032 4.56% 28+30 5+7 3.705 3.658 1.28%
2441 :     tsp 0.888 0.862 3.09% 0+0 0+0 7.040 6.893 2.13%
2442 :     vliw 24.378 23.455 3.94% 106+127 25+45 2.758 2.707 1.91%
2443 :     --------------------------------------------------------------------------
2444 :     Average 6.12% 4.09%
2445 :    
2446 :     SPARC Compilation Time Spill+Reload Run Time
2447 :     110.25 New 110.25 New 110.25 New
2448 :    
2449 :     barnesHut 3.778 3.592 5.20% 2+2 0+0 3.648 3.453 5.65%
2450 :     boyer 6.632 6.110 8.54% 0+0 0+0 0.258 0.242 6.90%
2451 :     count-graphs 1.435 1.325 8.30% 0+0 0+0 33.672 34.737 -3.07%
2452 :     fft 0.980 0.940 4.26% 3+9 2+6 0.838 0.827 1.41%
2453 :     knuthBendix 3.590 3.138 14.39% 0+0 0+0 0.962 0.967 -0.52%
2454 :     lexgen 6.593 6.072 8.59% 1+1 0+0 1.077 1.078 -0.15%
2455 :     life 0.972 0.868 11.90% 26+26 0+0 0.143 0.140 2.38%
2456 :     logic 2.525 2.387 5.80% 7+7 1+1 5.625 5.158 9.05%
2457 :     mandelbrot 0.090 0.093 -3.57% 0+0 0+0 0.855 0.728 17.39%
2458 :     mlyacc 26.732 23.827 12.19% 162+189 32+57 0.550 0.560 -1.79%
2459 :     nucleic 6.233 6.197 0.59% 3+3 0+0 0.163 0.173 -5.77%
2460 :     ratio-regions 3.780 3.507 7.79% 0+0 0+0 133.993 131.035 2.26%
2461 :     ray 1.595 1.550 2.90% 1+1 0+0 3.440 3.418 0.63%
2462 :     simple 6.972 6.487 7.48% 29+32 5+7 3.523 3.525 -0.05%
2463 :     tsp 1.115 1.063 4.86% 0+0 0+0 7.393 7.265 1.77%
2464 :     vliw 27.765 24.818 11.87% 110+135 25+45 2.265 2.135 6.09%
2465 :     ----------------------------------------------------------------------------
2466 :     Average 6.94% 2.64%
2467 :    
2468 :     X86 Compilation Time Spill+Reload Run Time
2469 :     110.25 New 110.25 New 110.25 New
2470 :    
2471 :     barnesHut 5.530 5.420 2.03% 593+893 597+915 3.532 3.440 2.66%
2472 :     boyer 8.768 7.747 13.19% 493+199 301+289 0.327 0.297 10.11%
2473 :     count-graphs 2.040 2.010 1.49% 298+394 315+457 26.578 28.660 -7.26%
2474 :     fft 1.327 1.302 1.92% 112+209 115+210 1.055 0.962 9.71%
2475 :     knuthBendix 5.218 5.475 -4.69% 451+598 510+650 0.928 0.932 -0.36%
2476 :     lexgen 9.970 9.623 3.60% 1014+841 1157+885 0.947 0.928 1.97%
2477 :     life 1.183 1.183 0.00% 162+182 145+148 0.127 0.103 22.58%
2478 :     logic 3.285 3.512 -6.45% 514+684 591+836 5.682 5.577 1.88%
2479 :     mandelbrot 0.147 0.143 2.33% 38+41 33+54 0.703 0.690 1.93%
2480 :     mlyacc 35.457 32.763 8.22% 3496+4564 3611+4860 0.552 0.550 0.30%
2481 :     nucleic 7.100 6.888 3.07% 239+168 201+158 0.175 0.173 0.96%
2482 :     ratio-regions 6.388 6.843 -6.65% 1182+257 981+300 120.142 120.345 -0.17%
2483 :     ray 2.332 2.338 -0.29% 346+398 402+494 3.593 3.540 1.51%
2484 :     simple 9.912 9.903 0.08% 1475+941 1579+1168 3.057 3.178 -3.83%
2485 :     tsp 1.623 1.532 5.98% 266+200 250+211 8.045 7.878 2.12%
2486 :     vliw 33.947 35.470 -4.29% 2629+2774 2877+3171 2.072 1.890 9.61%
2487 :     ----------------------------------------------------------------------------
2488 :     Average 1.22% 3.36%
2489 :    
2490 :     ----------------------------------------------------------------------
2491 :     Name: Allen Leung
2492 : leunga 583 Date: 2000/03/23 16:25:00
2493 :     Tag: leunga-20000323-fix_x86_alpha
2494 :     Description:
2495 :    
2496 :     1. X86 fixes/changes
2497 :    
2498 :     a. The old code generated for SETcc was completely wrong.
2499 :     The Intel optimization guide is VERY misleading.
2500 :    
2501 :     2. ALPHA fixes/changes
2502 :    
2503 :     a. Added the instructions LDBU, LDWU, STB, STW as per Fermin's suggestion.
2504 :     b. Added a new mode byteWordLoadStores to the functor parameter to Alpha()
2505 :     c. Added reassociation code for address computation.
2506 :    
2507 :     ----------------------------------------------------------------------
2508 :     Name: Allen Leung
2509 : leunga 580 Date: 2000/03/22 01:23:00
2510 :     Tag: leunga-20000322-fix_x86_hppa_ra
2511 :     Description:
2512 :    
2513 :     1. X86 fixes/changes
2514 :    
2515 :     a. x86Rewrite bug with MUL3 (found by Lal)
2516 :     b. Added the instructions FSTS, FSTL
2517 :    
2518 :     2. PA-RISC fixes/changes
2519 :    
2520 :     a. B label should not be a delay slot candidate! Why did this work?
2521 :     b. ADDT(32, REG(32, r), LI n) now generates one instruction instead of two,
2522 :     as it should be.
2523 :     c. The assembly syntax for fstds and fstdd was wrong.
2524 :     d. Added the composite instruction COMICLR/LDO, which is the immediate
2525 :     operand variant of COMCLR/LDO.
2526 :    
2527 :     3. Generic MLRISC
2528 :    
2529 :     a. shuffle.sml rewritten to be slightly more efficient
2530 :     b. DIV bug in mltree-simplify fixed (found by Fermin)
2531 :    
2532 :     4. Register Allocator
2533 :    
2534 :     a. I now release the interference graph earlier during spilling.
2535 :     May improve memory usage.
2536 :    
2537 :     ----------------------------------------------------------------------
2538 : blume 577 Name: Matthias Blume
2539 : blume 578 Date: 2000/03/14 14:15:32
2540 :     Tag: blume_main_v110p26p1_2
2541 :     Description:
2542 :    
2543 :     1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
2544 :     additional argument called "template" which is an optional string that
2545 : monnier 659 specifies the layout of the tool command line. See the CM manual for
2546 : blume 578 explanation.
2547 :    
2548 : monnier 659 2. A special-purpose tool can be "registered" by simply dropping the
2549 : blume 578 corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
2550 :     directory where the .cm file lives that uses this tool. (The
2551 :     behavior/misfeature until now was to look for the tool description
2552 :     files in the current working directory.) As before, tool description
2553 :     files could also be anchored -- in which case they can live anywhere
2554 :     they like. Following the recent e-mail discussion, this change should
2555 :     make it easier to have special-purpose tools that are shipped together
2556 :     with the sources of the program that uses them.
2557 :    
2558 :     ----------------------------------------------------------------------
2559 :     Name: Matthias Blume
2560 : blume 577 Date: 2000/03/10 07:48:34
2561 :     Tag: blume_main_v110p26p1_1
2562 :     Description:
2563 :    
2564 :     I added a re-written version of Dave's fixpt script to src/system.
2565 :     Changes relative to the original version:
2566 :     - sh-ified (not everybody has ksh)
2567 :     - automatically figures out which architecture it runs on
2568 :     - uses ./makeml a bit more cleverly
2569 :     - never invokes ./installml (and, thus, does not clobber your
2570 :     good and working installation of sml in case something goes wrong)
2571 :     - accepts max iteration count using option "-iter <n>"
2572 :     - accepts a "base" name using option "-base <base>"
2573 :    
2574 :     It does not build any extraneous heap images but directly rebuilds
2575 :     bin- and boot-hierarchies using makeml's "-rebuild" switch. Finally,
2576 :     it can incorporate existing bin- and boot- hierarchies. For example,
2577 :     suppose the base is set to "sml" (which is the default). Then it
2578 :     successively builds
2579 :    
2580 :     sml.bin.<arch>-unix and sml.boot.<arch>-unix
2581 :     then sml1.bin.<arch>-unix and sml1.boot.<arch>-unix
2582 :     then sml2.bin.<arch>-unix and sml2.boot.<arch>-unix
2583 :     ...
2584 :     then sml<n>.bin.<arch>-unix and sml<n>.boot.<arch>-unix
2585 :    
2586 :     and so on. If any of these already exist, it will just use what's
2587 :     there. In particular, many people will have the initial set of bin
2588 :     and boot files around, so this saves time for at least one full
2589 :     rebuild. Having sets of the form <base><k>.{bin,boot}.<arch>-unix for
2590 :     <k>=1,2,... is normally not a good idea when invoking fixpt. However,
2591 :     they might be the result of an earlier partial run of fixpt (which
2592 : monnier 659 perhaps got accidentally killed). In this case, fixpt will quickly
2593 : blume 577 move through what exists before continuing where it left off earlier,
2594 :     and, thus, saves a lot of time.
2595 :    
2596 :     ----------------------------------------------------------------------
2597 : leunga 576 Name: Allen Leung
2598 :     Date: 00/03/10 02:20:00
2599 :     Tag: leunga-20000310-fix_x86_asm_ra
2600 :     Description:
2601 : dbm 570
2602 : leunga 576 More assembly output problems involving the indexed addressing mode
2603 :     on the x86 have been found and corrected. Thanks to Fermin Reig for the
2604 :     fix.
2605 :    
2606 :     The interface and implementation of the register allocator have been changed
2607 :     slightly to accommodate the possibility to skip the register allocation
2608 :     phases completely and go directly to memory allocation. This is needed
2609 :     for C-- use.
2610 :    
2611 : dbm 570 ----------------------------------------------------------------------
2612 : blume 572 Name: Matthias Blume
2613 : blume 575 Date: 00/03/09 10:23:53
2614 :     Tag: blume_main_v110p26p1_0
2615 :     Description:
2616 :    
2617 :     * Complete re-organization of library names. Many libraries have been
2618 :     consolidated so that they share the same path anchor. For example,
2619 :     all MLRISC-related libraries are anchored at MLRISC, most libraries that
2620 :     are SML/NJ-specific are under "smlnj". Notice that names like
2621 :     host-cmb.cm or host-compiler.cm no longer exist. See system/README
2622 :     for a complete description of the new naming scheme. Quick reference:
2623 :    
2624 :     host-cmb.cm -> smlnj/cmb.cm
2625 :     host-compiler.cm -> smlnj/compiler.cm
2626 :     full-cm.cm -> smlnj/cm.cm
2627 :     <arch>-<os>.cm -> smlnj/cmb/<arch>-<os>.cm
2628 :     <arch>-compiler.cm -> smlnj/compiler/<arch>.cm
2629 :    
2630 :     * Bug fixes in CM.
2631 :     - exceptions in user code are being passed through (i.e., reach top level)
2632 :     - more bugs in paranoia mode fixed
2633 :     - bug related to checking group owners fixed
2634 :    
2635 :     * New install.sh script that automagically fetches archive files:
2636 :     The new file config/srcarchiveurl must contain the URL of the
2637 :     (remote) directory that contains bin files (or other source archives).
2638 :     If install.sh does not find the archive locally, it tries to get
2639 :     it from that remote directory.
2640 :     This should simplify installation further: For machines that have
2641 :     access to the internet, just fetch <version>-config.tgz, unpack it,
2642 : monnier 659 edit config/targets, and go (run config/install.sh). The script will
2643 : blume 575 fetch everything else that it might need all by itself.
2644 :    
2645 :     For CVS users, this mechanism is not relevant for source archives, but
2646 :     it is convenient for getting new sets of binfiles.
2647 :    
2648 :     Archives should be tar files compressed with either gzip, compress, or
2649 :     bzip2. The script recognizes .tgz, .tar, tar.gz, tz, .tar.Z, and .tar.bz2.
2650 :    
2651 :     ----------------------------------------------------------------------
2652 :     Name: Matthias Blume
2653 : blume 572 Date: 2000/03/07 04:01:04
2654 :     Tag: blume_main_v110_26_2
2655 : dbm 570 Description:
2656 : blume 572 - size info in BOOTLIST
2657 :     * no fixed upper limits for number of bootfiles or length of
2658 :     bootfile names in runtime
2659 :     * falling back to old behavior if no BOOTLIST size info found
2660 :     - allocation size heuristics in .run-sml
2661 :     * tries to read cache size from /proc/cpuinfo (this is important for
2662 :     small-cache Celeron systems!)
2663 :     - install.sh robustified
2664 :     - CM manual updates
2665 :     - paranoid mode
2666 :     * no more CMB.deliver() (i.e., all done by CMB.make())
2667 :     * can re-use existing sml.boot.* files
2668 :     * init.cmi now treated as library
2669 :     * library stamps for consistency checks
2670 :     - sml.boot.<arch>-<os>/PIDMAP file
2671 :     * This file is read by the CM startup code. This is used to minimize
2672 :     the amount of dynamic state that needs to be stowed away for the
2673 :     purpose of sharing between interactive system and user code.
2674 :     - CM.Anchor.anchor instead of CM.Anchor.{set,cancel}
2675 :     * Upon request by Elsa. Anchors now controlled by get-set-pair
2676 :     like most other CM state variables.
2677 :     - Compiler.CMSA eliminated
2678 :     * No longer supported by CM anyway.
2679 :     - fixed bugs in pickler that kept biting Stefan
2680 :     * past refs to past refs (was caused by the possibility that
2681 :     ad-hoc sharing is more discriminating than hash-cons sharing)
2682 :     * integer overflow on LargeInt.minInt
2683 :     - ml-{lex,yacc} build scripts now use new mechanism
2684 :     for building standalone programs
2685 :     - fixed several gcc -Wall warnings that were caused by missing header
2686 :     files, missing initializations, etc., in runtime (not all warnings
2687 :     eliminated, though)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0