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

SCM Repository

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

Diff of /sml/trunk/HISTORY

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

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

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

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