Class ValuesMap

All Implemented Interfaces:
Inlineable, Named

public class ValuesMap extends MethodProc implements 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 Details

    • valuesMap

      public static final ValuesMap valuesMap
    • valuesMapWithPos

      public static final ValuesMap valuesMapWithPos
  • Method Details

    • numArgs

      public int numArgs()
      Description copied from class: Procedure
      Return minArgs()|(maxArgs<<12). We use a single virtual function to reduce the number of methods in the system, as well as the number of virtual method table entries. We shift by 12 so the number can normally be represented using a sipush instruction, without requiring a constant pool entry.
      Overrides:
      numArgs in class Procedure
    • compile

      public void compile(ApplyExp exp, Compilation comp, Target target)
      Specified by:
      compile in interface Inlineable
    • compileInlined

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

      public Type getReturnType(Expression[] args)
      Description copied from class: Procedure
      Semi-deprecated - instead should be set at Inline time. FIXME
      Overrides:
      getReturnType in class Procedure