Package gnu.expr
Class ChainLambdas
- All Implemented Interfaces:
SourceLocator,SourceLocator,Locator
Sets up the firstChild/nextSibling links of each LambdaExp.
Setup 'outer' links of ScopeExp and its sub-classes.
Also generates a class name for each ClassExp and registers each class.
Also, if lambda is bound to a unique declaration, make that its name.
This pass also checks for unreachable code, which happens if a
neverReturns expression is followed dynamically by another expression.
Doing this check after InlineCalls allows benefiting from data-flow; OTOH
checking for unreachable code this late yields less precise type inference,
but only when there actually is unreachable code, which is bogus anyway.
-
Nested Class Summary
Nested classes/interfaces inherited from interface gnu.text.SourceLocator
SourceLocator.Simple -
Field Summary
Fields inherited from class gnu.expr.ExpVisitor
currentLambda, exitValue, messages -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidchainLambdas(Expression exp, Compilation comp) protected voidprotected ExpressionvisitApplyExp(ApplyExp exp, ScopeExp scope) protected ExpressionvisitBeginExp(BeginExp exp, ScopeExp scope) protected ExpressionvisitCaseExp(CaseExp exp, ScopeExp scope) protected ExpressionvisitClassExp(ClassExp exp, ScopeExp scope) protected ExpressionvisitIfExp(IfExp exp, ScopeExp scope) protected ExpressionvisitLambdaExp(LambdaExp exp, ScopeExp scope) protected ExpressionvisitLetExp(LetExp exp, ScopeExp scope) protected ExpressionvisitScopeExp(ScopeExp exp, ScopeExp scope) protected ExpressionvisitSetExp(SetExp sexp, ScopeExp scope) Methods inherited from class gnu.expr.ExpExpVisitor
defaultValue, error, error, updateMethods inherited from class gnu.expr.ExpVisitor
error, getColumnNumber, getCompilation, getCurrentLambda, getEndColumn, getEndLine, getExitValue, getFileName, getLanguage, getLineNumber, getMessages, getPublicId, getStartColumn, getStartLine, getSystemId, isStableSourceLocation, noteError, setColumn, setContext, setFile, setLine, setLine, visit, visit, visitAndUpdate, visitBlockExp, visitDeclarationType, visitDeclarationTypes, visitDefaultArgs, visitExitExp, visitExpression, visitExps, visitExps, visitFluidLetExp, visitLangExp, visitModuleExp, visitObjectExp, visitQuoteExp, visitReferenceExp, visitSynchronizedExp, visitThisExp, visitTryExp
-
Constructor Details
-
ChainLambdas
public ChainLambdas()
-
-
Method Details
-
chainLambdas
-
maybeWarnUnreachable
-
visitBeginExp
- Overrides:
visitBeginExpin classExpVisitor<Expression,ScopeExp>
-
visitApplyExp
- Overrides:
visitApplyExpin classExpVisitor<Expression,ScopeExp>
-
visitSetExp
- Overrides:
visitSetExpin classExpVisitor<Expression,ScopeExp>
-
visitIfExp
- Overrides:
visitIfExpin classExpVisitor<Expression,ScopeExp>
-
visitCaseExp
- Overrides:
visitCaseExpin classExpVisitor<Expression,ScopeExp>
-
visitScopeExp
- Overrides:
visitScopeExpin classExpVisitor<Expression,ScopeExp>
-
visitLetExp
- Overrides:
visitLetExpin classExpVisitor<Expression,ScopeExp>
-
visitLambdaExp
- Overrides:
visitLambdaExpin classExpVisitor<Expression,ScopeExp>
-
visitClassExp
- Overrides:
visitClassExpin classExpVisitor<Expression,ScopeExp>
-