gnu.expr
Class PushApply

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

public class PushApply
extends ExpWalker

Re-arranges ApplyExp where the function is a LetExp or BeginExp. Optimizes ((let (...) body) . args) to (let (...) (body . args)). Optimizes ((begin ... last) . args) to (begin ... (last . args)). This helps optimize Scheme "named let" (and some other forms) by making it more likely the application will be to a known procedure. This optimization has to be done after Declarations are bound.


Field Summary
 
Fields inherited from class gnu.expr.ExpWalker
currentLambda, messages
 
Constructor Summary
PushApply()
           
 
Method Summary
static void pushApply(Expression exp)
           
protected  Expression walkApplyExp(ApplyExp 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, walkBeginExp, walkBlockExp, walkClassExp, walkDeclarationType, walkDeclarationTypes, walkDefaultArgs, walkExitExp, walkExpression, walkExps, walkExps, walkFluidLetExp, walkIfExp, walkLambdaExp, walkLangExp, walkLetExp, walkModuleExp, walkObjectExp, walkQuoteExp, walkReferenceExp, walkScopeExp, walkSetExp, walkSynchronizedExp, walkThisExp, walkTryExp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushApply

public PushApply()
Method Detail

pushApply

public static void pushApply(Expression exp)

walkApplyExp

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