Scope rules for CPS and other questions...
Daniel Wang
danwang@cs.princeton.edu
01 Dec 1999 18:11:39 -0500
Suresh sent me a paper that describes the CPS IR a bit. It seems out of
sync, as the sources seem a bit different. In particular CPS seems to have
nested functions, are these lexically scoped i.e. can a nested function
contain refrences to variables in the enclosing scope?
Is there a phase that lifts everything out? It's a not big deal. Another
question I have is that I'll need to really turn CPS into honest to
goodness CPS (i.e. not the current ANF version). I'll be doing
this externally and feeding the results back to the MLton to use MLton
as a backend. Is this going to produce decent C code? i.e. do you guys
really handle tail calls right?