re CWS paper

Stephen Weeks MLton@sourcelight.com
Wed, 22 Nov 2000 09:36:24 -0800 (PST)


> I had assumed (although it wasn't entirely clear to me) that  this  was  what
> Reppy  was  talking about in his paper.  If it wasn't, then I don't quite get
> the analysis.  The analysis he uses (in figure 4) only records the top  frame
> of  the  continuation.   To  be  concrete,  consider  rule  (3): he views the
> continuation of the RHS of a let-binding to be the body  (a  singleton).   In
> fact,  the  full continuation will be do the body and then ..., and these may
> not all be the same.

The analysis currently in MLton only records the top frame of the continuation
as well.  That's why it gets confused with tail calls.  The difference with what
you proposes (as I understand it), is that for tail calls within f to other
functions, we don't keep track of the top frame on the stack, which is whatever
f was called with -- instead, we pretend that f is making a nontail call with a
simple frame that just says return.