gnu.expr
Class FindTailCalls

java.lang.Object
  extended by gnu.expr.ExpWalker
      extended by gnu.expr.FindTailCalls
All Implemented Interfaces:
SourceLocator, org.xml.sax.Locator

public class FindTailCalls
extends ExpWalker

Does setTailCall on ApplyExp's that are tail-calls. Also setCanRead, setCanCall, setCanWrite on Declarations and setCanRead, setCanCall on LambdaExp when appropriate.


Field Summary
 
Fields inherited from class gnu.expr.ExpWalker
currentLambda, messages
 
Constructor Summary
FindTailCalls()
           
 
Method Summary
static void findTailCalls(Expression exp, Compilation comp)
           
protected  Expression walkApplyExp(ApplyExp exp)
           
protected  Expression walkBeginExp(BeginExp exp)
           
protected  Expression walkClassExp(ClassExp exp)
           
 void walkDecls(ScopeExp exp)
           
protected  Expression walkFluidLetExp(FluidLetExp exp)
           
protected  Expression walkIfExp(IfExp exp)
           
protected  Expression walkLambdaExp(LambdaExp exp)
           
protected  Expression walkLetExp(LetExp exp)
           
protected  Expression walkReferenceExp(ReferenceExp exp)
           
protected  Expression walkSetExp(SetExp exp)
           
protected  Expression walkSynchronizedExp(SynchronizedExp exp)
           
protected  Expression walkTryExp(TryExp exp)
           
 
Methods inherited from class gnu.expr.ExpWalker
error, getColumnNumber, getCompilation, getCurrentLambda, getFileName, getLineNumber, getMessages, getPublicId, getSystemId, isStableSourceLocation, noteError, setColumn, setContext, setFile, setLine, setLine, walk, walkBlockExp, walkDeclarationType, walkDeclarationTypes, walkDefaultArgs, walkExitExp, walkExpression, walkExps, walkExps, walkLangExp, walkModuleExp, walkObjectExp, walkQuoteExp, walkScopeExp, walkThisExp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindTailCalls

public FindTailCalls()
Method Detail

findTailCalls

public static void findTailCalls(Expression exp,
                                 Compilation comp)

walkApplyExp

protected Expression walkApplyExp(ApplyExp exp)
Overrides:
walkApplyExp in class ExpWalker

walkBeginExp

protected Expression walkBeginExp(BeginExp exp)
Overrides:
walkBeginExp in class ExpWalker

walkFluidLetExp

protected Expression walkFluidLetExp(FluidLetExp exp)
Overrides:
walkFluidLetExp in class ExpWalker

walkLetExp

protected Expression walkLetExp(LetExp exp)
Overrides:
walkLetExp in class ExpWalker

walkDecls

public void walkDecls(ScopeExp exp)

walkIfExp

protected Expression walkIfExp(IfExp exp)
Overrides:
walkIfExp in class ExpWalker

walkLambdaExp

protected Expression walkLambdaExp(LambdaExp exp)
Overrides:
walkLambdaExp in class ExpWalker

walkClassExp

protected Expression walkClassExp(ClassExp exp)
Overrides:
walkClassExp in class ExpWalker

walkReferenceExp

protected Expression walkReferenceExp(ReferenceExp exp)
Overrides:
walkReferenceExp in class ExpWalker

walkSetExp

protected Expression walkSetExp(SetExp exp)
Overrides:
walkSetExp in class ExpWalker

walkTryExp

protected Expression walkTryExp(TryExp exp)
Overrides:
walkTryExp in class ExpWalker

walkSynchronizedExp

protected Expression walkSynchronizedExp(SynchronizedExp exp)
Overrides:
walkSynchronizedExp in class ExpWalker