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 671, Mon Jun 19 02:02:32 2000 UTC revision 772, Thu Jan 4 15:36:41 2001 UTC
# Line 13  Line 13 
13  Description:  Description:
14  ----------------------------------------------------------------------  ----------------------------------------------------------------------
15  Name: Matthias Blume  Name: Matthias Blume
16    Date: 2001/01/05 00:30:00 JST
17    Tag: blume-20010105-primops
18    Description:
19    
20    Added some experimental support for work that I am doing right now.
21    These changes mostly concern added primops, but there is also a new
22    experimental C library in the runtime system (but currently not enabled
23    anywhere except on Linux/X86).
24    
25    In the course of adding primops (and playing with them), I discovered that
26    Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly
27    broken.  (Zhong was very right he labeled this stuff as "major gross hack".)
28    To recover, I made type information in INL_PRIM mandatory and changed
29    prim.sml as well as built-in.sml accordingly.  The InLine structure now
30    has complete, correct type information (i.e., no bottom types).
31    
32    Since all these changes mean that we need new binfiles, I also bumped the
33    version number to 110.32.1.
34    
35    ----------------------------------------------------------------------
36    Name: Matthias Blume
37    Date: 2000/12/30 22:10:00 JST
38    Tag: blume-20001230-various
39    Description:
40    
41    Added proxy libraries for MLRISC and let MLRISC libraries refer
42    to each other using path anchors.  (See CM manual for explanation.)
43    
44    Updated CM documentation.
45    
46    Fixed some bugs in CM.
47    
48    Implemented "proxy" libraries (= syntactic sugar for CM).
49    
50    Added "-quiet" option to makeml and changed runtime system accordingly.
51    
52    Added cleanup handler for exportML to reset timers and compiler stats.
53    
54    ----------------------------------------------------------------------
55    Name: Lal George
56    Date: 2000/12/22 22:22:58 EST 2000
57    Tag: Release_110_32
58    Description:
59    
60            Infinite precision used throughout MLRISC.
61            see MLRISC/mltree/machine-int.sig
62    
63    ----------------------------------------------------------------------
64    Name: Matthias Blume
65    Date: 2000/12/22 23:16:00 JST
66    Tag: blume-20001222-warn
67    Description:
68    
69    Corrected wording and formatting of some CM warning message which I
70    broke in my previous patch.
71    
72    ----------------------------------------------------------------------
73    Name: Matthias Blume
74    Date: 2000/12/22 21:20:00 JST
75    Tag: blume-20001222-anchorenv
76    Description:
77    
78    Fixed CM's handling of anchor environments in connection with CMB.make.
79    
80    ----------------------------------------------------------------------
81    Name: Matthias Blume
82    Date: 2000/12/22 13:15:00 JST
83    Tag: blume-20001222-cleanup
84    Description:
85    
86    Removed src/cm/ffi which does not (and did not) belong here.
87    
88    ----------------------------------------------------------------------
89    Name: Matthias Blume
90    Date: 2000/12/21 23:55:00 JST
91    Tag: blume-20001221-exn
92    Description:
93    
94    Probably most important: CM no longer silently swallows all exceptions
95    in the compiler.
96    Plus: some other minor CM changes.  For example, CM now reports some
97    sizes for generated binfiles (code, data, envpickle, lambdapickle).
98    
99    ----------------------------------------------------------------------
100    Name: Matthias Blume
101    Date: 2000/12/15 00:01:05 JST
102    Tag: blume-20001215-dirtool
103    Description:
104    
105    - "dir" tool added.
106    - improvements and cleanup to Tools structure
107    - documentation updates
108    
109    ----------------------------------------------------------------------
110    Name: Allen Leung
111    Date: Thu Dec 14 03:45:24 EST 2000
112    Description:
113    Tag:  leunga-20001214-int-inf
114    Description:
115    
116       In IntInf, added these standard functions, which are missing from our
117    implementation:
118    
119        andb : int * int -> int
120        xorb : int * int -> int
121        orb  : int * int -> int
122        notb : int -> int
123         <<   : int * word -> int
124        ~>>  : int * word -> int
125    
126       Not tested, I hope they are correct.
127    
128    ----------------------------------------------------------------------
129    Name: Allen Leung
130    Date: Fri Dec  8 19:23:26 EST 2000
131    Description:
132    Tag:  leunga-20001208-nowhere
133    Description:
134    
135      Slight improvements to the 'nowhere' tool to handle OR-patterns,
136    to generate better error messages etc.  Plus a brief manual.
137    
138    ----------------------------------------------------------------------
139    Name: Lal George
140    Date: 2000/12/08 09:54:02 EST 2000
141    Tag: Release_110_31
142    Description:
143    
144    - Version 110.31
145    ----------------------------------------------------------------------
146    Name: Allen Leung
147    Date: Thu Dec  7 22:01:04 EST 2000
148    Tag:  leunga-20001207-cell-monster-hack
149    Description:
150    
151    Major MLRISC internal changes.  Affect all clients.
152    Summary:
153    
154    1.  Type CELLS.cell = int is now replaced by a datatype.
155        As a result, the old regmap is now gone.  Almost all interfaces
156        in MLRISC change as a consequence.
157    
158    2.  A new brand version of machine description tool (v3.0) that generates
159        modules expecting the new interface.  The old version is removed.
160    
161    3.  The RA interface has been further abstracted into two new functors.
162        RISC_RA and X86RA.  These functors have much simpler interfaces.
163        [See also directory MLRISC/demo.]
164    
165    4.  Some other new source->source code generation tools are available:
166    
167        a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
168        b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
169           I use this tool to generate the peephole optimizers---with the new
170           cell type changes, peephole rules are becoming difficult to write
171           without conditional pattern matching.
172    
173    5.  More Intmap -> IntHashTable change.  Previous changes by Matthias didn't
174        cover the entire MLRISC source tree so many things broke.
175    
176    6.  CM files have been moved to the subdirectory MLRISC/cm.
177        They are moved because there are a lot of them and they clutter up the
178        root dir.
179    
180    7.  More detailed documentation to come...
181    
182        NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
183        a makeml -rebuild first.  This is because of other other
184        changes that Matthias has made (see below).
185    
186    
187    ----------------------------------------------------------------------
188    Name: Matthias Blume
189    Date: 2000/11/30 23:12:00 JST
190    Tag: blume-20001130-filereorg
191    Description:
192    
193    Some manual updates and some file reorganizations in CM.
194    
195    ----------------------------------------------------------------------
196    Name: Matthias Blume
197    Date: 2000/11/24 17:45:00 JST
198    Tag: blume-20001124-link
199    Description:
200    
201    Drastically improved link traversal code for the case that the dynamic
202    value was already loaded at bootstrap time.  As a result, CM and CMB
203    now both load blazingly fast -- even on a very slow machine.  Also,
204    memory consumption has been further reduced by this.
205    
206    Warning: The format of the PIDMAP file has changed.  THerefore, to
207    bootstrap you have to do this:
208    
209    1. Run CMB.make
210    2. Make a symbolic link for the boot directory:
211         ln -s sml.boot.ARCH-OS xxx
212    3. "Rebuild" the boot directory:
213         ./makeml -boot xxx -rebuild sml ; rm xxx
214    4. Boot normally:
215          ./makeml
216    
217    ----------------------------------------------------------------------
218    Name: Matthias Blume
219    Date: 2000/11/21 21:20:00 JST
220    Tag: blume-20001121-tools
221    Description:
222    
223    Continued hacking on autoloading problem -- with success this time.
224    Also changed tool-plugin mechanism.  See new CM manual.
225    
226    ----------------------------------------------------------------------
227    Name: Matthias Blume
228    Date: 2000/11/19 14:30:00 JST
229    Tag:  blume-20001119-autoload
230    Description:
231    
232    Some hacking to make autoloading faster.  Success for CMB, no success
233    so far for CM.  There is a reduced structure CM' that autoloads faster.
234    (This is a temporary, non-documented hack to be eliminated again when
235    the general problem is solved.)
236    
237    ----------------------------------------------------------------------
238    Name: Matthias Blume
239    Date: 2000/11/17 14:10:00 JST
240    Tag: blume-20001117-pickle-lib
241    Description:
242    
243    1. Eliminated comp-lib.cm
244    2. Made pickle-lib.cm
245    3. Eliminated all uses of intset.sml (from comp-lib.cm)
246    4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
247       equivalent constructs from smlnj-lib.cm (INtHashTable).
248    5. Point 4. also goes for those uses of intmap.* in MLRISC.
249       Duplicated intmap modules thrown out.
250    6. Hunted down all duplicated SCC code and replaced it with
251       equivalent stuff (GraphSCCFn from smlnj-lib.cm).
252    7. Rewrote Feedback module.
253    8. Moved sortedlist.sml into viscomp-lib.cm.  Eventually it
254       should be thrown out and equivalent modules from smlnj-lib.cm
255       should be used (IntRedBlackSet, IntListSet, ...).
256    
257    Confirmed that compiler compiles to fixpoint.
258    
259    ----------------------------------------------------------------------
260    Name: Allen Leung
261    Date: 2000/11/10 18:00:00
262    Tag: leunga-20001110-new-x86-fp
263    
264    A new x86 floating point code generator has been added.
265    By default this is turned off.  To turn this on, do:
266    
267        CM.autoload "$smlnj/compiler.cm";
268        Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
269    
270    Changes:
271    
272    1.  Changed FTAN to FPTAN so that the assembly output is correct.
273    2.  Changed the extension callback for FTANGENT to generate:
274    
275              fptan
276              fstp  %st(0)
277        instead of
278              fptan
279              fstpl ftempmem
280    
281    3.  Numerous assembly fixes for x86.
282    
283    5.  Cleaned up the machine code output module x86/x86MC.sml and added
284        support for a whole bunch of instructions and addressing modes:
285    
286          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st, %st(n)
287          faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp  %st, %st(n)
288          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st(n), %st
289          fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
290          fxch %st(n)
291          fld %st(n)
292          fst %st(n)
293          fst mem
294          fstp %st(n)
295          fucom %st(n)
296          fucomp %st(n)
297    
298        All these are now generated when the fast fp mode is turned on.
299    
300    6.  Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
301    
302    ----------------------------------------------------------------------
303    Name: Matthias Blume
304    Date: 2000/11/09 11:20:00 JST
305    Tag: blume-20001109-scc
306    Description:
307    
308    Eliminated some code duplication:
309    
310    1. Added "where" clause to GraphSCCFn in SML/NJ Library.
311       (Otherwise the functor is useless.)
312    2. Used GraphSCCFn where SCCUtilFun was used previously.
313    3. Got rid of SCCUtilFun (in comp-lib.cm).
314    
315    ----------------------------------------------------------------------
316    Name: Lal George
317    Date: 2000/11/06 09:02:21 EST 2000
318    Tag: Release_110_30
319    Description:
320    
321    - Version 110.30
322    ----------------------------------------------------------------------
323    Name: Matthias Blume
324    Date: 2000/11/04 14:45:00
325    Tag: blume-20001104-mlbuild
326    Description:
327    
328    - Made ml-build faster on startup.
329    - Documentation fixes.
330    
331    ----------------------------------------------------------------------
332    Name: Matthias Blume
333    Date: 2000/11/02 17:00:00 JST
334    Tag: blume-20001102-condcomp
335    Description:
336    
337    - Small tweaks to pickler -- new BOOTFILES!
338    - Version bumped to 110.29.2.
339    - Added conditional compilation facility to init.cmi (see comment there).
340    ----------------------------------------------------------------------
341    Name: Allen Leung
342    Date: 2000/10/23 19:31:00
343    Tag: leunga-20001023-demo-ra
344    
345    1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
346    2. Test programs for the graph library updated
347    3. Some new MLRISC demo programs added
348    
349    ----------------------------------------------------------------------
350    Name: Matthias Blume
351    Date: 2000/08/31 22:15:00 JST
352    Tag: blume-20001017-errmsg
353    Description:
354    
355    More error message grief: Where there used to be no messages, there
356    now were some that had bogus error regions.  Fixed.
357    
358    ----------------------------------------------------------------------
359    Name: Matthias Blume
360    Date: 2000/08/31 17:30:00 JST
361    Tag: blume-20001017-v110p29p1
362    Description:
363    
364    I made a version 110.29.1 with new bootfiles.
365    
366    Changes:  Modified pickler/unpickler for faster and leaner unpickling.
367              CM documentation changes and a small bugfix in CM's error reporting.
368    
369    ----------------------------------------------------------------------
370    Name: Lal George
371    Date: 2000/09/27 14:42:35 EDT
372    Tag: george-20000927-nodestatus
373    Description:
374    
375    Changed the type of the nodestatus, so that:
376    
377            SPILLED(~1)             is now SPILLED
378            SPILLED(m) where m>=0   is now MEMREG(m)
379            SPILLED(s) where s<~1   is now SPILL_LOC(~s)
380    
381    ----------------------------------------------------------------------
382    Name: Matthias Blume
383    Date: 2000/09/07 14:45:00 JST
384    Tag: blume-20000907-cmerrmsg
385    Description:
386    
387    Small tweak to CM to avoid getting ML syntax error messages twice.
388    
389    ----------------------------------------------------------------------
390    Name: Matthias Blume
391    Date: 2000/08/31 18:00:00 JST
392    Tag: blume-20000831-cvsbootfiles
393    Description:
394    
395    New URL for boot files (because the 110.29 files on the BL server do
396    now work correctly with my updated install scripts for yacc and lex).
397    
398    ----------------------------------------------------------------------
399    Name: Matthias Blume
400    Date: 2000/08/08 12:33:00 JST
401    Tag: blume-20000808-manual
402    Description:
403    
404    Tiny update to CM manual.
405    
406    ----------------------------------------------------------------------
407    Name: Allen Leung
408    Date: 2000/08/7 19:31:00
409    Tag: leunga-20000807-a-whole-bunch-of-stuff
410    
411      Moby, C--, SSA, x86, machine descriptions etc.  Should only affect C--
412    and Mobdy.
413    
414    1.  x86
415    
416       a.  Fixes to peephole module by John and Dan.
417       b.  Assembly fix to SETcc by Allen.
418       c.  Fix to c-call by John.
419       d.  Fix to spilling by John.  (This one deals with the missing FSTPT case)
420       e.  Instruction selection optimization to SETcc as suggested by John.
421    
422           For example,
423    
424            MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
425    
426           should generate:
427    
428            MOVL a, x
429            SUBL b, x
430            SHRL 31, x
431    
432    2.  IR stuff
433    
434         A bunch of new DJ-graph related algorithms added.  These
435         speed up SSA construction.
436    
437    3.  SSA + Scheduling
438    
439         Added code for SSA and scheduling to the repository
440    
441    ----------------------------------------------------------------------
442    Name: Lal George
443    Date: 2000/07/27 11:53:14 EDT
444    
445    Tag: lal-20000727-linux-ppc
446    Description:
447    
448     Made changes to support Linux PPC.
449     p.s. I have confirmation that the 110.29 boot files work fine.
450    
451    ----------------------------------------------------------------------
452    Name: Matthias Blume
453    Date: 2000/07/27 17:40:00 JST
454    Tag: blume-20000727-scripts
455    Description:
456    
457    !!!! WARNING !!!!
458    You must recompile the runtime system!
459    !!!! WARNING !!!!
460    
461    This is basically another round of script-enhancements:
462    
463    1. sml, ml-build, and ml-makedepend accept options -D and -U to define
464       and undefine CM preprocessor symbols.
465    
466    2. ml-build avoids generating a new heap image if it finds that the
467       existing one is still ok.  (The condition is that no ML file had to
468       be recompiled and all ML files are found to be older that the heap
469       file.)
470    
471       To make this work smoothly, I also hacked the runtime system as
472       well as SMLofNJ.SysInfo to get access to the heap image suffix
473       (.sparc-solaris, ...) that is currently being used.
474    
475       Moreover, the signature of CM.mk_standalone has changed.  See the
476       CM manual.
477    
478    3. ml-makedepend accepts additional options -n, -a, and -o.  (See the
479       CM manual for details.)
480    
481    4. More CM manual updates:
482        - all of the above has been documented.
483        - there is now a section describing the (CM-related) command line
484          arguments that are accepted by the "sml" command
485    
486    ----------------------------------------------------------------------
487    Name: Matthias Blume
488    Date: 2000/07/25 16:20:00 JST
489    Tag: blume-20000725-makedepend
490    Description:
491    
492    Added a script called ml-makedepend.  This can be used in makefiles
493    for Unix' make in a way very similar to the "makedepend" command for
494    C.
495    
496    The script internally uses function CM.sources.
497    
498    Synopsis:
499    
500        ml-makedepend [-f makefile] cmfile targetname
501    
502    The default for the makefile is "makefile" (or "Makefile" should
503    "makefile" not exist).
504    
505    ml-makedepend adds a cmfile/targetname-specific section to this
506    makefile (after removing the previous version of this section).  The
507    section contains a single dependency specification with targetname on
508    the LHS (targetname is an arbitrary name), and a list of files derived
509    from the cmfile on the RHS.  Some of the files on the RHS are
510    ARCH/OPSYS-specific.  Therefore, ml-makedepend inserts references to
511    "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
512    path names.  The makefile writer is responsible for making sure that
513    these variables have correct at the time "make" is invoked.
514    
515    ----------------------------------------------------------------------
516    Name: Matthias Blume
517    Date: 2000/07/22 23:30:00 JST
518    Tag: blume-20000722-urlupdate
519    Description:
520    
521    Changed BOOT and config/srcarchiveurl to point to BL server:
522    
523        ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
524    
525    ----------------------------------------------------------------------
526    Name: Matthias Blume
527    Date: 2000/07/18 18:00:00 JST
528    Tag: blume-20000718-Version_110_29
529    Description:
530    
531    1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
532    
533    2. Updated config/version to 110.29
534    
535    3. Updated config/srcarchiveurl
536    
537    3. New boot files!
538       ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
539    
540    ----------------------------------------------------------------------
541    Name: Matthias Blume
542    Date: 2000/07/11 13:58:00 JST
543    Tag: blume-20000711-doctypo
544    Description:
545    
546    Fixed a few typos in CM manual.
547    
548    ----------------------------------------------------------------------
549    Name: Allen Leung
550    Date: 2000/06/15 00:38:00
551    Tag: leunga-20000704-sparc-x86
552    
553    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
554    2. fix to x86 RET bug [found by Dan Grossman]
555    3. sparc assembly bug fix for ticc instructions [found by Fermin]
556    
557       Affects c-- and moby only
558    
559    ----------------------------------------------------------------------
560    Name: Matthias Blume
561    Date: 2000/07/04 15:26:00
562    Tag: blume-20000704-trigger
563    Description:
564    
565    1. Improvements to CM manual.
566    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
567       of getting a back-trace.  The function, when called, raises an
568       internal exception which explicitly carries the full back-trace history,
569       so it is unaffected by any intervening handle-raise pairs ("trivial"
570       or not).  The interactive loop will print that history once it arrives
571       at top level.
572       Short of having all exceptions implicitly carry the full history, the
573       recommended way of using this facility is:
574         - compile your program with instrumentation "on"
575         - run it, when it raises an exception, look at the history
576         - if the history is "cut off" because of some handler, go and modify
577           your program so that it explicitly calls BTrace.trigger
578         - recompile (still instrumented), and rerun; look at the full history
579    
580    ----------------------------------------------------------------------
581    Name: Matthias Blume
582    Date: 2000/07/03 15:36:00 JST
583    Tag: blume-20000702-manual
584    Description:
585    
586    Small corrections and updates to CM manual.
587    
588    ----------------------------------------------------------------------
589    Name: Matthias Blume
590    Date: 2000/06/29 16:04:00 JST
591    Tag: blume-20000629-yacctool
592    Description:
593    
594    Changes:
595    
596    1. Class "mlyacc" now takes separate arguments to pass options to
597       generated .sml- and .sig-files independently.
598    2. Corresponding CM manual updates.
599    3. BTrace module now also reports call sites.  (However, for loop clusters
600       it only shows from where the cluster was entered.)  There are associated
601       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
602    
603    ----------------------------------------------------------------------
604    Name: Matthias Blume
605    Date: 2000/06/27 16:51:00 JST
606    Tag: blume-20000627-noweb
607    Description:
608    
609    Changes:
610    
611     1. Implemented "subdir" and "witness" options for noweb tool.
612        This caused some slight internal changes in CM's tool implementation.
613     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
614        some remaining issues from earlier path anchor changes.
615     3. Updated CM manual accordingly.
616    
617     4. Changed implementation of back-tracing so that I now consider it
618        ready for prime-time.
619    
620        In particular, you don't have to explicitly trigger the back-trace
621        anymore.  Instead, if you are running BTrace-instrumented code and
622        there is an uncaught exception (regardless of whether or not it was
623        raised in instrumented code), the top-level evalloop will print
624        the back-trace.
625    
626        Features:
627    
628          - Instrumented and uninstrumented code work together seemlessly.
629            (Of course, uninstrumented code is never mentioned in actual
630             back-traces.)
631    
632          - Asymptotic time- and space-complexity of instrumented code is
633            equal to that of uninstrumented code.  (This means that
634            tail-recursion is preserved by the instrumentation phase.)
635    
636          - Modules whose code has been instrumented in different sessions
637            work together without problem.
638    
639          - There is no penalty whatsoever on uninstrumented code.
640    
641          - There is no penalty on "raise" expressions, even in
642            instrumented code.
643    
644        A potential bug (or perhaps it is a feature, too):
645    
646          A back-trace reaches no further than the outermost instrumented
647          non-trivial "raise".  Here, a "trivial" raise is one that is the
648          sole RHS of a "handle" rule.  Thus, back-traces reach trough
649    
650               <exp> handle e => raise e
651    
652          and even
653    
654               <exp> handle Foo => raise Bar
655    
656          and, of course, through
657    
658               <exp> handle Foo => ...
659    
660         if the exception was not Foo.
661    
662         Back-traces always reach right through any un-instrumented code
663         including any of its "handle" expressions, trivial or not.
664    
665       To try this out, do the following:
666    
667         - Erase all existing binfiles for your program.
668           (You may keep binfiles for those modules where you think you
669            definitely don't need back-tracing.)
670         - Turn on back-trace instrumentation:
671              SMLofNJ.Internals.BTrace.mode (SOME true);
672         - Recompile your program.  (I.e., run "CM.make" or "use".)
673         - You may now turn instrumentation off again (if you want):
674              SMLofNJ.Internals.BTrace.mode (SOME false);
675         - Run your program as usual.  If it raises an exception that
676           reaches the interactive toplevel, then a back-trace will
677           automatically be printed.  After that, the toplevel loop
678           will print the exception history as usual.
679    
680    ----------------------------------------------------------------------
681    Name: Matthias Blume
682    Date: 2000/06/26 09:56:46 JST
683    Tag: blume-20000626-setup
684    Description:
685    
686    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
687          ML code before and after compiling a file (e.g., to set compiler
688          flags)
689    
690    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
691              - associated changes to btrace.sml (BTrace instrumentation pass)
692              - cleaner implementation of btimp.sml (BTrace tracing and report
693                module)
694    
695    CM manual: * new path encoding documented
696               * description of setup-parameter to "sml" added
697    
698    The biggest user-visible change to back-tracing is that it is no
699    longer necessary to compile all traced modules within the same
700    session.  (This was a real limitation.)
701    
702    ----------------------------------------------------------------------
703    Name: Matthias Blume
704    Date: 2000/06/24 12:40:00 JST
705    Tag: blume-20000624-startup
706    Description:
707    
708    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
709    bit too often -- to put it mildly. :)
710    
711    ----------------------------------------------------------------------
712    Name: Matthias Blume
713    Date: 2000/06/23 18:20:00 JST
714    Tag: blume-20000623-btrace
715    Description:
716    
717    This updates adds a backtrace facility to aid programmers in debugging
718    their programs.  This involves the following changes:
719    
720    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
721       keeping track of the current call stack.  When programs are compiled
722       in a special mode, the compiler will insert calls to these hooks
723       into the user program.
724       "Hook" means that it is possible for different implementations of
725       back-tracing to register themselves (at different times).
726    
727    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
728       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
729       It can be turned on using this call:
730         SMLofNJ.Internals.BTrace.mode (SOME true);
731       Turning it off again:
732         SMLofNJ.Internals.BTrace.mode (SOME false);
733       Querying the current status:
734         SMLofNJ.Internals.BTrace.mode NONE;
735       Annotated programs are about twice as big as normal ones, and they
736       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
737       where all hooks do nothing).  The slowdown with a plugin that is
738       actually useful (such as the one supplied by default) is even greater,
739       but in the case of the default plugin it is still only an constant
740       factor (amortized).
741    
742    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
743       with a sub-structure BTrace for controlling back-tracing.  In particular,
744       the above-mentioned function "mode" controls whether the annotation
745       phase is invoked by the compiler.  Another important function is
746       "trigger": when called it aborts the current execution and causes
747       the top-level loop to print a full back-trace.
748    
749    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
750       for back-tracing.  It keeps track of the dynamic call stack and in
751       addition to that it keeps a partial history at each "level" of that
752       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
753       d and b (at separate times, dynamically), then the report will show:
754    
755       GOTO   d
756             /c
757       GOTO  \b
758       CALL   a
759    
760       This shows that there was an initial non-tail call of a, then a
761       tail-call to b or c, looping behavior in a cluster of functions that
762       consist of b and c, and then a goto from that cluster (i.e., either from
763       b or from c) to d.
764    
765       Note that (depending on the user program) the amount of information
766       that the back-trace module has to keep track of at each level is bounded
767       by a constant.  Thus, the whole implementation has the same asymptotical
768       complexity as the original program (both in space and in time).
769    
770    5. compiler/TopLevel/interact/evalloop.sml has been modified to
771       handle the special exception SMLofNJ.Internals.BTrace.BTrace
772       which is raised by the "trigger" function mentioned above.
773    
774    Notes on usage:
775    
776    - Annotated code works well together with unannotated code:
777    Unannotated calls simply do not show up at all in the backtrace.
778    
779    - It is not a good idea to let modules that were annotated during
780    different sessions run at the same time.  This is because the compiler
781    chooses small integers to identify individual functions, and there
782    will be clashes if different modules were compiled in separate sessions.
783    (Nothing will crash, and you will even be told about the clashes, but
784    back-trace information will in general not be useful.)
785    
786    - Back-tracing can be confused by callcc and capture.
787    
788    - The only way of getting a back-trace right now is to explicitly
789    invoke the "trigger" function from your user program.  Eventually, we
790    should make every exception carry back-trace information (if
791    available).  But since this creates more overhead at "raise"-time
792    (similar to the current exnHistory overhead), I have not yet
793    implemented this.  (The implementation will be rather easy.)  With
794    exceptions carrying back-trace information, this facility will be even
795    more useful because users don't need to modify their programs...
796    
797    - While it is possible to compile the compiler with back-trace
798    annotations turned on (I did it to get some confidence in
799    correctness), you must make absolutely sure that core.sml and
800    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
801    be compiled with annotation because there is no core access yet, but
802    if you compile btimp.sml with annotation, then the system will go into
803    an infinite recursion and crash.)
804    Since CM currently does not know about BTrace, the only way to turn
805    annotations on and off for different modules of the compiler is to
806    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
807    this is awkward and clumsy.
808    
809    Sample sessions:
810    
811    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
812    - SMLofNJ.Internals.BTrace.mode (SOME true);
813    [autoloading]
814    [autoloading done]
815    val it = false : bool
816    - structure X = struct
817    -     fun main n = let
818    -         fun a (x, 0) = d x
819    -           | a (x, n) = b (x, n - 1)
820    -         and b (x, n) = c (x, n)
821    -         and c (x, n) = a (x, n)
822    -         and d x = e (x, 3)
823    -         and e (x, 0) = f x
824    -           | e (x, n) = e (x, n - 1)
825    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
826    -           | f n = n * g (n - 1)
827    -         and g n = a (n, 3)
828    -     in
829    -         f n
830    -     end
831    - end;
832    structure X : sig val main : int -> int end
833    - X.main 3;
834    *** BACK-TRACE ***
835    GOTO   stdIn:4.2-13.20: X.main[2].f
836    GOTO-( stdIn:4.2-13.20: X.main[2].e
837    GOTO   stdIn:4.2-13.20: X.main[2].d
838         / stdIn:4.2-13.20: X.main[2].a
839         | stdIn:4.2-13.20: X.main[2].b
840    GOTO-\ stdIn:4.2-13.20: X.main[2].c
841    CALL   stdIn:4.2-13.20: X.main[2].g
842    GOTO   stdIn:4.2-13.20: X.main[2].f
843    GOTO-( stdIn:4.2-13.20: X.main[2].e
844    GOTO   stdIn:4.2-13.20: X.main[2].d
845         / stdIn:4.2-13.20: X.main[2].a
846         | stdIn:4.2-13.20: X.main[2].b
847    GOTO-\ stdIn:4.2-13.20: X.main[2].c
848    CALL   stdIn:4.2-13.20: X.main[2].g
849    GOTO   stdIn:4.2-13.20: X.main[2].f
850    GOTO-( stdIn:4.2-13.20: X.main[2].e
851    GOTO   stdIn:4.2-13.20: X.main[2].d
852         / stdIn:4.2-13.20: X.main[2].a
853         | stdIn:4.2-13.20: X.main[2].b
854    GOTO-\ stdIn:4.2-13.20: X.main[2].c
855    CALL   stdIn:4.2-13.20: X.main[2].g
856    GOTO   stdIn:4.2-13.20: X.main[2].f
857    CALL   stdIn:2.15-17.4: X.main[2]
858    -
859    
860    (Note that because of a FLINt bug the above code currently does not
861    compile without BTrace turned on.)
862    
863    Here is another example, using my modified Tiger compiler:
864    
865    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
866    - SMLofNJ.Internals.BTrace.mode (SOME true);
867    [autoloading]
868    [autoloading done]
869    val it = false : bool
870    - CM.make "sources.cm";
871    [autoloading]
872    ...
873    [autoloading done]
874    [scanning sources.cm]
875    [parsing (sources.cm):parse.sml]
876    [creating directory CM/SKEL ...]
877    [parsing (sources.cm):tiger.lex.sml]
878    ...
879    [wrote CM/sparc-unix/semant.sml]
880    [compiling (sources.cm):main.sml]
881    [wrote CM/sparc-unix/main.sml]
882    [New bindings added.]
883    val it = true : bool
884    - Main.compile ("../testcases/merge.tig", "foo.out");
885    *** BACK-TRACE ***
886    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
887    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
888    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
889    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
890    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
891    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
892    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
893         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
894    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
895    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
896    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
897    CALL   main.sml:1.18-118.4: Main.compile[2]
898    -
899    
900    ----------------------------------------------------------------------
901    Name: Matthias Blumen
902    Date: 2000/06/21 18:00:00 JST
903    Tag: blume-20000621-manual
904    Description:
905    
906    CM manual update: Path environments documented.
907    
908    ----------------------------------------------------------------------
909    Name: Matthias Blume
910    Date: 2000/06/19 13:40:00
911    Tag: blume-20000619-manual
912    Description:
913    
914    CM manual and system/README update.  This only covers the fact that
915    there are no more implicit anchors.  (Path environments and the "bind"
916    option to "cm" have yet to be documented.)
917    
918    ----------------------------------------------------------------------
919    Name: Matthias Blume
920  Date: 2000/06/19 11:05:00 JST  Date: 2000/06/19 11:05:00 JST
921  Tag: blume-20000619-chdir-bugfix  Tag: blume-20000619-chdir-bugfix
922  Description:  Description:

Legend:
Removed from v.671  
changed lines
  Added in v.772

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