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 670, Sun Jun 18 13:10:57 2000 UTC revision 694, Thu Jul 27 16:00:25 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/07/27 11:53:14 EDT
17    
18    Tag: lal-20000727-linux-ppc
19    Description:
20    
21     Made changes to support Linux PPC.
22     p.s. I have confirmation that the 110.29 boot files work fine.
23    
24    ----------------------------------------------------------------------
25    Name: Matthias Blume
26    Date: 2000/07/27 17:40:00 JST
27    Tag: blume-20000727-scripts
28    Description:
29    
30    !!!! WARNING !!!!
31    You must recompile the runtime system!
32    !!!! WARNING !!!!
33    
34    This is basically another round of script-enhancements:
35    
36    1. sml, ml-build, and ml-makedepend accept options -D and -U to define
37       and undefine CM preprocessor symbols.
38    
39    2. ml-build avoids generating a new heap image if it finds that the
40       existing one is still ok.  (The condition is that no ML file had to
41       be recompiled and all ML files are found to be older that the heap
42       file.)
43    
44       To make this work smoothly, I also hacked the runtime system as
45       well as SMLofNJ.SysInfo to get access to the heap image suffix
46       (.sparc-solaris, ...) that is currently being used.
47    
48       Moreover, the signature of CM.mk_standalone has changed.  See the
49       CM manual.
50    
51    3. ml-makedepend accepts additional options -n, -a, and -o.  (See the
52       CM manual for details.)
53    
54    4. More CM manual updates:
55        - all of the above has been documented.
56        - there is now a section describing the (CM-related) command line
57          arguments that are accepted by the "sml" command
58    
59    ----------------------------------------------------------------------
60    Name: Matthias Blume
61    Date: 2000/07/25 16:20:00 JST
62    Tag: blume-20000725-makedepend
63    Description:
64    
65    Added a script called ml-makedepend.  This can be used in makefiles
66    for Unix' make in a way very similar to the "makedepend" command for
67    C.
68    
69    The script internally uses function CM.sources.
70    
71    Synopsis:
72    
73        ml-makedepend [-f makefile] cmfile targetname
74    
75    The default for the makefile is "makefile" (or "Makefile" should
76    "makefile" not exist).
77    
78    ml-makedepend adds a cmfile/targetname-specific section to this
79    makefile (after removing the previous version of this section).  The
80    section contains a single dependency specification with targetname on
81    the LHS (targetname is an arbitrary name), and a list of files derived
82    from the cmfile on the RHS.  Some of the files on the RHS are
83    ARCH/OPSYS-specific.  Therefore, ml-makedepend inserts references to
84    "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
85    path names.  The makefile writer is responsible for making sure that
86    these variables have correct at the time "make" is invoked.
87    
88    ----------------------------------------------------------------------
89    Name: Matthias Blume
90    Date: 2000/07/22 23:30:00 JST
91    Tag: blume-20000722-urlupdate
92    Description:
93    
94    Changed BOOT and config/srcarchiveurl to point to BL server:
95    
96        ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
97    
98    ----------------------------------------------------------------------
99    Name: Matthias Blume
100    Date: 2000/07/18 18:00:00 JST
101    Tag: blume-20000718-Version_110_29
102    Description:
103    
104    1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
105    
106    2. Updated config/version to 110.29
107    
108    3. Updated config/srcarchiveurl
109    
110    3. New boot files!
111       ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
112    
113    ----------------------------------------------------------------------
114    Name: Matthias Blume
115    Date: 2000/07/11 13:58:00 JST
116    Tag: blume-20000711-doctypo
117    Description:
118    
119    Fixed a few typos in CM manual.
120    
121    ----------------------------------------------------------------------
122    Name: Allen Leung
123    Date: 2000/06/15 00:38:00
124    Tag: leunga-20000704-sparc-x86
125    
126    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
127    2. fix to x86 RET bug [found by Dan Grossman]
128    3. sparc assembly bug fix for ticc instructions [found by Fermin]
129    
130       Affects c-- and moby only
131    
132    ----------------------------------------------------------------------
133    Name: Matthias Blume
134    Date: 2000/07/04 15:26:00
135    Tag: blume-20000704-trigger
136    Description:
137    
138    1. Improvements to CM manual.
139    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
140       of getting a back-trace.  The function, when called, raises an
141       internal exception which explicitly carries the full back-trace history,
142       so it is unaffected by any intervening handle-raise pairs ("trivial"
143       or not).  The interactive loop will print that history once it arrives
144       at top level.
145       Short of having all exceptions implicitly carry the full history, the
146       recommended way of using this facility is:
147         - compile your program with instrumentation "on"
148         - run it, when it raises an exception, look at the history
149         - if the history is "cut off" because of some handler, go and modify
150           your program so that it explicitly calls BTrace.trigger
151         - recompile (still instrumented), and rerun; look at the full history
152    
153    ----------------------------------------------------------------------
154    Name: Matthias Blume
155    Date: 2000/07/03 15:36:00 JST
156    Tag: blume-20000702-manual
157    Description:
158    
159    Small corrections and updates to CM manual.
160    
161    ----------------------------------------------------------------------
162    Name: Matthias Blume
163    Date: 2000/06/29 16:04:00 JST
164    Tag: blume-20000629-yacctool
165    Description:
166    
167    Changes:
168    
169    1. Class "mlyacc" now takes separate arguments to pass options to
170       generated .sml- and .sig-files independently.
171    2. Corresponding CM manual updates.
172    3. BTrace module now also reports call sites.  (However, for loop clusters
173       it only shows from where the cluster was entered.)  There are associated
174       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
175    
176    ----------------------------------------------------------------------
177    Name: Matthias Blume
178    Date: 2000/06/27 16:51:00 JST
179    Tag: blume-20000627-noweb
180    Description:
181    
182    Changes:
183    
184     1. Implemented "subdir" and "witness" options for noweb tool.
185        This caused some slight internal changes in CM's tool implementation.
186     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
187        some remaining issues from earlier path anchor changes.
188     3. Updated CM manual accordingly.
189    
190     4. Changed implementation of back-tracing so that I now consider it
191        ready for prime-time.
192    
193        In particular, you don't have to explicitly trigger the back-trace
194        anymore.  Instead, if you are running BTrace-instrumented code and
195        there is an uncaught exception (regardless of whether or not it was
196        raised in instrumented code), the top-level evalloop will print
197        the back-trace.
198    
199        Features:
200    
201          - Instrumented and uninstrumented code work together seemlessly.
202            (Of course, uninstrumented code is never mentioned in actual
203             back-traces.)
204    
205          - Asymptotic time- and space-complexity of instrumented code is
206            equal to that of uninstrumented code.  (This means that
207            tail-recursion is preserved by the instrumentation phase.)
208    
209          - Modules whose code has been instrumented in different sessions
210            work together without problem.
211    
212          - There is no penalty whatsoever on uninstrumented code.
213    
214          - There is no penalty on "raise" expressions, even in
215            instrumented code.
216    
217        A potential bug (or perhaps it is a feature, too):
218    
219          A back-trace reaches no further than the outermost instrumented
220          non-trivial "raise".  Here, a "trivial" raise is one that is the
221          sole RHS of a "handle" rule.  Thus, back-traces reach trough
222    
223               <exp> handle e => raise e
224    
225          and even
226    
227               <exp> handle Foo => raise Bar
228    
229          and, of course, through
230    
231               <exp> handle Foo => ...
232    
233         if the exception was not Foo.
234    
235         Back-traces always reach right through any un-instrumented code
236         including any of its "handle" expressions, trivial or not.
237    
238       To try this out, do the following:
239    
240         - Erase all existing binfiles for your program.
241           (You may keep binfiles for those modules where you think you
242            definitely don't need back-tracing.)
243         - Turn on back-trace instrumentation:
244              SMLofNJ.Internals.BTrace.mode (SOME true);
245         - Recompile your program.  (I.e., run "CM.make" or "use".)
246         - You may now turn instrumentation off again (if you want):
247              SMLofNJ.Internals.BTrace.mode (SOME false);
248         - Run your program as usual.  If it raises an exception that
249           reaches the interactive toplevel, then a back-trace will
250           automatically be printed.  After that, the toplevel loop
251           will print the exception history as usual.
252    
253    ----------------------------------------------------------------------
254    Name: Matthias Blume
255    Date: 2000/06/26 09:56:46 JST
256    Tag: blume-20000626-setup
257    Description:
258    
259    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
260          ML code before and after compiling a file (e.g., to set compiler
261          flags)
262    
263    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
264              - associated changes to btrace.sml (BTrace instrumentation pass)
265              - cleaner implementation of btimp.sml (BTrace tracing and report
266                module)
267    
268    CM manual: * new path encoding documented
269               * description of setup-parameter to "sml" added
270    
271    The biggest user-visible change to back-tracing is that it is no
272    longer necessary to compile all traced modules within the same
273    session.  (This was a real limitation.)
274    
275    ----------------------------------------------------------------------
276    Name: Matthias Blume
277    Date: 2000/06/24 12:40:00 JST
278    Tag: blume-20000624-startup
279    Description:
280    
281    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
282    bit too often -- to put it mildly. :)
283    
284    ----------------------------------------------------------------------
285    Name: Matthias Blume
286    Date: 2000/06/23 18:20:00 JST
287    Tag: blume-20000623-btrace
288    Description:
289    
290    This updates adds a backtrace facility to aid programmers in debugging
291    their programs.  This involves the following changes:
292    
293    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
294       keeping track of the current call stack.  When programs are compiled
295       in a special mode, the compiler will insert calls to these hooks
296       into the user program.
297       "Hook" means that it is possible for different implementations of
298       back-tracing to register themselves (at different times).
299    
300    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
301       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
302       It can be turned on using this call:
303         SMLofNJ.Internals.BTrace.mode (SOME true);
304       Turning it off again:
305         SMLofNJ.Internals.BTrace.mode (SOME false);
306       Querying the current status:
307         SMLofNJ.Internals.BTrace.mode NONE;
308       Annotated programs are about twice as big as normal ones, and they
309       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
310       where all hooks do nothing).  The slowdown with a plugin that is
311       actually useful (such as the one supplied by default) is even greater,
312       but in the case of the default plugin it is still only an constant
313       factor (amortized).
314    
315    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
316       with a sub-structure BTrace for controlling back-tracing.  In particular,
317       the above-mentioned function "mode" controls whether the annotation
318       phase is invoked by the compiler.  Another important function is
319       "trigger": when called it aborts the current execution and causes
320       the top-level loop to print a full back-trace.
321    
322    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
323       for back-tracing.  It keeps track of the dynamic call stack and in
324       addition to that it keeps a partial history at each "level" of that
325       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
326       d and b (at separate times, dynamically), then the report will show:
327    
328       GOTO   d
329             /c
330       GOTO  \b
331       CALL   a
332    
333       This shows that there was an initial non-tail call of a, then a
334       tail-call to b or c, looping behavior in a cluster of functions that
335       consist of b and c, and then a goto from that cluster (i.e., either from
336       b or from c) to d.
337    
338       Note that (depending on the user program) the amount of information
339       that the back-trace module has to keep track of at each level is bounded
340       by a constant.  Thus, the whole implementation has the same asymptotical
341       complexity as the original program (both in space and in time).
342    
343    5. compiler/TopLevel/interact/evalloop.sml has been modified to
344       handle the special exception SMLofNJ.Internals.BTrace.BTrace
345       which is raised by the "trigger" function mentioned above.
346    
347    Notes on usage:
348    
349    - Annotated code works well together with unannotated code:
350    Unannotated calls simply do not show up at all in the backtrace.
351    
352    - It is not a good idea to let modules that were annotated during
353    different sessions run at the same time.  This is because the compiler
354    chooses small integers to identify individual functions, and there
355    will be clashes if different modules were compiled in separate sessions.
356    (Nothing will crash, and you will even be told about the clashes, but
357    back-trace information will in general not be useful.)
358    
359    - Back-tracing can be confused by callcc and capture.
360    
361    - The only way of getting a back-trace right now is to explicitly
362    invoke the "trigger" function from your user program.  Eventually, we
363    should make every exception carry back-trace information (if
364    available).  But since this creates more overhead at "raise"-time
365    (similar to the current exnHistory overhead), I have not yet
366    implemented this.  (The implementation will be rather easy.)  With
367    exceptions carrying back-trace information, this facility will be even
368    more useful because users don't need to modify their programs...
369    
370    - While it is possible to compile the compiler with back-trace
371    annotations turned on (I did it to get some confidence in
372    correctness), you must make absolutely sure that core.sml and
373    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
374    be compiled with annotation because there is no core access yet, but
375    if you compile btimp.sml with annotation, then the system will go into
376    an infinite recursion and crash.)
377    Since CM currently does not know about BTrace, the only way to turn
378    annotations on and off for different modules of the compiler is to
379    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
380    this is awkward and clumsy.
381    
382    Sample sessions:
383    
384    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
385    - SMLofNJ.Internals.BTrace.mode (SOME true);
386    [autoloading]
387    [autoloading done]
388    val it = false : bool
389    - structure X = struct
390    -     fun main n = let
391    -         fun a (x, 0) = d x
392    -           | a (x, n) = b (x, n - 1)
393    -         and b (x, n) = c (x, n)
394    -         and c (x, n) = a (x, n)
395    -         and d x = e (x, 3)
396    -         and e (x, 0) = f x
397    -           | e (x, n) = e (x, n - 1)
398    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
399    -           | f n = n * g (n - 1)
400    -         and g n = a (n, 3)
401    -     in
402    -         f n
403    -     end
404    - end;
405    structure X : sig val main : int -> int end
406    - X.main 3;
407    *** BACK-TRACE ***
408    GOTO   stdIn:4.2-13.20: X.main[2].f
409    GOTO-( stdIn:4.2-13.20: X.main[2].e
410    GOTO   stdIn:4.2-13.20: X.main[2].d
411         / stdIn:4.2-13.20: X.main[2].a
412         | stdIn:4.2-13.20: X.main[2].b
413    GOTO-\ stdIn:4.2-13.20: X.main[2].c
414    CALL   stdIn:4.2-13.20: X.main[2].g
415    GOTO   stdIn:4.2-13.20: X.main[2].f
416    GOTO-( stdIn:4.2-13.20: X.main[2].e
417    GOTO   stdIn:4.2-13.20: X.main[2].d
418         / stdIn:4.2-13.20: X.main[2].a
419         | stdIn:4.2-13.20: X.main[2].b
420    GOTO-\ stdIn:4.2-13.20: X.main[2].c
421    CALL   stdIn:4.2-13.20: X.main[2].g
422    GOTO   stdIn:4.2-13.20: X.main[2].f
423    GOTO-( stdIn:4.2-13.20: X.main[2].e
424    GOTO   stdIn:4.2-13.20: X.main[2].d
425         / stdIn:4.2-13.20: X.main[2].a
426         | stdIn:4.2-13.20: X.main[2].b
427    GOTO-\ stdIn:4.2-13.20: X.main[2].c
428    CALL   stdIn:4.2-13.20: X.main[2].g
429    GOTO   stdIn:4.2-13.20: X.main[2].f
430    CALL   stdIn:2.15-17.4: X.main[2]
431    -
432    
433    (Note that because of a FLINt bug the above code currently does not
434    compile without BTrace turned on.)
435    
436    Here is another example, using my modified Tiger compiler:
437    
438    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
439    - SMLofNJ.Internals.BTrace.mode (SOME true);
440    [autoloading]
441    [autoloading done]
442    val it = false : bool
443    - CM.make "sources.cm";
444    [autoloading]
445    ...
446    [autoloading done]
447    [scanning sources.cm]
448    [parsing (sources.cm):parse.sml]
449    [creating directory CM/SKEL ...]
450    [parsing (sources.cm):tiger.lex.sml]
451    ...
452    [wrote CM/sparc-unix/semant.sml]
453    [compiling (sources.cm):main.sml]
454    [wrote CM/sparc-unix/main.sml]
455    [New bindings added.]
456    val it = true : bool
457    - Main.compile ("../testcases/merge.tig", "foo.out");
458    *** BACK-TRACE ***
459    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
460    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
461    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
462    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
463    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
464    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
465    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
466         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
467    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
468    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
469    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
470    CALL   main.sml:1.18-118.4: Main.compile[2]
471    -
472    
473    ----------------------------------------------------------------------
474    Name: Matthias Blumen
475    Date: 2000/06/21 18:00:00 JST
476    Tag: blume-20000621-manual
477    Description:
478    
479    CM manual update: Path environments documented.
480    
481    ----------------------------------------------------------------------
482    Name: Matthias Blume
483    Date: 2000/06/19 13:40:00
484    Tag: blume-20000619-manual
485    Description:
486    
487    CM manual and system/README update.  This only covers the fact that
488    there are no more implicit anchors.  (Path environments and the "bind"
489    option to "cm" have yet to be documented.)
490    
491    ----------------------------------------------------------------------
492    Name: Matthias Blume
493    Date: 2000/06/19 11:05:00 JST
494    Tag: blume-20000619-chdir-bugfix
495    Description:
496    
497    Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
498    
499    ----------------------------------------------------------------------
500  Name: Matthias Blume  Name: Matthias Blume
501  Date: 2000/06/18 22:00:10 JST  Date: 2000/06/18 22:00:10 JST
502  Tag: blume-20000618-implicit-anchors-really-gone  Tag: blume-20000618-implicit-anchors-really-gone

Legend:
Removed from v.670  
changed lines
  Added in v.694

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