Package gnu.expr
Class TryExp
-
- All Implemented Interfaces:
gnu.kawa.format.Printable,Named,SourceLocator,SourceLocator,Locator
public class TryExp extends Expression
This class represents try/catch/finally.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gnu.text.SourceLocator
SourceLocator.Simple
-
-
Field Summary
-
Fields inherited from class gnu.expr.Expression
applyMethodExpression, flags, NEXT_AVAIL_FLAG, noExpressions, type, VALIDATED
-
Fields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
-
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
-
Constructor Summary
Constructors Constructor Description TryExp(Expression try_clause, Expression finally_clause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCatchClause(Declaration decl, Expression body)voidapply(CallContext ctx)Evaluate the expression.protected TypecalculateType()voidcompile(Compilation comp, Target target)CatchClausegetCatchClauses()ExpressiongetFinallyClause()protected booleanmustCompile()voidprint(gnu.kawa.io.OutPort ps)voidsetCatchClauses(CatchClause catch_clauses)protected <R,D>
Rvisit(ExpVisitor<R,D> visitor, D d)protected <R,D>
voidvisitChildren(ExpVisitor<R,D> visitor, D d)-
Methods inherited from class gnu.expr.Expression
applyMethodExpression, checkLiteralKeyword, compile, compile, compileWithPosition, compileWithPosition, deepCopy, deepCopy, deepCopy, deepCopy, eval, eval, getColumnNumber, getEndColumn, getEndLine, getFileName, getFlag, getFlags, getLineNumber, getPublicId, getStartColumn, getStartLine, getSystemId, getType, getTypeRaw, isSingleValue, isStableSourceLocation, makeWhile, maybeSetLine, neverReturns, numArgs, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLine, setLocation, setType, side_effects, toString, validateApply, valueIfConstant
-
Methods inherited from class gnu.mapping.Procedure
apply0, apply1, apply2, apply3, apply4, applyL, applyN, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSetter, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation
-
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Constructor Detail
-
TryExp
public TryExp(Expression try_clause, Expression finally_clause)
-
-
Method Detail
-
getCatchClauses
public final CatchClause getCatchClauses()
-
getFinallyClause
public final Expression getFinallyClause()
-
setCatchClauses
public final void setCatchClauses(CatchClause catch_clauses)
-
addCatchClause
public void addCatchClause(Declaration decl, Expression body)
-
mustCompile
protected boolean mustCompile()
- Specified by:
mustCompilein classExpression
-
apply
public void apply(CallContext ctx) throws Throwable
Description copied from class:ExpressionEvaluate the expression. This is named apply rather than eval so it is compatible with the full-tail-call calling convention, and we can stash an Expression in CallContext's proc field. FIXME - are we making use of this?- Overrides:
applyin classExpression- Throws:
Throwable
-
compile
public void compile(Compilation comp, Target target)
- Specified by:
compilein classExpression
-
visit
protected <R,D> R visit(ExpVisitor<R,D> visitor, D d)
- Overrides:
visitin classExpression
-
visitChildren
protected <R,D> void visitChildren(ExpVisitor<R,D> visitor, D d)
- Overrides:
visitChildrenin classExpression
-
calculateType
protected Type calculateType()
- Overrides:
calculateTypein classExpression
-
print
public void print(gnu.kawa.io.OutPort ps)
- Specified by:
printin classExpression
-
-