Class CurryExp
java.lang.Object
gnu.mapping.PropertySet
gnu.mapping.Procedure
gnu.expr.Expression
gnu.expr.ApplyExp
gnu.kawa.functions.CurryExp
- All Implemented Interfaces:
gnu.kawa.format.Printable, Named, SourceLocator, SourceLocator, Locator
A specialized ApplyExp class for curried function calls.
I.e. the actual arguments are only an initial subset of the
needed arguments. The result is a new function that expects
the remaining arguments.
-
Nested Class Summary
Nested classes/interfaces inherited from interface SourceLocator
SourceLocator.Simple -
Field Summary
Fields inherited from class ApplyExp
firstKeywordArgIndex, firstSpliceArg, INLINE_IF_CONSTANT, IS_SUPER_INIT, MAY_CONTAIN_BACK_JUMP, nextCall, numKeywordArgs, TAILCALLFields inherited from class Expression
applyMethodExpression, flags, NEXT_AVAIL_FLAG, noExpressions, type, VALIDATEDFields inherited from class Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKeyFields inherited from class PropertySet
nameKey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TypevalidateApply(ApplyExp exp, InlineCalls visitor, Type required, Declaration decl) Apply inlining transformations on a given ApplyExp.Methods inherited from class ApplyExp
adjustSplice, apply, compile, compile, compileArgsToContext, deepCopy, getArg, getArgCount, getArgs, getFunction, getFunctionValue, hasSpliceAllowingKeywords, inlineIfConstant, inlineIfConstant, isAppendValues, isInlineable, isSimple, isSimple, isSimple, isTailCall, mustCompile, print, setArg, setArgs, setFuncArgs, setFuncArgs, setFunction, setFunction, setTailCall, side_effects, spliceCount, toString, visit, visitArgs, visitArgs, visitChildrenMethods inherited from class Expression
applyMethodExpression, checkLiteralKeyword, compile, compile, compileWithPosition, compileWithPosition, 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, valueIfConstantMethods inherited from class 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, setSourceLocationMethods inherited from class PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
Constructor Details
-
CurryExp
-
-
Method Details
-
calculateType
- Overrides:
calculateTypein classApplyExp
-
validateApply
Description copied from class:ExpressionApply inlining transformations on a given ApplyExp. Assumes the ApplyExp's function is this expression, or can be optimized to this expression.- Overrides:
validateApplyin classExpression- Parameters:
exp- an application whose function expression can be simplified to this expression.visitor- the context for the current inlining passdecl- if non-null, a Declaration bound to this expression.- Returns:
- an Expression equivalent to the passed-in exp.
-