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 645, Mon May 15 07:17:30 2000 UTC revision 749, Fri Dec 8 15:16:36 2000 UTC
# Line 12  Line 12 
12  Tag: <post-commit CVS tag>  Tag: <post-commit CVS tag>
13  Description:  Description:
14  ----------------------------------------------------------------------  ----------------------------------------------------------------------
15    Name: Lal George
16    Date: 2000/12/08 09:54:02 EST 2000
17    Tag: Release_110_31
18    Description:
19    
20    - Version 110.31
21    ----------------------------------------------------------------------
22    Name: Allen Leung
23    Date: Thu Dec  7 22:01:04 EST 2000
24    Tag:  leunga-20001207-cell-monster-hack
25    Description:
26    
27    Major MLRISC internal changes.  Affect all clients.
28    Summary:
29    
30    1.  Type CELLS.cell = int is now replaced by a datatype.
31        As a result, the old regmap is now gone.  Almost all interfaces
32        in MLRISC change as a consequence.
33    
34    2.  A new brand version of machine description tool (v3.0) that generates
35        modules expecting the new interface.  The old version is removed.
36    
37    3.  The RA interface has been further abstracted into two new functors.
38        RISC_RA and X86RA.  These functors have much simpler interfaces.
39        [See also directory MLRISC/demo.]
40    
41    4.  Some other new source->source code generation tools are available:
42    
43        a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
44        b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
45           I use this tool to generate the peephole optimizers---with the new
46           cell type changes, peephole rules are becoming difficult to write
47           without conditional pattern matching.
48    
49    5.  More Intmap -> IntHashTable change.  Previous changes by Matthias didn't
50        cover the entire MLRISC source tree so many things broke.
51    
52    6.  CM files have been moved to the subdirectory MLRISC/cm.
53        They are moved because there are a lot of them and they clutter up the
54        root dir.
55    
56    7.  More detailed documentation to come...
57    
58        NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
59        a makeml -rebuild first.  This is because of other other
60        changes that Matthias has made (see below).
61    
62    
63    ----------------------------------------------------------------------
64    Name: Matthias Blume
65    Date: 2000/11/30 23:12:00 JST
66    Tag: blume-20001130-filereorg
67    Description:
68    
69    Some manual updates and some file reorganizations in CM.
70    
71    ----------------------------------------------------------------------
72    Name: Matthias Blume
73    Date: 2000/11/24 17:45:00 JST
74    Tag: blume-20001124-link
75    Description:
76    
77    Drastically improved link traversal code for the case that the dynamic
78    value was already loaded at bootstrap time.  As a result, CM and CMB
79    now both load blazingly fast -- even on a very slow machine.  Also,
80    memory consumption has been further reduced by this.
81    
82    Warning: The format of the PIDMAP file has changed.  THerefore, to
83    bootstrap you have to do this:
84    
85    1. Run CMB.make
86    2. Make a symbolic link for the boot directory:
87         ln -s sml.boot.ARCH-OS xxx
88    3. "Rebuild" the boot directory:
89         ./makeml -boot xxx -rebuild sml ; rm xxx
90    4. Boot normally:
91          ./makeml
92    
93    ----------------------------------------------------------------------
94    Name: Matthias Blume
95    Date: 2000/11/21 21:20:00 JST
96    Tag: blume-20001121-tools
97    Description:
98    
99    Continued hacking on autoloading problem -- with success this time.
100    Also changed tool-plugin mechanism.  See new CM manual.
101    
102    ----------------------------------------------------------------------
103    Name: Matthias Blume
104    Date: 2000/11/19 14:30:00 JST
105    Tag:  blume-20001119-autoload
106    Description:
107    
108    Some hacking to make autoloading faster.  Success for CMB, no success
109    so far for CM.  There is a reduced structure CM' that autoloads faster.
110    (This is a temporary, non-documented hack to be eliminated again when
111    the general problem is solved.)
112    
113    ----------------------------------------------------------------------
114    Name: Matthias Blume
115    Date: 2000/11/17 14:10:00 JST
116    Tag: blume-20001117-pickle-lib
117    Description:
118    
119    1. Eliminated comp-lib.cm
120    2. Made pickle-lib.cm
121    3. Eliminated all uses of intset.sml (from comp-lib.cm)
122    4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
123       equivalent constructs from smlnj-lib.cm (INtHashTable).
124    5. Point 4. also goes for those uses of intmap.* in MLRISC.
125       Duplicated intmap modules thrown out.
126    6. Hunted down all duplicated SCC code and replaced it with
127       equivalent stuff (GraphSCCFn from smlnj-lib.cm).
128    7. Rewrote Feedback module.
129    8. Moved sortedlist.sml into viscomp-lib.cm.  Eventually it
130       should be thrown out and equivalent modules from smlnj-lib.cm
131       should be used (IntRedBlackSet, IntListSet, ...).
132    
133    Confirmed that compiler compiles to fixpoint.
134    
135    ----------------------------------------------------------------------
136    Name: Allen Leung
137    Date: 2000/11/10 18:00:00
138    Tag: leunga-20001110-new-x86-fp
139    
140    A new x86 floating point code generator has been added.
141    By default this is turned off.  To turn this on, do:
142    
143        CM.autoload "$smlnj/compiler.cm";
144        Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
145    
146    Changes:
147    
148    1.  Changed FTAN to FPTAN so that the assembly output is correct.
149    2.  Changed the extension callback for FTANGENT to generate:
150    
151              fptan
152              fstp  %st(0)
153        instead of
154              fptan
155              fstpl ftempmem
156    
157    3.  Numerous assembly fixes for x86.
158    
159    5.  Cleaned up the machine code output module x86/x86MC.sml and added
160        support for a whole bunch of instructions and addressing modes:
161    
162          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st, %st(n)
163          faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp  %st, %st(n)
164          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st(n), %st
165          fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
166          fxch %st(n)
167          fld %st(n)
168          fst %st(n)
169          fst mem
170          fstp %st(n)
171          fucom %st(n)
172          fucomp %st(n)
173    
174        All these are now generated when the fast fp mode is turned on.
175    
176    6.  Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
177    
178    ----------------------------------------------------------------------
179    Name: Matthias Blume
180    Date: 2000/11/09 11:20:00 JST
181    Tag: blume-20001109-scc
182    Description:
183    
184    Eliminated some code duplication:
185    
186    1. Added "where" clause to GraphSCCFn in SML/NJ Library.
187       (Otherwise the functor is useless.)
188    2. Used GraphSCCFn where SCCUtilFun was used previously.
189    3. Got rid of SCCUtilFun (in comp-lib.cm).
190    
191    ----------------------------------------------------------------------
192    Name: Lal George
193    Date: 2000/11/06 09:02:21 EST 2000
194    Tag: Release_110_30
195    Description:
196    
197    - Version 110.30
198    ----------------------------------------------------------------------
199    Name: Matthias Blume
200    Date: 2000/11/04 14:45:00
201    Tag: blume-20001104-mlbuild
202    Description:
203    
204    - Made ml-build faster on startup.
205    - Documentation fixes.
206    
207    ----------------------------------------------------------------------
208    Name: Matthias Blume
209    Date: 2000/11/02 17:00:00 JST
210    Tag: blume-20001102-condcomp
211    Description:
212    
213    - Small tweaks to pickler -- new BOOTFILES!
214    - Version bumped to 110.29.2.
215    - Added conditional compilation facility to init.cmi (see comment there).
216    ----------------------------------------------------------------------
217    Name: Allen Leung
218    Date: 2000/10/23 19:31:00
219    Tag: leunga-20001023-demo-ra
220    
221    1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
222    2. Test programs for the graph library updated
223    3. Some new MLRISC demo programs added
224    
225    ----------------------------------------------------------------------
226    Name: Matthias Blume
227    Date: 2000/08/31 22:15:00 JST
228    Tag: blume-20001017-errmsg
229    Description:
230    
231    More error message grief: Where there used to be no messages, there
232    now were some that had bogus error regions.  Fixed.
233    
234    ----------------------------------------------------------------------
235    Name: Matthias Blume
236    Date: 2000/08/31 17:30:00 JST
237    Tag: blume-20001017-v110p29p1
238    Description:
239    
240    I made a version 110.29.1 with new bootfiles.
241    
242    Changes:  Modified pickler/unpickler for faster and leaner unpickling.
243              CM documentation changes and a small bugfix in CM's error reporting.
244    
245    ----------------------------------------------------------------------
246    Name: Lal George
247    Date: 2000/09/27 14:42:35 EDT
248    Tag: george-20000927-nodestatus
249    Description:
250    
251    Changed the type of the nodestatus, so that:
252    
253            SPILLED(~1)             is now SPILLED
254            SPILLED(m) where m>=0   is now MEMREG(m)
255            SPILLED(s) where s<~1   is now SPILL_LOC(~s)
256    
257    ----------------------------------------------------------------------
258    Name: Matthias Blume
259    Date: 2000/09/07 14:45:00 JST
260    Tag: blume-20000907-cmerrmsg
261    Description:
262    
263    Small tweak to CM to avoid getting ML syntax error messages twice.
264    
265    ----------------------------------------------------------------------
266    Name: Matthias Blume
267    Date: 2000/08/31 18:00:00 JST
268    Tag: blume-20000831-cvsbootfiles
269    Description:
270    
271    New URL for boot files (because the 110.29 files on the BL server do
272    now work correctly with my updated install scripts for yacc and lex).
273    
274    ----------------------------------------------------------------------
275    Name: Matthias Blume
276    Date: 2000/08/08 12:33:00 JST
277    Tag: blume-20000808-manual
278    Description:
279    
280    Tiny update to CM manual.
281    
282    ----------------------------------------------------------------------
283    Name: Allen Leung
284    Date: 2000/08/7 19:31:00
285    Tag: leunga-20000807-a-whole-bunch-of-stuff
286    
287      Moby, C--, SSA, x86, machine descriptions etc.  Should only affect C--
288    and Mobdy.
289    
290    1.  x86
291    
292       a.  Fixes to peephole module by John and Dan.
293       b.  Assembly fix to SETcc by Allen.
294       c.  Fix to c-call by John.
295       d.  Fix to spilling by John.  (This one deals with the missing FSTPT case)
296       e.  Instruction selection optimization to SETcc as suggested by John.
297    
298           For example,
299    
300            MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
301    
302           should generate:
303    
304            MOVL a, x
305            SUBL b, x
306            SHRL 31, x
307    
308    2.  IR stuff
309    
310         A bunch of new DJ-graph related algorithms added.  These
311         speed up SSA construction.
312    
313    3.  SSA + Scheduling
314    
315         Added code for SSA and scheduling to the repository
316    
317    ----------------------------------------------------------------------
318    Name: Lal George
319    Date: 2000/07/27 11:53:14 EDT
320    
321    Tag: lal-20000727-linux-ppc
322    Description:
323    
324     Made changes to support Linux PPC.
325     p.s. I have confirmation that the 110.29 boot files work fine.
326    
327    ----------------------------------------------------------------------
328    Name: Matthias Blume
329    Date: 2000/07/27 17:40:00 JST
330    Tag: blume-20000727-scripts
331    Description:
332    
333    !!!! WARNING !!!!
334    You must recompile the runtime system!
335    !!!! WARNING !!!!
336    
337    This is basically another round of script-enhancements:
338    
339    1. sml, ml-build, and ml-makedepend accept options -D and -U to define
340       and undefine CM preprocessor symbols.
341    
342    2. ml-build avoids generating a new heap image if it finds that the
343       existing one is still ok.  (The condition is that no ML file had to
344       be recompiled and all ML files are found to be older that the heap
345       file.)
346    
347       To make this work smoothly, I also hacked the runtime system as
348       well as SMLofNJ.SysInfo to get access to the heap image suffix
349       (.sparc-solaris, ...) that is currently being used.
350    
351       Moreover, the signature of CM.mk_standalone has changed.  See the
352       CM manual.
353    
354    3. ml-makedepend accepts additional options -n, -a, and -o.  (See the
355       CM manual for details.)
356    
357    4. More CM manual updates:
358        - all of the above has been documented.
359        - there is now a section describing the (CM-related) command line
360          arguments that are accepted by the "sml" command
361    
362    ----------------------------------------------------------------------
363    Name: Matthias Blume
364    Date: 2000/07/25 16:20:00 JST
365    Tag: blume-20000725-makedepend
366    Description:
367    
368    Added a script called ml-makedepend.  This can be used in makefiles
369    for Unix' make in a way very similar to the "makedepend" command for
370    C.
371    
372    The script internally uses function CM.sources.
373    
374    Synopsis:
375    
376        ml-makedepend [-f makefile] cmfile targetname
377    
378    The default for the makefile is "makefile" (or "Makefile" should
379    "makefile" not exist).
380    
381    ml-makedepend adds a cmfile/targetname-specific section to this
382    makefile (after removing the previous version of this section).  The
383    section contains a single dependency specification with targetname on
384    the LHS (targetname is an arbitrary name), and a list of files derived
385    from the cmfile on the RHS.  Some of the files on the RHS are
386    ARCH/OPSYS-specific.  Therefore, ml-makedepend inserts references to
387    "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
388    path names.  The makefile writer is responsible for making sure that
389    these variables have correct at the time "make" is invoked.
390    
391    ----------------------------------------------------------------------
392    Name: Matthias Blume
393    Date: 2000/07/22 23:30:00 JST
394    Tag: blume-20000722-urlupdate
395    Description:
396    
397    Changed BOOT and config/srcarchiveurl to point to BL server:
398    
399        ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
400    
401    ----------------------------------------------------------------------
402    Name: Matthias Blume
403    Date: 2000/07/18 18:00:00 JST
404    Tag: blume-20000718-Version_110_29
405    Description:
406    
407    1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
408    
409    2. Updated config/version to 110.29
410    
411    3. Updated config/srcarchiveurl
412    
413    3. New boot files!
414       ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
415    
416    ----------------------------------------------------------------------
417    Name: Matthias Blume
418    Date: 2000/07/11 13:58:00 JST
419    Tag: blume-20000711-doctypo
420    Description:
421    
422    Fixed a few typos in CM manual.
423    
424    ----------------------------------------------------------------------
425    Name: Allen Leung
426    Date: 2000/06/15 00:38:00
427    Tag: leunga-20000704-sparc-x86
428    
429    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
430    2. fix to x86 RET bug [found by Dan Grossman]
431    3. sparc assembly bug fix for ticc instructions [found by Fermin]
432    
433       Affects c-- and moby only
434    
435    ----------------------------------------------------------------------
436    Name: Matthias Blume
437    Date: 2000/07/04 15:26:00
438    Tag: blume-20000704-trigger
439    Description:
440    
441    1. Improvements to CM manual.
442    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
443       of getting a back-trace.  The function, when called, raises an
444       internal exception which explicitly carries the full back-trace history,
445       so it is unaffected by any intervening handle-raise pairs ("trivial"
446       or not).  The interactive loop will print that history once it arrives
447       at top level.
448       Short of having all exceptions implicitly carry the full history, the
449       recommended way of using this facility is:
450         - compile your program with instrumentation "on"
451         - run it, when it raises an exception, look at the history
452         - if the history is "cut off" because of some handler, go and modify
453           your program so that it explicitly calls BTrace.trigger
454         - recompile (still instrumented), and rerun; look at the full history
455    
456    ----------------------------------------------------------------------
457    Name: Matthias Blume
458    Date: 2000/07/03 15:36:00 JST
459    Tag: blume-20000702-manual
460    Description:
461    
462    Small corrections and updates to CM manual.
463    
464    ----------------------------------------------------------------------
465    Name: Matthias Blume
466    Date: 2000/06/29 16:04:00 JST
467    Tag: blume-20000629-yacctool
468    Description:
469    
470    Changes:
471    
472    1. Class "mlyacc" now takes separate arguments to pass options to
473       generated .sml- and .sig-files independently.
474    2. Corresponding CM manual updates.
475    3. BTrace module now also reports call sites.  (However, for loop clusters
476       it only shows from where the cluster was entered.)  There are associated
477       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
478    
479    ----------------------------------------------------------------------
480    Name: Matthias Blume
481    Date: 2000/06/27 16:51:00 JST
482    Tag: blume-20000627-noweb
483    Description:
484    
485    Changes:
486    
487     1. Implemented "subdir" and "witness" options for noweb tool.
488        This caused some slight internal changes in CM's tool implementation.
489     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
490        some remaining issues from earlier path anchor changes.
491     3. Updated CM manual accordingly.
492    
493     4. Changed implementation of back-tracing so that I now consider it
494        ready for prime-time.
495    
496        In particular, you don't have to explicitly trigger the back-trace
497        anymore.  Instead, if you are running BTrace-instrumented code and
498        there is an uncaught exception (regardless of whether or not it was
499        raised in instrumented code), the top-level evalloop will print
500        the back-trace.
501    
502        Features:
503    
504          - Instrumented and uninstrumented code work together seemlessly.
505            (Of course, uninstrumented code is never mentioned in actual
506             back-traces.)
507    
508          - Asymptotic time- and space-complexity of instrumented code is
509            equal to that of uninstrumented code.  (This means that
510            tail-recursion is preserved by the instrumentation phase.)
511    
512          - Modules whose code has been instrumented in different sessions
513            work together without problem.
514    
515          - There is no penalty whatsoever on uninstrumented code.
516    
517          - There is no penalty on "raise" expressions, even in
518            instrumented code.
519    
520        A potential bug (or perhaps it is a feature, too):
521    
522          A back-trace reaches no further than the outermost instrumented
523          non-trivial "raise".  Here, a "trivial" raise is one that is the
524          sole RHS of a "handle" rule.  Thus, back-traces reach trough
525    
526               <exp> handle e => raise e
527    
528          and even
529    
530               <exp> handle Foo => raise Bar
531    
532          and, of course, through
533    
534               <exp> handle Foo => ...
535    
536         if the exception was not Foo.
537    
538         Back-traces always reach right through any un-instrumented code
539         including any of its "handle" expressions, trivial or not.
540    
541       To try this out, do the following:
542    
543         - Erase all existing binfiles for your program.
544           (You may keep binfiles for those modules where you think you
545            definitely don't need back-tracing.)
546         - Turn on back-trace instrumentation:
547              SMLofNJ.Internals.BTrace.mode (SOME true);
548         - Recompile your program.  (I.e., run "CM.make" or "use".)
549         - You may now turn instrumentation off again (if you want):
550              SMLofNJ.Internals.BTrace.mode (SOME false);
551         - Run your program as usual.  If it raises an exception that
552           reaches the interactive toplevel, then a back-trace will
553           automatically be printed.  After that, the toplevel loop
554           will print the exception history as usual.
555    
556    ----------------------------------------------------------------------
557    Name: Matthias Blume
558    Date: 2000/06/26 09:56:46 JST
559    Tag: blume-20000626-setup
560    Description:
561    
562    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
563          ML code before and after compiling a file (e.g., to set compiler
564          flags)
565    
566    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
567              - associated changes to btrace.sml (BTrace instrumentation pass)
568              - cleaner implementation of btimp.sml (BTrace tracing and report
569                module)
570    
571    CM manual: * new path encoding documented
572               * description of setup-parameter to "sml" added
573    
574    The biggest user-visible change to back-tracing is that it is no
575    longer necessary to compile all traced modules within the same
576    session.  (This was a real limitation.)
577    
578    ----------------------------------------------------------------------
579    Name: Matthias Blume
580    Date: 2000/06/24 12:40:00 JST
581    Tag: blume-20000624-startup
582    Description:
583    
584    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
585    bit too often -- to put it mildly. :)
586    
587    ----------------------------------------------------------------------
588    Name: Matthias Blume
589    Date: 2000/06/23 18:20:00 JST
590    Tag: blume-20000623-btrace
591    Description:
592    
593    This updates adds a backtrace facility to aid programmers in debugging
594    their programs.  This involves the following changes:
595    
596    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
597       keeping track of the current call stack.  When programs are compiled
598       in a special mode, the compiler will insert calls to these hooks
599       into the user program.
600       "Hook" means that it is possible for different implementations of
601       back-tracing to register themselves (at different times).
602    
603    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
604       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
605       It can be turned on using this call:
606         SMLofNJ.Internals.BTrace.mode (SOME true);
607       Turning it off again:
608         SMLofNJ.Internals.BTrace.mode (SOME false);
609       Querying the current status:
610         SMLofNJ.Internals.BTrace.mode NONE;
611       Annotated programs are about twice as big as normal ones, and they
612       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
613       where all hooks do nothing).  The slowdown with a plugin that is
614       actually useful (such as the one supplied by default) is even greater,
615       but in the case of the default plugin it is still only an constant
616       factor (amortized).
617    
618    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
619       with a sub-structure BTrace for controlling back-tracing.  In particular,
620       the above-mentioned function "mode" controls whether the annotation
621       phase is invoked by the compiler.  Another important function is
622       "trigger": when called it aborts the current execution and causes
623       the top-level loop to print a full back-trace.
624    
625    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
626       for back-tracing.  It keeps track of the dynamic call stack and in
627       addition to that it keeps a partial history at each "level" of that
628       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
629       d and b (at separate times, dynamically), then the report will show:
630    
631       GOTO   d
632             /c
633       GOTO  \b
634       CALL   a
635    
636       This shows that there was an initial non-tail call of a, then a
637       tail-call to b or c, looping behavior in a cluster of functions that
638       consist of b and c, and then a goto from that cluster (i.e., either from
639       b or from c) to d.
640    
641       Note that (depending on the user program) the amount of information
642       that the back-trace module has to keep track of at each level is bounded
643       by a constant.  Thus, the whole implementation has the same asymptotical
644       complexity as the original program (both in space and in time).
645    
646    5. compiler/TopLevel/interact/evalloop.sml has been modified to
647       handle the special exception SMLofNJ.Internals.BTrace.BTrace
648       which is raised by the "trigger" function mentioned above.
649    
650    Notes on usage:
651    
652    - Annotated code works well together with unannotated code:
653    Unannotated calls simply do not show up at all in the backtrace.
654    
655    - It is not a good idea to let modules that were annotated during
656    different sessions run at the same time.  This is because the compiler
657    chooses small integers to identify individual functions, and there
658    will be clashes if different modules were compiled in separate sessions.
659    (Nothing will crash, and you will even be told about the clashes, but
660    back-trace information will in general not be useful.)
661    
662    - Back-tracing can be confused by callcc and capture.
663    
664    - The only way of getting a back-trace right now is to explicitly
665    invoke the "trigger" function from your user program.  Eventually, we
666    should make every exception carry back-trace information (if
667    available).  But since this creates more overhead at "raise"-time
668    (similar to the current exnHistory overhead), I have not yet
669    implemented this.  (The implementation will be rather easy.)  With
670    exceptions carrying back-trace information, this facility will be even
671    more useful because users don't need to modify their programs...
672    
673    - While it is possible to compile the compiler with back-trace
674    annotations turned on (I did it to get some confidence in
675    correctness), you must make absolutely sure that core.sml and
676    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
677    be compiled with annotation because there is no core access yet, but
678    if you compile btimp.sml with annotation, then the system will go into
679    an infinite recursion and crash.)
680    Since CM currently does not know about BTrace, the only way to turn
681    annotations on and off for different modules of the compiler is to
682    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
683    this is awkward and clumsy.
684    
685    Sample sessions:
686    
687    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
688    - SMLofNJ.Internals.BTrace.mode (SOME true);
689    [autoloading]
690    [autoloading done]
691    val it = false : bool
692    - structure X = struct
693    -     fun main n = let
694    -         fun a (x, 0) = d x
695    -           | a (x, n) = b (x, n - 1)
696    -         and b (x, n) = c (x, n)
697    -         and c (x, n) = a (x, n)
698    -         and d x = e (x, 3)
699    -         and e (x, 0) = f x
700    -           | e (x, n) = e (x, n - 1)
701    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
702    -           | f n = n * g (n - 1)
703    -         and g n = a (n, 3)
704    -     in
705    -         f n
706    -     end
707    - end;
708    structure X : sig val main : int -> int end
709    - X.main 3;
710    *** BACK-TRACE ***
711    GOTO   stdIn:4.2-13.20: X.main[2].f
712    GOTO-( stdIn:4.2-13.20: X.main[2].e
713    GOTO   stdIn:4.2-13.20: X.main[2].d
714         / stdIn:4.2-13.20: X.main[2].a
715         | stdIn:4.2-13.20: X.main[2].b
716    GOTO-\ stdIn:4.2-13.20: X.main[2].c
717    CALL   stdIn:4.2-13.20: X.main[2].g
718    GOTO   stdIn:4.2-13.20: X.main[2].f
719    GOTO-( stdIn:4.2-13.20: X.main[2].e
720    GOTO   stdIn:4.2-13.20: X.main[2].d
721         / stdIn:4.2-13.20: X.main[2].a
722         | stdIn:4.2-13.20: X.main[2].b
723    GOTO-\ stdIn:4.2-13.20: X.main[2].c
724    CALL   stdIn:4.2-13.20: X.main[2].g
725    GOTO   stdIn:4.2-13.20: X.main[2].f
726    GOTO-( stdIn:4.2-13.20: X.main[2].e
727    GOTO   stdIn:4.2-13.20: X.main[2].d
728         / stdIn:4.2-13.20: X.main[2].a
729         | stdIn:4.2-13.20: X.main[2].b
730    GOTO-\ stdIn:4.2-13.20: X.main[2].c
731    CALL   stdIn:4.2-13.20: X.main[2].g
732    GOTO   stdIn:4.2-13.20: X.main[2].f
733    CALL   stdIn:2.15-17.4: X.main[2]
734    -
735    
736    (Note that because of a FLINt bug the above code currently does not
737    compile without BTrace turned on.)
738    
739    Here is another example, using my modified Tiger compiler:
740    
741    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
742    - SMLofNJ.Internals.BTrace.mode (SOME true);
743    [autoloading]
744    [autoloading done]
745    val it = false : bool
746    - CM.make "sources.cm";
747    [autoloading]
748    ...
749    [autoloading done]
750    [scanning sources.cm]
751    [parsing (sources.cm):parse.sml]
752    [creating directory CM/SKEL ...]
753    [parsing (sources.cm):tiger.lex.sml]
754    ...
755    [wrote CM/sparc-unix/semant.sml]
756    [compiling (sources.cm):main.sml]
757    [wrote CM/sparc-unix/main.sml]
758    [New bindings added.]
759    val it = true : bool
760    - Main.compile ("../testcases/merge.tig", "foo.out");
761    *** BACK-TRACE ***
762    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
763    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
764    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
765    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
766    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
767    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
768    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
769         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
770    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
771    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
772    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
773    CALL   main.sml:1.18-118.4: Main.compile[2]
774    -
775    
776    ----------------------------------------------------------------------
777    Name: Matthias Blumen
778    Date: 2000/06/21 18:00:00 JST
779    Tag: blume-20000621-manual
780    Description:
781    
782    CM manual update: Path environments documented.
783    
784    ----------------------------------------------------------------------
785    Name: Matthias Blume
786    Date: 2000/06/19 13:40:00
787    Tag: blume-20000619-manual
788    Description:
789    
790    CM manual and system/README update.  This only covers the fact that
791    there are no more implicit anchors.  (Path environments and the "bind"
792    option to "cm" have yet to be documented.)
793    
794    ----------------------------------------------------------------------
795    Name: Matthias Blume
796    Date: 2000/06/19 11:05:00 JST
797    Tag: blume-20000619-chdir-bugfix
798    Description:
799    
800    Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
801    
802    ----------------------------------------------------------------------
803    Name: Matthias Blume
804    Date: 2000/06/18 22:00:10 JST
805    Tag: blume-20000618-implicit-anchors-really-gone
806    Description:
807    
808    I updates the previous HISTORY entry where I forgot to mention that
809    implicit anchors are no longer with us.
810    
811    The current update also gets rid of the (now useless) controller
812    CM.Control.implicit_anchors.
813    
814    ----------------------------------------------------------------------
815    Name: Matthias Blume
816    Date: 2000/06/16 17:30:00 JST
817    Tag: blume-20000616-anchorenv
818    Description:
819    
820    This patch implements the long anticipated (just kidding :) "anchor
821    environment" mechanism.  In the course of doing this, I also
822    re-implemented CM's internal "SrcPath" module from scratch.  The new
823    one should be more robust in certain boundary cases.  In any case, it
824    is a lot cleaner than its predecessor (IMHO).
825    
826    This time, although there is yet another boot file format change, I
827    kept the unpickler backward-compatible.  As a result, no new bootfiles
828    are necessary and bootstrapping is straightforward.  (You cannot read
829    new bootfiles into an old system, but the other way around is no
830    problem.)
831    
832    Visible changes:
833    
834    ** 0. Implicit path anchors (without the leading $-symbol) are no
835    longer recognized at all. This means that such path names are not
836    illegal either.  For example, the name basis.cm simply refers to a
837    local file called "basis.cm" (i.e, the name is an ordinary path
838    relative to .cm-files directory).  Or, to put it differently, only
839    names that start with $ are anchored paths.
840    
841    ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
842    vanished.
843    
844    John (Reppy) had critizised this as soon as I originally proposed and
845    implemented it, but at that time I did not really deeply believe
846    him. :) Now I came full-circle because I need the $<singlearc> syntax
847    in another place where it cannot be seen as an abbreviation for
848    $/<singlearc>.  To avoid the confusion, $<singlearc> now means what it
849    seems to mean (i.e., it "expands" into the corresponding anchor
850    value).
851    
852    However, when paths are used as members in CM description files, it
853    continues to be true that there must be at least another arc after the
854    anchor.  This is now enforced separately during semantic analysis
855    (i.e., from a lexical/syntactical point of view, the notation is ok.)
856    
857    ** 2. The "cm" class now accepts an option "bind".  The option's value
858    is a sub-option list of precisely two items -- one labeled "anchor"
859    and the other one labeled "value".  As you might expect, "anchor" is
860    used to specify an anchor name to be bound, and "value" specifies what
861    the anchor is being bound to.
862    
863    The value must be a directory name and can be given in either standard
864    syntax (including the possibility that it is itself an anchored path)
865    or native syntax.
866    
867    Examples:
868    
869       foo.cm (bind:(anchor:bar value:$mystuff/bar))
870       lib.cm (bind:(anchor:a value:"H:\\x\\y\\z"))  (* only works under windows *)
871    
872    and so on.
873    
874    The meaning of this is that the .cm-file will be processed with an
875    augmented anchor environment where the given anchor(s) is/are bound to
876    the given values(s).
877    
878    The rationale for having this feature is this: Suppose you are trying
879    to use two different (already stable) libraries a.cm and b.cm (that
880    you perhaps didn't write yourself).  Further, suppose each of these
881    two libraries internally uses its own auxiliary library $aux/lib.cm.
882    Normally you would now have a problem because the anchor "lib" can not
883    be bound to more than one value globally.  Therefore, the project that
884    uses both a.cm and b.cm must locally redirect the anchor to some other
885    place:
886    
887       a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
888       b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
889    
890    This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
891    /usr/lib/smlnj/b-stuff/aux.cm, respectively.
892    
893    Hard-wiring path names is a bit inflexible (and CM will verbosely warn
894    you when you do so at the time of CM.stabilize).  Therefore, you can
895    also use an anchored path as the value:
896    
897      a.cm (bind:(anchor:lib value:$a-lib))
898      b.cm (bind:(anchor:lib value:$b-lib))
899    
900    Now you can globally configure (using the usual CM.Anchor.anchor or
901    pathconfig machinery) bindings for "a-lib" and "b-lib".  Since "lib"
902    itself is always locally bound, setting it globally is no longer
903    meaningful or necessary (but it does not hurt either).  In fact, "lib"
904    can still be used as a global anchor for separate purposes.  As a
905    matter of fact, one can locally define "lib" in terms of a global
906    "lib":
907    
908      a.cm (bind:(anchor:lib value:$lib/a))
909      b.cm (bind:(anchor:lib value:$lib/b))
910    
911    ** 3: The encoding of path names has changed.  This affects the way
912    path names are shown in CM's progress report and also the internal
913    protocol encoding used for parallel make.
914    
915    The encoding now uses one or more ':'-separated segments.  Each
916    segments corresponds to a file that has been specified relative to the
917    file given by its preceding segment.  The first segment is either
918    relative to the CWD, absolute, or anchored.  Each segment itself is
919    basically a Unix pathname; all segments but the first are relative.
920    
921    Example:
922    
923       $foo/bar/baz.cm:a/b/c.sml
924    
925    This path denotes the file bar/a/b/c.sml relative to the directory
926    denoted by anchor "foo".  Notice that the encoding also includes
927    baz.cm which is the .cm-file that listed a/b/c.sml.  As usual, such
928    paths are resolved relative to the .cm-files directory, so baz.cm must
929    be ignored to get the "real" pathname.
930    
931    To make this fact more obvious, CM puts the names of such "virtual
932    arcs" into parentheses when they appear in progress reports. (No
933    parentheses will appear in the internal protocol encoding.)  Thus,
934    what you really see is:
935    
936      $foo/bar/(baz.cm):a/b/c.sml
937    
938    I find this notation to be much more informative than before.
939    
940    Another new feature of the encoding is that special characters
941    including parentheses, colons, (back)slashes, and white space are
942    written as \ddd (where ddd is the decimal encoding of the character).
943    
944    *** The CM manual still needs to be updated.
945    
946    ----------------------------------------------------------------------
947    Name: Allen Leung
948    Date: 2000/06/15 00:38:00
949    Tag: leunga-20000615-x86-peephole
950    
951    x86 Peephole fix by Fermin.  Affects c-- and moby only.
952    
953    ----------------------------------------------------------------------
954    Name: Matthias Blume
955    Date: 2000/06/12 11:40:00
956    Tag: blume-20000612-parmakefix
957    Description:
958    
959    More cleanup after changing the file naming scheme: This time I
960    repaired the parallel make mechanism for CMB.make which I broke earlier.
961    
962    ----------------------------------------------------------------------
963    Name: Allen Leung
964    Date: 2000/06/09 01:25:00
965    Tag: leunga-20000609-various
966    
967    None of these things should affect normal SML/NJ operations
968    
969    1. Peephole improvements provided by Fermin (c--)
970    2. New annotation DEFUSE for adding extra dependence (moby)
971    3. New X86 LOCK instructions (moby)
972    4. New machine description language for reservation tables (scheduling)
973    5. Fixes to various optimization/analysis modules (branch chaining, dominator
974       trees etc.)
975    6. I've changed the CM files so that they can work with versions
976       110.0.6, 110.25 and 110.28
977    
978    ----------------------------------------------------------------------
979    Name: Matthias Blume
980    Date: 2000/06/09 12:40:00
981    Tag: blume-20000609-log
982    Description:
983    
984    - Removed all(?) remaining RCS Log entries from sources.
985    
986    - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
987      anchored paths).
988    
989    ----------------------------------------------------------------------
990    Name: Matthias Blume
991    Date: 2000/06/07 17:00:00 JST
992    Tag: blume-20000607-no-implicit-anchors
993    Description:
994    
995    1. This update changes the default setting for
996    CM.Control.implicit_anchors from true to false.  This means that
997    implicit anchors are no longer permitted by default.  I also tried to
998    make sure that nothing else still relies on implicit anchors.
999    (This is the next step on the schedule towards a CM that does not even
1000    have the notion of implicit anchors anymore.)
1001    
1002    2. More CM manual updates.
1003    
1004    3. I managed to track down and fix the pickling bug I mentioned last
1005    time.  Because of the previously existing workaround, this entails no
1006    immediate practical changes.
1007    
1008    ----------------------------------------------------------------------
1009    Name: Matthias Blume
1010    Date: 2000/06/06 11:15:00 JST
1011    Tag: blume-20000606-lazierpickle
1012    Description:
1013    
1014    !!!! NEW BOOT FILES !!!!
1015    
1016    * The main purpose of this update is to make library pickles lazier in
1017    order to reduce the initial space penalty for autoloading a library.
1018    As a result, it is now possible to have $smlnj/compiler.cm
1019    pre-registered.  This should take care of the many complaints or
1020    inquiries about missing structure Compiler.  This required changes to
1021    CM's internal data structures and small tweaks to some algorithms.
1022    
1023    As a neat additional effect, it is no longer necessary (for the sake
1024    of lean heap image files) to distinguish between a "minimal" CM and a
1025    "full" CM.  Now, there is only one CM (i.e., the "full" version:
1026    $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
1027    interactive top level. ($smlnj/cm/minimal.cm is gone.)
1028    
1029    To make the life of compiler-hackers easier, "makeml" now also
1030    pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm).  In other
1031    words, after you bootstrap a new sml for the first time, you will not
1032    have to autoload $smlnj/cmb.cm again afterwards.  (The first time
1033    around you will still have to do it, though.)
1034    
1035    * A second change consists of major updates to the CM manual.  There
1036    are now several appendices with summary information and also a full
1037    specification of the CM description file syntax.
1038    
1039    * In directory src/system I added the script "allcross".  This script
1040    invokes sml and cross-compiles the compiler for all supported
1041    architectures.  (Useful when providing a new set of boot files.)
1042    
1043    * There seems to be a latent bug in my "lazy pickles" mechanism.  I
1044    added a small tweak to pickle-util.sml to work around this problem,
1045    but it is not a proper fix yet.  I will investigate further.  (The
1046    effect of the bug was an inflation of library pickle size.)
1047    
1048    * Version number increased to 110.28.1 (to avoid compatibility problems).
1049    
1050    ----------------------------------------------------------------------
1051    Name: Allen Leung
1052    Date: 2000/05/25 17:28 EDT
1053    Tag: leunga-20000525-ra
1054    Description:
1055    
1056      Fixed a bug in freezing phase of the register allocator.
1057    
1058    ----------------------------------------------------------------------
1059    Name: Allen Leung
1060    Date: 2000/05/15 22:53 EDT
1061    Tag: leunga-20000515-alpha-x86-ra
1062    Description:
1063    
1064      1. Alpha
1065    
1066          Slight cleanup.  Removed the instruction SGNXL
1067    
1068      2. X86
1069    
1070          Added the following instructions to the instruction set:
1071    
1072            ROLx, RORx,
1073            BTx, BTSx, BTLx, BTRx,
1074            XCHGx, and variants with the LOCK prefix
1075    
1076      3. Register Allocation
1077    
1078          The module ra-rewrite-with-renaming has been improved.
1079    
1080      These have no effect on SML/NJ.
1081    
1082    ----------------------------------------------------------------------
1083  Name: Matthias Blume  Name: Matthias Blume
1084  Date: 2000/05/15 16:20:00 JST  Date: 2000/05/15 16:20:00 JST
1085  Tag: blume-20000515-lightrebuild  Tag: blume-20000515-lightrebuild
# Line 470  Line 1538 
1538    
1539  3.  Assembly  3.  Assembly
1540    
1541      When generating assemby, resolve the value of client defined constants,      When generating assembly, resolve the value of client defined constants,
1542      instead of generating symbolic values.  This is controlled by the      instead of generating symbolic values.  This is controlled by the
1543      new flag "asm-resolve-constants", which is default to true.      new flag "asm-resolve-constants", which is default to true.
1544    
# Line 493  Line 1561 
1561    
1562  To this end, I arranged that instead of "structure Core" as "structure  To this end, I arranged that instead of "structure Core" as "structure
1563  _Core" is bound in the pervasive environment.  Core access is done via  _Core" is bound in the pervasive environment.  Core access is done via
1564  _Core (which can never be accidentially rebound because _Core is not a  _Core (which can never be accidentally rebound because _Core is not a
1565  legal surface-syntax symbol).  legal surface-syntax symbol).
1566    
1567  The current solution is much cleaner because the core environment is  The current solution is much cleaner because the core environment is
# Line 503  Line 1571 
1571  with dynamic and symbolic parts of the core environment.  with dynamic and symbolic parts of the core environment.
1572    
1573  Remaining hackery (to bind the "magic" symbol _Core) is localized in the  Remaining hackery (to bind the "magic" symbol _Core) is localized in the
1574  compilation mananger's bootstrap compiler (actually: in the "init group"  compilation manager's bootstrap compiler (actually: in the "init group"
1575  handling).  See the comments in src/system/smlnj/init/init.cmi for  handling).  See the comments in src/system/smlnj/init/init.cmi for
1576  more details.  more details.
1577    
# Line 618  Line 1686 
1686     (specified in the .cm file at each instance where the tool's class is     (specified in the .cm file at each instance where the tool's class is
1687     used).     used).
1688    
1689     This was done to accomodate the new "make" and "shell" tools which     This was done to accommodate the new "make" and "shell" tools which
1690     facilitate fairly seemless hookup to portions of code managed using     facilitate fairly seamless hookup to portions of code managed using
1691     Makefiles or Shell scripts.     Makefiles or Shell scripts.
1692    
1693     There are no classes "shared" or "private" anymore.  Instead, the     There are no classes "shared" or "private" anymore.  Instead, the
# Line 631  Line 1699 
1699    
1700     All existing tools are described in the CM manual.     All existing tools are described in the CM manual.
1701    
1702     - Slightly better error handling.  (CM now surpresses many followup     - Slightly better error handling.  (CM now suppresses many followup
1703     error messages that tended to be more annoying than helpful.)     error messages that tended to be more annoying than helpful.)
1704    
1705  2. Major changes to the compiler's static environment data structures.  2. Major changes to the compiler's static environment data structures.
# Line 765  Line 1833 
1833    
1834       I've changed andl to testl in the floating point test sequence       I've changed andl to testl in the floating point test sequence
1835       whenever appropriate.  The Intel optimization guide states that       whenever appropriate.  The Intel optimization guide states that
1836       testl is perferable to andl.       testl is preferable to andl.
1837    
1838  7. RA (x86 only)  7. RA (x86 only)
1839    
# Line 947  Line 2015 
2015    
2016  1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an  1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
2017  additional argument called "template" which is an optional string that  additional argument called "template" which is an optional string that
2018  specifiel the layout of the tool command line.  See the CM manual for  specifies the layout of the tool command line.  See the CM manual for
2019  explanation.  explanation.
2020    
2021  2. A special-purpose tool can be "regisitered" by simply dropping the  2. A special-purpose tool can be "registered" by simply dropping the
2022  corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same  corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
2023  directory where the .cm file lives that uses this tool.  (The  directory where the .cm file lives that uses this tool.  (The
2024  behavior/misfeature until now was to look for the tool description  behavior/misfeature until now was to look for the tool description
# Line 994  Line 2062 
2062  rebuild.  Having sets of the form <base><k>.{bin,boot}.<arch>-unix for  rebuild.  Having sets of the form <base><k>.{bin,boot}.<arch>-unix for
2063  <k>=1,2,... is normally not a good idea when invoking fixpt.  However,  <k>=1,2,... is normally not a good idea when invoking fixpt.  However,
2064  they might be the result of an earlier partial run of fixpt (which  they might be the result of an earlier partial run of fixpt (which
2065  perhaps got accidentially killed).  In this case, fixpt will quickly  perhaps got accidentally killed).  In this case, fixpt will quickly
2066  move through what exists before continuing where it left off earlier,  move through what exists before continuing where it left off earlier,
2067  and, thus, saves a lot of time.  and, thus, saves a lot of time.
2068    
# Line 1044  Line 2112 
2112    it from that remote directory.    it from that remote directory.
2113    This should simplify installation further:  For machines that have    This should simplify installation further:  For machines that have
2114    access to the internet, just fetch <version>-config.tgz, unpack it,    access to the internet, just fetch <version>-config.tgz, unpack it,
2115    edit config/targets, and go (run config/install.sh).  The scipt will    edit config/targets, and go (run config/install.sh).  The script will
2116    fetch everything else that it might need all by itself.    fetch everything else that it might need all by itself.
2117    
2118    For CVS users, this mechanism is not relevant for source archives, but    For CVS users, this mechanism is not relevant for source archives, but

Legend:
Removed from v.645  
changed lines
  Added in v.749

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