Package gnu.kawa.functions
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 gnu.text.SourceLocator
SourceLocator.Simple
-
Field Summary
Fields inherited from class gnu.expr.ApplyExp
firstKeywordArgIndex, firstSpliceArg, INLINE_IF_CONSTANT, IS_SUPER_INIT, MAY_CONTAIN_BACK_JUMP, nextCall, numKeywordArgs, TAILCALL
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected Type
validateApply
(ApplyExp exp, InlineCalls visitor, Type required, Declaration decl) Apply inlining transformations on a given ApplyExp.Methods inherited from class gnu.expr.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, visitChildren
Methods inherited from class gnu.expr.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, 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 Details
-
CurryExp
-
-
Method Details
-
calculateType
- Overrides:
calculateType
in classApplyExp
-
validateApply
Description copied from class:Expression
Apply inlining transformations on a given ApplyExp. Assumes the ApplyExp's function is this expression, or can be optimized to this expression.- Overrides:
validateApply
in 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.
-