gnu.kawa.functions

Class ValuesMap

public class ValuesMap extends MethodProc implements CanInline, Inlineable

Map a function over a value sequence, yielding a new sequence. Normally, the function takes one argument, the item in the sequence. If startCounter is non-negative, a position index is also passed. Used to implement XQuery's 'for' form.
Field Summary
static ValuesMapvaluesMap
static ValuesMapvaluesMapWithPos
Method Summary
voidapply(CallContext ctx)
voidcompile(ApplyExp exp, Compilation comp, Target target)
static voidcompileInlined(LambdaExp lambda, Expression vals, int startCounter, Method matchesMethod, Compilation comp, Target target)
TypegetReturnType(Expression[] args)
Expressioninline(ApplyExp exp, ExpWalker walker)
intnumArgs()

Field Detail

valuesMap

public static final ValuesMap valuesMap

valuesMapWithPos

public static final ValuesMap valuesMapWithPos

Method Detail

apply

public void apply(CallContext ctx)

compile

public void compile(ApplyExp exp, Compilation comp, Target target)

compileInlined

public static void compileInlined(LambdaExp lambda, Expression vals, int startCounter, Method matchesMethod, Compilation comp, Target target)

getReturnType

public Type getReturnType(Expression[] args)

inline

public Expression inline(ApplyExp exp, ExpWalker walker)

numArgs

public int numArgs()