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 755, Thu Dec 14 07:57:55 2000 UTC revision 1094, Mon Feb 25 09:58:56 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: Allen Leung
17    Date: 2002/02/25 04:45:00 EST
18    Tag: leunga-20020225-cps-spill
19    
20    This is a new implementation of the CPS spill phase.
21    The new phase is in the new file compiler/CodeGen/cpscompile/spill-new.sml
22    In case of problems, replace it with the old file spill.sml
23    
24    The current compiler runs into some serious performance problems when
25    constructing a large record.  This can happen when we try to compile a
26    structure with many items.  Even a very simple structure like the following
27    makes the compiler slow down.
28    
29        structure Foo = struct
30           val x_1 = 0w1 : Word32.int
31           val x_2 = 0w2 : Word32.int
32           val x_3 = 0w3 : Word32.int
33           ...
34           val x_N = 0wN : Word32.int
35        end
36    
37    The following table shows the compile time, from N=1000 to N=4000,
38    with the old compiler:
39    
40    N
41    1000   CPS 100 spill                           0.04u  0.00s  0.00g
42           MLRISC ra                               0.06u  0.00s  0.05g
43              (spills = 0 reloads = 0)
44           TOTAL                                   0.63u  0.07s  0.21g
45    
46    1100   CPS 100 spill                           8.25u  0.32s  0.64g
47           MLRISC ra                               5.68u  0.59s  3.93g
48              (spills = 0 reloads = 0)
49           TOTAL                                   14.71u  0.99s  4.81g
50    
51    1500   CPS 100 spill                           58.55u  2.34s  1.74g
52           MLRISC ra                               5.54u  0.65s  3.91g
53              (spills = 543 reloads = 1082)
54           TOTAL                                   65.40u  3.13s  6.00g
55    
56    2000   CPS 100 spill                           126.69u  4.84s  3.08g
57           MLRISC ra                               0.80u  0.10s  0.55g
58              (spills = 42 reloads = 84)
59           TOTAL                                   129.42u  5.10s  4.13g
60    
61    3000   CPS 100 spill                           675.59u  19.03s  11.64g
62           MLRISC ra                               2.69u  0.27s  1.38g
63              (spills = 62 reloads = 124)
64           TOTAL                                   682.48u  19.61s  13.99g
65    
66    4000   CPS 100 spill                           2362.82u  56.28s  43.60g
67           MLRISC ra                               4.96u  0.27s  2.72g
68              (spills = 85 reloads = 170)
69           TOTAL                                   2375.26u  57.21s  48.00g
70    
71    As you can see the old cps spill module suffers from some serious
72    performance problem but since I cannot decipher the old code fully,
73    innstead of patching the problems up, I'm reimplementing it
74    with a different algorithm.  The new code is more modular,
75    smaller when compiled, and substantially faster
76    (O(n log n) time and O(n) space).  Timing of the new spill module:
77    
78    4000  CPS 100 spill                           0.02u  0.00s  0.00g
79          MLRISC ra                               0.25u  0.02s  0.15g
80             (spills=1 reloads=3)
81          TOTAL                                   7.74u  0.34s  1.62g
82    
83    Implementation details:
84    
85    As far as I can tell, the purpose of the CPS spill module is to make sure the
86    number of live variables at any program point (the bandwidth)
87    does not exceed a certain limit, which is determined by the
88    size of the spill area.
89    
90    When the bandwidth is too large, we decrease the register pressure by
91    packing live variables into spill records.  How we achieve this is
92    completely different than what we did in the old code.
93    
94    First, there is something about the MLRiscGen code generator
95    that we should be aware of:
96    
97    o MLRiscGen performs code motion!
98    
99       In particular, it will move floating point computations and
100       address computations involving only the heap pointer to
101       their use sites (if there is only a single use).
102       What this means is that if we have a CPS record construction
103       statement
104    
105           RECORD(k,vl,w,e)
106    
107       we should never count the new record address w as live if w
108       has only one use (which is often the case).
109    
110       We should do something similar to floating point, but the transformation
111       there is much more complex, so I won't deal with that.
112    
113    Secondly, there are now two new cps primops at our disposal:
114    
115     1. rawrecord of record_kind option
116        This pure operator allocates some uninitialized storage from the heap.
117        There are two forms:
118    
119         rawrecord NONE [INT n]  allocates a tagless record of length n
120         rawrecord (SOME rk) [INT n] allocates a tagged record of length n
121                                     and initializes the tag.
122    
123     2. rawupdate of cty
124          rawupdate cty (v,i,x)
125          Assigns to x to the ith component of record v.
126          The storelist is not updated.
127    
128    We use these new primops for both spilling and increment record construction.
129    
130     1. Spilling.
131    
132        This is implemented with a linear scan algorithm (but generalized
133        to trees).  The algorithm will create a single spill record at the
134        beginning of the cps function and use rawupdate to spill to it,
135        and SELECT or SELp to reload from it.  So both spills and reloads
136        are fine-grain operations.  In contrast, in the old algorithm
137        "spills" have to be bundled together in records.
138    
139        Ideally, we should sink the spill record construction to where
140        it is needed.  We can even split the spill record into multiple ones
141        at the places where they are needed.  But CPS is not a good
142        representation for global code motion, so I'll keep it simple and
143        am not attempting this.
144    
145     2. Incremental record construction (aka record splitting).
146    
147        Long records with many component values which are simulatenously live
148        (recall that single use record addresses are not considered to
149         be live) are constructed with rawrecord and rawupdate.
150        We allocate space on the heap with rawrecord first, then gradually
151        fill it in with rawupdate.  This is the technique suggested to me
152        by Matthias.
153    
154        Some restrictions on when this is applicable:
155        1. It is not a VECTOR record.  The code generator currently does not handle
156           this case. VECTOR record uses double indirection like arrays.
157        2. All the record component values are defined in the same "basic block"
158           as the record constructor.  This is to prevent speculative
159           record construction.
160    
161    ----------------------------------------------------------------------
162    Name: Allen Leung
163    Date: 2002/02/22 01:02:00 EST
164    Tag: leunga-20020222-mlrisc-tools
165    
166    Minor bug fixes in the parser and rewriter
167    
168    ----------------------------------------------------------------------
169    Name: Allen Leung
170    Date: 2002/02/21 20:20:00 EST
171    Tag: leunga-20020221-peephole
172    
173    Regenerated the peephole files.  Some contained typos in the specification
174    and some didn't compile because of pretty printing bugs in the old version
175    of 'nowhere'.
176    
177    ----------------------------------------------------------------------
178    Name: Allen Leung
179    Date: 2002/02/19 20:20:00 EST
180    Tag: leunga-20020219-mlrisc-tools
181    Description:
182    
183       Minor bug fixes to the mlrisc-tools library:
184    
185       1.  Fixed up parsing colon suffixed keywords
186       2.  Added the ability to shut the error messages up
187       3.  Reimplemented the pretty printer and fixed up/improved
188           the pretty printing of handle and -> types.
189       4.  Fixed up generation of literal symbols in the nowhere tool.
190       5.  Added some SML keywords to to sml.sty
191    
192    ----------------------------------------------------------------------
193    Name: Matthias Blume
194    Date: 2002/02/19 16:20:00 EST
195    Tag: blume-20020219-cmffi
196    Description:
197    
198    A wild mix of changes, some minor, some major:
199    
200    * All C FFI-related libraries are now anchored under $c:
201        $/c.cm      --> $c/c.cm
202        $/c-int.cm  --> $c/internals/c-int.cm
203        $/memory.cm --> $c/memory/memory.cm
204    
205    * "make" tool (in CM) now treats its argument pathname slightly
206      differently:
207        1. If the native expansion is an absolute name, then before invoking
208           the "make" command on it, CM will apply OS.Path.mkRelative
209           (with relativeTo = OS.FileSys.getDir()) to it.
210        2. The argument will be passed through to subsequent phases of CM
211           processing without "going native".  In particular, if the argument
212           was an anchored path, then "make" will not lose track of that anchor.
213    
214    * Compiler backends now "know" their respective C calling conventions
215      instead of having to be told about it by ml-nlffigen.  This relieves
216      ml-nlffigen from one of its burdens.
217    
218    * The X86Backend has been split into X86CCallBackend and X86StdCallBackend.
219    
220    * Export C_DEBUG and C_Debug from $c/c.cm.
221    
222    * C type encoding in ml-nlffi-lib has been improved to model the conceptual
223      subtyping relationship between incomplete pointers and their complete
224      counterparts.  For this, ('t, 'c) ptr has been changed to 'o ptr --
225      with the convention of instantiating 'o with ('t, 'c) obj whenever
226      the pointer target type is complete.  In the incomplete case, 'o
227      will be instantiated with some "'c iobj" -- a type obtained by
228      using one of the functors PointerToIncompleteType or PointerToCompleteType.
229    
230      Operations that work on both incomplete and complete pointer types are
231      typed as taking an 'o ptr while operations that require the target to
232      be known are typed as taking some ('t, 'c) obj ptr.
233    
234      voidptr is now a bit "more concrete", namely "type voidptr = void ptr'"
235      where void is an eqtype without any values.  This makes it possible
236      to work on voidptr values using functions meant to operate on light
237      incomplete pointers.
238    
239    * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has
240      been vastly simplified.
241    
242    ----------------------------------------------------------------------
243    Name: Matthias Blume
244    Date: 2002/02/19 10:48:00 EST
245    Tag: blume-20020219-pqfix
246    Description:
247    
248    Applied Chris Okasaki's bug fix for priority queues.
249    
250    ----------------------------------------------------------------------
251    Name: Matthias Blume
252    Date: 2002/02/15 17:05:00
253    Tag: Release_110_39
254    Description:
255    
256    Last-minute retagging is becoming a tradition... :-(
257    
258    This is the working release 110.39.
259    
260    ----------------------------------------------------------------------
261    Name: Matthias Blume
262    Date: 2002/02/15 16:00:00 EST
263    Tag: Release_110_39-orig
264    Description:
265    
266    Working release 110.39.  New bootfiles.
267    
268    (Update: There was a small bug in the installer so it wouldn't work
269    with all shells.  So I retagged. -Matthias)
270    
271    ----------------------------------------------------------------------
272    Name: Matthias Blume
273    Date: 2002/02/15 14:17:00 EST
274    Tag: blume-20020215-showbindings
275    Description:
276    
277    Added EnvRef.listBoundSymbols and CM.State.showBindings.  Especially
278    the latter can be useful for exploring what bindings are available at
279    the interactive prompt.  (The first function returns only the list
280    of symbols that are really bound, the second prints those but also the
281    ones that CM's autoloading mechanism knows about.)
282    
283    ----------------------------------------------------------------------
284    Name: Matthias Blume
285    Date: 2002/02/15 12:08:00 EST
286    Tag: blume-20020215-iptrs
287    Description:
288    
289    Two improvements to ml-nlffigen:
290    
291      1. Write files only if they do not exist or if their current contents
292         do not coincide with what's being written.  (That is, avoid messing
293         with the time stamps unless absolutely necessary.)
294    
295      2. Implement a "repository" mechanism for generated files related
296         to "incomplete pointer types".   See the README file for details.
297    
298    ----------------------------------------------------------------------
299    Name: Matthias Blume
300    Date: 2002/02/14 11:50:00 EST
301    Tag: blume-20020214-quote
302    Description:
303    
304    Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm).  This is required
305    because of the new and improved tag generation scheme.  (Thanks to Allen
306    Leung for pointing it out.)
307    
308    ----------------------------------------------------------------------
309    Name: Lal George
310    Date: 2002/02/14 09:55:27 EST 2002
311    Tag: george-20020214-isabelle-bug
312    Description:
313    
314    Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation
315    of Isabelle on the x86.
316    
317    From Allen:
318    -----------
319     I've found the problem:
320    
321         in ra-core.sml, I use the counter "blocked" to keep track of the
322         true number of elements in the freeze queue.  When the counter goes
323         to zero, I skip examining the queue.  But I've messed up the
324         bookkeeping in combine():
325    
326             else ();
327             case !ucol of
328               PSEUDO => (if !cntv > 0 then
329                     (if !cntu > 0 then blocked := !blocked - 1 else ();
330                                        ^^^^^^^^^^^^^^^^^^^^^^^
331                      moveu := mergeMoveList(!movev, !moveu)
332                     )
333                  else ();
334    
335         combine() is called to coalesce two nodes u and v.
336         I think I was thinking that if the move counts of u and v are both
337         greater than zero then after they are coalesced then one node is
338         removed from the freeze queue.  Apparently I was thinking that
339         both u and v are of low degree, but that's clearly not necessarily true.
340    
341    
342    02/12/2002:
343        Here's the patch.  HOL now compiles.
344    
345        I don't know how this impact on performance (compile
346        time or runtime).  This bug caused the RA (especially on the x86)
347        to go thru the potential spill phase when there are still nodes on the
348        freeze queue.
349    
350    
351    
352    
353    ----------------------------------------------------------------------
354    Name: Matthias Blume
355    Date: 2002/02/13 22:40:00 EST
356    Tag: blume-20020213-fptr-rtti
357    Description:
358    
359    Fixed a bug in ml-nlffigen that was introduced with one of the previous
360    updates.
361    
362    ----------------------------------------------------------------------
363    Name: Matthias Blume
364    Date: 2002/02/13 16:41:00 EST
365    Tag: blume-20020213-cmlpq
366    Description:
367    
368    Added new priority queue export symbols (which have just been added to
369    smlnj-lib.cm) to CML's version of smlnj-lib.cm.  (Otherwise CML would
370    not compile and the installer would choke.)
371    
372    ----------------------------------------------------------------------
373    Name: Matthias Blume
374    Date: 2002/02/13 16:15:00 EST
375    Tag: blume-20020213-various
376    Description:
377    
378    1. More tweaks to ml-nlffigen:
379    
380       - better internal datastructures (resulting in slight speedup)
381       - "-match" option requires exact match
382       - "localized" gensym counters (untagged structs/unions nested within
383         other structs/unions or within typedefs get a fresh counter; their
384         tag will be prefixed by a concatenation of their parents' tags)
385       - bug fixes (related to calculation of transitive closure of types
386         to be included in the output)
387    
388    2. Minor Basis updates:
389    
390       - added implementations for List.collate and Option.app
391    
392    ----------------------------------------------------------------------
393    Name: Matthias Blume
394    Date: 2002/02/11 15:55:00 EST
395    Tag: blume-20020211-gensym
396    Description:
397    
398    Added a "-gensym" option to command line of ml-nlffigen.  This can be
399    used to specify a "stem" -- a string that is inserted in all "gensym'd"
400    names (ML structure names that correspond to unnamed C structs, unions,
401    and enums), so that separate runs of ml-nlffigen do not clash.
402    
403    ----------------------------------------------------------------------
404    Name: Matthias Blume
405    Date: 2002/02/11 12:05:00 EST
406    Tag: blume-20020211-gensml
407    Description:
408    
409    A quick fix for a problem with GenSML (in the pgraph-util library):
410    Make generation of toplevel "local" optional.  (Strictly speaking,
411    signature definitions within "local" are not legal SML.)
412    
413    Other than that: updates to INSTALL and cm/TODO.
414    
415    ----------------------------------------------------------------------
416    Name: Matthias Blume
417    Date: 2002/02/08 15:00:00 EST
418    Tag: blume-20020208-uniquepid
419    Description:
420    
421    0. Version number has been bumped to 110.38.1.  NEW BOOTFILES!!!
422    
423    1. The installer (config/install.sh) has gotten smarter:
424    
425         - Configuration options are a bit easier to specify now
426           (in config/targets).
427         - Bug in recognizing .tar.bz2 files fixed.
428         - Installer automatically resolves dependencies between
429           configuration options (e.g., if you ask for eXene, you will
430           also get cml -- regardless whether you asked for it or not).
431         - Installer can run in "quieter mode" by setting the environment
432           variable INSTALL_QUIETLY to "true".  "Quieter" does not mean
433           "completely silent", though.
434         - Build HashCons library as part of smlnj-lib.
435    
436    2. A new scheme for assigning persistent identifiers to compilation
437       units (and, by extension, to types etc.) has been put into place.
438       This fixes a long-standing bug where types and even dynamic values
439       can get internally confused, thereby compromising type safety
440       (abstraction) and dynamic correctness.  See
441    
442         http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz
443    
444       for an example of how things could go wrong until now.
445    
446       The downside of the new scheme is that pids are not quite as
447       persistent as they used to be: CM will generate a fresh pid
448       for every compilation unit that it thinks it sees for the first
449       time.  That means that if you compile starting from a clean, fresh
450       source tree at two different times, you end up with different
451       binaries.
452    
453       Cutoff recompilation, however, has not been compromised because
454       CM keeps pid information in special caches between runs.
455    
456    ----------------------------------------------------------------------
457    Name: Lal George
458    Date: 2002/02/07 15:34:13 EST 2002
459    Tag: <none>
460    Description:
461    
462    Compilers that generate assembly code may produce  global labels
463    whose value is resolved at link time. The various peephole optimization
464    modules did not take this in account.
465    
466    TODO. The Labels.addrOf function should really return an option
467    type so that clients are forced to deal with this issue, rather
468    than an exception being raised.
469    
470    ----------------------------------------------------------------------
471    Name: Lal George
472    Date: 2002/02/06 13:55:02 EST
473    Tag: george-20020206-ra-breakup
474    Description:
475    
476    1. A bug fix from Allen.
477    
478        A typo causes extra fstp %st(0)'s to be generated at compensation
479        edges, which might cause stack underflow traps at runtime.  This
480        occurs in fft where there are extraneous fstps right before the 'into'
481        trap instruction (in this case they are harmless since none of the
482        integers overflow.)
483    
484    2. Pulled out various utility modules that were embedded in the modules
485       of the register allocator. I need these modules for other purposes, but
486       they are not complete enough to put into a library (just yet).
487    ----------------------------------------------------------------------
488    Name: Matthias Blume
489    Date: 2002/01/31 16:05:00 EST
490    Tag: blume-20020131-sparc-ccalls
491    Description:
492    
493    1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes)
494       of extra stack space by mistake.  Fixed.
495    
496    2. Bug in logic of handling of command-line options in ml-nlffigen fixed.
497    
498    ----------------------------------------------------------------------
499    Name: Allen Leung
500    Date: 2002/01/30
501    Tag: leunga-20020130-nowhere-bug-fix
502    Description:
503    
504       MLRISC bug fixes:
505       1. Fixed a bindings computation bug in the 'nowhere' program generator tool.
506       2. MachineInt.fromString was negating its value.
507    
508    ----------------------------------------------------------------------
509    Name: Matthias Blume
510    Date: 2002/01/29
511    Tag: blume-20020129-INSTALL
512    Description:
513    
514    - Added somewhat detailed installation instructions (file INSTALL).
515    - Fixed curl-detection bug in config/install.sh.
516    - It is now possible to select the URL getter using the URLGETTER
517      environment variable:
518    
519          not set / "unknown"      --> automatic detection (script tries wget,
520                                       curl, and lynx)
521          "wget" / "curl" / "lynx" --> use the specified program (script "knows"
522                                       how to properly invoke them)
523          other                    --> use $URLGETTER directly, it must take
524                                       precisely two command-line arguments
525                                       (source URL and destination file name)
526    
527    ----------------------------------------------------------------------
528    Name: Matthias Blume
529    Date: 2002/01/28
530    Tag: blume-20020128-sparc-ccalls
531    Description:
532    
533    - Fixed problem with calculation of "used" registers in sparc-c-calls.
534    - Make use of the allocParam argument in sparc-c-calls.
535    
536    ----------------------------------------------------------------------
537    Name: Matthias Blume
538    Date: 2002/01/28
539    Tag: blume-20020128-allocParam
540    Description:
541    
542    John Reppy:  Changes c-calls API to accept client-callback for
543    allocating extra stack space.
544    me: Corresponding changes to mlriscGen (using a dummy argument that
545        does not change the current behavior).
546    
547    ----------------------------------------------------------------------
548    Name: Matthias Blume
549    Date: 2002/01/28 12:00:00
550    Tag: Release_110_38
551    Description:
552    
553    This time for real!!!
554    
555    ----------------------------------------------------------------------
556    Name: Matthias Blume
557    Date: 2002/01/28 10:56:00 EST
558    Tag: blume-20020128-retraction
559    Description:
560    
561    0. Retracted earlier 110.38.  (The Release_110_38 tag has been replaced
562       with blume-Release_110_38-retracted.)
563    
564    1. Fixed a problem with incorrect rounding modes in real64.sml.
565       (Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.)
566    
567    2. A bug in ml-nlffigen related to the handling of unnamed structs, unions,
568       and enums fixed.  The naming of corresponding ML identifiers should
569       now be consistent again.
570    
571    ----------------------------------------------------------------------
572    Name: Allen Leung
573    Date: 2002/01/27
574    Tag: leunga-20020127-nowhere
575    Description:
576    
577       Added a target called nowhere in the configuration scripts.
578       Enabling this will build the MLRISC 'nowhere' tool (for translating
579       programs with where-clauses into legal SML code) during installation.
580    
581    ----------------------------------------------------------------------
582    Name: Matthias Blume
583    Date: 2002/01/25 21:27:00 EST
584    Tag: blume-Release_110_38-retracted
585    Description:
586    
587    Call it a (working) release!  Version is 110.38. Bootfiles are ready.
588    
589    README will be added later.
590    
591    !!! NOTE:  Re-tagged as blume-Release_110_38-retracted. Original tag
592    (Release_110_38) removed.  Reason: Last-minute bug fixes.
593    
594    ----------------------------------------------------------------------
595    Name: Matthias Blume
596    Date: 2002/01/25
597    Tag: blume-20020125-ffi
598    Description:
599    
600    A large number of tweaks and improvements to ml-nlffi-lib and
601    ml-nlffigen:
602    
603       - ML represenation types have been streamlined
604       - getter and setter functions work with concrete values, not abstract
605         ones where possible
606       - ml-nlffigen command line more flexible (see README file there)
607       - some bugs have been fixed (hopefully)
608    
609    ----------------------------------------------------------------------
610    Name: Lal George
611    Date: 2002/01/24
612    Tag: george-20020124-risc-ra-interface
613    Description:
614    
615       There is a dramatic simplification in the interface to the
616       register allocator for RISC architectures as a result of making
617       parallel copy instructions explicit.
618    
619    ----------------------------------------------------------------------
620    Name: Matthias Blume
621    Date: 2002/01/22
622    Tag: blume-20020122-x86-ccalls
623    Description:
624    
625    Bug fix for c-calls on x86 (having to do with how char- and
626    short-arguments are being handled).
627    
628    ----------------------------------------------------------------------
629    Name: Matthias Blume
630    Date: 2002/01/21
631    Tag: blume-20020121-ff
632    Description:
633    
634    Another day of fiddling with the FFI...
635    
636    1. Bug fix/workaround:  CKIT does not complain about negative array
637       dimensions, so ml-nlffigen has to guard itself against this possibility.
638       (Otherwise a negative dimension would send it into an infinite loop.)
639    
640    2. Some of the abstract types (light objects, light pointers, most "base"
641       types) in structure C are now eqtypes.
642    
643    3. Added constructors and test functions for NULL function pointers.
644    
645    ----------------------------------------------------------------------
646    Name: Matthias Blume
647    Date: 2002/01/18
648    Tag: blume-20020118-ready-for-new-release
649    Description:
650    
651    Made config/srcarchiveurl point to a new place.  (Will provide boot
652    files shortly.)
653    
654    Maybe we christen this to be 110.38?
655    
656    ----------------------------------------------------------------------
657    Name: Matthias Blume
658    Date: 2002/01/18
659    Tag: blume-20020118-more-ffifiddle
660    Description:
661    
662    Today's FFI fiddling:
663    
664      - Provided a structure CGetSet with "convenient" versions of C.Get.* and
665        C.Set.* that use concrete (MLRep.*) arguments and results instead
666        of abstract ones.
667    
668      - Provided word-style bit operations etc. for "int" representation
669        types in MLRep.S<Foo>Bitops where <Foo> ranges over Char, Int, Short,
670        and Long.
671    
672    ----------------------------------------------------------------------
673    Name: Matthias Blume
674    Date: 2002/01/18
675    Tag: blume-20020118-use-x86-fp
676    Description:
677    
678    Now that x86-fast-fp seems to be working, I turned it back on again
679    by default.  (Seems to work fine now, even with the FFI.)
680    
681    Other than that, I added some documentation about the FFI to
682    src/ml-nlffigen/README and updated the FFI test examples in
683    src/ml-nlffi-lib/Tests/*.
684    
685    ----------------------------------------------------------------------
686    Name: Allen Leung
687    Date: 2002/01/17
688    Tag: leunga-20020117-x86-fast-fp-call
689    Description:
690    
691       1. Fixed a problem with handling return fp values when x86's fast fp
692          mode is turned on.
693    
694       2. Minor pretty printing fix for cellset.  Print %st(0) as %st(0) instead
695          of %f32.
696    
697       3. Added a constructor INT32lit to the ast of MLRISC tools.
698    
699    ----------------------------------------------------------------------
700    Name: Matthias Blume
701    Date: 2002/01/16
702    Tag: blume-20020116-ffifiddle
703    Description:
704    
705    More fiddling with the FFI interface:
706    
707     - Make constness 'c instead of rw wherever possible.  This eliminates
708       the need for certain explicit coercions.  (However, due to ML's
709       value polymorphism, there will still be many cases where explicit
710       coercions are necessary.  Phantom types are not the whole answer
711       to modeling a subtyping relationship in ML.)
712    
713     - ro/rw coersions for pointers added.  (Avoids the detour through */&.)
714    
715     - "printf" test example added to src/ml-nlffi-lib/Tests.  (Demonstrates
716       clumsy workaround for varargs problem.)
717    
718    ----------------------------------------------------------------------
719    Name: Lal George
720    Date: 2002/01/15
721    Tag: <none>
722    Description:
723    
724    1. Since COPY instructions are no longer native to the architecture,
725       a generic functor can be used to implement the expandCopies function.
726    
727    2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a
728       TEXT segment.
729    
730    ----------------------------------------------------------------------
731    Name: Matthias Blume
732    Date: 2002/01/15
733    Tag: blume-20020115-ffiupdates
734    Description:
735    
736    1. Fix for bug resulting in single-precision float values being returned
737       incorrectly from FFI calls.
738    
739    2. Small modifications to C FFI API:
740    
741        - memory-allocation routines return straight objects (no options)
742          and raise an exception in out-of-memory situations
743        - unsafe extensions to cast between function pointers and pointers
744          from/to ints
745        - added structure C_Debug as an alternative to structure C where
746          pointer-dereferencing (|*| and |*!) always check for null-pointers
747        - added open_lib' to DynLinkage;  open_lib' works like open_lib
748          but also takes a (possibly empty) list of existing library handles
749          that the current library depends on
750    
751    ----------------------------------------------------------------------
752    Name: Matthias Blume
753    Date: 2002/01/10
754    Tag: blume-20020110-newffigen
755    Description:
756    
757    1. Updates to portable graph code.
758    
759    2. Major update to ml-nlffigen and ml-nlffi-lib.  Things are much
760       more scalable now so that even huge interfaces such as the one
761       for GTK compile in finite time and space. :-)
762       See src/ml-nlffigen/README for details on what's new.
763    
764    ----------------------------------------------------------------------
765    Name: Lal George
766    Date: 2001/01/09 14:31:35 EST 2002
767    Tag: george-20011206-rm-native-copy
768    Description:
769    
770            Removed the native COPY and FCOPY instructions
771            from all the architectures and replaced it with the
772            explicit COPY instruction from the previous commit.
773    
774            It is now possible to simplify many of the optimizations
775            modules that manipulate copies. This has not been
776            done in this change.
777    
778    ----------------------------------------------------------------------
779    Name: Lal George
780    Date: 2001/12/06 16:50:13 EST 2001
781    Tag: george-20011206-mlrisc-instruction
782    Description:
783    
784    Changed the representation of instructions from being fully abstract
785    to being partially concrete. That is to say:
786    
787      from
788            type instruction
789    
790      to
791            type instr                              (* machine instruction *)
792    
793            datatype instruction =
794                LIVE of {regs: C.cellset, spilled: C.cellset}
795              | KILL of {regs: C.cellset, spilled: C.cellset}
796              | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
797              | ANNOTATION of {i: instruction, a: Annotations.annotation}
798              | INSTR of instr
799    
800    This makes the handling of certain special instructions that appear on
801    all architectures easier and uniform.
802    
803    LIVE and KILL say that a list of registers are live or killed at the
804    program point where they appear. No spill code is generated when an
805    element of the 'regs' field is spilled, but the register is moved to
806    the 'spilled' (which is present, more for debugging than anything else).
807    
808    LIVE replaces the (now deprecated) DEFFREG instruction on the alpha.
809    We used to generate:
810    
811            DEFFREG f1
812            f1 := f2 + f3
813            trapb
814    
815    but now generate:
816    
817            f1 := f2 + f3
818            trapb
819            LIVE {regs=[f1,f2,f3], spilled=[]}
820    
821    Furthermore, the DEFFREG (hack) required that all floating point instruction
822    use all registers mentioned in the instruction. Therefore f1 := f2 + f3,
823    defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting
824    in a cleaner alpha implementation. (Hopefully, intel will not get rid of
825    this architecture).
826    
827    COPYXXX is intended to replace the parallel COPY and FCOPY  available on
828    all the architectures. This will result in further simplification of the
829    register allocator that must be aware of them for coalescing purposes, and
830    will also simplify certain aspects of the machine description that provides
831    callbacks related to parallel copies.
832    
833    ANNOTATION should be obvious, and now INSTR represents the honest to God
834    machine instruction set!
835    
836    The <arch>/instructions/<arch>Instr.sml files define certain utility
837    functions for making porting easier -- essentially converting upper case
838    to lower case. All machine instructions (of type instr) are in upper case,
839    and the lower case form generates an MLRISC instruction. For example on
840    the alpha we have:
841    
842      datatype instr =
843         LDA of {r:cell, b:cell, d:operand}
844       | ...
845    
846      val lda : {r:cell, b:cell, d:operand} -> instruction
847        ...
848    
849    where lda is just (INSTR o LDA), etc.
850    
851    ----------------------------------------------------------------------
852    Name: Matthias Blume
853    Date: 2001/11/22 21:40:00 EST
854    Tag: Release_110_37
855    Description:
856    
857    Release 110.37.  This time for real.
858    
859    ----------------------------------------------------------------------
860    Name: Matthias Blume
861    Date: 2001/11/21 16:35:00 EST
862    Tag: blume-20011121-foot-in-mouth
863    Description:
864    
865    Removed the "Release_110_37" tag because of a serious bug.
866    This will be re-tagged once the bug is fixed.
867    
868    ----------------------------------------------------------------------
869    Name: Matthias Blume
870    Date: 2001/11/21 16:14:00 EST
871    Tag: blume-20011121-forgottenfile
872    Description:
873    
874    Forgot to add a file.  (Just a .tex-file -- part of
875    the CM manual source.)
876    
877    ----------------------------------------------------------------------
878    Name: Matthias Blume
879    Date: 2001/11/21 16:10:00 EST
880    Tag: blume-20011121-invalid_110_37
881    Description:
882    
883    Note: I removed the original tag "Release_110_37" from this commit
884          because we found a serious bug in all non-x86 backends.
885          - Matthias
886    
887    1. Modifications to the SML/NJ code generator and to the runtime system
888       so that code object name strings are directly inserted into code
889       objects at code generation time.  The only business the runtime system
890       has with this is now to read the name strings on occasions.
891       (The encoding of the name string has also changed somewhat.)
892    
893    2. CM now implements a simple "set calculus" for specifying export lists.
894       In particular, it is now possible to refer to the export lists of
895       other libraries/groups/sources and form unions as well as differences.
896       See the latest CM manual for details.
897    
898    3. An separate notion of "proxy" libraries has again be eliminated from
899       CM's model.  (Proxy libraries are now simply a special case of using
900       the export list calculus.)
901    
902    4. Some of the existing libraries now take advantage of the new set
903       calculus.
904       (Notice that not all libraries have been converted because some
905       of the existing .cm-files are supposed to be backward compatible
906       with 110.0.x.)
907    
908    5. Some cleanup in stand-alone programs.  (Don't use "exnMessage" -- use
909       "General.exnMessage"!  The former relies on a certain hook to be
910       initialized, and that often does not happen in the stand-alone case.)
911    
912    ----------------------------------------------------------------------
913    Name: Lal George
914    Date: 2001/11/21  13:56:18 EST
915    Tag: george-2001121-pseudo-ops
916    Description:
917    
918      Implemented a complete redesign of MLRISC pseudo-ops. Now there
919      ought to never be any question of incompatabilities with
920      pseudo-op syntax expected by host assemblers.
921    
922      For now, only modules supporting GAS syntax are implemented
923      but more should follow, such as MASM, and vendor assembler
924      syntax, e.g. IBM as, Sun as, etc.
925    
926    ----------------------------------------------------------------------
927    Name: Matthias Blume
928    Date: 2001/11/14 11:52:00 EST
929    Tag: blume-20011114-srcname
930    Description:
931    
932    1. Routed the name of the current source file to mlriscgen where it
933       should be directly emitted into the code object.  (This last part
934       is yet to be done.)
935    
936    2. Some cleanup of the pgraph code to make it match the proposal that
937       I put out the other day.  (The proposal notwithstanding, things are
938       still in flux here.)
939    
940    ----------------------------------------------------------------------
941    Name: Lal George
942    Date: 2001/11/14 09:44:04 EST
943    Tag:
944    Description:
945    
946      Fix for a backpatching bug reported by Allen.
947    
948      Because the boundary between short and long span-dependent
949      instructions is +/- 128, there are an astounding number of
950      span-dependent instructions whose size is over estimated.
951    
952      Allen came up with the idea of letting the size of span
953      dependent instructions be non-monotonic, for a maxIter
954      number of times, after which the size must be monotonically
955      increasing.
956    
957      This table shows the number of span-dependent instructions
958      whose size was over-estimated as a function of maxIter, for the
959      file Parse/parse/ml.grm.sml:
960    
961         maxIter            # of instructions:
962            10                      687
963            20                      438
964            30                      198
965            40                        0
966    
967      In compiling the compiler, there is no significant difference in
968      compilation speed between maxIter=10 and maxIter=40. Actually,
969      my measurements showed that maxIter=40 was a tad faster than
970      maxIter=10! Also 96% of the  files in the compiler reach a fix
971      point within 13 iterations, so fixing maxIter at 40, while high,
972      is okay.
973    
974    ----------------------------------------------------------------------
975    Name: Matthias Blume
976    Date: 2001/10/31 15:25:00 EST
977    Tag: blume-20011031-pgraph
978    Description:
979    
980    CKIT:
981    * Changed the "Function" constructor of type Ast.ctype to carry optional
982      argument identifiers.
983    * Changed the return type of TypeUtil.getFunction accordingly.
984    * Type equality ignores the argument names.
985    * TypeUtil.composite tries to preserve argument names but gives up quickly
986      if there is a mismatch.
987    
988    installation script:
989    * attempts to use "curl" if available (unless "wget" is available as well)
990    
991    CM:
992    * has an experimental implementation of "portable graphs" which I will
993      soon propose as an implementation-independent library format
994    * there are also new libraries $/pgraph.cm and $/pgraph-util.cm
995    
996    NLFFI-LIB:
997    * some cleanup (all cosmetic)
998    
999    NLFFIGEN:
1000    * temporarily disabled the mechanism that suppresses ML output for
1001      C definitions whose identifiers start with an underscore character
1002    * generate val bindings for enum constants
1003    * user can request that only one style (light or heavy) is being used;
1004      default is to use both (command-line arguments: -heavy and -light)
1005    * fixed bug in handling of function types involving incomplete pointers
1006    * generate ML entry points that take record arguments (i.e., using
1007      named arguments) for C functions that have a prototype with named
1008      arguments
1009      (see changes to CKIT)
1010    
1011    ----------------------------------------------------------------------
1012    Name: Allen Leung
1013    Date: 2001/10/27 20:34:00 EDT
1014    Tag: leunga-20011027-x86-fast-fp-call
1015    Description:
1016    
1017       Fixed the bug described in blume-20010920-slowfp.
1018    
1019       The fix involves
1020          1. generating FCOPYs in FSTP in ia32-svid
1021          2. marking a CALL with the appropriate annotation
1022    
1023    ----------------------------------------------------------------------
1024    Name: Matthias Blume
1025    Date: 2001/10/16 11:32:00 EDT
1026    Tag: blume-20011016-netbsd
1027    Description:
1028    
1029    Underscore patch from Chris Richards (fixing problem with compiling
1030    runtime system under recent NetBSD).
1031    
1032    ----------------------------------------------------------------------
1033    Name: Allen Leung
1034    Date: 2001/10/12 17:18:32 EDT 2001
1035    Tag: leung-20011012-x86-printflowgraph
1036    Description:
1037    
1038    X86RA now uses a valid (instead of dummy) PrintFlowgraph module.
1039    
1040    ----------------------------------------------------------------------
1041    Name: Lal George
1042    Date: 2001/10/11 23:51:34 EDT
1043    Tag: george-20011011-too-many-instrs
1044    Description:
1045    
1046    The representation of a program point never expected to see more
1047    than 65536 instructions in a basic block!
1048    
1049    ----------------------------------------------------------------------
1050    Name: Lal George
1051    Date: 2001/10/09 09:41:37 EDT
1052    Tag: george-20011008-mlrisc-labels
1053    Description:
1054    
1055    Changed the machine description files to support printing of
1056    local and global labels in assembly code, based on host assembler
1057    conventions.
1058    
1059    ----------------------------------------------------------------------
1060    Name: Matthias Blume
1061    Date: 2001/09/25 15:25:00 EDT
1062    Tag: blume-20010925-exninfo
1063    Description:
1064    
1065    I provided a non-hook implementation of exnName (at the toplevel) and
1066    made the "dummy" implementation of exnMessage (at the toplevel) more
1067    useful: if nothing gets "hooked in", then at least you are going to
1068    see the exception name and a message indicating why you don't see more.
1069    
1070    [For the time being, programs that need exnMessage and want to use
1071    ml-build should either use General.exnMessage (strongly recommended) or
1072    refer to structure General at some other point so that CM sees a
1073    static dependency.]
1074    
1075    [Similar remarks go for "print" and "use":  If you want to use their
1076    functionality in stand-alone programs generated by ml-build, then use
1077    TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).]
1078    
1079    ----------------------------------------------------------------------
1080    Name: Matthias Blume
1081    Date: 2001/09/20 17:28:00 EDT
1082    Tag: blume-20010920-slowfp
1083    Description:
1084    
1085    Allen says that x86-fast-fp is not safe yet, so I turned it off again...
1086    
1087    ----------------------------------------------------------------------
1088    Name: Matthias Blume
1089    Date: 2001/09/20 17:20:00 EDT
1090    Tag: blume-20010920-canonicalpaths
1091    Description:
1092    
1093    0. Updated the BOOT file (something that I forgot to do earlier).
1094    
1095    1. Small internal change to CM so that it avoids "/../" in filenames
1096       as much as possible (but only where it is safe).
1097    
1098    2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so
1099       that arguments that contain delimiters are passed through correctly.
1100       This change also means that all "special" arguments of the form
1101       @SMLxxx... must come first.
1102    
1103    3. Changed install script to put relative anchor names for tool commands
1104       into pathconfig.
1105    
1106    ----------------------------------------------------------------------
1107    Name: Matthias Blume
1108    Date: 2001/09/18 15:35:00 EDT
1109    Tag: blume-20010918-readme11036
1110    Description:
1111    
1112    Added README files.
1113    
1114    ----------------------------------------------------------------------
1115    Name: Matthias Blume
1116    Date: 2001/09/18 11:45:00 EDT
1117    Tag: Release_110_36 (retag)
1118    Description:
1119    
1120    Fixed mistake in config/preloads. Retagged as 110.36.
1121    
1122    ----------------------------------------------------------------------
1123    Name: Matthias Blume
1124    Date: 2001/09/18 09:40:00 EDT
1125    Tag: Release_110_36_orig (tag changed)
1126    Description:
1127    
1128    New version (110.36).  New bootfiles.
1129    
1130    ----------------------------------------------------------------------
1131    Name: Matthias Blume
1132    Date: 2001/09/14 16:15:00 EDT
1133    Tag: blume-20010914-x86fastfp
1134    Description:
1135    
1136    John committed some changes that Allen made, in particular a (hopefully)
1137    correctly working version of the x86-fp module.
1138    
1139    I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp"
1140    flag to "true".  Everything seems to compile to a fixpoint ok, and
1141    "mandelbrot" speeds up by about 15%.
1142    
1143    ----------------------------------------------------------------------
1144    Name: Matthias Blume
1145    Date: 2001/09/13 11:20:00 EDT
1146    Tag: blume-20010913-minimal
1147    Description:
1148    
1149    1. Stefan Monnier's patch to fix a miscompilation problem that
1150       was brought to light by John Reppy's work on Moby.
1151    
1152    2. Implemented a minimal "structure Compiler" that contains just
1153       "version" and "architecture".  The minimal version will be
1154       available when the full version is not.  This is for backward-
1155       compatibility with code that wants to test Compiler.version.
1156    
1157    ----------------------------------------------------------------------
1158    Name: Matthias Blume
1159    Date: 2001/08/28 14:03:00 EDT
1160    Tag: blume-20010828-ml-lex
1161    Description:
1162    
1163    Fix for bug 1581, received from Neophytos Michael.
1164    
1165    ----------------------------------------------------------------------
1166    Name: Matthias Blume
1167    Date: 2001/08/27 11:20:00 EDT
1168    Tag: blume-20010827-readme11035
1169    Description:
1170    
1171    Fleshed out the README file for 110.35.
1172    
1173    ----------------------------------------------------------------------
1174    Name: Matthias Blume
1175    Date: 2001/08/24 17:10:00 EDT
1176    Tag: Release_110_35
1177    Description:
1178    
1179    New version number (110.35).  New bootfiles.
1180    
1181    ----------------------------------------------------------------------
1182    Name: Lal George
1183    Date: 2001/08/24 13:47:18 EDT 2001
1184    Tag: george-20010824-MLRISC-graphs
1185    Description:
1186    
1187     removed clusters from MLRISC completely and replaced with graphs.
1188    
1189    ----------------------------------------------------------------------
1190    Name: Matthias Blume
1191    Date: 2001/08/23 17:50:00 EDT
1192    Tag: blume-20010823-toplevel
1193    Description:
1194    
1195    - some reorganization of the code that implements various kinds of
1196      environments in the compiler (static, dynamic, symbolic, combined)
1197    - re-implemented the EnvRef module so that evalStream works properly
1198      (if the stream contains references to "use", "CM.make", etc.)
1199    - cleaned up evalloop.sml and interact.sml (but they need more cleaning)
1200    
1201    ----------------------------------------------------------------------
1202    Name: Matthias Blume
1203    Date: 2001/08/20 15:50 EDT
1204    Tag: blume20010820-slipup
1205    Description:
1206    
1207    I forgot to commit a few files.  Here they are...
1208    
1209    ----------------------------------------------------------------------
1210    Name: Matthias Blume
1211    Date: 2001/08/20 15:35:00 EDT
1212    Tag: blume-20010820-debugprof
1213    Description:
1214    
1215    !!!! NEW BOOTFILES !!!!
1216    
1217    This is another round of reorganizing the compiler sources.  This
1218    time the main goal was to factor out all the "instrumentation"
1219    passes (for profiling and backtracing) into their own library.
1220    The difficulty was to do it in such a way that it does not depend
1221    on elaborate.cm but only on elabdata.cm.
1222    
1223    Therefore there have been further changes to both elaborate.cm and
1224    elabdata.cm -- more "generic" things have been moved from the former
1225    to the latter.  As a result, I was forced to split the assignment
1226    of numbers indicating "primtyc"s into two portions: SML-generic and
1227    SML/NJ-specific.  Since it would have been awkward to maintain,
1228    I bit the bullet and actually _changed_ the mapping between these
1229    numbers and primtycs.  The bottom line of this is that you need
1230    a new set of bin- and bootfiles.
1231    
1232    I have built new bootfiles for all architectures, so doing a fresh
1233    checkout and config/install.sh should be all you need.
1234    
1235    The newly created library's name is
1236    
1237        $smlnj/viscomp/debugprof.cm
1238    
1239    and its sources live under
1240    
1241        src/compiler/DebugProf
1242    
1243    ----------------------------------------------------------------------
1244    Name: Matthias Blume
1245    Date: 2001/08/15 17:15:00 EDT
1246    Tag: blume-20010815-compreorg
1247    Description:
1248    
1249    This is a first cut at reorganizing the CM libraries that make up the
1250    core of the compiler.  The idea is to separate out pieces that could
1251    be used independently by tools, e.g., the parser, the typechecker, etc.
1252    
1253    The current status is a step in this direction, but it is not quite
1254    satisfactory yet.  Expect more changes in the future.
1255    
1256    Here is the current (new) organization...
1257    
1258        What used to be $smlnj/viscomp/core.cm is now divided into
1259        six CM libraries:
1260    
1261             $smlnj/viscomp/basics.cm
1262                           /parser.cm
1263                           /elabdata.cm
1264                           /elaborate.cm
1265                           /execute.cm
1266                           /core.cm
1267    
1268        The CM files for these libraries live under src/system/smlnj/viscomp.
1269        All these libraries are proxy libraries that contain precisely
1270        one CM library component.  Here are the locations of the components
1271        (all within the src/compiler tree):
1272    
1273             Basics/basics.cm
1274             Parse/parser.cm
1275             ElabData/elabdata.cm
1276             Elaborator/elaborate.cm
1277             Execution/execute.cm
1278             core.cm
1279    
1280         [This organization is the same that has been used already
1281         for a while for the architecture-specific parts of the visible
1282         compiler and for the old version of core.cm.]
1283    
1284         As you will notice, many source files have been moved from their
1285         respective original locations to a new home in one of the above
1286         subtrees.
1287    
1288         The division of labor between the new libraries is the following:
1289    
1290             basics.cm:
1291                - Simple, basic definitions that pertain to many (or all) of
1292                  the other libraries.
1293             parser.cm:
1294                - The SML parser, producing output of type Ast.dec.
1295                - The type family for Ast is also defined and exported here.
1296             elabdata.cm:
1297                - The datatypes that describe input and output of the elaborator.
1298                  This includes types, absyn, and static environments.
1299             elaborator.cm:
1300                - The SML/NJ type checker and elaborator.
1301                  This maps an Ast.dec (with a given static environment) to
1302                  an Absyn.dec (with a new static environment).
1303                - This libraries implements certain modules that used to be
1304                  structures as functors (to remove dependencies on FLINT).
1305             execute.cm:
1306                - Everything having to do with executing binary code objects.
1307                - Dynamic environments.
1308             core.cm:
1309                - SML/NJ-specific instantiations of the elaborator and MLRISC.
1310                - Top-level modules.
1311                - FLINT (this should eventually become its own library)
1312    
1313    Notes:
1314    
1315    I am not 100% happy with the way I separated the elaborator (and its
1316    data structures) from FLINT.  Two instances of the same problem:
1317    
1318        1. Data structures contain certain fields that carry FLINT-specific
1319           information.  I hacked around this using exn and the property list
1320           module from smlnj-lib.  But the fact that there are middle-end
1321           specific fields around at all is a bit annoying.
1322    
1323        2. The elaborator calculates certain FLINT-related information.  I tried
1324           to make this as abstract as I could using functorization, but, again,
1325           the fact that the elaborator has to perform calculations on behalf
1326           of the middle-end at all is not nice.
1327    
1328        3. Having to used exn and property lists is unfortunate because it
1329           weakens type checking.  The other alternative (parameterizing
1330           nearly *everything*) is not appealing, though.
1331    
1332    I removed the "rebinding =" warning hack because due to the new organization
1333    it was awkward to maintain it.  As a result, the compiler now issues some of
1334    these warnings when compiling init.cmi during bootstrap compilation. On
1335    the plus side, you also get a warning when you do, for example:
1336       val op = = Int32.+
1337    which was not the case up to now.
1338    
1339    I placed "assign" and "deref" into the _Core structure so that the
1340    code that deals with the "lazy" keyword can find them there.  This
1341    removes the need for having access to the primitive environment
1342    during elaboration.
1343    
1344    ----------------------------------------------------------------------
1345    Name: Matthias Blume
1346    Date: 2001/08/13
1347    Tag: blume-20010813-closures
1348    Description:
1349    
1350    This fix was sent to us by Zhong Shao.  It is supposed to improve the
1351    performance of certain loops by avoiding needless closure allocation.
1352    
1353    ----------------------------------------------------------------------
1354    Name: Lal George
1355    Date: 2001/07/31 10:03:23 EDT 2001
1356    Tag: george-20010731-x86-fmalloc
1357    Description: Fixed bug in x86 calls
1358    
1359        There was a bug where call instructions would mysteriously
1360        vanish. The call instruction had to be one that returned
1361        a floating point value.
1362    
1363    ----------------------------------------------------------------------
1364    Name: Lal George
1365    Date: 2001/07/19 16:36:29 EDT 2001
1366    Tag: george-20010719-simple-cells
1367    Description:
1368    
1369    I have dramatically simplified the interface for CELLS in MLRISC.
1370    
1371    In summary, the cells interface is broken up into three parts:
1372    
1373      1. CellsBasis : CELLS_BASIS
1374    
1375            CellsBasis is a top level structure and common for all
1376            architectures.  it contains the definitions of basic datatypes
1377            and utility  functions over these types.
1378    
1379      2. functor Cells() : CELLS
1380    
1381            Cells generates an interface for CELLS that incorporates the
1382            specific resources on the target architecture, such as the
1383            presence of special register classes, their number and size,
1384            and various useful substructures.
1385    
1386      3. <ARCH>CELLS
1387    
1388            e.g. SparcCells: SPARCCELLS
1389    
1390            <ARCH>CELLS usually contains additional bindings for special
1391            registers  on the architecture, such as:
1392    
1393                    val r0 : cell           (* register zero *)
1394                    val y : cell            (* Y register *)
1395                    val psr : cell          (* processor status register *)
1396                    ...
1397    
1398            The structure returned by applying the Cells functor is opened
1399            in this interface.
1400    
1401    The main implication of all this is that the datatypes for cells is
1402    split between CellsBasis and CELLS -- a fairly simple change for user
1403    code.
1404    
1405    In the old scheme the CELLS interface had a definitional binding of
1406    the form:
1407    
1408            signature CELLS = sig
1409    
1410               structure CellsBasis = CellsBasis
1411    
1412               ...
1413    
1414            end
1415    
1416    With all the sharing constraints that goes on in MLRISC, this old
1417    design  quickly leads to errors such as:
1418    
1419            "structure definition spec inside of sharing ... "
1420    
1421    
1422    and appears to require an unacceptable amount of sharing and where
1423    constraint hackery.
1424    
1425    I think this error message (the interaction of definitional specs and
1426    sharing) requires more explanation on our web page.
1427    
1428    ----------------------------------------------------------------------
1429    Name: Matthias Blume
1430    Date: 2001/07/19 15:00:00 EDT
1431    Tag: blume-20010719-libreorg
1432    Description:
1433    
1434    This update puts together a fairly extensive but straightforward change
1435    to the way the libraries that implement the interactive system are
1436    organized:
1437    
1438       The biggest change is the elimination of structure Compiler.  As a
1439       replacement for this structure, there is now a CM library
1440       (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm)
1441       that exports all the substructures of the original structure Compiler
1442       directly.  So instead of saying Compiler.Foo.bar one now simply
1443       says Foo.bar.  (The CM libraries actually export a collection of
1444       structures that is richer than the collection of substructures of
1445       structure Compiler.)
1446    
1447       To make the transition smooth, there is a separate library called
1448       $smlnj/compiler/compiler.cm which puts together and exports the
1449       original structure Compiler (or at least something very close to it).
1450    
1451       There are five members of the original structure Compiler
1452       that are not exported directly but which instead became members
1453       of a new structure Backend (described by signature BACKEND).  These are:
1454       structure Profile (: PROFILE), structure Compile (: COMPILE), structure
1455       Interact (: INTERACT), structure Machine (: MACHINE), and val
1456       architecture (: string).
1457    
1458       Structure Compiler.Version has become structure CompilerVersion.
1459    
1460       Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided
1461       by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc,
1462       or x86, respectively.
1463       Each of these exports the same frontend structures that
1464       $smlnj/compiler.cm exports.  But they do not have a structure Backend
1465       and instead export some structure <Arch>Backend where <Arch> is Alpha32,
1466       Hppa, PPC, Sparc, or X86, respectively.
1467    
1468       Library $smlnj/compiler/all.cm exports the union of the exports of
1469       $smlnj/compiler/<arch>.cm
1470    
1471       There are no structures <Arch>Compiler anymore, use
1472       $smlnj/compiler/<arch>.cm instead.
1473    
1474       Library host-compiler-0.cm is gone.  Instead, the internal library
1475       that instantiates CM is now called cm0.cm.  Selection of the host
1476       compiler (backend) is no longer done here but. (Responsibility for it
1477       now lies with $smlnj/compiler/current.cm.  This seems to be more
1478       logical.)
1479    
1480       Many individual files have been moved or renamed.  Some files have
1481       been split into multiple files, and some "dead" files have been deleted.
1482    
1483    Aside from these changes to library organization, there are also changes
1484    to the way the code itself is organized:
1485    
1486       Structure Binfile has been re-implemented in such a way that it no
1487       longer needs any knowledge of the compiler.  It exclusively deals
1488       with the details of binfile layout.  It no longer invokes the
1489       compiler (for the purpose of creating new prospective binfile
1490       content), and it no longer has any knowledge of how to interpret
1491       pickles.
1492    
1493       Structure Compile (: COMPILE) has been stripped down to the bare
1494       essentials of compilation.  It no longer deals with linking/execution.
1495       The interface has been cleaned up considerably.
1496    
1497       Utility routines for dealing with linking and execution have been
1498       moved into their own substructures.
1499    
1500       (The ultimate goal of these changes is to provide a light-weight
1501       binfile loader/linker (at least for, e.g., stable libraries) that
1502       does not require CM or the compiler to be present.)
1503    
1504    CM documentation has been updated to reflect the changes to library
1505    organization.
1506    
1507    ----------------------------------------------------------------------
1508    Name: Matthias Blume
1509    Date: 2001/07/10 17:30:00 EDT
1510    Tag: Release_110_34
1511    Description:
1512    
1513    Minor tweak to 110.34 (re-tagged):
1514    
1515      - README.html file added to CVS repository
1516      - runtime compiles properly under FreeBSD 3.X and 4.X
1517    
1518    ----------------------------------------------------------------------
1519    Name: Matthias Blume
1520    Date: 2001/07/10 17:30:00 EDT
1521    Tag: Release_110_34
1522    Description:
1523    
1524    New version number (110.34). New bootfiles.
1525    
1526    ----------------------------------------------------------------------
1527    Name: Matthias Blume
1528    Date: 2001/07/09 16:00:00 EDT
1529    Tag: blume-20010709-more-varargs
1530    Description:
1531    
1532    I changed the handling of varargs in ml-nlffigen again:
1533    The ellipsis ... will now simply be ignored (with an accompanying warning).
1534    
1535    The immediate effect is that you can actually call a varargs function
1536    from ML -- but you can't actually supply any arguments beyond the ones
1537    specified explicitly.  (For example, you can call printf with its format
1538    string, but you cannot pass additional arguments.)
1539    
1540    This behavior is only marginally more useful than the one before, but
1541    it has the advantage that a function or, more importantly, a function
1542    type never gets dropped on the floor, thus avoiding follow-up problems with
1543    other types that refer to the offending one.
1544    
1545    ----------------------------------------------------------------------
1546    Name: Matthias Blume
1547    Date: 2001/07/09 11:25:00 EDT
1548    Tag: blume-20010709-varargs
1549    Description:
1550    
1551    1. ckit-lib.cm now exports structure Error
1552    2. ml-nlffigen reports occurences of "..." (i.e., varargs function types)
1553       with a warning accompanied by a source location.  Moreover, it
1554       merely skips the offending function or type and proceeds with the
1555       rest of its work.u  As a result, one can safely feed C code containing
1556       "..." to ml-nlffigen.
1557    3. There are some internal improvements to CM, providing slightly
1558       more general string substitutions in the tools subsystem.
1559    
1560    ----------------------------------------------------------------------
1561    Name: Matthias Blume
1562    Date: 2001/06/27 15:10:00 EDT
1563    Tag: blume-20010627-concur
1564    Description:
1565    
1566    Fixed a small bug in CM's handling of parallel compilation.
1567    (You could observe the bug by Control-C-interrupting an ordinary
1568    CMB.make or CM.stabilize and then attaching some compile servers.
1569    The result was that all of a sudden the previously interrupted
1570    compilation would continue on its own.  This was because of
1571    an over-optimization: CM did not bother to clean out certain queues
1572    when no servers were attached "anyway", resulting in the contents
1573    of these queues to grab control when new servers did get attached.)
1574    
1575    There is also another minor update to the CM manual.
1576    
1577    ----------------------------------------------------------------------
1578    Name: Matthias Blume
1579    Date: 2001/06/26 16:15:00 EDT
1580    Tag: blume-20010626-cmdoc
1581    Description:
1582    
1583    Minor typo fixed in CM manual (syntax diagram for libraries).
1584    
1585    ----------------------------------------------------------------------
1586    Name: Matthias Blume
1587    Date: 2001/06/25 22:55:00 EDT
1588    Tag: blume-20010625-x86pc
1589    Description:
1590    
1591    Fixed a nasty bug in the X86 assembly code that caused signal
1592    handlers to fail (crash) randomly.
1593    
1594    ----------------------------------------------------------------------
1595    Name: Matthias Blume
1596    Date: 2001/06/25 12:05:00 EDT
1597    Tag: blume-20010625-nlffigen
1598    Description:
1599    
1600    This update fixes a number of minor bugs in ml-nlffigen as reported by
1601    Nick Carter <nbc@andrew.cmu.edu>.
1602    
1603      1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted.
1604      2. Default names for generated files are now derived from the name of
1605         the C file *without its directory*.  In particular, this causes generated
1606         files to be placed locally even if the C file is in some system directory.
1607      3. Default names for generated signatures and structures are also derived
1608         from the C file name without its directory.  This avoids silly things
1609         like "structure GL/GL".
1610         (Other silly names are still possible because ml-nlffigen does not do
1611          a thorough check of whether generated names are legal ML identifiers.
1612          When in doubt, use command line arguments to force particular names.)
1613    
1614    ----------------------------------------------------------------------
1615    Name: Matthias Blume
1616    Date: 2001/06/21 12:25:00 EDT
1617    Tag: blume-20010621-eXene
1618    Description:
1619    
1620    eXene now compiles and (sort of) works again.
1621    
1622    The library name (for version > 110.33) is $/eXene.cm.
1623    
1624    I also added an new example in src/eXene/examples/nbody.  See the
1625    README file there for details.
1626    
1627    ----------------------------------------------------------------------
1628    Name: Matthias Blume
1629    Date: 2001/06/20 16:40:00 EDT
1630    Tag: blume-20010620-cml
1631    Description:
1632    
1633    CML now compiles and works again.
1634    
1635    Libraries (for version > 110.33):
1636    
1637      $cml/cml.cm            Main CML library.
1638      $cml/basis.cm          CML's version of $/basis.cm.
1639      $cml/cml-internal.cm   Internal helper library.
1640      $cml/core-cml.cm       Internal helper library.
1641      $cml-lib/trace-cml.cm  Tracing facility.
1642      $cml-lib/smlnj-lib.cm  CML's version of $/smlnj-lib.cm
1643    
1644    The installer (config/install.sh) has been taught how to properly
1645    install this stuff.
1646    
1647    ----------------------------------------------------------------------
1648    Name: Matthias Blume
1649    Date: 2001/06/19 17:55:00 EDT
1650    Tag: blume-20010619-instantiate
1651    Description:
1652    
1653    This un-breaks the fix for bug 1432.
1654    (The bug was originally fixed in 110.9 but I broke it again some
1655    time after that.)
1656    
1657    ----------------------------------------------------------------------
1658    Name: Matthias Blume
1659    Date: 2001/06/19 17:25:00 EDT
1660    Tag: blume-20010619-signals
1661    Description:
1662    
1663    This should (hopefully) fix the long-standing signal handling bug.
1664    (The runtime system was constructing a continuation record with an
1665    incorrect descriptor which would cause the GC to drop data on the floor...)
1666    
1667    ----------------------------------------------------------------------
1668    Name: Matthias Blume
1669    Date: 2001/06/15 15:05:00 EDT
1670    Tag: blume-20010615-moresparc
1671    Description:
1672    
1673    Here is a short late-hour update related to Sparc c-calls:
1674    
1675     -- made handling of double-word arguments a bit smarter
1676    
1677     -- instruction selection phase tries to collapse certain clumsily
1678        constructed ML-Trees; typical example:
1679    
1680            ADD(ty,ADD(_,e,LI d1),LI d2)  ->  ADD(ty,e,LI(d1+d2))
1681    
1682        This currently has no further impact on SML/NJ since mlriscGen does
1683        not seem to generate such patterns in the first place, and c-calls
1684        (which did generate them in the beginning) has meanwhile been fixed
1685        so as to avoid them as well.
1686    
1687    ----------------------------------------------------------------------
1688    Name: Matthias Blume
1689    Date: 2001/06/15 15:05:00 EDT
1690    Tag: blume-20010615-sparc
1691    Description:
1692    
1693    The purpose of this update is to provide an implementation of NLFFI
1694    on Sparc machines.
1695    
1696    Here are the changes in detail:
1697    
1698       * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing
1699       the Sparc implementation of the c-calls API.
1700       * The Sparc backend of SML/NJ has been modified to uniformely use %fp
1701       for accessing the ML frame.  Thus, we have a real frame pointer and
1702       can freely modify %sp without need for an omit-frame-ptr phase.
1703       The vfp logic in src/compiler/CodeGen/* has been changed to accomodate
1704       this case.
1705       * ml-nlffigen has been taught to produce code for different architectures
1706       and calling conventions.
1707       * In a way similar to what was done in the x86 case, the Sparc
1708       backend uses its own specific extension to mltree.  (For example,
1709       it needs to be able to generate UNIMP instructions which are part
1710       of the calling convention.)
1711       * ml-nlffi-lib was reorganized to make it more modular (in particular,
1712       to make it easier to plug in new machine- and os-dependent parts).
1713    
1714    There are some other fairly unrelated bug fixes and cleanups as well:
1715    
1716       * I further hacked the .cm files for MLRISC tools (like MDLGen) so
1717       that they properly share their libraries with existing SML/NJ libraries.
1718       * I fixed a minor cosmetic bug in CM, supressing certain spurious
1719       follow-up error messages.
1720       * Updates to CM/CMB documentation.
1721    
1722    TODO items:
1723    
1724       * MLRISC should use a different register as its asmTemp on the Sparc.
1725         (The current %o2 is a really bad choice because it is part of the
1726         calling conventions, so things might interfere in unexpected ways.)
1727    
1728    ----------------------------------------------------------------------
1729    Name: Matthias Blume
1730    Date: 2001/06/07
1731    Tag: blume-20010607-calls
1732    Description:
1733    
1734    A number of internal changes related to C calls and calling conventions:
1735    
1736    1. ML-Tree CALL statements now carry a "pops" field.  It indicates the
1737       number of bytes popped implicitly (by the callee).  In most cases
1738       this field is 0 but on x86/win32 it is some non-zero value.  This
1739       is information provided for the benefit of the "omit-frameptr" pass.
1740    2. The CALL instruction on the x86 carries a similar "pops" field.
1741       The instruction selection phase copies its value from the ML-Tree
1742       CALL statement.
1743    3. On all other architectures, the instruction selection phase checks
1744       whether "pops=0" and complains if not.
1745    4. The c-calls implementation for x86 now accepts two calling conventions:
1746       "ccall" and "stdcall".  When "ccall" is selected, the caller cleans
1747       up after the call and pops is set to 0.  For "stdcall", the caller
1748       does nothing, leaving the cleanup to the callee; pops is set to
1749       the number of bytes that were pushed onto the stack.
1750    5. The cproto decoder (compiler/Semant/types/cproto.sml) now can
1751       distinguish between "ccall" and "stdcall".
1752    6. The UNIMP instruction has been added to the supported Sparc instruction
1753       set. (This is needed for implementing the official C calling convention
1754       on this architecture.)
1755    7. I fixed some of the .cm files under src/MLRISC/Tools to make them
1756       work with the latest CM.
1757    
1758    ----------------------------------------------------------------------
1759    Name: Matthias Blume
1760    Date: 2001/06/05 15:10:00 EDT
1761    Tag: blume-20010605-cm-index
1762    Description:
1763    
1764    0. The "lambdasplit" parameter for class "sml" in CM has been documented.
1765    
1766    1. CM can now generate "index files".  These are human-readable files
1767       that list on a per-.cm-file basis each toplevel symbol defined or
1768       imported.  The location of the index file for
1769       <p>/<d>.cm is <p>/CM/INDEX/<d>.cm.
1770       To enable index-file generation, set CM.Control.generate_index to true
1771       or export an environment-symbol: export CM_GENERATE_INDEX=true.
1772    
1773       The CM manual has been updated accordingly.
1774    
1775    2. I made some slight modifications to the c-calls API in MLRISC.
1776    
1777         a) There is now a callback to support saving/restoring of
1778            dedicated but caller-save registers around the actual call
1779            instruction.
1780         b) One can optionally specify a comment-annotation for the
1781            call instruction.
1782    
1783    3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop.
1784       (For example, the comment annotation shows the C prototype of
1785        the function being called.)
1786    
1787    ----------------------------------------------------------------------
1788    Name: Matthias Blume
1789    Date: 2001/06/01 13:30:00 EDT
1790    Tag: blume-20010601-nlffi-cleanup
1791    Description:
1792    
1793    This is mostly a cleanup of MLFFI stuff:
1794    
1795       - some signature files have been put into a more exposed place
1796       - the ugly 'f type parameter is gone (simplifies types tremendously!)
1797       - ml-nlffigen changed accordingly
1798       - tutorial updated
1799    
1800    Other changes:
1801    
1802       - author's affiliation in CM manual(s) updated
1803       - some more recognized keywords added to Allen's sml.sty
1804    
1805    ----------------------------------------------------------------------
1806    Name: Matthias Blume
1807    Date: 2001/05/25 15:30:00 EDT
1808    Tag: blume-20010525-iptr
1809    Description:
1810    
1811      - put the official 110.33-README (as it appears on the ftp server) under
1812        CVS
1813      - fixed a small bug related to incomplete pointer types in
1814        ml-nlffigen
1815      - small cosmetic change to the ml-nlffi-lib's "arr" type constructor
1816        (it does not need the 'f type parameter)
1817    
1818    ----------------------------------------------------------------------
1819    Name: Matthias Blume
1820    Date: 2001/05/23 14:30:00 EDT
1821    Tag: Release_110_33
1822    Description:
1823    
1824    New version number (110.33).  New bootfiles.
1825    
1826    ----------------------------------------------------------------------
1827    Name: Matthias Blume
1828    Date: 2001/05/22 18:06:00 EDT
1829    Tag: blume-20010522-targets
1830    Description:
1831    
1832    Made install.sh use file config/targets.customized if it exists, falling
1833    back to config/targets if it doesn't.  This way one can have a customized
1834    version of the targets file without touching the "real thing", thus
1835    eliminating the constant fear of accidentally checking something bogus
1836    back into the CVS repository...  (File config/targets.customized must
1837    not be added to the repository!)
1838    
1839    ----------------------------------------------------------------------
1840    Name: Matthias Blume
1841    Date: 2001/05/22 16:30:00 EDT
1842    Tag: blume-20010522-minitut
1843    Description:
1844    
1845    1. Bug fix in ml-nlffigen; now (hopefully) correctly handling
1846       struct returns.
1847    2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt.  This is some very
1848       incomplete, preliminary documentation for NLFFI.
1849    
1850    ----------------------------------------------------------------------
1851    Name: Matthias Blume
1852    Date: 2001/05/14 11:30:00 EDT
1853    Tag: blume-20010514-script
1854    Description:
1855    
1856    Some bugs in install script fixed.
1857    
1858    In addition to that I also made a slight change to the NLFFI API:
1859    Functors generated by ml-nlffigen now take the dynamic library as a
1860    straight functor argument, not as a suspended one.  (The original
1861    functor code used to force the suspension right away anyway, so there
1862    was nothing gained by this complication of the interface.)
1863    
1864    ----------------------------------------------------------------------
1865    Name: Matthias Blume
1866    Date: 2001/05/11 14:35:00 EDT
1867    Tag: blume-20010511-ml-nlffi
1868    Description:
1869    
1870    I finally took the plunge and added my new FFI code to the main
1871    repository.  For x86-linux it is now ready for prime-time.
1872    
1873    There are two new subdirectories of "src":
1874    
1875      - ml-nlffi-lib:
1876           The utility library for programs using the FFI interface.
1877           Here is the implementation of $/c.cm and its associated low-level
1878           partners $/c-int.cm and $/memory.cm.
1879      - ml-nlffigen:
1880           A stand-alone program for generating ML glue code from C source
1881           code.
1882    
1883    Building ml-nlffigen requires $/ckit-lib.cm.
1884    
1885    The config/install.sh script has been updates to do the Right Thing
1886    (hopefully).
1887    
1888    Notice that the source tree for the C-Kit will not be put under "src"
1889    but directly under the installation root directory.  (This is the
1890    structure that currently exists on the CVS server when you check out
1891    module "sml".)  Fortunately, config/install.sh knows about this oddity.
1892    
1893    Bugs: No documentation yet.
1894    
1895    ----------------------------------------------------------------------
1896    Name: Matthias Blume
1897    Date: 2001/05/09 16:35:00 EDT
1898    Tag: blume-20010509-cpscontract
1899    Description:
1900    
1901    Fixed a bug in the accounting code in cpsopt/contract.sml.  (The
1902    wrapper/unwrapper elimination did not decrement usage counts and some
1903    dead variables got overlooked by the dead-up logic.)
1904    
1905    ----------------------------------------------------------------------
1906    Name: Lal George
1907    Date: 2001/05/08  17:26:09 EDT
1908    Tag: george-20010508-omit-frameptr
1909    Description:
1910    
1911    Changes to implement the omit-frame-pointer optimization to support
1912    raw C calls. For now, there is only support on the Intel x86, but
1913    other architectures will follow as more experience is gained with this.
1914    
1915    
1916    ----------------------------------------------------------------------
1917    Name: Matthias Blume
1918    Date: 2001/05/07 14:40:00 EDT
1919    Tag: blume-20010507-proxies
1920    Description:
1921    
1922    I made into "proxy libraries" all libraries that qualify for such a
1923    change.  (A qualifying library is a library that has another library or
1924    groups as its sole member and repeats that member's export list
1925    verbatim.  A proxy library avoids this repetition by omitting its export
1926    list, effectively inheriting the list that its (only) member exports.
1927    See the CM manual for more explanation.)
1928    The main effect is that explicit export lists for these libraries
1929    do not have to be kepts in sync, making maintenance a bit easier.
1930    
1931    I also added copyright notices to many .cm-files.
1932    
1933    Last but not least, I made a new set of bootfiles.
1934    
1935    ----------------------------------------------------------------------
1936    Name: Matthias Blume
1937    Date: 2001/05/04 17:00:00 EDT
1938    Tag: blume-20010504-cm-lsplit
1939    Description:
1940    
1941    0. John merged pending changes to $/smlnj-lib.cm
1942    
1943    1. Allen's previous change accidentally backed out of one of Lal's
1944       earlier changes.  I undid this mistake (re-introducing Lal's change).
1945    
1946    2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm)
1947       within the compiler where applicable.  There is some code simplification
1948       because of that.
1949    
1950    3. The "split" phase (in FLINT) is now part of the default list of phases.
1951       Compiler.Control.LambdaSplitting.* can be used to globally control the
1952       lambda-splitting (cross-module-inlining) engine.  In addition to that,
1953       it can now also be controlled on a per-source basis: CM has been taught
1954       a new tool parameter applicable to ML source files.
1955    
1956       - To turn lambda-splitting off completely:
1957            local open Compiler.Control.LambdaSplitting in
1958                val _ = set Off
1959            end
1960       - To make "no lambda-splitting" the global default (but allow per-source
1961         overriding); this is the initial setting:
1962            local open Compiler.Control.LambdaSplitting in
1963                val _ = set (Default NONE)
1964            end
1965       - To make "lambda-splitting with aggressiveness a" the global default
1966         (and allow per-source overriding):
1967            local open Compiler.Control.LambdaSplitting in
1968                val _ = set (Default (SOME a))
1969            end
1970    
1971       - To turn lambda-splitting off for a given ML souce file (say: a.sml)
1972         write (in the respective .cm-file):
1973            a.sml (lambdasplitting:off)
1974       - To turn lambda-splitting for a.sml on with minimal aggressiveness:
1975            a.sml (lambdasplitting:on)
1976       - To turn lambda-splitting for a.sml on with aggressiveness <a> (where
1977         <a> is a decimal non-negative integer):
1978            a.sml (lambdasplitting:<a>)
1979       - To turn lambda-splitting for a.sml on with maximal aggressiveness:
1980            a.sml (lambdasplitting:infinity)
1981       - To use the global default for a.sml:
1982            a.sml (lambdasplitting:default)
1983         or simply
1984            a.sml
1985    
1986    ----------------------------------------------------------------------
1987    Name: Allen Leung
1988    Date: 2001/05/04 01:57:00 EDT
1989    Tag: leunga-20010504-sync
1990    Description:
1991    
1992      MLRISC features.
1993    
1994      1. Fix to CMPXCHG instructions.
1995      2. Changed RA interface to allow annotations in callbacks.
1996      3. Added a new method to the stream interface to allow annotations updates.
1997    
1998    ----------------------------------------------------------------------
1999    Name: Matthias Blume
2000    Date: 2001/05/01 11:45:00 EDT
2001    Tag: blume-20010501-pcedittmp
2002    Description:
2003    
2004    Changed install.sh to use the current working directory instead of
2005    /usr/tmp for a temporary file (pcedittmp).  The previous choice
2006    of /usr/tmp caused trouble with MacOS X because of file premission
2007    problems.
2008    
2009    ----------------------------------------------------------------------
2010    Name: Matthias Blume
2011    Date: 2001/04/20 11:10:00 EDT
2012    Tag: blume-20010420-inMLflag
2013    Description:
2014    
2015     - added vp_limitPtrMask to vproc-state.h
2016       (for use by the raw-C-calls mechanism to implement proper interrupt
2017        handling)
2018     - made the ML compiler aware of various data-structure offsets so it
2019       can generate code for accessing the vp_inML flag and vp_limitPtrMask
2020     - tweaked mlriscGen.sml to have it emit interrupt-handling code for
2021       raw C-calls
2022    
2023    ----------------------------------------------------------------------
2024    Name: Lal George
2025    Date: 2001/04/20 09:15:28 EDT
2026    Tag: george-20010420-macosX
2027    Description:
2028    
2029     - Changes to port to Mac OS X; Darwin.
2030    
2031     - In the process I found that sqrt was broken on the PPC, because the
2032       fsqrt instruction is not implemented.
2033    
2034    ----------------------------------------------------------------------
2035    Name: Matthias Blume
2036    Date: 2001/04/18 12:45:00 EDT
2037    Tag: blume-20010418-ccalls
2038    Description:
2039    
2040     - fixed two off-by-4 errors in the x86-specific c-calls implementation
2041       (this bug prevented structure arguments containing pointers from being
2042        passed correctly)
2043     - changed the raw-C-call code in mlriscGen.sml in such a way that
2044       structure arguments are represented as a pointer to the beginning
2045       of the structure (instead of having a series of synthesized arguments,
2046       one for each structure member)
2047    
2048     - made makeml script's verbosity level configurable via environment
2049       variable (MAKEML_VERBOSITY)
2050    
2051     - eliminated placeholder implementations for f32l, w16s, i16s, and f32s
2052       in rawmem-x86.sml; we are now using the real thing
2053    
2054    ----------------------------------------------------------------------
2055    Name: Matthias Blume
2056    Date: 2001/03/22 16:25:00 EST
2057    Tag: blume-20010322-bootfiles
2058    Description:
2059    
2060    Created a new set of bootfiles (for your automatic installation convenience).
2061    
2062    ----------------------------------------------------------------------
2063    Name: Matthias Blume
2064    Date: 2001/03/22 15:10:00 EST
2065    Tag: blume-20010322-rawmem-parcm
2066    Description:
2067    
2068    1. All "raw memory access" primitives for the new FFI are implemented now
2069       (at least on the x86).
2070    2. Some further cleanup of CM's parallel make mechanism.
2071    
2072    ----------------------------------------------------------------------
2073    Name: Matthias Blume
2074    Date: 2001/03/19 17:53:00 EST
2075    Tag: blume-20010319-parallel
2076    Description:
2077    
2078    Parallel make (using compile servers) now works again.
2079    
2080    To this end, CM.stabilize and CMB.make have been modified to work in
2081    two passes when compile servers are attached:
2082       1. Compile everything, do not perform stabilization; this pass
2083          uses compile servers
2084       2. Stabilize everything; this pass does not use compile servers
2085    If there are no compile servers, the two passes are combined into one
2086    (as before).  Splitting the passes increases the inherent parallelism
2087    in the dependency graph because the entire graph including all
2088    libraries is available at the same time.  This, in turn, improves
2089    server utilization.  The downside is that the master process will
2090    have to do some extra work after compilation is done (because for
2091    technical reasons it must re-read all the binfiles during stabilization).
2092    
2093    ----------------------------------------------------------------------
2094    Name: Matthias Blume
2095    Date: 2001/03/16 12:22:00 EST
2096    Tag: blume-20010316-bootfiles
2097    Description:
2098    
2099    Created a new set of bootfiles (for your automatic installation convenience).
2100    
2101    ----------------------------------------------------------------------
2102    Name: Matthias Blume
2103    Date: 2001/03/16 11:00:00 EST
2104    Tag: blume-20010316-MLTREE-fixup
2105    Description:
2106    
2107    This is a minor fixup for an (untagged) earlier commit by Allen.
2108    (A file was missing).
2109    
2110    ----------------------------------------------------------------------
2111    Name: Allen Leung
2112    Date: Mon Mar  5 18:54:57 EST 2001
2113    Tag: leunga-20010305-cut-support
2114    
2115    1. New support for alternative control-flow in MLTREE.
2116       Currently we support
2117    
2118          FLOW_TO(CALL ...., [k1,...,kn])
2119    
2120       This is needed for 'cuts to' in C-- and try/handle-like constructs
2121       in Moby
2122    
2123       New assembler flag "asm-show-cutsto" to turn on control-flow debugging.
2124    
2125    2. Register Allocator
2126    
2127       Changes in interface [from Fermin, John]
2128    
2129    3. Alpha 8-bit SLL support [Fermin]
2130    
2131    4. All architectures
2132    
2133       A new module (ClusterExpandCopies) for expanding parallel copies.
2134    
2135    ----------------------------------------------------------------------
2136    Name: Allen Leung
2137    Date: 2001/02/27 23:07:00 EST
2138    Tag: leunga-20010227-minor-stuff
2139    
2140    1. Alpha bug fix for CMOVNE
2141    2. Handle mltree COND(..,FCMP ...,...)
2142    3. Bug fix in simplifier
2143    
2144    ----------------------------------------------------------------------
2145    Name: Matthias Blume
2146    Date: 2001/01/30 17:50:00 EST
2147    Tag: blume-20010130-sync
2148    Description:
2149    
2150    This is just a minor update to sync my devel branch with the main brach.
2151    The only visible change is the addition of some README files.
2152    
2153    ----------------------------------------------------------------------
2154    Name: Matthias Blume
2155    Date: 2001/01/12 23:30:00 JST
2156    Tag: blume-20010112-bootfiles
2157    Description:
2158    
2159    Made a new set of bootfiles that goes with the current state of the
2160    repository.
2161    
2162    ----------------------------------------------------------------------
2163    Name: Matthias Blume
2164    Date: 2001/01/12 21:20:00 JST
2165    Tag: blume-20010112-sync
2166    Description:
2167    
2168    I am just flushing out some minor changes that had accumulated in
2169    my private branch in order to sync with the main tree.  (This is
2170    mainly because I had CVS trouble when trying to merge _into_ my
2171    private branch.)
2172    
2173    Most people should be completely unaffected by this.
2174    
2175    ----------------------------------------------------------------------
2176    Name: Allen Leung
2177    Date: Thu Jan 11 21:03:00 EST 2001
2178    Tag: leunga-20010111-labexp=mltree
2179    Description:
2180    
2181    1.  Removed the type LabelExp and replace it by MLTree.
2182    2.  Rewritten mltree-simplify with the pattern matcher tool.
2183    3.  There were some bugs in alpha code generator which would break
2184        64-bit code generation.
2185    4.  Redo the tools to generate code with the
2186    5.  The CM files in MLRISC (and in src/system/smlnj/MLRISC)
2187        are now generated by perl scripts.
2188    
2189    ----------------------------------------------------------------------
2190    Name: Matthias Blume
2191    Date: 2001/01/10 21:55:00 JST
2192    Tag: blume-20010110-rcc
2193    Description:
2194    
2195    The RCC stuff now seems to work (but only on the x86).
2196    This required hacking of the c-calls interface (and -implementation) in
2197    MLRISC.
2198    
2199    Normal compiler users should be unaffected.
2200    
2201    ----------------------------------------------------------------------
2202    Name: Matthias Blume
2203    Date: 2001/01/09 01:20:00 JST
2204    Tag: blume-20010109-rcc
2205    Description:
2206    
2207    This is a fairly big patch, flushing out a large number of pending
2208    changes that I made to my development copy over the last couple of days.
2209    
2210    Of practical relevance at this moment is a workaround for a pickling
2211    bug that Allen ran into the other day.  The cause of the bug itself is
2212    still unknown and it might be hard to fix it properly, but the
2213    workaround has some merits of its own (namely somewhat reducing pickling
2214    overhead for certain libraries).  Therefore, I think this solution should
2215    be satisfactory at this time.
2216    
2217    The rest of the changes (i.e., the vast majority) has to do with my
2218    ongoing efforts of providing direct support for C function calls from
2219    ML.  At the moment there is a new primop "RAW_CCALL", typing magic
2220    in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new
2221    case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to
2222    translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to
2223    handle RCC.
2224    
2225    The last part (the changes to mlriscGen.sml) are still known to be
2226    wrong on the x86 and not implemented on all other architectures.  But
2227    the infrastructure is in place. I had to change a few functor
2228    signatures in the backend to be able to route the CCalls interface
2229    from MLRISC there, and I had to specialize the mltree type (on the
2230    x86) to include the necessary extensions. (The extensions themselves
2231    were already there and redy to go in MLRISC/x86).
2232    
2233    Everything should be very happy as soon as someone helps me with
2234    mlriscGen.sml...
2235    
2236    In any case, nothing of this should matter to anyone as long as the
2237    new primop is not being used (which is going to be the case unless you
2238    find it where I hid it :). The rest of the compiler is completely
2239    unaffected.
2240    
2241    ----------------------------------------------------------------------
2242    Name: Matthias Blume
2243    Date: 2001/01/05 00:30:00 JST
2244    Tag: blume-20010105-primops
2245    Description:
2246    
2247    Added some experimental support for work that I am doing right now.
2248    These changes mostly concern added primops, but there is also a new
2249    experimental C library in the runtime system (but currently not enabled
2250    anywhere except on Linux/X86).
2251    
2252    In the course of adding primops (and playing with them), I discovered that
2253    Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly
2254    broken.  (Zhong was very right he labeled this stuff as "major gross hack".)
2255    To recover, I made type information in INL_PRIM mandatory and changed
2256    prim.sml as well as built-in.sml accordingly.  The InLine structure now
2257    has complete, correct type information (i.e., no bottom types).
2258    
2259    Since all these changes mean that we need new binfiles, I also bumped the
2260    version number to 110.32.1.
2261    
2262    ----------------------------------------------------------------------
2263    Name: Matthias Blume
2264    Date: 2000/12/30 22:10:00 JST
2265    Tag: blume-20001230-various
2266    Description:
2267    
2268    Added proxy libraries for MLRISC and let MLRISC libraries refer
2269    to each other using path anchors.  (See CM manual for explanation.)
2270    
2271    Updated CM documentation.
2272    
2273    Fixed some bugs in CM.
2274    
2275    Implemented "proxy" libraries (= syntactic sugar for CM).
2276    
2277    Added "-quiet" option to makeml and changed runtime system accordingly.
2278    
2279    Added cleanup handler for exportML to reset timers and compiler stats.
2280    
2281    ----------------------------------------------------------------------
2282    Name: Lal George
2283    Date: 2000/12/22 22:22:58 EST 2000
2284    Tag: Release_110_32
2285    Description:
2286    
2287            Infinite precision used throughout MLRISC.
2288            see MLRISC/mltree/machine-int.sig
2289    
2290    ----------------------------------------------------------------------
2291    Name: Matthias Blume
2292    Date: 2000/12/22 23:16:00 JST
2293    Tag: blume-20001222-warn
2294    Description:
2295    
2296    Corrected wording and formatting of some CM warning message which I
2297    broke in my previous patch.
2298    
2299    ----------------------------------------------------------------------
2300    Name: Matthias Blume
2301    Date: 2000/12/22 21:20:00 JST
2302    Tag: blume-20001222-anchorenv
2303    Description:
2304    
2305    Fixed CM's handling of anchor environments in connection with CMB.make.
2306    
2307    ----------------------------------------------------------------------
2308    Name: Matthias Blume
2309    Date: 2000/12/22 13:15:00 JST
2310    Tag: blume-20001222-cleanup
2311    Description:
2312    
2313    Removed src/cm/ffi which does not (and did not) belong here.
2314    
2315    ----------------------------------------------------------------------
2316    Name: Matthias Blume
2317    Date: 2000/12/21 23:55:00 JST
2318    Tag: blume-20001221-exn
2319    Description:
2320    
2321    Probably most important: CM no longer silently swallows all exceptions
2322    in the compiler.
2323    Plus: some other minor CM changes.  For example, CM now reports some
2324    sizes for generated binfiles (code, data, envpickle, lambdapickle).
2325    
2326    ----------------------------------------------------------------------
2327    Name: Matthias Blume
2328    Date: 2000/12/15 00:01:05 JST
2329    Tag: blume-20001215-dirtool
2330    Description:
2331    
2332    - "dir" tool added.
2333    - improvements and cleanup to Tools structure
2334    - documentation updates
2335    
2336  ----------------------------------------------------------------------  ----------------------------------------------------------------------
2337  Name: Allen Leung  Name: Allen Leung
2338  Date: Thu Dec 14 03:45:24 EST 2000  Date: Thu Dec 14 03:45:24 EST 2000
# Line 1759  Line 4081 
4081       elaborator). There were a lot of changes during my "linkpath" trials       elaborator). There were a lot of changes during my "linkpath" trials
4082       that could have been reverted to their original state but weren't.       that could have been reverted to their original state but weren't.
4083       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
4084       than what was strictly necessary...  (I _did_ resist the tempation       than what was strictly necessary...  (I _did_ resist the temptation
4085       of doing any "global reformatting" to avoid an untimely death at       of doing any "global reformatting" to avoid an untimely death at
4086       Dave's hands. :)       Dave's hands. :)
4087    

Legend:
Removed from v.755  
changed lines
  Added in v.1094

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