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

SCM Repository

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

Diff of /sml/trunk/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 660, Thu Jun 15 04:40:56 2000 UTC revision 984, Wed Nov 21 19:00:08 2001 UTC
# Line 11  Line 11 
11  Date:  Date:
12  Tag: <post-commit CVS tag>  Tag: <post-commit CVS tag>
13  Description:  Description:
14    
15    ----------------------------------------------------------------------
16    Name: Lal George
17    Date: 2001/11/21  13:56:18 EST
18    Tag: george-2001121-pseudo-ops
19    Description:
20    
21      Implemented a complete redesign of MLRISC pseudo-ops. Now there
22      ought to never be any question of incompatabilities with
23      pseudo-op syntax expected by host assemblers.
24    
25      For now, only modules supporting GAS syntax are implemented
26      but more should follow, such as MASM, and vendor assembler
27      syntax, e.g. IBM as, Sun as, etc.
28    
29    ----------------------------------------------------------------------
30    Name: Matthias Blume
31    Date: 2001/11/14 11:52:00 EST
32    Tag: blume-20011114-srcname
33    Description:
34    
35    1. Routed the name of the current source file to mlriscgen where it
36       should be directly emitted into the code object.  (This last part
37       is yet to be done.)
38    
39    2. Some cleanup of the pgraph code to make it match the proposal that
40       I put out the other day.  (The proposal notwithstanding, things are
41       still in flux here.)
42    
43    ----------------------------------------------------------------------
44    Name: Lal George
45    Date: 2001/11/14 09:44:04 EST
46    Tag:
47    Description:
48    
49      Fix for a backpatching bug reported by Allen.
50    
51      Because the boundary between short and long span-dependent
52      instructions is +/- 128, there are an astounding number of
53      span-dependent instructions whose size is over estimated.
54    
55      Allen came up with the idea of letting the size of span
56      dependent instructions be non-monotonic, for a maxIter
57      number of times, after which the size must be monotonically
58      increasing.
59    
60      This table shows the number of span-dependent instructions
61      whose size was over-estimated as a function of maxIter, for the
62      file Parse/parse/ml.grm.sml:
63    
64         maxIter            # of instructions:
65            10                      687
66            20                      438
67            30                      198
68            40                        0
69    
70      In compiling the compiler, there is no significant difference in
71      compilation speed between maxIter=10 and maxIter=40. Actually,
72      my measurements showed that maxIter=40 was a tad faster than
73      maxIter=10! Also 96% of the  files in the compiler reach a fix
74      point within 13 iterations, so fixing maxIter at 40, while high,
75      is okay.
76    
77    ----------------------------------------------------------------------
78    Name: Matthias Blume
79    Date: 2001/10/31 15:25:00 EST
80    Tag: blume-20011031-pgraph
81    Description:
82    
83    CKIT:
84    * Changed the "Function" constructor of type Ast.ctype to carry optional
85      argument identifiers.
86    * Changed the return type of TypeUtil.getFunction accordingly.
87    * Type equality ignores the argument names.
88    * TypeUtil.composite tries to preserve argument names but gives up quickly
89      if there is a mismatch.
90    
91    installation script:
92    * attempts to use "curl" if available (unless "wget" is available as well)
93    
94    CM:
95    * has an experimental implementation of "portable graphs" which I will
96      soon propose as an implementation-independent library format
97    * there are also new libraries $/pgraph.cm and $/pgraph-util.cm
98    
99    NLFFI-LIB:
100    * some cleanup (all cosmetic)
101    
102    NLFFIGEN:
103    * temporarily disabled the mechanism that suppresses ML output for
104      C definitions whose identifiers start with an underscore character
105    * generate val bindings for enum constants
106    * user can request that only one style (light or heavy) is being used;
107      default is to use both (command-line arguments: -heavy and -light)
108    * fixed bug in handling of function types involving incomplete pointers
109    * generate ML entry points that take record arguments (i.e., using
110      named arguments) for C functions that have a prototype with named
111      arguments
112      (see changes to CKIT)
113    
114    ----------------------------------------------------------------------
115    Name: Allen Leung
116    Date: 2001/10/27 20:34:00 EDT
117    Tag: leunga-20011027-x86-fast-fp-call
118    Description:
119    
120       Fixed the bug described in blume-20010920-slowfp.
121    
122       The fix involves
123          1. generating FCOPYs in FSTP in ia32-svid
124          2. marking a CALL with the appropriate annotation
125    
126    ----------------------------------------------------------------------
127    Name: Matthias Blume
128    Date: 2001/10/16 11:32:00 EDT
129    Tag: blume-20011016-netbsd
130    Description:
131    
132    Underscore patch from Chris Richards (fixing problem with compiling
133    runtime system under recent NetBSD).
134    
135    ----------------------------------------------------------------------
136    Name: Allen Leung
137    Date: 2001/10/12 17:18:32 EDT 2001
138    Tag: leung-20011012-x86-printflowgraph
139    Description:
140    
141    X86RA now uses a valid (instead of dummy) PrintFlowgraph module.
142    
143    ----------------------------------------------------------------------
144    Name: Lal George
145    Date: 2001/10/11 23:51:34 EDT
146    Tag: george-20011011-too-many-instrs
147    Description:
148    
149    The representation of a program point never expected to see more
150    than 65536 instructions in a basic block!
151    
152    ----------------------------------------------------------------------
153    Name: Lal George
154    Date: 2001/10/09 09:41:37 EDT
155    Tag: george-20011008-mlrisc-labels
156    Description:
157    
158    Changed the machine description files to support printing of
159    local and global labels in assembly code, based on host assembler
160    conventions.
161    
162    ----------------------------------------------------------------------
163    Name: Matthias Blume
164    Date: 2001/09/25 15:25:00 EDT
165    Tag: blume-20010925-exninfo
166    Description:
167    
168    I provided a non-hook implementation of exnName (at the toplevel) and
169    made the "dummy" implementation of exnMessage (at the toplevel) more
170    useful: if nothing gets "hooked in", then at least you are going to
171    see the exception name and a message indicating why you don't see more.
172    
173    [For the time being, programs that need exnMessage and want to use
174    ml-build should either use General.exnMessage (strongly recommended) or
175    refer to structure General at some other point so that CM sees a
176    static dependency.]
177    
178    [Similar remarks go for "print" and "use":  If you want to use their
179    functionality in stand-alone programs generated by ml-build, then use
180    TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).]
181    
182    ----------------------------------------------------------------------
183    Name: Matthias Blume
184    Date: 2001/09/20 17:28:00 EDT
185    Tag: blume-20010920-slowfp
186    Description:
187    
188    Allen says that x86-fast-fp is not safe yet, so I turned it off again...
189    
190    ----------------------------------------------------------------------
191    Name: Matthias Blume
192    Date: 2001/09/20 17:20:00 EDT
193    Tag: blume-20010920-canonicalpaths
194    Description:
195    
196    0. Updated the BOOT file (something that I forgot to do earlier).
197    
198    1. Small internal change to CM so that it avoids "/../" in filenames
199       as much as possible (but only where it is safe).
200    
201    2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so
202       that arguments that contain delimiters are passed through correctly.
203       This change also means that all "special" arguments of the form
204       @SMLxxx... must come first.
205    
206    3. Changed install script to put relative anchor names for tool commands
207       into pathconfig.
208    
209    ----------------------------------------------------------------------
210    Name: Matthias Blume
211    >>>>>>> 1.169
212    Date: 2001/09/18 15:35:00 EDT
213    Tag: blume-20010918-readme11036
214    Description:
215    
216    Added README files.
217    
218    ----------------------------------------------------------------------
219    Name: Matthias Blume
220    Date: 2001/09/18 11:45:00 EDT
221    Tag: Release_110_36 (retag)
222    Description:
223    
224    Fixed mistake in config/preloads. Retagged as 110.36.
225    
226    ----------------------------------------------------------------------
227    Name: Matthias Blume
228    Date: 2001/09/18 09:40:00 EDT
229    Tag: Release_110_36_orig (tag changed)
230    Description:
231    
232    New version (110.36).  New bootfiles.
233    
234    ----------------------------------------------------------------------
235    Name: Matthias Blume
236    Date: 2001/09/14 16:15:00 EDT
237    Tag: blume-20010914-x86fastfp
238    Description:
239    
240    John committed some changes that Allen made, in particular a (hopefully)
241    correctly working version of the x86-fp module.
242    
243    I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp"
244    flag to "true".  Everything seems to compile to a fixpoint ok, and
245    "mandelbrot" speeds up by about 15%.
246    
247    ----------------------------------------------------------------------
248    Name: Matthias Blume
249    Date: 2001/09/13 11:20:00 EDT
250    Tag: blume-20010913-minimal
251    Description:
252    
253    1. Stefan Monnier's patch to fix a miscompilation problem that
254       was brought to light by John Reppy's work on Moby.
255    
256    2. Implemented a minimal "structure Compiler" that contains just
257       "version" and "architecture".  The minimal version will be
258       available when the full version is not.  This is for backward-
259       compatibility with code that wants to test Compiler.version.
260    
261    ----------------------------------------------------------------------
262    Name: Matthias Blume
263    Date: 2001/08/28 14:03:00 EDT
264    Tag: blume-20010828-ml-lex
265    Description:
266    
267    Fix for bug 1581, received from Neophytos Michael.
268    
269    ----------------------------------------------------------------------
270    Name: Matthias Blume
271    Date: 2001/08/27 11:20:00 EDT
272    Tag: blume-20010827-readme11035
273    Description:
274    
275    Fleshed out the README file for 110.35.
276    
277    ----------------------------------------------------------------------
278    Name: Matthias Blume
279    Date: 2001/08/24 17:10:00 EDT
280    Tag: Release_110_35
281    Description:
282    
283    New version number (110.35).  New bootfiles.
284    
285    ----------------------------------------------------------------------
286    Name: Lal George
287    Date: 2001/08/24 13:47:18 EDT 2001
288    Tag: george-20010824-MLRISC-graphs
289    Description:
290    
291     removed clusters from MLRISC completely and replaced with graphs.
292    
293    ----------------------------------------------------------------------
294    Name: Matthias Blume
295    Date: 2001/08/23 17:50:00 EDT
296    Tag: blume-20010823-toplevel
297    Description:
298    
299    - some reorganization of the code that implements various kinds of
300      environments in the compiler (static, dynamic, symbolic, combined)
301    - re-implemented the EnvRef module so that evalStream works properly
302      (if the stream contains references to "use", "CM.make", etc.)
303    - cleaned up evalloop.sml and interact.sml (but they need more cleaning)
304    
305    ----------------------------------------------------------------------
306    Name: Matthias Blume
307    Date: 2001/08/20 15:50 EDT
308    Tag: blume20010820-slipup
309    Description:
310    
311    I forgot to commit a few files.  Here they are...
312    
313    ----------------------------------------------------------------------
314    Name: Matthias Blume
315    Date: 2001/08/20 15:35:00 EDT
316    Tag: blume-20010820-debugprof
317    Description:
318    
319    !!!! NEW BOOTFILES !!!!
320    
321    This is another round of reorganizing the compiler sources.  This
322    time the main goal was to factor out all the "instrumentation"
323    passes (for profiling and backtracing) into their own library.
324    The difficulty was to do it in such a way that it does not depend
325    on elaborate.cm but only on elabdata.cm.
326    
327    Therefore there have been further changes to both elaborate.cm and
328    elabdata.cm -- more "generic" things have been moved from the former
329    to the latter.  As a result, I was forced to split the assignment
330    of numbers indicating "primtyc"s into two portions: SML-generic and
331    SML/NJ-specific.  Since it would have been awkward to maintain,
332    I bit the bullet and actually _changed_ the mapping between these
333    numbers and primtycs.  The bottom line of this is that you need
334    a new set of bin- and bootfiles.
335    
336    I have built new bootfiles for all architectures, so doing a fresh
337    checkout and config/install.sh should be all you need.
338    
339    The newly created library's name is
340    
341        $smlnj/viscomp/debugprof.cm
342    
343    and its sources live under
344    
345        src/compiler/DebugProf
346    
347    ----------------------------------------------------------------------
348    Name: Matthias Blume
349    Date: 2001/08/15 17:15:00 EDT
350    Tag: blume-20010815-compreorg
351    Description:
352    
353    This is a first cut at reorganizing the CM libraries that make up the
354    core of the compiler.  The idea is to separate out pieces that could
355    be used independently by tools, e.g., the parser, the typechecker, etc.
356    
357    The current status is a step in this direction, but it is not quite
358    satisfactory yet.  Expect more changes in the future.
359    
360    Here is the current (new) organization...
361    
362        What used to be $smlnj/viscomp/core.cm is now divided into
363        six CM libraries:
364    
365             $smlnj/viscomp/basics.cm
366                           /parser.cm
367                           /elabdata.cm
368                           /elaborate.cm
369                           /execute.cm
370                           /core.cm
371    
372        The CM files for these libraries live under src/system/smlnj/viscomp.
373        All these libraries are proxy libraries that contain precisely
374        one CM library component.  Here are the locations of the components
375        (all within the src/compiler tree):
376    
377             Basics/basics.cm
378             Parse/parser.cm
379             ElabData/elabdata.cm
380             Elaborator/elaborate.cm
381             Execution/execute.cm
382             core.cm
383    
384         [This organization is the same that has been used already
385         for a while for the architecture-specific parts of the visible
386         compiler and for the old version of core.cm.]
387    
388         As you will notice, many source files have been moved from their
389         respective original locations to a new home in one of the above
390         subtrees.
391    
392         The division of labor between the new libraries is the following:
393    
394             basics.cm:
395                - Simple, basic definitions that pertain to many (or all) of
396                  the other libraries.
397             parser.cm:
398                - The SML parser, producing output of type Ast.dec.
399                - The type family for Ast is also defined and exported here.
400             elabdata.cm:
401                - The datatypes that describe input and output of the elaborator.
402                  This includes types, absyn, and static environments.
403             elaborator.cm:
404                - The SML/NJ type checker and elaborator.
405                  This maps an Ast.dec (with a given static environment) to
406                  an Absyn.dec (with a new static environment).
407                - This libraries implements certain modules that used to be
408                  structures as functors (to remove dependencies on FLINT).
409             execute.cm:
410                - Everything having to do with executing binary code objects.
411                - Dynamic environments.
412             core.cm:
413                - SML/NJ-specific instantiations of the elaborator and MLRISC.
414                - Top-level modules.
415                - FLINT (this should eventually become its own library)
416    
417    Notes:
418    
419    I am not 100% happy with the way I separated the elaborator (and its
420    data structures) from FLINT.  Two instances of the same problem:
421    
422        1. Data structures contain certain fields that carry FLINT-specific
423           information.  I hacked around this using exn and the property list
424           module from smlnj-lib.  But the fact that there are middle-end
425           specific fields around at all is a bit annoying.
426    
427        2. The elaborator calculates certain FLINT-related information.  I tried
428           to make this as abstract as I could using functorization, but, again,
429           the fact that the elaborator has to perform calculations on behalf
430           of the middle-end at all is not nice.
431    
432        3. Having to used exn and property lists is unfortunate because it
433           weakens type checking.  The other alternative (parameterizing
434           nearly *everything*) is not appealing, though.
435    
436    I removed the "rebinding =" warning hack because due to the new organization
437    it was awkward to maintain it.  As a result, the compiler now issues some of
438    these warnings when compiling init.cmi during bootstrap compilation. On
439    the plus side, you also get a warning when you do, for example:
440       val op = = Int32.+
441    which was not the case up to now.
442    
443    I placed "assign" and "deref" into the _Core structure so that the
444    code that deals with the "lazy" keyword can find them there.  This
445    removes the need for having access to the primitive environment
446    during elaboration.
447    
448    ----------------------------------------------------------------------
449    Name: Matthias Blume
450    Date: 2001/08/13
451    Tag: blume-20010813-closures
452    Description:
453    
454    This fix was sent to us by Zhong Shao.  It is supposed to improve the
455    performance of certain loops by avoiding needless closure allocation.
456    
457    ----------------------------------------------------------------------
458    Name: Lal George
459    Date: 2001/07/31 10:03:23 EDT 2001
460    Tag: george-20010731-x86-fmalloc
461    Description: Fixed bug in x86 calls
462    
463        There was a bug where call instructions would mysteriously
464        vanish. The call instruction had to be one that returned
465        a floating point value.
466    
467    ----------------------------------------------------------------------
468    Name: Lal George
469    Date: 2001/07/19 16:36:29 EDT 2001
470    Tag: george-20010719-simple-cells
471    Description:
472    
473    I have dramatically simplified the interface for CELLS in MLRISC.
474    
475    In summary, the cells interface is broken up into three parts:
476    
477      1. CellsBasis : CELLS_BASIS
478    
479            CellsBasis is a top level structure and common for all
480            architectures.  it contains the definitions of basic datatypes
481            and utility  functions over these types.
482    
483      2. functor Cells() : CELLS
484    
485            Cells generates an interface for CELLS that incorporates the
486            specific resources on the target architecture, such as the
487            presence of special register classes, their number and size,
488            and various useful substructures.
489    
490      3. <ARCH>CELLS
491    
492            e.g. SparcCells: SPARCCELLS
493    
494            <ARCH>CELLS usually contains additional bindings for special
495            registers  on the architecture, such as:
496    
497                    val r0 : cell           (* register zero *)
498                    val y : cell            (* Y register *)
499                    val psr : cell          (* processor status register *)
500                    ...
501    
502            The structure returned by applying the Cells functor is opened
503            in this interface.
504    
505    The main implication of all this is that the datatypes for cells is
506    split between CellsBasis and CELLS -- a fairly simple change for user
507    code.
508    
509    In the old scheme the CELLS interface had a definitional binding of
510    the form:
511    
512            signature CELLS = sig
513    
514               structure CellsBasis = CellsBasis
515    
516               ...
517    
518            end
519    
520    With all the sharing constraints that goes on in MLRISC, this old
521    design  quickly leads to errors such as:
522    
523            "structure definition spec inside of sharing ... "
524    
525    
526    and appears to require an unacceptable amount of sharing and where
527    constraint hackery.
528    
529    I think this error message (the interaction of definitional specs and
530    sharing) requires more explanation on our web page.
531    
532    ----------------------------------------------------------------------
533    Name: Matthias Blume
534    Date: 2001/07/19 15:00:00 EDT
535    Tag: blume-20010719-libreorg
536    Description:
537    
538    This update puts together a fairly extensive but straightforward change
539    to the way the libraries that implement the interactive system are
540    organized:
541    
542       The biggest change is the elimination of structure Compiler.  As a
543       replacement for this structure, there is now a CM library
544       (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm)
545       that exports all the substructures of the original structure Compiler
546       directly.  So instead of saying Compiler.Foo.bar one now simply
547       says Foo.bar.  (The CM libraries actually export a collection of
548       structures that is richer than the collection of substructures of
549       structure Compiler.)
550    
551       To make the transition smooth, there is a separate library called
552       $smlnj/compiler/compiler.cm which puts together and exports the
553       original structure Compiler (or at least something very close to it).
554    
555       There are five members of the original structure Compiler
556       that are not exported directly but which instead became members
557       of a new structure Backend (described by signature BACKEND).  These are:
558       structure Profile (: PROFILE), structure Compile (: COMPILE), structure
559       Interact (: INTERACT), structure Machine (: MACHINE), and val
560       architecture (: string).
561    
562       Structure Compiler.Version has become structure CompilerVersion.
563    
564       Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided
565       by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc,
566       or x86, respectively.
567       Each of these exports the same frontend structures that
568       $smlnj/compiler.cm exports.  But they do not have a structure Backend
569       and instead export some structure <Arch>Backend where <Arch> is Alpha32,
570       Hppa, PPC, Sparc, or X86, respectively.
571    
572       Library $smlnj/compiler/all.cm exports the union of the exports of
573       $smlnj/compiler/<arch>.cm
574    
575       There are no structures <Arch>Compiler anymore, use
576       $smlnj/compiler/<arch>.cm instead.
577    
578       Library host-compiler-0.cm is gone.  Instead, the internal library
579       that instantiates CM is now called cm0.cm.  Selection of the host
580       compiler (backend) is no longer done here but. (Responsibility for it
581       now lies with $smlnj/compiler/current.cm.  This seems to be more
582       logical.)
583    
584       Many individual files have been moved or renamed.  Some files have
585       been split into multiple files, and some "dead" files have been deleted.
586    
587    Aside from these changes to library organization, there are also changes
588    to the way the code itself is organized:
589    
590       Structure Binfile has been re-implemented in such a way that it no
591       longer needs any knowledge of the compiler.  It exclusively deals
592       with the details of binfile layout.  It no longer invokes the
593       compiler (for the purpose of creating new prospective binfile
594       content), and it no longer has any knowledge of how to interpret
595       pickles.
596    
597       Structure Compile (: COMPILE) has been stripped down to the bare
598       essentials of compilation.  It no longer deals with linking/execution.
599       The interface has been cleaned up considerably.
600    
601       Utility routines for dealing with linking and execution have been
602       moved into their own substructures.
603    
604       (The ultimate goal of these changes is to provide a light-weight
605       binfile loader/linker (at least for, e.g., stable libraries) that
606       does not require CM or the compiler to be present.)
607    
608    CM documentation has been updated to reflect the changes to library
609    organization.
610    
611    ----------------------------------------------------------------------
612    Name: Matthias Blume
613    Date: 2001/07/10 17:30:00 EDT
614    Tag: Release_110_34
615    Description:
616    
617    Minor tweak to 110.34 (re-tagged):
618    
619      - README.html file added to CVS repository
620      - runtime compiles properly under FreeBSD 3.X and 4.X
621    
622    ----------------------------------------------------------------------
623    Name: Matthias Blume
624    Date: 2001/07/10 17:30:00 EDT
625    Tag: Release_110_34
626    Description:
627    
628    New version number (110.34). New bootfiles.
629    
630    ----------------------------------------------------------------------
631    Name: Matthias Blume
632    Date: 2001/07/09 16:00:00 EDT
633    Tag: blume-20010709-more-varargs
634    Description:
635    
636    I changed the handling of varargs in ml-nlffigen again:
637    The ellipsis ... will now simply be ignored (with an accompanying warning).
638    
639    The immediate effect is that you can actually call a varargs function
640    from ML -- but you can't actually supply any arguments beyond the ones
641    specified explicitly.  (For example, you can call printf with its format
642    string, but you cannot pass additional arguments.)
643    
644    This behavior is only marginally more useful than the one before, but
645    it has the advantage that a function or, more importantly, a function
646    type never gets dropped on the floor, thus avoiding follow-up problems with
647    other types that refer to the offending one.
648    
649    ----------------------------------------------------------------------
650    Name: Matthias Blume
651    Date: 2001/07/09 11:25:00 EDT
652    Tag: blume-20010709-varargs
653    Description:
654    
655    1. ckit-lib.cm now exports structure Error
656    2. ml-nlffigen reports occurences of "..." (i.e., varargs function types)
657       with a warning accompanied by a source location.  Moreover, it
658       merely skips the offending function or type and proceeds with the
659       rest of its work.u  As a result, one can safely feed C code containing
660       "..." to ml-nlffigen.
661    3. There are some internal improvements to CM, providing slightly
662       more general string substitutions in the tools subsystem.
663    
664    ----------------------------------------------------------------------
665    Name: Matthias Blume
666    Date: 2001/06/27 15:10:00 EDT
667    Tag: blume-20010627-concur
668    Description:
669    
670    Fixed a small bug in CM's handling of parallel compilation.
671    (You could observe the bug by Control-C-interrupting an ordinary
672    CMB.make or CM.stabilize and then attaching some compile servers.
673    The result was that all of a sudden the previously interrupted
674    compilation would continue on its own.  This was because of
675    an over-optimization: CM did not bother to clean out certain queues
676    when no servers were attached "anyway", resulting in the contents
677    of these queues to grab control when new servers did get attached.)
678    
679    There is also another minor update to the CM manual.
680    
681    ----------------------------------------------------------------------
682    Name: Matthias Blume
683    Date: 2001/06/26 16:15:00 EDT
684    Tag: blume-20010626-cmdoc
685    Description:
686    
687    Minor typo fixed in CM manual (syntax diagram for libraries).
688    
689    ----------------------------------------------------------------------
690    Name: Matthias Blume
691    Date: 2001/06/25 22:55:00 EDT
692    Tag: blume-20010625-x86pc
693    Description:
694    
695    Fixed a nasty bug in the X86 assembly code that caused signal
696    handlers to fail (crash) randomly.
697    
698    ----------------------------------------------------------------------
699    Name: Matthias Blume
700    Date: 2001/06/25 12:05:00 EDT
701    Tag: blume-20010625-nlffigen
702    Description:
703    
704    This update fixes a number of minor bugs in ml-nlffigen as reported by
705    Nick Carter <nbc@andrew.cmu.edu>.
706    
707      1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted.
708      2. Default names for generated files are now derived from the name of
709         the C file *without its directory*.  In particular, this causes generated
710         files to be placed locally even if the C file is in some system directory.
711      3. Default names for generated signatures and structures are also derived
712         from the C file name without its directory.  This avoids silly things
713         like "structure GL/GL".
714         (Other silly names are still possible because ml-nlffigen does not do
715          a thorough check of whether generated names are legal ML identifiers.
716          When in doubt, use command line arguments to force particular names.)
717    
718    ----------------------------------------------------------------------
719    Name: Matthias Blume
720    Date: 2001/06/21 12:25:00 EDT
721    Tag: blume-20010621-eXene
722    Description:
723    
724    eXene now compiles and (sort of) works again.
725    
726    The library name (for version > 110.33) is $/eXene.cm.
727    
728    I also added an new example in src/eXene/examples/nbody.  See the
729    README file there for details.
730    
731    ----------------------------------------------------------------------
732    Name: Matthias Blume
733    Date: 2001/06/20 16:40:00 EDT
734    Tag: blume-20010620-cml
735    Description:
736    
737    CML now compiles and works again.
738    
739    Libraries (for version > 110.33):
740    
741      $cml/cml.cm            Main CML library.
742      $cml/basis.cm          CML's version of $/basis.cm.
743      $cml/cml-internal.cm   Internal helper library.
744      $cml/core-cml.cm       Internal helper library.
745      $cml-lib/trace-cml.cm  Tracing facility.
746      $cml-lib/smlnj-lib.cm  CML's version of $/smlnj-lib.cm
747    
748    The installer (config/install.sh) has been taught how to properly
749    install this stuff.
750    
751    ----------------------------------------------------------------------
752    Name: Matthias Blume
753    Date: 2001/06/19 17:55:00 EDT
754    Tag: blume-20010619-instantiate
755    Description:
756    
757    This un-breaks the fix for bug 1432.
758    (The bug was originally fixed in 110.9 but I broke it again some
759    time after that.)
760    
761    ----------------------------------------------------------------------
762    Name: Matthias Blume
763    Date: 2001/06/19 17:25:00 EDT
764    Tag: blume-20010619-signals
765    Description:
766    
767    This should (hopefully) fix the long-standing signal handling bug.
768    (The runtime system was constructing a continuation record with an
769    incorrect descriptor which would cause the GC to drop data on the floor...)
770    
771    ----------------------------------------------------------------------
772    Name: Matthias Blume
773    Date: 2001/06/15 15:05:00 EDT
774    Tag: blume-20010615-moresparc
775    Description:
776    
777    Here is a short late-hour update related to Sparc c-calls:
778    
779     -- made handling of double-word arguments a bit smarter
780    
781     -- instruction selection phase tries to collapse certain clumsily
782        constructed ML-Trees; typical example:
783    
784            ADD(ty,ADD(_,e,LI d1),LI d2)  ->  ADD(ty,e,LI(d1+d2))
785    
786        This currently has no further impact on SML/NJ since mlriscGen does
787        not seem to generate such patterns in the first place, and c-calls
788        (which did generate them in the beginning) has meanwhile been fixed
789        so as to avoid them as well.
790    
791    ----------------------------------------------------------------------
792    Name: Matthias Blume
793    Date: 2001/06/15 15:05:00 EDT
794    Tag: blume-20010615-sparc
795    Description:
796    
797    The purpose of this update is to provide an implementation of NLFFI
798    on Sparc machines.
799    
800    Here are the changes in detail:
801    
802       * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing
803       the Sparc implementation of the c-calls API.
804       * The Sparc backend of SML/NJ has been modified to uniformely use %fp
805       for accessing the ML frame.  Thus, we have a real frame pointer and
806       can freely modify %sp without need for an omit-frame-ptr phase.
807       The vfp logic in src/compiler/CodeGen/* has been changed to accomodate
808       this case.
809       * ml-nlffigen has been taught to produce code for different architectures
810       and calling conventions.
811       * In a way similar to what was done in the x86 case, the Sparc
812       backend uses its own specific extension to mltree.  (For example,
813       it needs to be able to generate UNIMP instructions which are part
814       of the calling convention.)
815       * ml-nlffi-lib was reorganized to make it more modular (in particular,
816       to make it easier to plug in new machine- and os-dependent parts).
817    
818    There are some other fairly unrelated bug fixes and cleanups as well:
819    
820       * I further hacked the .cm files for MLRISC tools (like MDLGen) so
821       that they properly share their libraries with existing SML/NJ libraries.
822       * I fixed a minor cosmetic bug in CM, supressing certain spurious
823       follow-up error messages.
824       * Updates to CM/CMB documentation.
825    
826    TODO items:
827    
828       * MLRISC should use a different register as its asmTemp on the Sparc.
829         (The current %o2 is a really bad choice because it is part of the
830         calling conventions, so things might interfere in unexpected ways.)
831    
832    ----------------------------------------------------------------------
833    Name: Matthias Blume
834    Date: 2001/06/07
835    Tag: blume-20010607-calls
836    Description:
837    
838    A number of internal changes related to C calls and calling conventions:
839    
840    1. ML-Tree CALL statements now carry a "pops" field.  It indicates the
841       number of bytes popped implicitly (by the callee).  In most cases
842       this field is 0 but on x86/win32 it is some non-zero value.  This
843       is information provided for the benefit of the "omit-frameptr" pass.
844    2. The CALL instruction on the x86 carries a similar "pops" field.
845       The instruction selection phase copies its value from the ML-Tree
846       CALL statement.
847    3. On all other architectures, the instruction selection phase checks
848       whether "pops=0" and complains if not.
849    4. The c-calls implementation for x86 now accepts two calling conventions:
850       "ccall" and "stdcall".  When "ccall" is selected, the caller cleans
851       up after the call and pops is set to 0.  For "stdcall", the caller
852       does nothing, leaving the cleanup to the callee; pops is set to
853       the number of bytes that were pushed onto the stack.
854    5. The cproto decoder (compiler/Semant/types/cproto.sml) now can
855       distinguish between "ccall" and "stdcall".
856    6. The UNIMP instruction has been added to the supported Sparc instruction
857       set. (This is needed for implementing the official C calling convention
858       on this architecture.)
859    7. I fixed some of the .cm files under src/MLRISC/Tools to make them
860       work with the latest CM.
861    
862    ----------------------------------------------------------------------
863    Name: Matthias Blume
864    Date: 2001/06/05 15:10:00 EDT
865    Tag: blume-20010605-cm-index
866    Description:
867    
868    0. The "lambdasplit" parameter for class "sml" in CM has been documented.
869    
870    1. CM can now generate "index files".  These are human-readable files
871       that list on a per-.cm-file basis each toplevel symbol defined or
872       imported.  The location of the index file for
873       <p>/<d>.cm is <p>/CM/INDEX/<d>.cm.
874       To enable index-file generation, set CM.Control.generate_index to true
875       or export an environment-symbol: export CM_GENERATE_INDEX=true.
876    
877       The CM manual has been updated accordingly.
878    
879    2. I made some slight modifications to the c-calls API in MLRISC.
880    
881         a) There is now a callback to support saving/restoring of
882            dedicated but caller-save registers around the actual call
883            instruction.
884         b) One can optionally specify a comment-annotation for the
885            call instruction.
886    
887    3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop.
888       (For example, the comment annotation shows the C prototype of
889        the function being called.)
890    
891    ----------------------------------------------------------------------
892    Name: Matthias Blume
893    Date: 2001/06/01 13:30:00 EDT
894    Tag: blume-20010601-nlffi-cleanup
895    Description:
896    
897    This is mostly a cleanup of MLFFI stuff:
898    
899       - some signature files have been put into a more exposed place
900       - the ugly 'f type parameter is gone (simplifies types tremendously!)
901       - ml-nlffigen changed accordingly
902       - tutorial updated
903    
904    Other changes:
905    
906       - author's affiliation in CM manual(s) updated
907       - some more recognized keywords added to Allen's sml.sty
908    
909    ----------------------------------------------------------------------
910    Name: Matthias Blume
911    Date: 2001/05/25 15:30:00 EDT
912    Tag: blume-20010525-iptr
913    Description:
914    
915      - put the official 110.33-README (as it appears on the ftp server) under
916        CVS
917      - fixed a small bug related to incomplete pointer types in
918        ml-nlffigen
919      - small cosmetic change to the ml-nlffi-lib's "arr" type constructor
920        (it does not need the 'f type parameter)
921    
922    ----------------------------------------------------------------------
923    Name: Matthias Blume
924    Date: 2001/05/23 14:30:00 EDT
925    Tag: Release_110_33
926    Description:
927    
928    New version number (110.33).  New bootfiles.
929    
930    ----------------------------------------------------------------------
931    Name: Matthias Blume
932    Date: 2001/05/22 18:06:00 EDT
933    Tag: blume-20010522-targets
934    Description:
935    
936    Made install.sh use file config/targets.customized if it exists, falling
937    back to config/targets if it doesn't.  This way one can have a customized
938    version of the targets file without touching the "real thing", thus
939    eliminating the constant fear of accidentally checking something bogus
940    back into the CVS repository...  (File config/targets.customized must
941    not be added to the repository!)
942    
943    ----------------------------------------------------------------------
944    Name: Matthias Blume
945    Date: 2001/05/22 16:30:00 EDT
946    Tag: blume-20010522-minitut
947    Description:
948    
949    1. Bug fix in ml-nlffigen; now (hopefully) correctly handling
950       struct returns.
951    2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt.  This is some very
952       incomplete, preliminary documentation for NLFFI.
953    
954    ----------------------------------------------------------------------
955    Name: Matthias Blume
956    Date: 2001/05/14 11:30:00 EDT
957    Tag: blume-20010514-script
958    Description:
959    
960    Some bugs in install script fixed.
961    
962    In addition to that I also made a slight change to the NLFFI API:
963    Functors generated by ml-nlffigen now take the dynamic library as a
964    straight functor argument, not as a suspended one.  (The original
965    functor code used to force the suspension right away anyway, so there
966    was nothing gained by this complication of the interface.)
967    
968    ----------------------------------------------------------------------
969    Name: Matthias Blume
970    Date: 2001/05/11 14:35:00 EDT
971    Tag: blume-20010511-ml-nlffi
972    Description:
973    
974    I finally took the plunge and added my new FFI code to the main
975    repository.  For x86-linux it is now ready for prime-time.
976    
977    There are two new subdirectories of "src":
978    
979      - ml-nlffi-lib:
980           The utility library for programs using the FFI interface.
981           Here is the implementation of $/c.cm and its associated low-level
982           partners $/c-int.cm and $/memory.cm.
983      - ml-nlffigen:
984           A stand-alone program for generating ML glue code from C source
985           code.
986    
987    Building ml-nlffigen requires $/ckit-lib.cm.
988    
989    The config/install.sh script has been updates to do the Right Thing
990    (hopefully).
991    
992    Notice that the source tree for the C-Kit will not be put under "src"
993    but directly under the installation root directory.  (This is the
994    structure that currently exists on the CVS server when you check out
995    module "sml".)  Fortunately, config/install.sh knows about this oddity.
996    
997    Bugs: No documentation yet.
998    
999    ----------------------------------------------------------------------
1000    Name: Matthias Blume
1001    Date: 2001/05/09 16:35:00 EDT
1002    Tag: blume-20010509-cpscontract
1003    Description:
1004    
1005    Fixed a bug in the accounting code in cpsopt/contract.sml.  (The
1006    wrapper/unwrapper elimination did not decrement usage counts and some
1007    dead variables got overlooked by the dead-up logic.)
1008    
1009    ----------------------------------------------------------------------
1010    Name: Lal George
1011    Date: 2001/05/08  17:26:09 EDT
1012    Tag: george-20010508-omit-frameptr
1013    Description:
1014    
1015    Changes to implement the omit-frame-pointer optimization to support
1016    raw C calls. For now, there is only support on the Intel x86, but
1017    other architectures will follow as more experience is gained with this.
1018    
1019    
1020    ----------------------------------------------------------------------
1021    Name: Matthias Blume
1022    Date: 2001/05/07 14:40:00 EDT
1023    Tag: blume-20010507-proxies
1024    Description:
1025    
1026    I made into "proxy libraries" all libraries that qualify for such a
1027    change.  (A qualifying library is a library that has another library or
1028    groups as its sole member and repeats that member's export list
1029    verbatim.  A proxy library avoids this repetition by omitting its export
1030    list, effectively inheriting the list that its (only) member exports.
1031    See the CM manual for more explanation.)
1032    The main effect is that explicit export lists for these libraries
1033    do not have to be kepts in sync, making maintenance a bit easier.
1034    
1035    I also added copyright notices to many .cm-files.
1036    
1037    Last but not least, I made a new set of bootfiles.
1038    
1039    ----------------------------------------------------------------------
1040    Name: Matthias Blume
1041    Date: 2001/05/04 17:00:00 EDT
1042    Tag: blume-20010504-cm-lsplit
1043    Description:
1044    
1045    0. John merged pending changes to $/smlnj-lib.cm
1046    
1047    1. Allen's previous change accidentally backed out of one of Lal's
1048       earlier changes.  I undid this mistake (re-introducing Lal's change).
1049    
1050    2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm)
1051       within the compiler where applicable.  There is some code simplification
1052       because of that.
1053    
1054    3. The "split" phase (in FLINT) is now part of the default list of phases.
1055       Compiler.Control.LambdaSplitting.* can be used to globally control the
1056       lambda-splitting (cross-module-inlining) engine.  In addition to that,
1057       it can now also be controlled on a per-source basis: CM has been taught
1058       a new tool parameter applicable to ML source files.
1059    
1060       - To turn lambda-splitting off completely:
1061            local open Compiler.Control.LambdaSplitting in
1062                val _ = set Off
1063            end
1064       - To make "no lambda-splitting" the global default (but allow per-source
1065         overriding); this is the initial setting:
1066            local open Compiler.Control.LambdaSplitting in
1067                val _ = set (Default NONE)
1068            end
1069       - To make "lambda-splitting with aggressiveness a" the global default
1070         (and allow per-source overriding):
1071            local open Compiler.Control.LambdaSplitting in
1072                val _ = set (Default (SOME a))
1073            end
1074    
1075       - To turn lambda-splitting off for a given ML souce file (say: a.sml)
1076         write (in the respective .cm-file):
1077            a.sml (lambdasplitting:off)
1078       - To turn lambda-splitting for a.sml on with minimal aggressiveness:
1079            a.sml (lambdasplitting:on)
1080       - To turn lambda-splitting for a.sml on with aggressiveness <a> (where
1081         <a> is a decimal non-negative integer):
1082            a.sml (lambdasplitting:<a>)
1083       - To turn lambda-splitting for a.sml on with maximal aggressiveness:
1084            a.sml (lambdasplitting:infinity)
1085       - To use the global default for a.sml:
1086            a.sml (lambdasplitting:default)
1087         or simply
1088            a.sml
1089    
1090    ----------------------------------------------------------------------
1091    Name: Allen Leung
1092    Date: 2001/05/04 01:57:00 EDT
1093    Tag: leunga-20010504-sync
1094    Description:
1095    
1096      MLRISC features.
1097    
1098      1. Fix to CMPXCHG instructions.
1099      2. Changed RA interface to allow annotations in callbacks.
1100      3. Added a new method to the stream interface to allow annotations updates.
1101    
1102    ----------------------------------------------------------------------
1103    Name: Matthias Blume
1104    Date: 2001/05/01 11:45:00 EDT
1105    Tag: blume-20010501-pcedittmp
1106    Description:
1107    
1108    Changed install.sh to use the current working directory instead of
1109    /usr/tmp for a temporary file (pcedittmp).  The previous choice
1110    of /usr/tmp caused trouble with MacOS X because of file premission
1111    problems.
1112    
1113    ----------------------------------------------------------------------
1114    Name: Matthias Blume
1115    Date: 2001/04/20 11:10:00 EDT
1116    Tag: blume-20010420-inMLflag
1117    Description:
1118    
1119     - added vp_limitPtrMask to vproc-state.h
1120       (for use by the raw-C-calls mechanism to implement proper interrupt
1121        handling)
1122     - made the ML compiler aware of various data-structure offsets so it
1123       can generate code for accessing the vp_inML flag and vp_limitPtrMask
1124     - tweaked mlriscGen.sml to have it emit interrupt-handling code for
1125       raw C-calls
1126    
1127    ----------------------------------------------------------------------
1128    Name: Lal George
1129    Date: 2001/04/20 09:15:28 EDT
1130    Tag: george-20010420-macosX
1131    Description:
1132    
1133     - Changes to port to Mac OS X; Darwin.
1134    
1135     - In the process I found that sqrt was broken on the PPC, because the
1136       fsqrt instruction is not implemented.
1137    
1138    ----------------------------------------------------------------------
1139    Name: Matthias Blume
1140    Date: 2001/04/18 12:45:00 EDT
1141    Tag: blume-20010418-ccalls
1142    Description:
1143    
1144     - fixed two off-by-4 errors in the x86-specific c-calls implementation
1145       (this bug prevented structure arguments containing pointers from being
1146        passed correctly)
1147     - changed the raw-C-call code in mlriscGen.sml in such a way that
1148       structure arguments are represented as a pointer to the beginning
1149       of the structure (instead of having a series of synthesized arguments,
1150       one for each structure member)
1151    
1152     - made makeml script's verbosity level configurable via environment
1153       variable (MAKEML_VERBOSITY)
1154    
1155     - eliminated placeholder implementations for f32l, w16s, i16s, and f32s
1156       in rawmem-x86.sml; we are now using the real thing
1157    
1158    ----------------------------------------------------------------------
1159    Name: Matthias Blume
1160    Date: 2001/03/22 16:25:00 EST
1161    Tag: blume-20010322-bootfiles
1162    Description:
1163    
1164    Created a new set of bootfiles (for your automatic installation convenience).
1165    
1166    ----------------------------------------------------------------------
1167    Name: Matthias Blume
1168    Date: 2001/03/22 15:10:00 EST
1169    Tag: blume-20010322-rawmem-parcm
1170    Description:
1171    
1172    1. All "raw memory access" primitives for the new FFI are implemented now
1173       (at least on the x86).
1174    2. Some further cleanup of CM's parallel make mechanism.
1175    
1176    ----------------------------------------------------------------------
1177    Name: Matthias Blume
1178    Date: 2001/03/19 17:53:00 EST
1179    Tag: blume-20010319-parallel
1180    Description:
1181    
1182    Parallel make (using compile servers) now works again.
1183    
1184    To this end, CM.stabilize and CMB.make have been modified to work in
1185    two passes when compile servers are attached:
1186       1. Compile everything, do not perform stabilization; this pass
1187          uses compile servers
1188       2. Stabilize everything; this pass does not use compile servers
1189    If there are no compile servers, the two passes are combined into one
1190    (as before).  Splitting the passes increases the inherent parallelism
1191    in the dependency graph because the entire graph including all
1192    libraries is available at the same time.  This, in turn, improves
1193    server utilization.  The downside is that the master process will
1194    have to do some extra work after compilation is done (because for
1195    technical reasons it must re-read all the binfiles during stabilization).
1196    
1197    ----------------------------------------------------------------------
1198    Name: Matthias Blume
1199    Date: 2001/03/16 12:22:00 EST
1200    Tag: blume-20010316-bootfiles
1201    Description:
1202    
1203    Created a new set of bootfiles (for your automatic installation convenience).
1204    
1205    ----------------------------------------------------------------------
1206    Name: Matthias Blume
1207    Date: 2001/03/16 11:00:00 EST
1208    Tag: blume-20010316-MLTREE-fixup
1209    Description:
1210    
1211    This is a minor fixup for an (untagged) earlier commit by Allen.
1212    (A file was missing).
1213    
1214    ----------------------------------------------------------------------
1215    Name: Allen Leung
1216    Date: Mon Mar  5 18:54:57 EST 2001
1217    Tag: leunga-20010305-cut-support
1218    
1219    1. New support for alternative control-flow in MLTREE.
1220       Currently we support
1221    
1222          FLOW_TO(CALL ...., [k1,...,kn])
1223    
1224       This is needed for 'cuts to' in C-- and try/handle-like constructs
1225       in Moby
1226    
1227       New assembler flag "asm-show-cutsto" to turn on control-flow debugging.
1228    
1229    2. Register Allocator
1230    
1231       Changes in interface [from Fermin, John]
1232    
1233    3. Alpha 8-bit SLL support [Fermin]
1234    
1235    4. All architectures
1236    
1237       A new module (ClusterExpandCopies) for expanding parallel copies.
1238    
1239    ----------------------------------------------------------------------
1240    Name: Allen Leung
1241    Date: 2001/02/27 23:07:00 EST
1242    Tag: leunga-20010227-minor-stuff
1243    
1244    1. Alpha bug fix for CMOVNE
1245    2. Handle mltree COND(..,FCMP ...,...)
1246    3. Bug fix in simplifier
1247    
1248    ----------------------------------------------------------------------
1249    Name: Matthias Blume
1250    Date: 2001/01/30 17:50:00 EST
1251    Tag: blume-20010130-sync
1252    Description:
1253    
1254    This is just a minor update to sync my devel branch with the main brach.
1255    The only visible change is the addition of some README files.
1256    
1257    ----------------------------------------------------------------------
1258    Name: Matthias Blume
1259    Date: 2001/01/12 23:30:00 JST
1260    Tag: blume-20010112-bootfiles
1261    Description:
1262    
1263    Made a new set of bootfiles that goes with the current state of the
1264    repository.
1265    
1266    ----------------------------------------------------------------------
1267    Name: Matthias Blume
1268    Date: 2001/01/12 21:20:00 JST
1269    Tag: blume-20010112-sync
1270    Description:
1271    
1272    I am just flushing out some minor changes that had accumulated in
1273    my private branch in order to sync with the main tree.  (This is
1274    mainly because I had CVS trouble when trying to merge _into_ my
1275    private branch.)
1276    
1277    Most people should be completely unaffected by this.
1278    
1279    ----------------------------------------------------------------------
1280    Name: Allen Leung
1281    Date: Thu Jan 11 21:03:00 EST 2001
1282    Tag: leunga-20010111-labexp=mltree
1283    Description:
1284    
1285    1.  Removed the type LabelExp and replace it by MLTree.
1286    2.  Rewritten mltree-simplify with the pattern matcher tool.
1287    3.  There were some bugs in alpha code generator which would break
1288        64-bit code generation.
1289    4.  Redo the tools to generate code with the
1290    5.  The CM files in MLRISC (and in src/system/smlnj/MLRISC)
1291        are now generated by perl scripts.
1292    
1293    ----------------------------------------------------------------------
1294    Name: Matthias Blume
1295    Date: 2001/01/10 21:55:00 JST
1296    Tag: blume-20010110-rcc
1297    Description:
1298    
1299    The RCC stuff now seems to work (but only on the x86).
1300    This required hacking of the c-calls interface (and -implementation) in
1301    MLRISC.
1302    
1303    Normal compiler users should be unaffected.
1304    
1305    ----------------------------------------------------------------------
1306    Name: Matthias Blume
1307    Date: 2001/01/09 01:20:00 JST
1308    Tag: blume-20010109-rcc
1309    Description:
1310    
1311    This is a fairly big patch, flushing out a large number of pending
1312    changes that I made to my development copy over the last couple of days.
1313    
1314    Of practical relevance at this moment is a workaround for a pickling
1315    bug that Allen ran into the other day.  The cause of the bug itself is
1316    still unknown and it might be hard to fix it properly, but the
1317    workaround has some merits of its own (namely somewhat reducing pickling
1318    overhead for certain libraries).  Therefore, I think this solution should
1319    be satisfactory at this time.
1320    
1321    The rest of the changes (i.e., the vast majority) has to do with my
1322    ongoing efforts of providing direct support for C function calls from
1323    ML.  At the moment there is a new primop "RAW_CCALL", typing magic
1324    in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new
1325    case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to
1326    translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to
1327    handle RCC.
1328    
1329    The last part (the changes to mlriscGen.sml) are still known to be
1330    wrong on the x86 and not implemented on all other architectures.  But
1331    the infrastructure is in place. I had to change a few functor
1332    signatures in the backend to be able to route the CCalls interface
1333    from MLRISC there, and I had to specialize the mltree type (on the
1334    x86) to include the necessary extensions. (The extensions themselves
1335    were already there and redy to go in MLRISC/x86).
1336    
1337    Everything should be very happy as soon as someone helps me with
1338    mlriscGen.sml...
1339    
1340    In any case, nothing of this should matter to anyone as long as the
1341    new primop is not being used (which is going to be the case unless you
1342    find it where I hid it :). The rest of the compiler is completely
1343    unaffected.
1344    
1345    ----------------------------------------------------------------------
1346    Name: Matthias Blume
1347    Date: 2001/01/05 00:30:00 JST
1348    Tag: blume-20010105-primops
1349    Description:
1350    
1351    Added some experimental support for work that I am doing right now.
1352    These changes mostly concern added primops, but there is also a new
1353    experimental C library in the runtime system (but currently not enabled
1354    anywhere except on Linux/X86).
1355    
1356    In the course of adding primops (and playing with them), I discovered that
1357    Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly
1358    broken.  (Zhong was very right he labeled this stuff as "major gross hack".)
1359    To recover, I made type information in INL_PRIM mandatory and changed
1360    prim.sml as well as built-in.sml accordingly.  The InLine structure now
1361    has complete, correct type information (i.e., no bottom types).
1362    
1363    Since all these changes mean that we need new binfiles, I also bumped the
1364    version number to 110.32.1.
1365    
1366    ----------------------------------------------------------------------
1367    Name: Matthias Blume
1368    Date: 2000/12/30 22:10:00 JST
1369    Tag: blume-20001230-various
1370    Description:
1371    
1372    Added proxy libraries for MLRISC and let MLRISC libraries refer
1373    to each other using path anchors.  (See CM manual for explanation.)
1374    
1375    Updated CM documentation.
1376    
1377    Fixed some bugs in CM.
1378    
1379    Implemented "proxy" libraries (= syntactic sugar for CM).
1380    
1381    Added "-quiet" option to makeml and changed runtime system accordingly.
1382    
1383    Added cleanup handler for exportML to reset timers and compiler stats.
1384    
1385    ----------------------------------------------------------------------
1386    Name: Lal George
1387    Date: 2000/12/22 22:22:58 EST 2000
1388    Tag: Release_110_32
1389    Description:
1390    
1391            Infinite precision used throughout MLRISC.
1392            see MLRISC/mltree/machine-int.sig
1393    
1394    ----------------------------------------------------------------------
1395    Name: Matthias Blume
1396    Date: 2000/12/22 23:16:00 JST
1397    Tag: blume-20001222-warn
1398    Description:
1399    
1400    Corrected wording and formatting of some CM warning message which I
1401    broke in my previous patch.
1402    
1403    ----------------------------------------------------------------------
1404    Name: Matthias Blume
1405    Date: 2000/12/22 21:20:00 JST
1406    Tag: blume-20001222-anchorenv
1407    Description:
1408    
1409    Fixed CM's handling of anchor environments in connection with CMB.make.
1410    
1411    ----------------------------------------------------------------------
1412    Name: Matthias Blume
1413    Date: 2000/12/22 13:15:00 JST
1414    Tag: blume-20001222-cleanup
1415    Description:
1416    
1417    Removed src/cm/ffi which does not (and did not) belong here.
1418    
1419    ----------------------------------------------------------------------
1420    Name: Matthias Blume
1421    Date: 2000/12/21 23:55:00 JST
1422    Tag: blume-20001221-exn
1423    Description:
1424    
1425    Probably most important: CM no longer silently swallows all exceptions
1426    in the compiler.
1427    Plus: some other minor CM changes.  For example, CM now reports some
1428    sizes for generated binfiles (code, data, envpickle, lambdapickle).
1429    
1430    ----------------------------------------------------------------------
1431    Name: Matthias Blume
1432    Date: 2000/12/15 00:01:05 JST
1433    Tag: blume-20001215-dirtool
1434    Description:
1435    
1436    - "dir" tool added.
1437    - improvements and cleanup to Tools structure
1438    - documentation updates
1439    
1440    ----------------------------------------------------------------------
1441    Name: Allen Leung
1442    Date: Thu Dec 14 03:45:24 EST 2000
1443    Description:
1444    Tag:  leunga-20001214-int-inf
1445    Description:
1446    
1447       In IntInf, added these standard functions, which are missing from our
1448    implementation:
1449    
1450        andb : int * int -> int
1451        xorb : int * int -> int
1452        orb  : int * int -> int
1453        notb : int -> int
1454         <<   : int * word -> int
1455        ~>>  : int * word -> int
1456    
1457       Not tested, I hope they are correct.
1458    
1459    ----------------------------------------------------------------------
1460    Name: Allen Leung
1461    Date: Fri Dec  8 19:23:26 EST 2000
1462    Description:
1463    Tag:  leunga-20001208-nowhere
1464    Description:
1465    
1466      Slight improvements to the 'nowhere' tool to handle OR-patterns,
1467    to generate better error messages etc.  Plus a brief manual.
1468    
1469    ----------------------------------------------------------------------
1470    Name: Lal George
1471    Date: 2000/12/08 09:54:02 EST 2000
1472    Tag: Release_110_31
1473    Description:
1474    
1475    - Version 110.31
1476    ----------------------------------------------------------------------
1477    Name: Allen Leung
1478    Date: Thu Dec  7 22:01:04 EST 2000
1479    Tag:  leunga-20001207-cell-monster-hack
1480    Description:
1481    
1482    Major MLRISC internal changes.  Affect all clients.
1483    Summary:
1484    
1485    1.  Type CELLS.cell = int is now replaced by a datatype.
1486        As a result, the old regmap is now gone.  Almost all interfaces
1487        in MLRISC change as a consequence.
1488    
1489    2.  A new brand version of machine description tool (v3.0) that generates
1490        modules expecting the new interface.  The old version is removed.
1491    
1492    3.  The RA interface has been further abstracted into two new functors.
1493        RISC_RA and X86RA.  These functors have much simpler interfaces.
1494        [See also directory MLRISC/demo.]
1495    
1496    4.  Some other new source->source code generation tools are available:
1497    
1498        a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
1499        b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
1500           I use this tool to generate the peephole optimizers---with the new
1501           cell type changes, peephole rules are becoming difficult to write
1502           without conditional pattern matching.
1503    
1504    5.  More Intmap -> IntHashTable change.  Previous changes by Matthias didn't
1505        cover the entire MLRISC source tree so many things broke.
1506    
1507    6.  CM files have been moved to the subdirectory MLRISC/cm.
1508        They are moved because there are a lot of them and they clutter up the
1509        root dir.
1510    
1511    7.  More detailed documentation to come...
1512    
1513        NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
1514        a makeml -rebuild first.  This is because of other other
1515        changes that Matthias has made (see below).
1516    
1517    
1518    ----------------------------------------------------------------------
1519    Name: Matthias Blume
1520    Date: 2000/11/30 23:12:00 JST
1521    Tag: blume-20001130-filereorg
1522    Description:
1523    
1524    Some manual updates and some file reorganizations in CM.
1525    
1526    ----------------------------------------------------------------------
1527    Name: Matthias Blume
1528    Date: 2000/11/24 17:45:00 JST
1529    Tag: blume-20001124-link
1530    Description:
1531    
1532    Drastically improved link traversal code for the case that the dynamic
1533    value was already loaded at bootstrap time.  As a result, CM and CMB
1534    now both load blazingly fast -- even on a very slow machine.  Also,
1535    memory consumption has been further reduced by this.
1536    
1537    Warning: The format of the PIDMAP file has changed.  THerefore, to
1538    bootstrap you have to do this:
1539    
1540    1. Run CMB.make
1541    2. Make a symbolic link for the boot directory:
1542         ln -s sml.boot.ARCH-OS xxx
1543    3. "Rebuild" the boot directory:
1544         ./makeml -boot xxx -rebuild sml ; rm xxx
1545    4. Boot normally:
1546          ./makeml
1547    
1548    ----------------------------------------------------------------------
1549    Name: Matthias Blume
1550    Date: 2000/11/21 21:20:00 JST
1551    Tag: blume-20001121-tools
1552    Description:
1553    
1554    Continued hacking on autoloading problem -- with success this time.
1555    Also changed tool-plugin mechanism.  See new CM manual.
1556    
1557    ----------------------------------------------------------------------
1558    Name: Matthias Blume
1559    Date: 2000/11/19 14:30:00 JST
1560    Tag:  blume-20001119-autoload
1561    Description:
1562    
1563    Some hacking to make autoloading faster.  Success for CMB, no success
1564    so far for CM.  There is a reduced structure CM' that autoloads faster.
1565    (This is a temporary, non-documented hack to be eliminated again when
1566    the general problem is solved.)
1567    
1568    ----------------------------------------------------------------------
1569    Name: Matthias Blume
1570    Date: 2000/11/17 14:10:00 JST
1571    Tag: blume-20001117-pickle-lib
1572    Description:
1573    
1574    1. Eliminated comp-lib.cm
1575    2. Made pickle-lib.cm
1576    3. Eliminated all uses of intset.sml (from comp-lib.cm)
1577    4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
1578       equivalent constructs from smlnj-lib.cm (INtHashTable).
1579    5. Point 4. also goes for those uses of intmap.* in MLRISC.
1580       Duplicated intmap modules thrown out.
1581    6. Hunted down all duplicated SCC code and replaced it with
1582       equivalent stuff (GraphSCCFn from smlnj-lib.cm).
1583    7. Rewrote Feedback module.
1584    8. Moved sortedlist.sml into viscomp-lib.cm.  Eventually it
1585       should be thrown out and equivalent modules from smlnj-lib.cm
1586       should be used (IntRedBlackSet, IntListSet, ...).
1587    
1588    Confirmed that compiler compiles to fixpoint.
1589    
1590    ----------------------------------------------------------------------
1591    Name: Allen Leung
1592    Date: 2000/11/10 18:00:00
1593    Tag: leunga-20001110-new-x86-fp
1594    
1595    A new x86 floating point code generator has been added.
1596    By default this is turned off.  To turn this on, do:
1597    
1598        CM.autoload "$smlnj/compiler.cm";
1599        Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
1600    
1601    Changes:
1602    
1603    1.  Changed FTAN to FPTAN so that the assembly output is correct.
1604    2.  Changed the extension callback for FTANGENT to generate:
1605    
1606              fptan
1607              fstp  %st(0)
1608        instead of
1609              fptan
1610              fstpl ftempmem
1611    
1612    3.  Numerous assembly fixes for x86.
1613    
1614    5.  Cleaned up the machine code output module x86/x86MC.sml and added
1615        support for a whole bunch of instructions and addressing modes:
1616    
1617          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st, %st(n)
1618          faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp  %st, %st(n)
1619          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st(n), %st
1620          fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
1621          fxch %st(n)
1622          fld %st(n)
1623          fst %st(n)
1624          fst mem
1625          fstp %st(n)
1626          fucom %st(n)
1627          fucomp %st(n)
1628    
1629        All these are now generated when the fast fp mode is turned on.
1630    
1631    6.  Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
1632    
1633    ----------------------------------------------------------------------
1634    Name: Matthias Blume
1635    Date: 2000/11/09 11:20:00 JST
1636    Tag: blume-20001109-scc
1637    Description:
1638    
1639    Eliminated some code duplication:
1640    
1641    1. Added "where" clause to GraphSCCFn in SML/NJ Library.
1642       (Otherwise the functor is useless.)
1643    2. Used GraphSCCFn where SCCUtilFun was used previously.
1644    3. Got rid of SCCUtilFun (in comp-lib.cm).
1645    
1646    ----------------------------------------------------------------------
1647    Name: Lal George
1648    Date: 2000/11/06 09:02:21 EST 2000
1649    Tag: Release_110_30
1650    Description:
1651    
1652    - Version 110.30
1653    ----------------------------------------------------------------------
1654    Name: Matthias Blume
1655    Date: 2000/11/04 14:45:00
1656    Tag: blume-20001104-mlbuild
1657    Description:
1658    
1659    - Made ml-build faster on startup.
1660    - Documentation fixes.
1661    
1662    ----------------------------------------------------------------------
1663    Name: Matthias Blume
1664    Date: 2000/11/02 17:00:00 JST
1665    Tag: blume-20001102-condcomp
1666    Description:
1667    
1668    - Small tweaks to pickler -- new BOOTFILES!
1669    - Version bumped to 110.29.2.
1670    - Added conditional compilation facility to init.cmi (see comment there).
1671    ----------------------------------------------------------------------
1672    Name: Allen Leung
1673    Date: 2000/10/23 19:31:00
1674    Tag: leunga-20001023-demo-ra
1675    
1676    1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
1677    2. Test programs for the graph library updated
1678    3. Some new MLRISC demo programs added
1679    
1680    ----------------------------------------------------------------------
1681    Name: Matthias Blume
1682    Date: 2000/08/31 22:15:00 JST
1683    Tag: blume-20001017-errmsg
1684    Description:
1685    
1686    More error message grief: Where there used to be no messages, there
1687    now were some that had bogus error regions.  Fixed.
1688    
1689    ----------------------------------------------------------------------
1690    Name: Matthias Blume
1691    Date: 2000/08/31 17:30:00 JST
1692    Tag: blume-20001017-v110p29p1
1693    Description:
1694    
1695    I made a version 110.29.1 with new bootfiles.
1696    
1697    Changes:  Modified pickler/unpickler for faster and leaner unpickling.
1698              CM documentation changes and a small bugfix in CM's error reporting.
1699    
1700    ----------------------------------------------------------------------
1701    Name: Lal George
1702    Date: 2000/09/27 14:42:35 EDT
1703    Tag: george-20000927-nodestatus
1704    Description:
1705    
1706    Changed the type of the nodestatus, so that:
1707    
1708            SPILLED(~1)             is now SPILLED
1709            SPILLED(m) where m>=0   is now MEMREG(m)
1710            SPILLED(s) where s<~1   is now SPILL_LOC(~s)
1711    
1712    ----------------------------------------------------------------------
1713    Name: Matthias Blume
1714    Date: 2000/09/07 14:45:00 JST
1715    Tag: blume-20000907-cmerrmsg
1716    Description:
1717    
1718    Small tweak to CM to avoid getting ML syntax error messages twice.
1719    
1720    ----------------------------------------------------------------------
1721    Name: Matthias Blume
1722    Date: 2000/08/31 18:00:00 JST
1723    Tag: blume-20000831-cvsbootfiles
1724    Description:
1725    
1726    New URL for boot files (because the 110.29 files on the BL server do
1727    now work correctly with my updated install scripts for yacc and lex).
1728    
1729    ----------------------------------------------------------------------
1730    Name: Matthias Blume
1731    Date: 2000/08/08 12:33:00 JST
1732    Tag: blume-20000808-manual
1733    Description:
1734    
1735    Tiny update to CM manual.
1736    
1737    ----------------------------------------------------------------------
1738    Name: Allen Leung
1739    Date: 2000/08/7 19:31:00
1740    Tag: leunga-20000807-a-whole-bunch-of-stuff
1741    
1742      Moby, C--, SSA, x86, machine descriptions etc.  Should only affect C--
1743    and Mobdy.
1744    
1745    1.  x86
1746    
1747       a.  Fixes to peephole module by John and Dan.
1748       b.  Assembly fix to SETcc by Allen.
1749       c.  Fix to c-call by John.
1750       d.  Fix to spilling by John.  (This one deals with the missing FSTPT case)
1751       e.  Instruction selection optimization to SETcc as suggested by John.
1752    
1753           For example,
1754    
1755            MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
1756    
1757           should generate:
1758    
1759            MOVL a, x
1760            SUBL b, x
1761            SHRL 31, x
1762    
1763    2.  IR stuff
1764    
1765         A bunch of new DJ-graph related algorithms added.  These
1766         speed up SSA construction.
1767    
1768    3.  SSA + Scheduling
1769    
1770         Added code for SSA and scheduling to the repository
1771    
1772    ----------------------------------------------------------------------
1773    Name: Lal George
1774    Date: 2000/07/27 11:53:14 EDT
1775    
1776    Tag: lal-20000727-linux-ppc
1777    Description:
1778    
1779     Made changes to support Linux PPC.
1780     p.s. I have confirmation that the 110.29 boot files work fine.
1781    
1782    ----------------------------------------------------------------------
1783    Name: Matthias Blume
1784    Date: 2000/07/27 17:40:00 JST
1785    Tag: blume-20000727-scripts
1786    Description:
1787    
1788    !!!! WARNING !!!!
1789    You must recompile the runtime system!
1790    !!!! WARNING !!!!
1791    
1792    This is basically another round of script-enhancements:
1793    
1794    1. sml, ml-build, and ml-makedepend accept options -D and -U to define
1795       and undefine CM preprocessor symbols.
1796    
1797    2. ml-build avoids generating a new heap image if it finds that the
1798       existing one is still ok.  (The condition is that no ML file had to
1799       be recompiled and all ML files are found to be older that the heap
1800       file.)
1801    
1802       To make this work smoothly, I also hacked the runtime system as
1803       well as SMLofNJ.SysInfo to get access to the heap image suffix
1804       (.sparc-solaris, ...) that is currently being used.
1805    
1806       Moreover, the signature of CM.mk_standalone has changed.  See the
1807       CM manual.
1808    
1809    3. ml-makedepend accepts additional options -n, -a, and -o.  (See the
1810       CM manual for details.)
1811    
1812    4. More CM manual updates:
1813        - all of the above has been documented.
1814        - there is now a section describing the (CM-related) command line
1815          arguments that are accepted by the "sml" command
1816    
1817    ----------------------------------------------------------------------
1818    Name: Matthias Blume
1819    Date: 2000/07/25 16:20:00 JST
1820    Tag: blume-20000725-makedepend
1821    Description:
1822    
1823    Added a script called ml-makedepend.  This can be used in makefiles
1824    for Unix' make in a way very similar to the "makedepend" command for
1825    C.
1826    
1827    The script internally uses function CM.sources.
1828    
1829    Synopsis:
1830    
1831        ml-makedepend [-f makefile] cmfile targetname
1832    
1833    The default for the makefile is "makefile" (or "Makefile" should
1834    "makefile" not exist).
1835    
1836    ml-makedepend adds a cmfile/targetname-specific section to this
1837    makefile (after removing the previous version of this section).  The
1838    section contains a single dependency specification with targetname on
1839    the LHS (targetname is an arbitrary name), and a list of files derived
1840    from the cmfile on the RHS.  Some of the files on the RHS are
1841    ARCH/OPSYS-specific.  Therefore, ml-makedepend inserts references to
1842    "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
1843    path names.  The makefile writer is responsible for making sure that
1844    these variables have correct at the time "make" is invoked.
1845    
1846    ----------------------------------------------------------------------
1847    Name: Matthias Blume
1848    Date: 2000/07/22 23:30:00 JST
1849    Tag: blume-20000722-urlupdate
1850    Description:
1851    
1852    Changed BOOT and config/srcarchiveurl to point to BL server:
1853    
1854        ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
1855    
1856    ----------------------------------------------------------------------
1857    Name: Matthias Blume
1858    Date: 2000/07/18 18:00:00 JST
1859    Tag: blume-20000718-Version_110_29
1860    Description:
1861    
1862    1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
1863    
1864    2. Updated config/version to 110.29
1865    
1866    3. Updated config/srcarchiveurl
1867    
1868    3. New boot files!
1869       ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
1870    
1871    ----------------------------------------------------------------------
1872    Name: Matthias Blume
1873    Date: 2000/07/11 13:58:00 JST
1874    Tag: blume-20000711-doctypo
1875    Description:
1876    
1877    Fixed a few typos in CM manual.
1878    
1879    ----------------------------------------------------------------------
1880    Name: Allen Leung
1881    Date: 2000/06/15 00:38:00
1882    Tag: leunga-20000704-sparc-x86
1883    
1884    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
1885    2. fix to x86 RET bug [found by Dan Grossman]
1886    3. sparc assembly bug fix for ticc instructions [found by Fermin]
1887    
1888       Affects c-- and moby only
1889    
1890    ----------------------------------------------------------------------
1891    Name: Matthias Blume
1892    Date: 2000/07/04 15:26:00
1893    Tag: blume-20000704-trigger
1894    Description:
1895    
1896    1. Improvements to CM manual.
1897    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
1898       of getting a back-trace.  The function, when called, raises an
1899       internal exception which explicitly carries the full back-trace history,
1900       so it is unaffected by any intervening handle-raise pairs ("trivial"
1901       or not).  The interactive loop will print that history once it arrives
1902       at top level.
1903       Short of having all exceptions implicitly carry the full history, the
1904       recommended way of using this facility is:
1905         - compile your program with instrumentation "on"
1906         - run it, when it raises an exception, look at the history
1907         - if the history is "cut off" because of some handler, go and modify
1908           your program so that it explicitly calls BTrace.trigger
1909         - recompile (still instrumented), and rerun; look at the full history
1910    
1911    ----------------------------------------------------------------------
1912    Name: Matthias Blume
1913    Date: 2000/07/03 15:36:00 JST
1914    Tag: blume-20000702-manual
1915    Description:
1916    
1917    Small corrections and updates to CM manual.
1918    
1919    ----------------------------------------------------------------------
1920    Name: Matthias Blume
1921    Date: 2000/06/29 16:04:00 JST
1922    Tag: blume-20000629-yacctool
1923    Description:
1924    
1925    Changes:
1926    
1927    1. Class "mlyacc" now takes separate arguments to pass options to
1928       generated .sml- and .sig-files independently.
1929    2. Corresponding CM manual updates.
1930    3. BTrace module now also reports call sites.  (However, for loop clusters
1931       it only shows from where the cluster was entered.)  There are associated
1932       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
1933    
1934    ----------------------------------------------------------------------
1935    Name: Matthias Blume
1936    Date: 2000/06/27 16:51:00 JST
1937    Tag: blume-20000627-noweb
1938    Description:
1939    
1940    Changes:
1941    
1942     1. Implemented "subdir" and "witness" options for noweb tool.
1943        This caused some slight internal changes in CM's tool implementation.
1944     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
1945        some remaining issues from earlier path anchor changes.
1946     3. Updated CM manual accordingly.
1947    
1948     4. Changed implementation of back-tracing so that I now consider it
1949        ready for prime-time.
1950    
1951        In particular, you don't have to explicitly trigger the back-trace
1952        anymore.  Instead, if you are running BTrace-instrumented code and
1953        there is an uncaught exception (regardless of whether or not it was
1954        raised in instrumented code), the top-level evalloop will print
1955        the back-trace.
1956    
1957        Features:
1958    
1959          - Instrumented and uninstrumented code work together seemlessly.
1960            (Of course, uninstrumented code is never mentioned in actual
1961             back-traces.)
1962    
1963          - Asymptotic time- and space-complexity of instrumented code is
1964            equal to that of uninstrumented code.  (This means that
1965            tail-recursion is preserved by the instrumentation phase.)
1966    
1967          - Modules whose code has been instrumented in different sessions
1968            work together without problem.
1969    
1970          - There is no penalty whatsoever on uninstrumented code.
1971    
1972          - There is no penalty on "raise" expressions, even in
1973            instrumented code.
1974    
1975        A potential bug (or perhaps it is a feature, too):
1976    
1977          A back-trace reaches no further than the outermost instrumented
1978          non-trivial "raise".  Here, a "trivial" raise is one that is the
1979          sole RHS of a "handle" rule.  Thus, back-traces reach trough
1980    
1981               <exp> handle e => raise e
1982    
1983          and even
1984    
1985               <exp> handle Foo => raise Bar
1986    
1987          and, of course, through
1988    
1989               <exp> handle Foo => ...
1990    
1991         if the exception was not Foo.
1992    
1993         Back-traces always reach right through any un-instrumented code
1994         including any of its "handle" expressions, trivial or not.
1995    
1996       To try this out, do the following:
1997    
1998         - Erase all existing binfiles for your program.
1999           (You may keep binfiles for those modules where you think you
2000            definitely don't need back-tracing.)
2001         - Turn on back-trace instrumentation:
2002              SMLofNJ.Internals.BTrace.mode (SOME true);
2003         - Recompile your program.  (I.e., run "CM.make" or "use".)
2004         - You may now turn instrumentation off again (if you want):
2005              SMLofNJ.Internals.BTrace.mode (SOME false);
2006         - Run your program as usual.  If it raises an exception that
2007           reaches the interactive toplevel, then a back-trace will
2008           automatically be printed.  After that, the toplevel loop
2009           will print the exception history as usual.
2010    
2011    ----------------------------------------------------------------------
2012    Name: Matthias Blume
2013    Date: 2000/06/26 09:56:46 JST
2014    Tag: blume-20000626-setup
2015    Description:
2016    
2017    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
2018          ML code before and after compiling a file (e.g., to set compiler
2019          flags)
2020    
2021    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
2022              - associated changes to btrace.sml (BTrace instrumentation pass)
2023              - cleaner implementation of btimp.sml (BTrace tracing and report
2024                module)
2025    
2026    CM manual: * new path encoding documented
2027               * description of setup-parameter to "sml" added
2028    
2029    The biggest user-visible change to back-tracing is that it is no
2030    longer necessary to compile all traced modules within the same
2031    session.  (This was a real limitation.)
2032    
2033    ----------------------------------------------------------------------
2034    Name: Matthias Blume
2035    Date: 2000/06/24 12:40:00 JST
2036    Tag: blume-20000624-startup
2037    Description:
2038    
2039    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
2040    bit too often -- to put it mildly. :)
2041    
2042    ----------------------------------------------------------------------
2043    Name: Matthias Blume
2044    Date: 2000/06/23 18:20:00 JST
2045    Tag: blume-20000623-btrace
2046    Description:
2047    
2048    This updates adds a backtrace facility to aid programmers in debugging
2049    their programs.  This involves the following changes:
2050    
2051    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
2052       keeping track of the current call stack.  When programs are compiled
2053       in a special mode, the compiler will insert calls to these hooks
2054       into the user program.
2055       "Hook" means that it is possible for different implementations of
2056       back-tracing to register themselves (at different times).
2057    
2058    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
2059       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
2060       It can be turned on using this call:
2061         SMLofNJ.Internals.BTrace.mode (SOME true);
2062       Turning it off again:
2063         SMLofNJ.Internals.BTrace.mode (SOME false);
2064       Querying the current status:
2065         SMLofNJ.Internals.BTrace.mode NONE;
2066       Annotated programs are about twice as big as normal ones, and they
2067       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
2068       where all hooks do nothing).  The slowdown with a plugin that is
2069       actually useful (such as the one supplied by default) is even greater,
2070       but in the case of the default plugin it is still only an constant
2071       factor (amortized).
2072    
2073    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
2074       with a sub-structure BTrace for controlling back-tracing.  In particular,
2075       the above-mentioned function "mode" controls whether the annotation
2076       phase is invoked by the compiler.  Another important function is
2077       "trigger": when called it aborts the current execution and causes
2078       the top-level loop to print a full back-trace.
2079    
2080    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
2081       for back-tracing.  It keeps track of the dynamic call stack and in
2082       addition to that it keeps a partial history at each "level" of that
2083       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
2084       d and b (at separate times, dynamically), then the report will show:
2085    
2086       GOTO   d
2087             /c
2088       GOTO  \b
2089       CALL   a
2090    
2091       This shows that there was an initial non-tail call of a, then a
2092       tail-call to b or c, looping behavior in a cluster of functions that
2093       consist of b and c, and then a goto from that cluster (i.e., either from
2094       b or from c) to d.
2095    
2096       Note that (depending on the user program) the amount of information
2097       that the back-trace module has to keep track of at each level is bounded
2098       by a constant.  Thus, the whole implementation has the same asymptotical
2099       complexity as the original program (both in space and in time).
2100    
2101    5. compiler/TopLevel/interact/evalloop.sml has been modified to
2102       handle the special exception SMLofNJ.Internals.BTrace.BTrace
2103       which is raised by the "trigger" function mentioned above.
2104    
2105    Notes on usage:
2106    
2107    - Annotated code works well together with unannotated code:
2108    Unannotated calls simply do not show up at all in the backtrace.
2109    
2110    - It is not a good idea to let modules that were annotated during
2111    different sessions run at the same time.  This is because the compiler
2112    chooses small integers to identify individual functions, and there
2113    will be clashes if different modules were compiled in separate sessions.
2114    (Nothing will crash, and you will even be told about the clashes, but
2115    back-trace information will in general not be useful.)
2116    
2117    - Back-tracing can be confused by callcc and capture.
2118    
2119    - The only way of getting a back-trace right now is to explicitly
2120    invoke the "trigger" function from your user program.  Eventually, we
2121    should make every exception carry back-trace information (if
2122    available).  But since this creates more overhead at "raise"-time
2123    (similar to the current exnHistory overhead), I have not yet
2124    implemented this.  (The implementation will be rather easy.)  With
2125    exceptions carrying back-trace information, this facility will be even
2126    more useful because users don't need to modify their programs...
2127    
2128    - While it is possible to compile the compiler with back-trace
2129    annotations turned on (I did it to get some confidence in
2130    correctness), you must make absolutely sure that core.sml and
2131    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
2132    be compiled with annotation because there is no core access yet, but
2133    if you compile btimp.sml with annotation, then the system will go into
2134    an infinite recursion and crash.)
2135    Since CM currently does not know about BTrace, the only way to turn
2136    annotations on and off for different modules of the compiler is to
2137    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
2138    this is awkward and clumsy.
2139    
2140    Sample sessions:
2141    
2142    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
2143    - SMLofNJ.Internals.BTrace.mode (SOME true);
2144    [autoloading]
2145    [autoloading done]
2146    val it = false : bool
2147    - structure X = struct
2148    -     fun main n = let
2149    -         fun a (x, 0) = d x
2150    -           | a (x, n) = b (x, n - 1)
2151    -         and b (x, n) = c (x, n)
2152    -         and c (x, n) = a (x, n)
2153    -         and d x = e (x, 3)
2154    -         and e (x, 0) = f x
2155    -           | e (x, n) = e (x, n - 1)
2156    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
2157    -           | f n = n * g (n - 1)
2158    -         and g n = a (n, 3)
2159    -     in
2160    -         f n
2161    -     end
2162    - end;
2163    structure X : sig val main : int -> int end
2164    - X.main 3;
2165    *** BACK-TRACE ***
2166    GOTO   stdIn:4.2-13.20: X.main[2].f
2167    GOTO-( stdIn:4.2-13.20: X.main[2].e
2168    GOTO   stdIn:4.2-13.20: X.main[2].d
2169         / stdIn:4.2-13.20: X.main[2].a
2170         | stdIn:4.2-13.20: X.main[2].b
2171    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2172    CALL   stdIn:4.2-13.20: X.main[2].g
2173    GOTO   stdIn:4.2-13.20: X.main[2].f
2174    GOTO-( stdIn:4.2-13.20: X.main[2].e
2175    GOTO   stdIn:4.2-13.20: X.main[2].d
2176         / stdIn:4.2-13.20: X.main[2].a
2177         | stdIn:4.2-13.20: X.main[2].b
2178    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2179    CALL   stdIn:4.2-13.20: X.main[2].g
2180    GOTO   stdIn:4.2-13.20: X.main[2].f
2181    GOTO-( stdIn:4.2-13.20: X.main[2].e
2182    GOTO   stdIn:4.2-13.20: X.main[2].d
2183         / stdIn:4.2-13.20: X.main[2].a
2184         | stdIn:4.2-13.20: X.main[2].b
2185    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2186    CALL   stdIn:4.2-13.20: X.main[2].g
2187    GOTO   stdIn:4.2-13.20: X.main[2].f
2188    CALL   stdIn:2.15-17.4: X.main[2]
2189    -
2190    
2191    (Note that because of a FLINt bug the above code currently does not
2192    compile without BTrace turned on.)
2193    
2194    Here is another example, using my modified Tiger compiler:
2195    
2196    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
2197    - SMLofNJ.Internals.BTrace.mode (SOME true);
2198    [autoloading]
2199    [autoloading done]
2200    val it = false : bool
2201    - CM.make "sources.cm";
2202    [autoloading]
2203    ...
2204    [autoloading done]
2205    [scanning sources.cm]
2206    [parsing (sources.cm):parse.sml]
2207    [creating directory CM/SKEL ...]
2208    [parsing (sources.cm):tiger.lex.sml]
2209    ...
2210    [wrote CM/sparc-unix/semant.sml]
2211    [compiling (sources.cm):main.sml]
2212    [wrote CM/sparc-unix/main.sml]
2213    [New bindings added.]
2214    val it = true : bool
2215    - Main.compile ("../testcases/merge.tig", "foo.out");
2216    *** BACK-TRACE ***
2217    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
2218    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2219    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
2220    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
2221    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2222    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2223    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
2224         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
2225    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
2226    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2227    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
2228    CALL   main.sml:1.18-118.4: Main.compile[2]
2229    -
2230    
2231    ----------------------------------------------------------------------
2232    Name: Matthias Blumen
2233    Date: 2000/06/21 18:00:00 JST
2234    Tag: blume-20000621-manual
2235    Description:
2236    
2237    CM manual update: Path environments documented.
2238    
2239    ----------------------------------------------------------------------
2240    Name: Matthias Blume
2241    Date: 2000/06/19 13:40:00
2242    Tag: blume-20000619-manual
2243    Description:
2244    
2245    CM manual and system/README update.  This only covers the fact that
2246    there are no more implicit anchors.  (Path environments and the "bind"
2247    option to "cm" have yet to be documented.)
2248    
2249    ----------------------------------------------------------------------
2250    Name: Matthias Blume
2251    Date: 2000/06/19 11:05:00 JST
2252    Tag: blume-20000619-chdir-bugfix
2253    Description:
2254    
2255    Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
2256    
2257    ----------------------------------------------------------------------
2258    Name: Matthias Blume
2259    Date: 2000/06/18 22:00:10 JST
2260    Tag: blume-20000618-implicit-anchors-really-gone
2261    Description:
2262    
2263    I updates the previous HISTORY entry where I forgot to mention that
2264    implicit anchors are no longer with us.
2265    
2266    The current update also gets rid of the (now useless) controller
2267    CM.Control.implicit_anchors.
2268    
2269    ----------------------------------------------------------------------
2270    Name: Matthias Blume
2271    Date: 2000/06/16 17:30:00 JST
2272    Tag: blume-20000616-anchorenv
2273    Description:
2274    
2275    This patch implements the long anticipated (just kidding :) "anchor
2276    environment" mechanism.  In the course of doing this, I also
2277    re-implemented CM's internal "SrcPath" module from scratch.  The new
2278    one should be more robust in certain boundary cases.  In any case, it
2279    is a lot cleaner than its predecessor (IMHO).
2280    
2281    This time, although there is yet another boot file format change, I
2282    kept the unpickler backward-compatible.  As a result, no new bootfiles
2283    are necessary and bootstrapping is straightforward.  (You cannot read
2284    new bootfiles into an old system, but the other way around is no
2285    problem.)
2286    
2287    Visible changes:
2288    
2289    ** 0. Implicit path anchors (without the leading $-symbol) are no
2290    longer recognized at all. This means that such path names are not
2291    illegal either.  For example, the name basis.cm simply refers to a
2292    local file called "basis.cm" (i.e, the name is an ordinary path
2293    relative to .cm-files directory).  Or, to put it differently, only
2294    names that start with $ are anchored paths.
2295    
2296    ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
2297    vanished.
2298    
2299    John (Reppy) had critizised this as soon as I originally proposed and
2300    implemented it, but at that time I did not really deeply believe
2301    him. :) Now I came full-circle because I need the $<singlearc> syntax
2302    in another place where it cannot be seen as an abbreviation for
2303    $/<singlearc>.  To avoid the confusion, $<singlearc> now means what it
2304    seems to mean (i.e., it "expands" into the corresponding anchor
2305    value).
2306    
2307    However, when paths are used as members in CM description files, it
2308    continues to be true that there must be at least another arc after the
2309    anchor.  This is now enforced separately during semantic analysis
2310    (i.e., from a lexical/syntactical point of view, the notation is ok.)
2311    
2312    ** 2. The "cm" class now accepts an option "bind".  The option's value
2313    is a sub-option list of precisely two items -- one labeled "anchor"
2314    and the other one labeled "value".  As you might expect, "anchor" is
2315    used to specify an anchor name to be bound, and "value" specifies what
2316    the anchor is being bound to.
2317    
2318    The value must be a directory name and can be given in either standard
2319    syntax (including the possibility that it is itself an anchored path)
2320    or native syntax.
2321    
2322    Examples:
2323    
2324       foo.cm (bind:(anchor:bar value:$mystuff/bar))
2325       lib.cm (bind:(anchor:a value:"H:\\x\\y\\z"))  (* only works under windows *)
2326    
2327    and so on.
2328    
2329    The meaning of this is that the .cm-file will be processed with an
2330    augmented anchor environment where the given anchor(s) is/are bound to
2331    the given values(s).
2332    
2333    The rationale for having this feature is this: Suppose you are trying
2334    to use two different (already stable) libraries a.cm and b.cm (that
2335    you perhaps didn't write yourself).  Further, suppose each of these
2336    two libraries internally uses its own auxiliary library $aux/lib.cm.
2337    Normally you would now have a problem because the anchor "lib" can not
2338    be bound to more than one value globally.  Therefore, the project that
2339    uses both a.cm and b.cm must locally redirect the anchor to some other
2340    place:
2341    
2342       a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
2343       b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
2344    
2345    This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
2346    /usr/lib/smlnj/b-stuff/aux.cm, respectively.
2347    
2348    Hard-wiring path names is a bit inflexible (and CM will verbosely warn
2349    you when you do so at the time of CM.stabilize).  Therefore, you can
2350    also use an anchored path as the value:
2351    
2352      a.cm (bind:(anchor:lib value:$a-lib))
2353      b.cm (bind:(anchor:lib value:$b-lib))
2354    
2355    Now you can globally configure (using the usual CM.Anchor.anchor or
2356    pathconfig machinery) bindings for "a-lib" and "b-lib".  Since "lib"
2357    itself is always locally bound, setting it globally is no longer
2358    meaningful or necessary (but it does not hurt either).  In fact, "lib"
2359    can still be used as a global anchor for separate purposes.  As a
2360    matter of fact, one can locally define "lib" in terms of a global
2361    "lib":
2362    
2363      a.cm (bind:(anchor:lib value:$lib/a))
2364      b.cm (bind:(anchor:lib value:$lib/b))
2365    
2366    ** 3: The encoding of path names has changed.  This affects the way
2367    path names are shown in CM's progress report and also the internal
2368    protocol encoding used for parallel make.
2369    
2370    The encoding now uses one or more ':'-separated segments.  Each
2371    segments corresponds to a file that has been specified relative to the
2372    file given by its preceding segment.  The first segment is either
2373    relative to the CWD, absolute, or anchored.  Each segment itself is
2374    basically a Unix pathname; all segments but the first are relative.
2375    
2376    Example:
2377    
2378       $foo/bar/baz.cm:a/b/c.sml
2379    
2380    This path denotes the file bar/a/b/c.sml relative to the directory
2381    denoted by anchor "foo".  Notice that the encoding also includes
2382    baz.cm which is the .cm-file that listed a/b/c.sml.  As usual, such
2383    paths are resolved relative to the .cm-files directory, so baz.cm must
2384    be ignored to get the "real" pathname.
2385    
2386    To make this fact more obvious, CM puts the names of such "virtual
2387    arcs" into parentheses when they appear in progress reports. (No
2388    parentheses will appear in the internal protocol encoding.)  Thus,
2389    what you really see is:
2390    
2391      $foo/bar/(baz.cm):a/b/c.sml
2392    
2393    I find this notation to be much more informative than before.
2394    
2395    Another new feature of the encoding is that special characters
2396    including parentheses, colons, (back)slashes, and white space are
2397    written as \ddd (where ddd is the decimal encoding of the character).
2398    
2399    *** The CM manual still needs to be updated.
2400    
2401  ----------------------------------------------------------------------  ----------------------------------------------------------------------
2402  Name: Allen Leung  Name: Allen Leung
2403  Date: 2000/06/15 00:38:00  Date: 2000/06/15 00:38:00
# Line 798  Line 3185 
3185       elaborator). There were a lot of changes during my "linkpath" trials       elaborator). There were a lot of changes during my "linkpath" trials
3186       that could have been reverted to their original state but weren't.       that could have been reverted to their original state but weren't.
3187       Please, don't be too harsh on me for messing with this code a bit more       Please, don't be too harsh on me for messing with this code a bit more
3188       than what was strictly necessary...  (I _did_ resist the tempation       than what was strictly necessary...  (I _did_ resist the temptation
3189       of doing any "global reformatting" to avoid an untimely death at       of doing any "global reformatting" to avoid an untimely death at
3190       Dave's hands. :)       Dave's hands. :)
3191    

Legend:
Removed from v.660  
changed lines
  Added in v.984

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