You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/07/31 00:41:48 UTC

cvs commit: xml-xalan/java/src/org/apache/xpath/axes AxesWalker.java FilterExprWalker.java UnionPathIterator.java

sboag       00/07/30 15:41:48

  Modified:    java/src/org/apache/xpath/axes AxesWalker.java
                        FilterExprWalker.java UnionPathIterator.java
  Log:
  Fix problem with variable not being handled right.
  
  Revision  Changes    Path
  1.2       +11 -1     xml-xalan/java/src/org/apache/xpath/axes/AxesWalker.java
  
  Index: AxesWalker.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/AxesWalker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AxesWalker.java	2000/07/05 14:45:11	1.1
  +++ AxesWalker.java	2000/07/30 22:41:48	1.2
  @@ -113,7 +113,17 @@
     {
       int nodeTestOpPos = compiler.getFirstChildPosOfStep(opPos);
       m_stepType = stepType;
  -    m_argLen = compiler.getArgLengthOfStep(opPos);
  +    switch(stepType)
  +    {
  +    case OpCodes.OP_VARIABLE:
  +    case OpCodes.OP_EXTFUNCTION:
  +    case OpCodes.OP_FUNCTION:
  +    case OpCodes.OP_GROUP:
  +      m_argLen = compiler.getArgLength(opPos);
  +      break;
  +    default:
  +      m_argLen = compiler.getArgLengthOfStep(opPos);
  +    }
       initPredicateInfo(compiler, opPos);
       
       // int testType = compiler.getOp(nodeTestOpPos);
  
  
  
  1.2       +9 -2      xml-xalan/java/src/org/apache/xpath/axes/FilterExprWalker.java
  
  Index: FilterExprWalker.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/FilterExprWalker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FilterExprWalker.java	2000/07/05 14:45:14	1.1
  +++ FilterExprWalker.java	2000/07/30 22:41:48	1.2
  @@ -95,10 +95,17 @@
     {
       super.init(compiler, opPos, stepType);
       // Smooth over an anomily in the opcode map...
  -    if(OpCodes.OP_FUNCTION == compiler.getOp(opPos))
  +    switch(stepType)
  +    {
  +    case OpCodes.OP_VARIABLE:
  +    case OpCodes.OP_EXTFUNCTION:
  +    case OpCodes.OP_FUNCTION:
  +    case OpCodes.OP_GROUP:
         m_expr = compiler.compile(opPos);
  -    else
  +      break;
  +    default:
         m_expr = compiler.compile(opPos+2);
  +    }
     }
   
     /**
  
  
  
  1.2       +1 -1      xml-xalan/java/src/org/apache/xpath/axes/UnionPathIterator.java
  
  Index: UnionPathIterator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/UnionPathIterator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UnionPathIterator.java	2000/07/05 14:45:15	1.1
  +++ UnionPathIterator.java	2000/07/30 22:41:48	1.2
  @@ -342,7 +342,7 @@
     {    
       // TODO: Handle unwrapped FilterExpr
       int steptype = compiler.getOpMap()[opPos];
  -    if((steptype & OpCodes.LOCATIONPATHEX_MASK) == OpCodes.OP_LOCATIONPATH)
  +    if(steptype == OpCodes.OP_LOCATIONPATH)
       {
         loadLocationPaths(compiler, compiler.getNextOpPos(opPos), count+1);
         m_iterators[count] = createLocPathIterator(compiler, opPos);