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

SCM Repository

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

Annotation of /sml/trunk/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1174 - (view) (download)

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