Lines Matching defs:compiler

30 import com.sun.org.apache.xpath.internal.compiler.Compiler;
31 import com.sun.org.apache.xpath.internal.compiler.FunctionTable;
32 import com.sun.org.apache.xpath.internal.compiler.OpCodes;
33 import com.sun.org.apache.xpath.internal.compiler.OpMap;
53 * @param compiler non-null reference to compiler object that has processed
63 WalkingIterator lpi, Compiler compiler, int stepOpCodePos)
68 int stepType = compiler.getOp(stepOpCodePos);
75 firstWalker = createDefaultWalker(compiler, stepType, lpi, 0);
77 firstWalker.init(compiler, stepOpCodePos, stepType);
87 * @param compiler non-null reference to compiler object that has processed
98 WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex)
106 int analysis = analyze(compiler, stepOpCodePos, stepIndex);
108 while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
110 walker = createDefaultWalker(compiler, stepOpCodePos, lpi, analysis);
112 walker.init(compiler, stepOpCodePos, stepType);
127 stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);
141 public static void diagnoseIterator(String name, int analysis, Compiler compiler)
143 System.out.println(compiler.toString()+", "+name+", "
152 * @param compiler non-null reference to compiler object that has processed
161 Compiler compiler, int opPos,
167 int analysis = analyze(compiler, firstStepPos, 0);
176 diagnoseIterator("SelfIteratorNoPredicate", analysis, compiler);
180 iter = new SelfIteratorNoPredicate(compiler, opPos, analysis);
190 diagnoseIterator("ChildIterator", analysis, compiler);
193 iter = new ChildIterator(compiler, opPos, analysis);
198 diagnoseIterator("ChildTestIterator", analysis, compiler);
201 iter = new ChildTestIterator(compiler, opPos, analysis);
208 diagnoseIterator("AttributeIterator", analysis, compiler);
212 iter = new AttributeIterator(compiler, opPos, analysis);
220 diagnoseIterator("OneStepIteratorForward", analysis, compiler);
224 iter = new OneStepIteratorForward(compiler, opPos, analysis);
229 diagnoseIterator("OneStepIterator", analysis, compiler);
233 iter = new OneStepIterator(compiler, opPos, analysis);
249 else if (isOptimizableForDescendantIterator(compiler, firstStepPos, 0)
256 diagnoseIterator("DescendantIterator", analysis, compiler);
258 iter = new DescendantIterator(compiler, opPos, analysis);
262 if(isNaturalDocOrder(compiler, firstStepPos, 0, analysis))
266 diagnoseIterator("WalkingIterator", analysis, compiler);
269 iter = new WalkingIterator(compiler, opPos, analysis, true);
274 // diagnoseIterator("MatchPatternIterator", analysis, compiler);
276 // return new MatchPatternIterator(compiler, opPos, analysis);
278 diagnoseIterator("WalkingIteratorSorted", analysis, compiler);
280 iter = new WalkingIteratorSorted(compiler, opPos, analysis, true);
293 * @param compiler non-null reference to compiler object that has processed
303 Compiler compiler, int stepOpCodePos)
307 int stepType = compiler.getOp(stepOpCodePos);
402 static boolean functionProximateOrContainsProximate(Compiler compiler,
405 int endFunc = opPos + compiler.getOp(opPos + 1) - 1;
407 int funcID = compiler.getOp(opPos);
419 for (int p = opPos; p < endFunc; p = compiler.getNextOpPos(p), i++)
422 int argOp = compiler.getOp(innerExprOpPos);
423 boolean prox = isProximateInnerExpr(compiler, innerExprOpPos);
432 static boolean isProximateInnerExpr(Compiler compiler, int opPos)
434 int op = compiler.getOp(opPos);
439 if(isProximateInnerExpr(compiler, innerExprOpPos))
448 boolean isProx = functionProximateOrContainsProximate(compiler, opPos);
458 int rightPos = compiler.getNextOpPos(leftPos);
459 isProx = isProximateInnerExpr(compiler, leftPos);
462 isProx = isProximateInnerExpr(compiler, rightPos);
475 public static boolean mightBeProximate(Compiler compiler, int opPos, int stepType)
488 argLen = compiler.getArgLength(opPos);
491 argLen = compiler.getArgLengthOfStep(opPos);
494 int predPos = compiler.getFirstPredicateOpPos(opPos);
497 while (OpCodes.OP_PREDICATE == compiler.getOp(predPos))
502 int predOp = compiler.getOp(innerExprOpPos);
516 = functionProximateOrContainsProximate(compiler, innerExprOpPos);
526 int rightPos = compiler.getNextOpPos(leftPos);
527 isProx = isProximateInnerExpr(compiler, leftPos);
530 isProx = isProximateInnerExpr(compiler, rightPos);
538 predPos = compiler.getNextOpPos(predPos);
548 * @param compiler non-null reference to compiler object that has processed
559 Compiler compiler, int stepOpCodePos, int stepIndex)
571 while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
582 boolean mightBeProximate = mightBeProximate(compiler, stepOpCodePos, stepType);
630 nodeTestType = compiler.getStepTestType(stepOpCodePos);
632 int nextStepOpCodePos = compiler.getNextStepPos(stepOpCodePos);
637 if(OpCodes.ENDOP != compiler.getOp(nextStepOpCodePos))
639 if(compiler.countPredicates(stepOpCodePos) > 0)
656 * @param compiler non-null reference to compiler object that has processed
667 Compiler compiler, int stepOpCodePos, int stepIndex)
675 while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
679 // String namespace = compiler.getStepNS(stepOpCodePos);
682 // String localname = compiler.getStepLocalName(stepOpCodePos);
684 boolean predAnalysis = analyzePredicate(compiler, stepOpCodePos,
761 if (OpCodes.NODETYPE_NODE == compiler.getOp(stepOpCodePos + 3)) // child::node()
766 stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);
812 * @param compiler The compiler that holds the syntax tree/op map to
822 MatchPatternIterator mpi, Compiler compiler, int stepOpCodePos,
829 System.out.println("loadSteps for: "+compiler.getPatternString());
834 int analysis = analyze(compiler, stepOpCodePos, stepIndex);
836 while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
838 step = createDefaultStepPattern(compiler, stepOpCodePos, mpi, analysis,
853 stepOpCodePos = compiler.getNextStepPos(stepOpCodePos);
963 * @param compiler The compiler that holds the syntax tree/op map to
981 Compiler compiler, int opPos, MatchPatternIterator mpi,
986 int stepType = compiler.getOp(opPos);
990 int whatToShow = compiler.getWhatToShow(opPos);
1010 expr = compiler.compile(opPos);
1013 expr = compiler.compile(opPos + 2);
1093 whatToShow = compiler.getWhatToShow(opPos); // %REVIEW%
1094 ai = new StepPattern(whatToShow, compiler.getStepNS(opPos),
1095 compiler.getStepLocalName(opPos),
1109 int argLen = compiler.getFirstPredicateOpPos(opPos);
1111 ai.setPredicates(compiler.getCompiledPredicates(argLen));
1120 * @param compiler non-null reference to compiler object that has processed
1129 static boolean analyzePredicate(Compiler compiler, int opPos, int stepType)
1141 argLen = compiler.getArgLength(opPos);
1144 argLen = compiler.getArgLengthOfStep(opPos);
1147 int pos = compiler.getFirstPredicateOpPos(opPos);
1148 int nPredicates = compiler.countPredicates(pos);
1156 * @param compiler non-null reference to compiler object that has processed
1166 private static AxesWalker createDefaultWalker(Compiler compiler, int opPos,
1171 int stepType = compiler.getOp(opPos);
1174 System.out.println("0: "+compiler.getOp(opPos));
1175 System.out.println("1: "+compiler.getOp(opPos+1));
1176 System.out.println("2: "+compiler.getOp(opPos+2));
1177 System.out.println("3: "+compiler.getOp(opPos+3));
1178 System.out.println("4: "+compiler.getOp(opPos+4));
1179 System.out.println("5: "+compiler.getOp(opPos+5));
1195 + ", " + compiler.toString());
1262 int whatToShow = compiler.getWhatToShow(opPos);
1277 ai.initNodeTest(whatToShow, compiler.getStepNS(opPos),
1278 compiler.getStepLocalName(opPos));
1615 * @param compiler non-null reference to compiler object that has processed
1626 Compiler compiler, int stepOpCodePos, int stepIndex, int analysis)
1661 while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOpCodePos)))
1673 // int nodeTestType = compiler.getStepTestType(stepOpCodePos);
1675 String localName = compiler.getStepLocalName(stepOpCodePos);
1712 int nextStepOpCodePos = compiler.getNextStepPos(stepOpCodePos);