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

SCM Repository

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

Annotation of /sml/trunk/NOTES/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log


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

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

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