Class RelativeStep

All Implemented Interfaces:
Inlineable, Named

public class RelativeStep extends MethodProc implements Inlineable
Implements XPath path expression. The XPath expression E1/E2 is compiled into: (relative-step E1 (lambda (dot position last) E2)).
  • Field Details

    • relativeStep

      public static final RelativeStep relativeStep
  • 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
    • applyToConsumer

      public static Object applyToConsumer(Procedure proc, CallContext ctx) throws Throwable
      Throws:
      Throwable
    • compile

      public void compile(ApplyExp exp, Compilation comp, Target target)
      Specified by:
      compile in interface Inlineable
    • 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
    • extractStep

      public static TreeScanner extractStep(Expression exp)