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 840, Fri Jun 15 19:05:19 2001 UTC revision 1126, Thu Mar 7 21:16:28 2002 UTC
# Line 8  Line 8 
8  The form of an entry should be:  The form of an entry should be:
9    
10  Name:  Name:
11  Date:  Date: yyyy/mm/dd
12  Tag: <post-commit CVS tag>  Tag: <post-commit CVS tag>
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16  Name: Matthias Blume  Name: Matthias Blume
17    Date: 2002/03/07 16:15:00 EST
18    Tag: blume-20020307-controls
19    Description:
20    
21    This is a very large but mostly boring patch which makes (almost)
22    every tuneable compiler knob (i.e., pretty much everything under
23    Control.* plus a few other things) configurable via both the command
24    line and environment variables in the style CM did its configuration
25    until now.
26    
27    Try starting sml with '-h' (or, if you are brave, '-H')
28    
29    To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which
30    implements the underlying generic mechanism.
31    
32    The interface to some of the existing such facilities has changed somewhat.
33    For example, the MLRiscControl module now provides mkFoo instead of getFoo.
34    (The getFoo interface is still there for backward-compatibility, but its
35    use is deprecated.)
36    
37    The ml-build script passes -Cxxx=yyy command-line arguments through so
38    that one can now twiddle the compiler settings when using this "batch"
39    compiler.
40    
41    TODO items:
42    
43    We should go through and throw out all controls that are no longer
44    connected to anything.  Moreover, we should go through and provide
45    meaningful (and correct!) documentation strings for those controls
46    that still are connected.
47    
48    Currently, multiple calls to Controls.new are accepted (only the first
49    has any effect).  Eventually we should make sure that every control
50    is being made (via Controls.new) exactly once.  Future access can then
51    be done using Controls.acc.
52    
53    Finally, it would probably be a good idea to use the getter-setter
54    interface to controls rather than ref cells.  For the time being, both
55    styles are provided by the Controls module, but getter-setter pairs are
56    better if thread-safety is of any concern because they can be wrapped.
57    
58    *****************************************
59    
60    One bug fix: The function blockPlacement in three of the MLRISC
61    backpatch files used to be hard-wired to one of two possibilities at
62    link time (according to the value of the placementFlag).  But (I
63    think) it should rather sense the flag every time.
64    
65    *****************************************
66    
67    Other assorted changes (by other people who did not supply a HISTORY entry):
68    
69    1. the cross-module inliner now works much better (Monnier)
70    2. representation of weights, frequencies, and probabilities in MLRISC
71       changed in preparation of using those for weighted block placement
72       (Reppy, George)
73    
74    ----------------------------------------------------------------------
75    Name: Lal George
76    Date: 2002/03/07 14:44:24 EST 2002
77    Tag: george-20020307-weighted-block-placement
78    
79    Tested the weighted block placement optimization on all architectures
80    (except the hppa) using AMPL to generate the block and edge frequencies.
81    Changes were required in the machine properties to correctly
82    categorize trap instructions. There is an MLRISC flag
83    "weighted-block-placement" that can be used to enable weighted block
84    placement, but this will be ineffective without block/edge
85    frequencies (coming soon).
86    
87    
88    ----------------------------------------------------------------------
89    Name: Lal George
90    Date: 2002/03/05 17:24:48 EST
91    Tag: george-20020305-linkage-cluster
92    
93    In order to support the block placement optimization, a new cluster
94    is generated as the very first cluster (called the linkage cluster).
95    It contains a single jump to the 'real' entry point for the compilation
96    unit. Block placement has no effect on the linkage cluster itself, but
97    all the other clusters  have full freedom in the manner in which they
98    reorder blocks or functions.
99    
100    On the x86 the typical linkage code that is generated is:
101       ----------------------
102            .align 2
103       L0:
104            addl    $L1-L0, 72(%esp)
105            jmp     L1
106    
107    
108            .align  2
109       L1:
110       ----------------------
111    
112    72(%esp) is the memory location for the stdlink register. This
113    must contain the address of the CPS function being called. In the
114    above example, it contains the address of  L0; before
115    calling L1 (the real entry point for the compilation unit), it
116    must contain the address for L1, and hence
117    
118            addl $L1-L0, 72(%esp)
119    
120    I have tested this on all architectures except the hppa.The increase
121    in code size is of course negligible
122    
123    ----------------------------------------------------------------------
124    Name: Allen Leung
125    Date: 2002/03/03 13:20:00 EST
126    Tag: leunga-20020303-mlrisc-tools
127    
128      Added #[ ... ] expressions to mlrisc tools
129    
130    ----------------------------------------------------------------------
131    Name: Matthias Blume
132    Date: 2002/02/27 12:29:00 EST
133    Tag: blume-20020227-cdebug
134    Description:
135    
136    - made types in structure C and C_Debug to be equal
137    - got rid of code duplication (c-int.sml vs. c-int-debug.sml)
138    - there no longer is a C_Int_Debug (C_Debug is directly derived from C)
139    
140    ----------------------------------------------------------------------
141    Name: Matthias Blume
142    Date: 2002/02/26 12:00:00 EST
143    Tag: blume-20020226-ffi
144    Description:
145    
146    1. Fixed a minor bug in CM's "noweb" tool:
147       If numbering is turned off, then truly don't number (i.e., do not
148       supply the -L option to noweb).  The previous behavior was to supply
149       -L'' -- which caused noweb to use the "default" line numbering scheme.
150       Thanks to Chris Richards for pointing this out (and supplying the fix).
151    
152    2. Once again, I reworked some aspects of the FFI:
153    
154       A. The incomplete/complete type business:
155    
156       - Signatures POINTER_TO_INCOMPLETE_TYPE and accompanying functors are
157         gone!
158       - ML types representing an incomplete type are now *equal* to
159         ML types representing their corresponding complete types (just like
160         in C).  This is still safe because ml-nlffigen will not generate
161         RTTI for incomplete types, nor will it generate functions that
162         require access to such RTTI.   But when ML code generated from both
163         incomplete and complete versions of the C type meet, the ML types
164         are trivially interoperable.
165    
166         NOTE:  These changes restore the full generality of the translation
167         (which was previously lost when I eliminated functorization)!
168    
169       B. Enum types:
170    
171       - Structure C now has a type constructor "enum" that is similar to
172         how the "su" constructor works.  However, "enum" is not a phantom
173         type because each "T enum" has values (and is isomorphic to
174         MLRep.Signed.int).
175       - There are generic access operations for enum objects (using
176         MLRep.Signed.int).
177       - ml-nlffigen will generate a structure E_foo for each "enum foo".
178         * The structure contains the definition of type "mlrep" (the ML-side
179         representation type of the enum).  Normally, mlrep is the same
180         as "MLRep.Signed.int", but if ml-nlffigen was invoked with "-ec",
181         then mlrep will be defined as a datatype -- thus facilitating
182         pattern matching on mlrep values.
183         ("-ec" will be suppressed if there are duplicate values in an
184          enumeration.)
185         * Constructors ("-ec") or values (no "-ec") e_xxx of type mlrep
186         will be generated for each C enum constant xxx.
187         * Conversion functions m2i and i2m convert between mlrep and
188         MLRep.Signed.int.  (Without "-ec", these functions are identities.)
189         * Coversion functions c and ml convert between mlrep and "tag enum".
190         * Access functions (get/set) fetch and store mlrep values.
191       - By default (unless ml-nlffigen was invoked with "-nocollect"), unnamed
192         enumerations are merged into one single enumeration represented by
193         structure E_'.
194    
195    ----------------------------------------------------------------------
196    Name: Allen Leung
197    Date: 2002/02/25 04:45:00 EST
198    Tag: leunga-20020225-cps-spill
199    
200    This is a new implementation of the CPS spill phase.
201    The new phase is in the new file compiler/CodeGen/cpscompile/spill-new.sml
202    In case of problems, replace it with the old file spill.sml
203    
204    The current compiler runs into some serious performance problems when
205    constructing a large record.  This can happen when we try to compile a
206    structure with many items.  Even a very simple structure like the following
207    makes the compiler slow down.
208    
209        structure Foo = struct
210           val x_1 = 0w1 : Word32.int
211           val x_2 = 0w2 : Word32.int
212           val x_3 = 0w3 : Word32.int
213           ...
214           val x_N = 0wN : Word32.int
215        end
216    
217    The following table shows the compile time, from N=1000 to N=4000,
218    with the old compiler:
219    
220    N
221    1000   CPS 100 spill                           0.04u  0.00s  0.00g
222           MLRISC ra                               0.06u  0.00s  0.05g
223              (spills = 0 reloads = 0)
224           TOTAL                                   0.63u  0.07s  0.21g
225    
226    1100   CPS 100 spill                           8.25u  0.32s  0.64g
227           MLRISC ra                               5.68u  0.59s  3.93g
228              (spills = 0 reloads = 0)
229           TOTAL                                   14.71u  0.99s  4.81g
230    
231    1500   CPS 100 spill                           58.55u  2.34s  1.74g
232           MLRISC ra                               5.54u  0.65s  3.91g
233              (spills = 543 reloads = 1082)
234           TOTAL                                   65.40u  3.13s  6.00g
235    
236    2000   CPS 100 spill                           126.69u  4.84s  3.08g
237           MLRISC ra                               0.80u  0.10s  0.55g
238              (spills = 42 reloads = 84)
239           TOTAL                                   129.42u  5.10s  4.13g
240    
241    3000   CPS 100 spill                           675.59u  19.03s  11.64g
242           MLRISC ra                               2.69u  0.27s  1.38g
243              (spills = 62 reloads = 124)
244           TOTAL                                   682.48u  19.61s  13.99g
245    
246    4000   CPS 100 spill                           2362.82u  56.28s  43.60g
247           MLRISC ra                               4.96u  0.27s  2.72g
248              (spills = 85 reloads = 170)
249           TOTAL                                   2375.26u  57.21s  48.00g
250    
251    As you can see the old cps spill module suffers from some serious
252    performance problem.  But since I cannot decipher the old code fully,
253    instead of patching the problems up, I'm reimplementing it
254    with a different algorithm.  The new code is more modular,
255    smaller when compiled, and substantially faster
256    (O(n log n) time and O(n) space).  Timing of the new spill module:
257    
258    4000  CPS 100 spill                           0.02u  0.00s  0.00g
259          MLRISC ra                               0.25u  0.02s  0.15g
260             (spills=1 reloads=3)
261          TOTAL                                   7.74u  0.34s  1.62g
262    
263    Implementation details:
264    
265    As far as I can tell, the purpose of the CPS spill module is to make sure the
266    number of live variables at any program point (the bandwidth)
267    does not exceed a certain limit, which is determined by the
268    size of the spill area.
269    
270    When the bandwidth is too large, we decrease the register pressure by
271    packing live variables into spill records.  How we achieve this is
272    completely different than what we did in the old code.
273    
274    First, there is something about the MLRiscGen code generator
275    that we should be aware of:
276    
277    o MLRiscGen performs code motion!
278    
279       In particular, it will move floating point computations and
280       address computations involving only the heap pointer to
281       their use sites (if there is only a single use).
282       What this means is that if we have a CPS record construction
283       statement
284    
285           RECORD(k,vl,w,e)
286    
287       we should never count the new record address w as live if w
288       has only one use (which is often the case).
289    
290       We should do something similar to floating point, but the transformation
291       there is much more complex, so I won't deal with that.
292    
293    Secondly, there are now two new cps primops at our disposal:
294    
295     1. rawrecord of record_kind option
296        This pure operator allocates some uninitialized storage from the heap.
297        There are two forms:
298    
299         rawrecord NONE [INT n]  allocates a tagless record of length n
300         rawrecord (SOME rk) [INT n] allocates a tagged record of length n
301                                     and initializes the tag.
302    
303     2. rawupdate of cty
304          rawupdate cty (v,i,x)
305          Assigns to x to the ith component of record v.
306          The storelist is not updated.
307    
308    We use these new primops for both spilling and increment record construction.
309    
310     1. Spilling.
311    
312        This is implemented with a linear scan algorithm (but generalized
313        to trees).  The algorithm will create a single spill record at the
314        beginning of the cps function and use rawupdate to spill to it,
315        and SELECT or SELp to reload from it.  So both spills and reloads
316        are fine-grain operations.  In contrast, in the old algorithm
317        "spills" have to be bundled together in records.
318    
319        Ideally, we should sink the spill record construction to where
320        it is needed.  We can even split the spill record into multiple ones
321        at the places where they are needed.  But CPS is not a good
322        representation for global code motion, so I'll keep it simple and
323        am not attempting this.
324    
325     2. Incremental record construction (aka record splitting).
326    
327        Long records with many component values which are simulatenously live
328        (recall that single use record addresses are not considered to
329         be live) are constructed with rawrecord and rawupdate.
330        We allocate space on the heap with rawrecord first, then gradually
331        fill it in with rawupdate.  This is the technique suggested to me
332        by Matthias.
333    
334        Some restrictions on when this is applicable:
335        1. It is not a VECTOR record.  The code generator currently does not handle
336           this case. VECTOR record uses double indirection like arrays.
337        2. All the record component values are defined in the same "basic block"
338           as the record constructor.  This is to prevent speculative
339           record construction.
340    
341    ----------------------------------------------------------------------
342    Name: Allen Leung
343    Date: 2002/02/22 01:02:00 EST
344    Tag: leunga-20020222-mlrisc-tools
345    
346    Minor bug fixes in the parser and rewriter
347    
348    ----------------------------------------------------------------------
349    Name: Allen Leung
350    Date: 2002/02/21 20:20:00 EST
351    Tag: leunga-20020221-peephole
352    
353    Regenerated the peephole files.  Some contained typos in the specification
354    and some didn't compile because of pretty printing bugs in the old version
355    of 'nowhere'.
356    
357    ----------------------------------------------------------------------
358    Name: Allen Leung
359    Date: 2002/02/19 20:20:00 EST
360    Tag: leunga-20020219-mlrisc-tools
361    Description:
362    
363       Minor bug fixes to the mlrisc-tools library:
364    
365       1.  Fixed up parsing colon suffixed keywords
366       2.  Added the ability to shut the error messages up
367       3.  Reimplemented the pretty printer and fixed up/improved
368           the pretty printing of handle and -> types.
369       4.  Fixed up generation of literal symbols in the nowhere tool.
370       5.  Added some SML keywords to to sml.sty
371    
372    ----------------------------------------------------------------------
373    Name: Matthias Blume
374    Date: 2002/02/19 16:20:00 EST
375    Tag: blume-20020219-cmffi
376    Description:
377    
378    A wild mix of changes, some minor, some major:
379    
380    * All C FFI-related libraries are now anchored under $c:
381        $/c.cm      --> $c/c.cm
382        $/c-int.cm  --> $c/internals/c-int.cm
383        $/memory.cm --> $c/memory/memory.cm
384    
385    * "make" tool (in CM) now treats its argument pathname slightly
386      differently:
387        1. If the native expansion is an absolute name, then before invoking
388           the "make" command on it, CM will apply OS.Path.mkRelative
389           (with relativeTo = OS.FileSys.getDir()) to it.
390        2. The argument will be passed through to subsequent phases of CM
391           processing without "going native".  In particular, if the argument
392           was an anchored path, then "make" will not lose track of that anchor.
393    
394    * Compiler backends now "know" their respective C calling conventions
395      instead of having to be told about it by ml-nlffigen.  This relieves
396      ml-nlffigen from one of its burdens.
397    
398    * The X86Backend has been split into X86CCallBackend and X86StdCallBackend.
399    
400    * Export C_DEBUG and C_Debug from $c/c.cm.
401    
402    * C type encoding in ml-nlffi-lib has been improved to model the conceptual
403      subtyping relationship between incomplete pointers and their complete
404      counterparts.  For this, ('t, 'c) ptr has been changed to 'o ptr --
405      with the convention of instantiating 'o with ('t, 'c) obj whenever
406      the pointer target type is complete.  In the incomplete case, 'o
407      will be instantiated with some "'c iobj" -- a type obtained by
408      using one of the functors PointerToIncompleteType or PointerToCompleteType.
409    
410      Operations that work on both incomplete and complete pointer types are
411      typed as taking an 'o ptr while operations that require the target to
412      be known are typed as taking some ('t, 'c) obj ptr.
413    
414      voidptr is now a bit "more concrete", namely "type voidptr = void ptr'"
415      where void is an eqtype without any values.  This makes it possible
416      to work on voidptr values using functions meant to operate on light
417      incomplete pointers.
418    
419    * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has
420      been vastly simplified.
421    
422    ----------------------------------------------------------------------
423    Name: Matthias Blume
424    Date: 2002/02/19 10:48:00 EST
425    Tag: blume-20020219-pqfix
426    Description:
427    
428    Applied Chris Okasaki's bug fix for priority queues.
429    
430    ----------------------------------------------------------------------
431    Name: Matthias Blume
432    Date: 2002/02/15 17:05:00
433    Tag: Release_110_39
434    Description:
435    
436    Last-minute retagging is becoming a tradition... :-(
437    
438    This is the working release 110.39.
439    
440    ----------------------------------------------------------------------
441    Name: Matthias Blume
442    Date: 2002/02/15 16:00:00 EST
443    Tag: Release_110_39-orig
444    Description:
445    
446    Working release 110.39.  New bootfiles.
447    
448    (Update: There was a small bug in the installer so it wouldn't work
449    with all shells.  So I retagged. -Matthias)
450    
451    ----------------------------------------------------------------------
452    Name: Matthias Blume
453    Date: 2002/02/15 14:17:00 EST
454    Tag: blume-20020215-showbindings
455    Description:
456    
457    Added EnvRef.listBoundSymbols and CM.State.showBindings.  Especially
458    the latter can be useful for exploring what bindings are available at
459    the interactive prompt.  (The first function returns only the list
460    of symbols that are really bound, the second prints those but also the
461    ones that CM's autoloading mechanism knows about.)
462    
463    ----------------------------------------------------------------------
464    Name: Matthias Blume
465    Date: 2002/02/15 12:08:00 EST
466    Tag: blume-20020215-iptrs
467    Description:
468    
469    Two improvements to ml-nlffigen:
470    
471      1. Write files only if they do not exist or if their current contents
472         do not coincide with what's being written.  (That is, avoid messing
473         with the time stamps unless absolutely necessary.)
474    
475      2. Implement a "repository" mechanism for generated files related
476         to "incomplete pointer types".   See the README file for details.
477    
478    ----------------------------------------------------------------------
479    Name: Matthias Blume
480    Date: 2002/02/14 11:50:00 EST
481    Tag: blume-20020214-quote
482    Description:
483    
484    Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm).  This is required
485    because of the new and improved tag generation scheme.  (Thanks to Allen
486    Leung for pointing it out.)
487    
488    ----------------------------------------------------------------------
489    Name: Lal George
490    Date: 2002/02/14 09:55:27 EST 2002
491    Tag: george-20020214-isabelle-bug
492    Description:
493    
494    Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation
495    of Isabelle on the x86.
496    
497    From Allen:
498    -----------
499     I've found the problem:
500    
501         in ra-core.sml, I use the counter "blocked" to keep track of the
502         true number of elements in the freeze queue.  When the counter goes
503         to zero, I skip examining the queue.  But I've messed up the
504         bookkeeping in combine():
505    
506             else ();
507             case !ucol of
508               PSEUDO => (if !cntv > 0 then
509                     (if !cntu > 0 then blocked := !blocked - 1 else ();
510                                        ^^^^^^^^^^^^^^^^^^^^^^^
511                      moveu := mergeMoveList(!movev, !moveu)
512                     )
513                  else ();
514    
515         combine() is called to coalesce two nodes u and v.
516         I think I was thinking that if the move counts of u and v are both
517         greater than zero then after they are coalesced then one node is
518         removed from the freeze queue.  Apparently I was thinking that
519         both u and v are of low degree, but that's clearly not necessarily true.
520    
521    
522    02/12/2002:
523        Here's the patch.  HOL now compiles.
524    
525        I don't know how this impact on performance (compile
526        time or runtime).  This bug caused the RA (especially on the x86)
527        to go thru the potential spill phase when there are still nodes on the
528        freeze queue.
529    
530    
531    
532    
533    ----------------------------------------------------------------------
534    Name: Matthias Blume
535    Date: 2002/02/13 22:40:00 EST
536    Tag: blume-20020213-fptr-rtti
537    Description:
538    
539    Fixed a bug in ml-nlffigen that was introduced with one of the previous
540    updates.
541    
542    ----------------------------------------------------------------------
543    Name: Matthias Blume
544    Date: 2002/02/13 16:41:00 EST
545    Tag: blume-20020213-cmlpq
546    Description:
547    
548    Added new priority queue export symbols (which have just been added to
549    smlnj-lib.cm) to CML's version of smlnj-lib.cm.  (Otherwise CML would
550    not compile and the installer would choke.)
551    
552    ----------------------------------------------------------------------
553    Name: Matthias Blume
554    Date: 2002/02/13 16:15:00 EST
555    Tag: blume-20020213-various
556    Description:
557    
558    1. More tweaks to ml-nlffigen:
559    
560       - better internal datastructures (resulting in slight speedup)
561       - "-match" option requires exact match
562       - "localized" gensym counters (untagged structs/unions nested within
563         other structs/unions or within typedefs get a fresh counter; their
564         tag will be prefixed by a concatenation of their parents' tags)
565       - bug fixes (related to calculation of transitive closure of types
566         to be included in the output)
567    
568    2. Minor Basis updates:
569    
570       - added implementations for List.collate and Option.app
571    
572    ----------------------------------------------------------------------
573    Name: Matthias Blume
574    Date: 2002/02/11 15:55:00 EST
575    Tag: blume-20020211-gensym
576    Description:
577    
578    Added a "-gensym" option to command line of ml-nlffigen.  This can be
579    used to specify a "stem" -- a string that is inserted in all "gensym'd"
580    names (ML structure names that correspond to unnamed C structs, unions,
581    and enums), so that separate runs of ml-nlffigen do not clash.
582    
583    ----------------------------------------------------------------------
584    Name: Matthias Blume
585    Date: 2002/02/11 12:05:00 EST
586    Tag: blume-20020211-gensml
587    Description:
588    
589    A quick fix for a problem with GenSML (in the pgraph-util library):
590    Make generation of toplevel "local" optional.  (Strictly speaking,
591    signature definitions within "local" are not legal SML.)
592    
593    Other than that: updates to INSTALL and cm/TODO.
594    
595    ----------------------------------------------------------------------
596    Name: Matthias Blume
597    Date: 2002/02/08 15:00:00 EST
598    Tag: blume-20020208-uniquepid
599    Description:
600    
601    0. Version number has been bumped to 110.38.1.  NEW BOOTFILES!!!
602    
603    1. The installer (config/install.sh) has gotten smarter:
604    
605         - Configuration options are a bit easier to specify now
606           (in config/targets).
607         - Bug in recognizing .tar.bz2 files fixed.
608         - Installer automatically resolves dependencies between
609           configuration options (e.g., if you ask for eXene, you will
610           also get cml -- regardless whether you asked for it or not).
611         - Installer can run in "quieter mode" by setting the environment
612           variable INSTALL_QUIETLY to "true".  "Quieter" does not mean
613           "completely silent", though.
614         - Build HashCons library as part of smlnj-lib.
615    
616    2. A new scheme for assigning persistent identifiers to compilation
617       units (and, by extension, to types etc.) has been put into place.
618       This fixes a long-standing bug where types and even dynamic values
619       can get internally confused, thereby compromising type safety
620       (abstraction) and dynamic correctness.  See
621    
622         http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz
623    
624       for an example of how things could go wrong until now.
625    
626       The downside of the new scheme is that pids are not quite as
627       persistent as they used to be: CM will generate a fresh pid
628       for every compilation unit that it thinks it sees for the first
629       time.  That means that if you compile starting from a clean, fresh
630       source tree at two different times, you end up with different
631       binaries.
632    
633       Cutoff recompilation, however, has not been compromised because
634       CM keeps pid information in special caches between runs.
635    
636    ----------------------------------------------------------------------
637    Name: Lal George
638    Date: 2002/02/07 15:34:13 EST 2002
639    Tag: <none>
640    Description:
641    
642    Compilers that generate assembly code may produce  global labels
643    whose value is resolved at link time. The various peephole optimization
644    modules did not take this in account.
645    
646    TODO. The Labels.addrOf function should really return an option
647    type so that clients are forced to deal with this issue, rather
648    than an exception being raised.
649    
650    ----------------------------------------------------------------------
651    Name: Lal George
652    Date: 2002/02/06 13:55:02 EST
653    Tag: george-20020206-ra-breakup
654    Description:
655    
656    1. A bug fix from Allen.
657    
658        A typo causes extra fstp %st(0)'s to be generated at compensation
659        edges, which might cause stack underflow traps at runtime.  This
660        occurs in fft where there are extraneous fstps right before the 'into'
661        trap instruction (in this case they are harmless since none of the
662        integers overflow.)
663    
664    2. Pulled out various utility modules that were embedded in the modules
665       of the register allocator. I need these modules for other purposes, but
666       they are not complete enough to put into a library (just yet).
667    ----------------------------------------------------------------------
668    Name: Matthias Blume
669    Date: 2002/01/31 16:05:00 EST
670    Tag: blume-20020131-sparc-ccalls
671    Description:
672    
673    1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes)
674       of extra stack space by mistake.  Fixed.
675    
676    2. Bug in logic of handling of command-line options in ml-nlffigen fixed.
677    
678    ----------------------------------------------------------------------
679    Name: Allen Leung
680    Date: 2002/01/30
681    Tag: leunga-20020130-nowhere-bug-fix
682    Description:
683    
684       MLRISC bug fixes:
685       1. Fixed a bindings computation bug in the 'nowhere' program generator tool.
686       2. MachineInt.fromString was negating its value.
687    
688    ----------------------------------------------------------------------
689    Name: Matthias Blume
690    Date: 2002/01/29
691    Tag: blume-20020129-INSTALL
692    Description:
693    
694    - Added somewhat detailed installation instructions (file INSTALL).
695    - Fixed curl-detection bug in config/install.sh.
696    - It is now possible to select the URL getter using the URLGETTER
697      environment variable:
698    
699          not set / "unknown"      --> automatic detection (script tries wget,
700                                       curl, and lynx)
701          "wget" / "curl" / "lynx" --> use the specified program (script "knows"
702                                       how to properly invoke them)
703          other                    --> use $URLGETTER directly, it must take
704                                       precisely two command-line arguments
705                                       (source URL and destination file name)
706    
707    ----------------------------------------------------------------------
708    Name: Matthias Blume
709    Date: 2002/01/28
710    Tag: blume-20020128-sparc-ccalls
711    Description:
712    
713    - Fixed problem with calculation of "used" registers in sparc-c-calls.
714    - Make use of the allocParam argument in sparc-c-calls.
715    
716    ----------------------------------------------------------------------
717    Name: Matthias Blume
718    Date: 2002/01/28
719    Tag: blume-20020128-allocParam
720    Description:
721    
722    John Reppy:  Changes c-calls API to accept client-callback for
723    allocating extra stack space.
724    me: Corresponding changes to mlriscGen (using a dummy argument that
725        does not change the current behavior).
726    
727    ----------------------------------------------------------------------
728    Name: Matthias Blume
729    Date: 2002/01/28 12:00:00
730    Tag: Release_110_38
731    Description:
732    
733    This time for real!!!
734    
735    ----------------------------------------------------------------------
736    Name: Matthias Blume
737    Date: 2002/01/28 10:56:00 EST
738    Tag: blume-20020128-retraction
739    Description:
740    
741    0. Retracted earlier 110.38.  (The Release_110_38 tag has been replaced
742       with blume-Release_110_38-retracted.)
743    
744    1. Fixed a problem with incorrect rounding modes in real64.sml.
745       (Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.)
746    
747    2. A bug in ml-nlffigen related to the handling of unnamed structs, unions,
748       and enums fixed.  The naming of corresponding ML identifiers should
749       now be consistent again.
750    
751    ----------------------------------------------------------------------
752    Name: Allen Leung
753    Date: 2002/01/27
754    Tag: leunga-20020127-nowhere
755    Description:
756    
757       Added a target called nowhere in the configuration scripts.
758       Enabling this will build the MLRISC 'nowhere' tool (for translating
759       programs with where-clauses into legal SML code) during installation.
760    
761    ----------------------------------------------------------------------
762    Name: Matthias Blume
763    Date: 2002/01/25 21:27:00 EST
764    Tag: blume-Release_110_38-retracted
765    Description:
766    
767    Call it a (working) release!  Version is 110.38. Bootfiles are ready.
768    
769    README will be added later.
770    
771    !!! NOTE:  Re-tagged as blume-Release_110_38-retracted. Original tag
772    (Release_110_38) removed.  Reason: Last-minute bug fixes.
773    
774    ----------------------------------------------------------------------
775    Name: Matthias Blume
776    Date: 2002/01/25
777    Tag: blume-20020125-ffi
778    Description:
779    
780    A large number of tweaks and improvements to ml-nlffi-lib and
781    ml-nlffigen:
782    
783       - ML represenation types have been streamlined
784       - getter and setter functions work with concrete values, not abstract
785         ones where possible
786       - ml-nlffigen command line more flexible (see README file there)
787       - some bugs have been fixed (hopefully)
788    
789    ----------------------------------------------------------------------
790    Name: Lal George
791    Date: 2002/01/24
792    Tag: george-20020124-risc-ra-interface
793    Description:
794    
795       There is a dramatic simplification in the interface to the
796       register allocator for RISC architectures as a result of making
797       parallel copy instructions explicit.
798    
799    ----------------------------------------------------------------------
800    Name: Matthias Blume
801    Date: 2002/01/22
802    Tag: blume-20020122-x86-ccalls
803    Description:
804    
805    Bug fix for c-calls on x86 (having to do with how char- and
806    short-arguments are being handled).
807    
808    ----------------------------------------------------------------------
809    Name: Matthias Blume
810    Date: 2002/01/21
811    Tag: blume-20020121-ff
812    Description:
813    
814    Another day of fiddling with the FFI...
815    
816    1. Bug fix/workaround:  CKIT does not complain about negative array
817       dimensions, so ml-nlffigen has to guard itself against this possibility.
818       (Otherwise a negative dimension would send it into an infinite loop.)
819    
820    2. Some of the abstract types (light objects, light pointers, most "base"
821       types) in structure C are now eqtypes.
822    
823    3. Added constructors and test functions for NULL function pointers.
824    
825    ----------------------------------------------------------------------
826    Name: Matthias Blume
827    Date: 2002/01/18
828    Tag: blume-20020118-ready-for-new-release
829    Description:
830    
831    Made config/srcarchiveurl point to a new place.  (Will provide boot
832    files shortly.)
833    
834    Maybe we christen this to be 110.38?
835    
836    ----------------------------------------------------------------------
837    Name: Matthias Blume
838    Date: 2002/01/18
839    Tag: blume-20020118-more-ffifiddle
840    Description:
841    
842    Today's FFI fiddling:
843    
844      - Provided a structure CGetSet with "convenient" versions of C.Get.* and
845        C.Set.* that use concrete (MLRep.*) arguments and results instead
846        of abstract ones.
847    
848      - Provided word-style bit operations etc. for "int" representation
849        types in MLRep.S<Foo>Bitops where <Foo> ranges over Char, Int, Short,
850        and Long.
851    
852    ----------------------------------------------------------------------
853    Name: Matthias Blume
854    Date: 2002/01/18
855    Tag: blume-20020118-use-x86-fp
856    Description:
857    
858    Now that x86-fast-fp seems to be working, I turned it back on again
859    by default.  (Seems to work fine now, even with the FFI.)
860    
861    Other than that, I added some documentation about the FFI to
862    src/ml-nlffigen/README and updated the FFI test examples in
863    src/ml-nlffi-lib/Tests/*.
864    
865    ----------------------------------------------------------------------
866    Name: Allen Leung
867    Date: 2002/01/17
868    Tag: leunga-20020117-x86-fast-fp-call
869    Description:
870    
871       1. Fixed a problem with handling return fp values when x86's fast fp
872          mode is turned on.
873    
874       2. Minor pretty printing fix for cellset.  Print %st(0) as %st(0) instead
875          of %f32.
876    
877       3. Added a constructor INT32lit to the ast of MLRISC tools.
878    
879    ----------------------------------------------------------------------
880    Name: Matthias Blume
881    Date: 2002/01/16
882    Tag: blume-20020116-ffifiddle
883    Description:
884    
885    More fiddling with the FFI interface:
886    
887     - Make constness 'c instead of rw wherever possible.  This eliminates
888       the need for certain explicit coercions.  (However, due to ML's
889       value polymorphism, there will still be many cases where explicit
890       coercions are necessary.  Phantom types are not the whole answer
891       to modeling a subtyping relationship in ML.)
892    
893     - ro/rw coersions for pointers added.  (Avoids the detour through */&.)
894    
895     - "printf" test example added to src/ml-nlffi-lib/Tests.  (Demonstrates
896       clumsy workaround for varargs problem.)
897    
898    ----------------------------------------------------------------------
899    Name: Lal George
900    Date: 2002/01/15
901    Tag: <none>
902    Description:
903    
904    1. Since COPY instructions are no longer native to the architecture,
905       a generic functor can be used to implement the expandCopies function.
906    
907    2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a
908       TEXT segment.
909    
910    ----------------------------------------------------------------------
911    Name: Matthias Blume
912    Date: 2002/01/15
913    Tag: blume-20020115-ffiupdates
914    Description:
915    
916    1. Fix for bug resulting in single-precision float values being returned
917       incorrectly from FFI calls.
918    
919    2. Small modifications to C FFI API:
920    
921        - memory-allocation routines return straight objects (no options)
922          and raise an exception in out-of-memory situations
923        - unsafe extensions to cast between function pointers and pointers
924          from/to ints
925        - added structure C_Debug as an alternative to structure C where
926          pointer-dereferencing (|*| and |*!) always check for null-pointers
927        - added open_lib' to DynLinkage;  open_lib' works like open_lib
928          but also takes a (possibly empty) list of existing library handles
929          that the current library depends on
930    
931    ----------------------------------------------------------------------
932    Name: Matthias Blume
933    Date: 2002/01/10
934    Tag: blume-20020110-newffigen
935    Description:
936    
937    1. Updates to portable graph code.
938    
939    2. Major update to ml-nlffigen and ml-nlffi-lib.  Things are much
940       more scalable now so that even huge interfaces such as the one
941       for GTK compile in finite time and space. :-)
942       See src/ml-nlffigen/README for details on what's new.
943    
944    ----------------------------------------------------------------------
945    Name: Lal George
946    Date: 2001/01/09 14:31:35 EST 2002
947    Tag: george-20011206-rm-native-copy
948    Description:
949    
950            Removed the native COPY and FCOPY instructions
951            from all the architectures and replaced it with the
952            explicit COPY instruction from the previous commit.
953    
954            It is now possible to simplify many of the optimizations
955            modules that manipulate copies. This has not been
956            done in this change.
957    
958    ----------------------------------------------------------------------
959    Name: Lal George
960    Date: 2001/12/06 16:50:13 EST 2001
961    Tag: george-20011206-mlrisc-instruction
962    Description:
963    
964    Changed the representation of instructions from being fully abstract
965    to being partially concrete. That is to say:
966    
967      from
968            type instruction
969    
970      to
971            type instr                              (* machine instruction *)
972    
973            datatype instruction =
974                LIVE of {regs: C.cellset, spilled: C.cellset}
975              | KILL of {regs: C.cellset, spilled: C.cellset}
976              | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
977              | ANNOTATION of {i: instruction, a: Annotations.annotation}
978              | INSTR of instr
979    
980    This makes the handling of certain special instructions that appear on
981    all architectures easier and uniform.
982    
983    LIVE and KILL say that a list of registers are live or killed at the
984    program point where they appear. No spill code is generated when an
985    element of the 'regs' field is spilled, but the register is moved to
986    the 'spilled' (which is present, more for debugging than anything else).
987    
988    LIVE replaces the (now deprecated) DEFFREG instruction on the alpha.
989    We used to generate:
990    
991            DEFFREG f1
992            f1 := f2 + f3
993            trapb
994    
995    but now generate:
996    
997            f1 := f2 + f3
998            trapb
999            LIVE {regs=[f1,f2,f3], spilled=[]}
1000    
1001    Furthermore, the DEFFREG (hack) required that all floating point instruction
1002    use all registers mentioned in the instruction. Therefore f1 := f2 + f3,
1003    defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting
1004    in a cleaner alpha implementation. (Hopefully, intel will not get rid of
1005    this architecture).
1006    
1007    COPYXXX is intended to replace the parallel COPY and FCOPY  available on
1008    all the architectures. This will result in further simplification of the
1009    register allocator that must be aware of them for coalescing purposes, and
1010    will also simplify certain aspects of the machine description that provides
1011    callbacks related to parallel copies.
1012    
1013    ANNOTATION should be obvious, and now INSTR represents the honest to God
1014    machine instruction set!
1015    
1016    The <arch>/instructions/<arch>Instr.sml files define certain utility
1017    functions for making porting easier -- essentially converting upper case
1018    to lower case. All machine instructions (of type instr) are in upper case,
1019    and the lower case form generates an MLRISC instruction. For example on
1020    the alpha we have:
1021    
1022      datatype instr =
1023         LDA of {r:cell, b:cell, d:operand}
1024       | ...
1025    
1026      val lda : {r:cell, b:cell, d:operand} -> instruction
1027        ...
1028    
1029    where lda is just (INSTR o LDA), etc.
1030    
1031    ----------------------------------------------------------------------
1032    Name: Matthias Blume
1033    Date: 2001/11/22 21:40:00 EST
1034    Tag: Release_110_37
1035    Description:
1036    
1037    Release 110.37.  This time for real.
1038    
1039    ----------------------------------------------------------------------
1040    Name: Matthias Blume
1041    Date: 2001/11/21 16:35:00 EST
1042    Tag: blume-20011121-foot-in-mouth
1043    Description:
1044    
1045    Removed the "Release_110_37" tag because of a serious bug.
1046    This will be re-tagged once the bug is fixed.
1047    
1048    ----------------------------------------------------------------------
1049    Name: Matthias Blume
1050    Date: 2001/11/21 16:14:00 EST
1051    Tag: blume-20011121-forgottenfile
1052    Description:
1053    
1054    Forgot to add a file.  (Just a .tex-file -- part of
1055    the CM manual source.)
1056    
1057    ----------------------------------------------------------------------
1058    Name: Matthias Blume
1059    Date: 2001/11/21 16:10:00 EST
1060    Tag: blume-20011121-invalid_110_37
1061    Description:
1062    
1063    Note: I removed the original tag "Release_110_37" from this commit
1064          because we found a serious bug in all non-x86 backends.
1065          - Matthias
1066    
1067    1. Modifications to the SML/NJ code generator and to the runtime system
1068       so that code object name strings are directly inserted into code
1069       objects at code generation time.  The only business the runtime system
1070       has with this is now to read the name strings on occasions.
1071       (The encoding of the name string has also changed somewhat.)
1072    
1073    2. CM now implements a simple "set calculus" for specifying export lists.
1074       In particular, it is now possible to refer to the export lists of
1075       other libraries/groups/sources and form unions as well as differences.
1076       See the latest CM manual for details.
1077    
1078    3. An separate notion of "proxy" libraries has again be eliminated from
1079       CM's model.  (Proxy libraries are now simply a special case of using
1080       the export list calculus.)
1081    
1082    4. Some of the existing libraries now take advantage of the new set
1083       calculus.
1084       (Notice that not all libraries have been converted because some
1085       of the existing .cm-files are supposed to be backward compatible
1086       with 110.0.x.)
1087    
1088    5. Some cleanup in stand-alone programs.  (Don't use "exnMessage" -- use
1089       "General.exnMessage"!  The former relies on a certain hook to be
1090       initialized, and that often does not happen in the stand-alone case.)
1091    
1092    ----------------------------------------------------------------------
1093    Name: Lal George
1094    Date: 2001/11/21  13:56:18 EST
1095    Tag: george-2001121-pseudo-ops
1096    Description:
1097    
1098      Implemented a complete redesign of MLRISC pseudo-ops. Now there
1099      ought to never be any question of incompatabilities with
1100      pseudo-op syntax expected by host assemblers.
1101    
1102      For now, only modules supporting GAS syntax are implemented
1103      but more should follow, such as MASM, and vendor assembler
1104      syntax, e.g. IBM as, Sun as, etc.
1105    
1106    ----------------------------------------------------------------------
1107    Name: Matthias Blume
1108    Date: 2001/11/14 11:52:00 EST
1109    Tag: blume-20011114-srcname
1110    Description:
1111    
1112    1. Routed the name of the current source file to mlriscgen where it
1113       should be directly emitted into the code object.  (This last part
1114       is yet to be done.)
1115    
1116    2. Some cleanup of the pgraph code to make it match the proposal that
1117       I put out the other day.  (The proposal notwithstanding, things are
1118       still in flux here.)
1119    
1120    ----------------------------------------------------------------------
1121    Name: Lal George
1122    Date: 2001/11/14 09:44:04 EST
1123    Tag:
1124    Description:
1125    
1126      Fix for a backpatching bug reported by Allen.
1127    
1128      Because the boundary between short and long span-dependent
1129      instructions is +/- 128, there are an astounding number of
1130      span-dependent instructions whose size is over estimated.
1131    
1132      Allen came up with the idea of letting the size of span
1133      dependent instructions be non-monotonic, for a maxIter
1134      number of times, after which the size must be monotonically
1135      increasing.
1136    
1137      This table shows the number of span-dependent instructions
1138      whose size was over-estimated as a function of maxIter, for the
1139      file Parse/parse/ml.grm.sml:
1140    
1141         maxIter            # of instructions:
1142            10                      687
1143            20                      438
1144            30                      198
1145            40                        0
1146    
1147      In compiling the compiler, there is no significant difference in
1148      compilation speed between maxIter=10 and maxIter=40. Actually,
1149      my measurements showed that maxIter=40 was a tad faster than
1150      maxIter=10! Also 96% of the  files in the compiler reach a fix
1151      point within 13 iterations, so fixing maxIter at 40, while high,
1152      is okay.
1153    
1154    ----------------------------------------------------------------------
1155    Name: Matthias Blume
1156    Date: 2001/10/31 15:25:00 EST
1157    Tag: blume-20011031-pgraph
1158    Description:
1159    
1160    CKIT:
1161    * Changed the "Function" constructor of type Ast.ctype to carry optional
1162      argument identifiers.
1163    * Changed the return type of TypeUtil.getFunction accordingly.
1164    * Type equality ignores the argument names.
1165    * TypeUtil.composite tries to preserve argument names but gives up quickly
1166      if there is a mismatch.
1167    
1168    installation script:
1169    * attempts to use "curl" if available (unless "wget" is available as well)
1170    
1171    CM:
1172    * has an experimental implementation of "portable graphs" which I will
1173      soon propose as an implementation-independent library format
1174    * there are also new libraries $/pgraph.cm and $/pgraph-util.cm
1175    
1176    NLFFI-LIB:
1177    * some cleanup (all cosmetic)
1178    
1179    NLFFIGEN:
1180    * temporarily disabled the mechanism that suppresses ML output for
1181      C definitions whose identifiers start with an underscore character
1182    * generate val bindings for enum constants
1183    * user can request that only one style (light or heavy) is being used;
1184      default is to use both (command-line arguments: -heavy and -light)
1185    * fixed bug in handling of function types involving incomplete pointers
1186    * generate ML entry points that take record arguments (i.e., using
1187      named arguments) for C functions that have a prototype with named
1188      arguments
1189      (see changes to CKIT)
1190    
1191    ----------------------------------------------------------------------
1192    Name: Allen Leung
1193    Date: 2001/10/27 20:34:00 EDT
1194    Tag: leunga-20011027-x86-fast-fp-call
1195    Description:
1196    
1197       Fixed the bug described in blume-20010920-slowfp.
1198    
1199       The fix involves
1200          1. generating FCOPYs in FSTP in ia32-svid
1201          2. marking a CALL with the appropriate annotation
1202    
1203    ----------------------------------------------------------------------
1204    Name: Matthias Blume
1205    Date: 2001/10/16 11:32:00 EDT
1206    Tag: blume-20011016-netbsd
1207    Description:
1208    
1209    Underscore patch from Chris Richards (fixing problem with compiling
1210    runtime system under recent NetBSD).
1211    
1212    ----------------------------------------------------------------------
1213    Name: Allen Leung
1214    Date: 2001/10/12 17:18:32 EDT 2001
1215    Tag: leung-20011012-x86-printflowgraph
1216    Description:
1217    
1218    X86RA now uses a valid (instead of dummy) PrintFlowgraph module.
1219    
1220    ----------------------------------------------------------------------
1221    Name: Lal George
1222    Date: 2001/10/11 23:51:34 EDT
1223    Tag: george-20011011-too-many-instrs
1224    Description:
1225    
1226    The representation of a program point never expected to see more
1227    than 65536 instructions in a basic block!
1228    
1229    ----------------------------------------------------------------------
1230    Name: Lal George
1231    Date: 2001/10/09 09:41:37 EDT
1232    Tag: george-20011008-mlrisc-labels
1233    Description:
1234    
1235    Changed the machine description files to support printing of
1236    local and global labels in assembly code, based on host assembler
1237    conventions.
1238    
1239    ----------------------------------------------------------------------
1240    Name: Matthias Blume
1241    Date: 2001/09/25 15:25:00 EDT
1242    Tag: blume-20010925-exninfo
1243    Description:
1244    
1245    I provided a non-hook implementation of exnName (at the toplevel) and
1246    made the "dummy" implementation of exnMessage (at the toplevel) more
1247    useful: if nothing gets "hooked in", then at least you are going to
1248    see the exception name and a message indicating why you don't see more.
1249    
1250    [For the time being, programs that need exnMessage and want to use
1251    ml-build should either use General.exnMessage (strongly recommended) or
1252    refer to structure General at some other point so that CM sees a
1253    static dependency.]
1254    
1255    [Similar remarks go for "print" and "use":  If you want to use their
1256    functionality in stand-alone programs generated by ml-build, then use
1257    TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).]
1258    
1259    ----------------------------------------------------------------------
1260    Name: Matthias Blume
1261    Date: 2001/09/20 17:28:00 EDT
1262    Tag: blume-20010920-slowfp
1263    Description:
1264    
1265    Allen says that x86-fast-fp is not safe yet, so I turned it off again...
1266    
1267    ----------------------------------------------------------------------
1268    Name: Matthias Blume
1269    Date: 2001/09/20 17:20:00 EDT
1270    Tag: blume-20010920-canonicalpaths
1271    Description:
1272    
1273    0. Updated the BOOT file (something that I forgot to do earlier).
1274    
1275    1. Small internal change to CM so that it avoids "/../" in filenames
1276       as much as possible (but only where it is safe).
1277    
1278    2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so
1279       that arguments that contain delimiters are passed through correctly.
1280       This change also means that all "special" arguments of the form
1281       @SMLxxx... must come first.
1282    
1283    3. Changed install script to put relative anchor names for tool commands
1284       into pathconfig.
1285    
1286    ----------------------------------------------------------------------
1287    Name: Matthias Blume
1288    Date: 2001/09/18 15:35:00 EDT
1289    Tag: blume-20010918-readme11036
1290    Description:
1291    
1292    Added README files.
1293    
1294    ----------------------------------------------------------------------
1295    Name: Matthias Blume
1296    Date: 2001/09/18 11:45:00 EDT
1297    Tag: Release_110_36 (retag)
1298    Description:
1299    
1300    Fixed mistake in config/preloads. Retagged as 110.36.
1301    
1302    ----------------------------------------------------------------------
1303    Name: Matthias Blume
1304    Date: 2001/09/18 09:40:00 EDT
1305    Tag: Release_110_36_orig (tag changed)
1306    Description:
1307    
1308    New version (110.36).  New bootfiles.
1309    
1310    ----------------------------------------------------------------------
1311    Name: Matthias Blume
1312    Date: 2001/09/14 16:15:00 EDT
1313    Tag: blume-20010914-x86fastfp
1314    Description:
1315    
1316    John committed some changes that Allen made, in particular a (hopefully)
1317    correctly working version of the x86-fp module.
1318    
1319    I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp"
1320    flag to "true".  Everything seems to compile to a fixpoint ok, and
1321    "mandelbrot" speeds up by about 15%.
1322    
1323    ----------------------------------------------------------------------
1324    Name: Matthias Blume
1325    Date: 2001/09/13 11:20:00 EDT
1326    Tag: blume-20010913-minimal
1327    Description:
1328    
1329    1. Stefan Monnier's patch to fix a miscompilation problem that
1330       was brought to light by John Reppy's work on Moby.
1331    
1332    2. Implemented a minimal "structure Compiler" that contains just
1333       "version" and "architecture".  The minimal version will be
1334       available when the full version is not.  This is for backward-
1335       compatibility with code that wants to test Compiler.version.
1336    
1337    ----------------------------------------------------------------------
1338    Name: Matthias Blume
1339    Date: 2001/08/28 14:03:00 EDT
1340    Tag: blume-20010828-ml-lex
1341    Description:
1342    
1343    Fix for bug 1581, received from Neophytos Michael.
1344    
1345    ----------------------------------------------------------------------
1346    Name: Matthias Blume
1347    Date: 2001/08/27 11:20:00 EDT
1348    Tag: blume-20010827-readme11035
1349    Description:
1350    
1351    Fleshed out the README file for 110.35.
1352    
1353    ----------------------------------------------------------------------
1354    Name: Matthias Blume
1355    Date: 2001/08/24 17:10:00 EDT
1356    Tag: Release_110_35
1357    Description:
1358    
1359    New version number (110.35).  New bootfiles.
1360    
1361    ----------------------------------------------------------------------
1362    Name: Lal George
1363    Date: 2001/08/24 13:47:18 EDT 2001
1364    Tag: george-20010824-MLRISC-graphs
1365    Description:
1366    
1367     removed clusters from MLRISC completely and replaced with graphs.
1368    
1369    ----------------------------------------------------------------------
1370    Name: Matthias Blume
1371    Date: 2001/08/23 17:50:00 EDT
1372    Tag: blume-20010823-toplevel
1373    Description:
1374    
1375    - some reorganization of the code that implements various kinds of
1376      environments in the compiler (static, dynamic, symbolic, combined)
1377    - re-implemented the EnvRef module so that evalStream works properly
1378      (if the stream contains references to "use", "CM.make", etc.)
1379    - cleaned up evalloop.sml and interact.sml (but they need more cleaning)
1380    
1381    ----------------------------------------------------------------------
1382    Name: Matthias Blume
1383    Date: 2001/08/20 15:50 EDT
1384    Tag: blume20010820-slipup
1385    Description:
1386    
1387    I forgot to commit a few files.  Here they are...
1388    
1389    ----------------------------------------------------------------------
1390    Name: Matthias Blume
1391    Date: 2001/08/20 15:35:00 EDT
1392    Tag: blume-20010820-debugprof
1393    Description:
1394    
1395    !!!! NEW BOOTFILES !!!!
1396    
1397    This is another round of reorganizing the compiler sources.  This
1398    time the main goal was to factor out all the "instrumentation"
1399    passes (for profiling and backtracing) into their own library.
1400    The difficulty was to do it in such a way that it does not depend
1401    on elaborate.cm but only on elabdata.cm.
1402    
1403    Therefore there have been further changes to both elaborate.cm and
1404    elabdata.cm -- more "generic" things have been moved from the former
1405    to the latter.  As a result, I was forced to split the assignment
1406    of numbers indicating "primtyc"s into two portions: SML-generic and
1407    SML/NJ-specific.  Since it would have been awkward to maintain,
1408    I bit the bullet and actually _changed_ the mapping between these
1409    numbers and primtycs.  The bottom line of this is that you need
1410    a new set of bin- and bootfiles.
1411    
1412    I have built new bootfiles for all architectures, so doing a fresh
1413    checkout and config/install.sh should be all you need.
1414    
1415    The newly created library's name is
1416    
1417        $smlnj/viscomp/debugprof.cm
1418    
1419    and its sources live under
1420    
1421        src/compiler/DebugProf
1422    
1423    ----------------------------------------------------------------------
1424    Name: Matthias Blume
1425    Date: 2001/08/15 17:15:00 EDT
1426    Tag: blume-20010815-compreorg
1427    Description:
1428    
1429    This is a first cut at reorganizing the CM libraries that make up the
1430    core of the compiler.  The idea is to separate out pieces that could
1431    be used independently by tools, e.g., the parser, the typechecker, etc.
1432    
1433    The current status is a step in this direction, but it is not quite
1434    satisfactory yet.  Expect more changes in the future.
1435    
1436    Here is the current (new) organization...
1437    
1438        What used to be $smlnj/viscomp/core.cm is now divided into
1439        six CM libraries:
1440    
1441             $smlnj/viscomp/basics.cm
1442                           /parser.cm
1443                           /elabdata.cm
1444                           /elaborate.cm
1445                           /execute.cm
1446                           /core.cm
1447    
1448        The CM files for these libraries live under src/system/smlnj/viscomp.
1449        All these libraries are proxy libraries that contain precisely
1450        one CM library component.  Here are the locations of the components
1451        (all within the src/compiler tree):
1452    
1453             Basics/basics.cm
1454             Parse/parser.cm
1455             ElabData/elabdata.cm
1456             Elaborator/elaborate.cm
1457             Execution/execute.cm
1458             core.cm
1459    
1460         [This organization is the same that has been used already
1461         for a while for the architecture-specific parts of the visible
1462         compiler and for the old version of core.cm.]
1463    
1464         As you will notice, many source files have been moved from their
1465         respective original locations to a new home in one of the above
1466         subtrees.
1467    
1468         The division of labor between the new libraries is the following:
1469    
1470             basics.cm:
1471                - Simple, basic definitions that pertain to many (or all) of
1472                  the other libraries.
1473             parser.cm:
1474                - The SML parser, producing output of type Ast.dec.
1475                - The type family for Ast is also defined and exported here.
1476             elabdata.cm:
1477                - The datatypes that describe input and output of the elaborator.
1478                  This includes types, absyn, and static environments.
1479             elaborator.cm:
1480                - The SML/NJ type checker and elaborator.
1481                  This maps an Ast.dec (with a given static environment) to
1482                  an Absyn.dec (with a new static environment).
1483                - This libraries implements certain modules that used to be
1484                  structures as functors (to remove dependencies on FLINT).
1485             execute.cm:
1486                - Everything having to do with executing binary code objects.
1487                - Dynamic environments.
1488             core.cm:
1489                - SML/NJ-specific instantiations of the elaborator and MLRISC.
1490                - Top-level modules.
1491                - FLINT (this should eventually become its own library)
1492    
1493    Notes:
1494    
1495    I am not 100% happy with the way I separated the elaborator (and its
1496    data structures) from FLINT.  Two instances of the same problem:
1497    
1498        1. Data structures contain certain fields that carry FLINT-specific
1499           information.  I hacked around this using exn and the property list
1500           module from smlnj-lib.  But the fact that there are middle-end
1501           specific fields around at all is a bit annoying.
1502    
1503        2. The elaborator calculates certain FLINT-related information.  I tried
1504           to make this as abstract as I could using functorization, but, again,
1505           the fact that the elaborator has to perform calculations on behalf
1506           of the middle-end at all is not nice.
1507    
1508        3. Having to used exn and property lists is unfortunate because it
1509           weakens type checking.  The other alternative (parameterizing
1510           nearly *everything*) is not appealing, though.
1511    
1512    I removed the "rebinding =" warning hack because due to the new organization
1513    it was awkward to maintain it.  As a result, the compiler now issues some of
1514    these warnings when compiling init.cmi during bootstrap compilation. On
1515    the plus side, you also get a warning when you do, for example:
1516       val op = = Int32.+
1517    which was not the case up to now.
1518    
1519    I placed "assign" and "deref" into the _Core structure so that the
1520    code that deals with the "lazy" keyword can find them there.  This
1521    removes the need for having access to the primitive environment
1522    during elaboration.
1523    
1524    ----------------------------------------------------------------------
1525    Name: Matthias Blume
1526    Date: 2001/08/13
1527    Tag: blume-20010813-closures
1528    Description:
1529    
1530    This fix was sent to us by Zhong Shao.  It is supposed to improve the
1531    performance of certain loops by avoiding needless closure allocation.
1532    
1533    ----------------------------------------------------------------------
1534    Name: Lal George
1535    Date: 2001/07/31 10:03:23 EDT 2001
1536    Tag: george-20010731-x86-fmalloc
1537    Description: Fixed bug in x86 calls
1538    
1539        There was a bug where call instructions would mysteriously
1540        vanish. The call instruction had to be one that returned
1541        a floating point value.
1542    
1543    ----------------------------------------------------------------------
1544    Name: Lal George
1545    Date: 2001/07/19 16:36:29 EDT 2001
1546    Tag: george-20010719-simple-cells
1547    Description:
1548    
1549    I have dramatically simplified the interface for CELLS in MLRISC.
1550    
1551    In summary, the cells interface is broken up into three parts:
1552    
1553      1. CellsBasis : CELLS_BASIS
1554    
1555            CellsBasis is a top level structure and common for all
1556            architectures.  it contains the definitions of basic datatypes
1557            and utility  functions over these types.
1558    
1559      2. functor Cells() : CELLS
1560    
1561            Cells generates an interface for CELLS that incorporates the
1562            specific resources on the target architecture, such as the
1563            presence of special register classes, their number and size,
1564            and various useful substructures.
1565    
1566      3. <ARCH>CELLS
1567    
1568            e.g. SparcCells: SPARCCELLS
1569    
1570            <ARCH>CELLS usually contains additional bindings for special
1571            registers  on the architecture, such as:
1572    
1573                    val r0 : cell           (* register zero *)
1574                    val y : cell            (* Y register *)
1575                    val psr : cell          (* processor status register *)
1576                    ...
1577    
1578            The structure returned by applying the Cells functor is opened
1579            in this interface.
1580    
1581    The main implication of all this is that the datatypes for cells is
1582    split between CellsBasis and CELLS -- a fairly simple change for user
1583    code.
1584    
1585    In the old scheme the CELLS interface had a definitional binding of
1586    the form:
1587    
1588            signature CELLS = sig
1589    
1590               structure CellsBasis = CellsBasis
1591    
1592               ...
1593    
1594            end
1595    
1596    With all the sharing constraints that goes on in MLRISC, this old
1597    design  quickly leads to errors such as:
1598    
1599            "structure definition spec inside of sharing ... "
1600    
1601    
1602    and appears to require an unacceptable amount of sharing and where
1603    constraint hackery.
1604    
1605    I think this error message (the interaction of definitional specs and
1606    sharing) requires more explanation on our web page.
1607    
1608    ----------------------------------------------------------------------
1609    Name: Matthias Blume
1610    Date: 2001/07/19 15:00:00 EDT
1611    Tag: blume-20010719-libreorg
1612    Description:
1613    
1614    This update puts together a fairly extensive but straightforward change
1615    to the way the libraries that implement the interactive system are
1616    organized:
1617    
1618       The biggest change is the elimination of structure Compiler.  As a
1619       replacement for this structure, there is now a CM library
1620       (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm)
1621       that exports all the substructures of the original structure Compiler
1622       directly.  So instead of saying Compiler.Foo.bar one now simply
1623       says Foo.bar.  (The CM libraries actually export a collection of
1624       structures that is richer than the collection of substructures of
1625       structure Compiler.)
1626    
1627       To make the transition smooth, there is a separate library called
1628       $smlnj/compiler/compiler.cm which puts together and exports the
1629       original structure Compiler (or at least something very close to it).
1630    
1631       There are five members of the original structure Compiler
1632       that are not exported directly but which instead became members
1633       of a new structure Backend (described by signature BACKEND).  These are:
1634       structure Profile (: PROFILE), structure Compile (: COMPILE), structure
1635       Interact (: INTERACT), structure Machine (: MACHINE), and val
1636       architecture (: string).
1637    
1638       Structure Compiler.Version has become structure CompilerVersion.
1639    
1640       Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided
1641       by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc,
1642       or x86, respectively.
1643       Each of these exports the same frontend structures that
1644       $smlnj/compiler.cm exports.  But they do not have a structure Backend
1645       and instead export some structure <Arch>Backend where <Arch> is Alpha32,
1646       Hppa, PPC, Sparc, or X86, respectively.
1647    
1648       Library $smlnj/compiler/all.cm exports the union of the exports of
1649       $smlnj/compiler/<arch>.cm
1650    
1651       There are no structures <Arch>Compiler anymore, use
1652       $smlnj/compiler/<arch>.cm instead.
1653    
1654       Library host-compiler-0.cm is gone.  Instead, the internal library
1655       that instantiates CM is now called cm0.cm.  Selection of the host
1656       compiler (backend) is no longer done here but. (Responsibility for it
1657       now lies with $smlnj/compiler/current.cm.  This seems to be more
1658       logical.)
1659    
1660       Many individual files have been moved or renamed.  Some files have
1661       been split into multiple files, and some "dead" files have been deleted.
1662    
1663    Aside from these changes to library organization, there are also changes
1664    to the way the code itself is organized:
1665    
1666       Structure Binfile has been re-implemented in such a way that it no
1667       longer needs any knowledge of the compiler.  It exclusively deals
1668       with the details of binfile layout.  It no longer invokes the
1669       compiler (for the purpose of creating new prospective binfile
1670       content), and it no longer has any knowledge of how to interpret
1671       pickles.
1672    
1673       Structure Compile (: COMPILE) has been stripped down to the bare
1674       essentials of compilation.  It no longer deals with linking/execution.
1675       The interface has been cleaned up considerably.
1676    
1677       Utility routines for dealing with linking and execution have been
1678       moved into their own substructures.
1679    
1680       (The ultimate goal of these changes is to provide a light-weight
1681       binfile loader/linker (at least for, e.g., stable libraries) that
1682       does not require CM or the compiler to be present.)
1683    
1684    CM documentation has been updated to reflect the changes to library
1685    organization.
1686    
1687    ----------------------------------------------------------------------
1688    Name: Matthias Blume
1689    Date: 2001/07/10 17:30:00 EDT
1690    Tag: Release_110_34
1691    Description:
1692    
1693    Minor tweak to 110.34 (re-tagged):
1694    
1695      - README.html file added to CVS repository
1696      - runtime compiles properly under FreeBSD 3.X and 4.X
1697    
1698    ----------------------------------------------------------------------
1699    Name: Matthias Blume
1700    Date: 2001/07/10 17:30:00 EDT
1701    Tag: Release_110_34
1702    Description:
1703    
1704    New version number (110.34). New bootfiles.
1705    
1706    ----------------------------------------------------------------------
1707    Name: Matthias Blume
1708    Date: 2001/07/09 16:00:00 EDT
1709    Tag: blume-20010709-more-varargs
1710    Description:
1711    
1712    I changed the handling of varargs in ml-nlffigen again:
1713    The ellipsis ... will now simply be ignored (with an accompanying warning).
1714    
1715    The immediate effect is that you can actually call a varargs function
1716    from ML -- but you can't actually supply any arguments beyond the ones
1717    specified explicitly.  (For example, you can call printf with its format
1718    string, but you cannot pass additional arguments.)
1719    
1720    This behavior is only marginally more useful than the one before, but
1721    it has the advantage that a function or, more importantly, a function
1722    type never gets dropped on the floor, thus avoiding follow-up problems with
1723    other types that refer to the offending one.
1724    
1725    ----------------------------------------------------------------------
1726    Name: Matthias Blume
1727    Date: 2001/07/09 11:25:00 EDT
1728    Tag: blume-20010709-varargs
1729    Description:
1730    
1731    1. ckit-lib.cm now exports structure Error
1732    2. ml-nlffigen reports occurences of "..." (i.e., varargs function types)
1733       with a warning accompanied by a source location.  Moreover, it
1734       merely skips the offending function or type and proceeds with the
1735       rest of its work.u  As a result, one can safely feed C code containing
1736       "..." to ml-nlffigen.
1737    3. There are some internal improvements to CM, providing slightly
1738       more general string substitutions in the tools subsystem.
1739    
1740    ----------------------------------------------------------------------
1741    Name: Matthias Blume
1742    Date: 2001/06/27 15:10:00 EDT
1743    Tag: blume-20010627-concur
1744    Description:
1745    
1746    Fixed a small bug in CM's handling of parallel compilation.
1747    (You could observe the bug by Control-C-interrupting an ordinary
1748    CMB.make or CM.stabilize and then attaching some compile servers.
1749    The result was that all of a sudden the previously interrupted
1750    compilation would continue on its own.  This was because of
1751    an over-optimization: CM did not bother to clean out certain queues
1752    when no servers were attached "anyway", resulting in the contents
1753    of these queues to grab control when new servers did get attached.)
1754    
1755    There is also another minor update to the CM manual.
1756    
1757    ----------------------------------------------------------------------
1758    Name: Matthias Blume
1759    Date: 2001/06/26 16:15:00 EDT
1760    Tag: blume-20010626-cmdoc
1761    Description:
1762    
1763    Minor typo fixed in CM manual (syntax diagram for libraries).
1764    
1765    ----------------------------------------------------------------------
1766    Name: Matthias Blume
1767    Date: 2001/06/25 22:55:00 EDT
1768    Tag: blume-20010625-x86pc
1769    Description:
1770    
1771    Fixed a nasty bug in the X86 assembly code that caused signal
1772    handlers to fail (crash) randomly.
1773    
1774    ----------------------------------------------------------------------
1775    Name: Matthias Blume
1776    Date: 2001/06/25 12:05:00 EDT
1777    Tag: blume-20010625-nlffigen
1778    Description:
1779    
1780    This update fixes a number of minor bugs in ml-nlffigen as reported by
1781    Nick Carter <nbc@andrew.cmu.edu>.
1782    
1783      1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted.
1784      2. Default names for generated files are now derived from the name of
1785         the C file *without its directory*.  In particular, this causes generated
1786         files to be placed locally even if the C file is in some system directory.
1787      3. Default names for generated signatures and structures are also derived
1788         from the C file name without its directory.  This avoids silly things
1789         like "structure GL/GL".
1790         (Other silly names are still possible because ml-nlffigen does not do
1791          a thorough check of whether generated names are legal ML identifiers.
1792          When in doubt, use command line arguments to force particular names.)
1793    
1794    ----------------------------------------------------------------------
1795    Name: Matthias Blume
1796    Date: 2001/06/21 12:25:00 EDT
1797    Tag: blume-20010621-eXene
1798    Description:
1799    
1800    eXene now compiles and (sort of) works again.
1801    
1802    The library name (for version > 110.33) is $/eXene.cm.
1803    
1804    I also added an new example in src/eXene/examples/nbody.  See the
1805    README file there for details.
1806    
1807    ----------------------------------------------------------------------
1808    Name: Matthias Blume
1809    Date: 2001/06/20 16:40:00 EDT
1810    Tag: blume-20010620-cml
1811    Description:
1812    
1813    CML now compiles and works again.
1814    
1815    Libraries (for version > 110.33):
1816    
1817      $cml/cml.cm            Main CML library.
1818      $cml/basis.cm          CML's version of $/basis.cm.
1819      $cml/cml-internal.cm   Internal helper library.
1820      $cml/core-cml.cm       Internal helper library.
1821      $cml-lib/trace-cml.cm  Tracing facility.
1822      $cml-lib/smlnj-lib.cm  CML's version of $/smlnj-lib.cm
1823    
1824    The installer (config/install.sh) has been taught how to properly
1825    install this stuff.
1826    
1827    ----------------------------------------------------------------------
1828    Name: Matthias Blume
1829    Date: 2001/06/19 17:55:00 EDT
1830    Tag: blume-20010619-instantiate
1831    Description:
1832    
1833    This un-breaks the fix for bug 1432.
1834    (The bug was originally fixed in 110.9 but I broke it again some
1835    time after that.)
1836    
1837    ----------------------------------------------------------------------
1838    Name: Matthias Blume
1839    Date: 2001/06/19 17:25:00 EDT
1840    Tag: blume-20010619-signals
1841    Description:
1842    
1843    This should (hopefully) fix the long-standing signal handling bug.
1844    (The runtime system was constructing a continuation record with an
1845    incorrect descriptor which would cause the GC to drop data on the floor...)
1846    
1847    ----------------------------------------------------------------------
1848    Name: Matthias Blume
1849    Date: 2001/06/15 15:05:00 EDT
1850    Tag: blume-20010615-moresparc
1851    Description:
1852    
1853    Here is a short late-hour update related to Sparc c-calls:
1854    
1855     -- made handling of double-word arguments a bit smarter
1856    
1857     -- instruction selection phase tries to collapse certain clumsily
1858        constructed ML-Trees; typical example:
1859    
1860            ADD(ty,ADD(_,e,LI d1),LI d2)  ->  ADD(ty,e,LI(d1+d2))
1861    
1862        This currently has no further impact on SML/NJ since mlriscGen does
1863        not seem to generate such patterns in the first place, and c-calls
1864        (which did generate them in the beginning) has meanwhile been fixed
1865        so as to avoid them as well.
1866    
1867    ----------------------------------------------------------------------
1868    Name: Matthias Blume
1869  Date: 2001/06/15 15:05:00 EDT  Date: 2001/06/15 15:05:00 EDT
1870  Tag: blume-20010615-sparc  Tag: blume-20010615-sparc
1871  Description:  Description:
# Line 2409  Line 4261 
4261       elaborator). There were a lot of changes during my "linkpath" trials       elaborator). There were a lot of changes during my "linkpath" trials
4262       that could have been reverted to their original state but weren't.       that could have been reverted to their original state but weren't.
4263       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
4264       than what was strictly necessary...  (I _did_ resist the tempation       than what was strictly necessary...  (I _did_ resist the temptation
4265       of doing any "global reformatting" to avoid an untimely death at       of doing any "global reformatting" to avoid an untimely death at
4266       Dave's hands. :)       Dave's hands. :)
4267    

Legend:
Removed from v.840  
changed lines
  Added in v.1126

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