dbertoni    2004/02/10 17:08:30

  Modified:    c/src/xalanc/XPath XPath.cpp XPath.hpp XPathExpression.cpp
                        XPathExpression.hpp XPathProcessorImpl.cpp
                        XPathProcessorImpl.hpp
  Log:
  General cleanup to prepare for op map iterators.
  
  Revision  Changes    Path
  1.10      +244 -219  xml-xalan/c/src/xalanc/XPath/XPath.cpp
  
  Index: XPath.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPath.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XPath.cpp 6 Jan 2004 02:41:32 -0000       1.9
  +++ XPath.cpp 11 Feb 2004 01:08:30 -0000      1.10
  @@ -121,7 +121,7 @@
   XPath::unknownOpCodeError(
                        XalanNode*                              context,
                        XPathExecutionContext&  executionContext,
  -                     int                                             opPos) 
const
  +                     OpCodePositionType              opPos) const
   {
        XalanDOMString  theOpCode;
                        
  @@ -294,7 +294,7 @@
   const XObjectPtr
   XPath::executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        switch(m_expression.getOpCodeMapValue(opPos))
  @@ -488,7 +488,7 @@
   void
   XPath::executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        bool&                                   result) const
   {
  @@ -673,7 +673,7 @@
   void
   XPath::executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        double&                                 result) const
   {
  @@ -858,7 +858,7 @@
   void
   XPath::executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        XalanDOMString&                 result) const
   {
  @@ -1054,7 +1054,7 @@
   void
   XPath::executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const
  @@ -1264,7 +1264,7 @@
   const XObjectPtr
   XPath::executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        MutableNodeRefList&             result) const
   {
  @@ -1365,11 +1365,11 @@
   {
        assert(context != 0);
   
  -     int             opPos = 2;
  +     OpCodePositionType      opPos = 2;
   
  -     while(m_expression.m_opMap[opPos] == 
XPathExpression::eOP_LOCATIONPATHPATTERN)
  +     while(m_expression.getOpCodeMapValue(opPos) == 
XPathExpression::eOP_LOCATIONPATHPATTERN)
        {
  -             const int       nextOpPos = 
m_expression.getNextOpCodePosition(opPos);
  +             const OpCodePositionType        nextOpPos = 
m_expression.getNextOpCodePosition(opPos);
   
                score = locationPathPattern(executionContext, *context, opPos);
   
  @@ -1441,10 +1441,10 @@
   
   inline const XalanDOMString*
   getStringFromTokenQueue(
  -                     const XPathExpression&  expression,
  -                     int                                             opPos)
  +                     const XPathExpression&      expression,
  +            XPath::OpCodePositionType        opPos)
   {
  -     const int       tokenPosition =
  +     const XPath::OpCodePositionType     tokenPosition =
                                expression.getOpCodeMapValue(opPos);
   
        if (tokenPosition < 0)
  @@ -1466,26 +1466,26 @@
   void
   XPath::getTargetData(TargetDataVectorType&   targetData) const
   {
  -     int opPos = 2;
  +     OpCodePositionType opPos = 2;
   
        targetData.reserve(eDefaultTargetDataSize);
   
  -     while(m_expression.m_opMap[opPos] == 
XPathExpression::eOP_LOCATIONPATHPATTERN)
  +     while(m_expression.getOpCodeMapValue(opPos) == 
XPathExpression::eOP_LOCATIONPATHPATTERN)
        {
  -             const int       nextOpPos = 
m_expression.getNextOpCodePosition(opPos);
  +             const OpCodePositionType        nextOpPos = 
m_expression.getNextOpCodePosition(opPos);
   
                opPos += 2;
         
  -             int             stepCount = 0;
  +             unsigned long   stepCount = 0;
   
                while(m_expression.getOpCodeMapValue(opPos) != 
XPathExpression::eENDOP)
                {
                        ++stepCount;
   
  -                     const int       nextStepPos =
  +                     const OpCodePositionType        nextStepPos =
                                m_expression.getNextOpCodePosition(opPos);
   
  -                     const int       nextOp = 
m_expression.getOpCodeMapValue(nextStepPos);
  +                     const OpCodePositionType        nextOp = 
m_expression.getOpCodeMapValue(nextStepPos);
   
                        if(nextOp == XPathExpression::eENDOP)
                        {
  @@ -1497,7 +1497,7 @@
   
                                bool    fIsAttribute = false;
   
  -                             const int       stepType = 
m_expression.getOpCodeMapValue(opPos);
  +                             const OpCodeMapValueType        stepType = 
m_expression.getOpCodeMapValue(opPos);
   
                                opPos += 3;
   
  @@ -1521,7 +1521,7 @@
                                case XPathExpression::eMATCH_ANY_ANCESTOR:
                                case XPathExpression::eMATCH_IMMEDIATE_ANCESTOR:
                                        {
  -                                             const int       tok = 
m_expression.getOpCodeMapValue(opPos);
  +                                             const OpCodeMapValueType        
tok = m_expression.getOpCodeMapValue(opPos);
   
                                                switch(tok)
                                                {
  @@ -1553,7 +1553,7 @@
   
                                                case 
XPathExpression::eNODETYPE_PI:
                                                        {
  -                                                             const int       
argLen =
  +                                                             const 
OpCodePositionType        argLen =
                                                                        
m_expression.getOpCodeMapValue(opPos - 3 + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
                                                                targetLocalName 
= PSEUDONAME_PI;
  @@ -1663,7 +1663,7 @@
   bool
   XPath::Or(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;
  @@ -1687,7 +1687,7 @@
   bool
   XPath::And(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;     
  @@ -1711,7 +1711,7 @@
   bool
   XPath::notequals(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;     
  @@ -1731,7 +1731,7 @@
   bool
   XPath::equals(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;     
  @@ -1751,7 +1751,7 @@
   bool
   XPath::lte(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;     
  @@ -1771,7 +1771,7 @@
   bool
   XPath::lt(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;
  @@ -1791,7 +1791,7 @@
   bool
   XPath::gte(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;
  @@ -1811,7 +1811,7 @@
   bool
   XPath::gt(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;
  @@ -1831,13 +1831,13 @@
   double
   XPath::getNumericOperand(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        if (m_expression.getOpCodeMapValue(opPos) == 
XPathExpression::eOP_NUMBERLIT)
        {
  -             assert(m_expression.m_tokenQueue.size() >
  -                     unsigned(m_expression.getOpCodeMapValue(opPos + 3)));
  +             assert(m_expression.tokenQueueSize() >
  +                     m_expression.getOpCodeMapValue(opPos + 3));
   
                return 
m_expression.getNumberLiteral(m_expression.getOpCodeMapValue(opPos + 2));
        }
  @@ -1856,7 +1856,7 @@
   double
   XPath::plus(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;
  @@ -1875,7 +1875,7 @@
   void
   XPath::plus(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const
  @@ -1890,7 +1890,7 @@
   double
   XPath::minus(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;
  @@ -1909,7 +1909,7 @@
   void
   XPath::minus(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const
  @@ -1924,7 +1924,7 @@
   double
   XPath::mult(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;
  @@ -1943,7 +1943,7 @@
   void
   XPath::mult(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const
  @@ -1958,7 +1958,7 @@
   double
   XPath::div(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;
  @@ -1977,7 +1977,7 @@
   void
   XPath::div(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const
  @@ -1992,7 +1992,7 @@
   double
   XPath::mod(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        opPos += 2;     
  @@ -2011,7 +2011,7 @@
   void
   XPath::mod(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const
  @@ -2026,7 +2026,7 @@
   double
   XPath::neg(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        return DoubleSupport::negative(getNumericOperand(context, opPos + 2, 
executionContext));
  @@ -2037,7 +2037,7 @@
   void
   XPath::neg(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const
  @@ -2052,7 +2052,7 @@
   const XObjectPtr
   XPath::Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext) const
   {
        typedef XPathExecutionContext::BorrowReturnMutableNodeRefList   
BorrowReturnMutableNodeRefList;
  @@ -2069,7 +2069,7 @@
   void
   XPath::Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext,
                        bool&                                   result) const
   {
  @@ -2087,7 +2087,7 @@
   void
   XPath::Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext,
                        double&                                 result) const
   {
  @@ -2105,7 +2105,7 @@
   void
   XPath::Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext,
                        XalanDOMString&                 result) const
   {
  @@ -2123,7 +2123,7 @@
   void
   XPath::Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const
  @@ -2142,7 +2142,7 @@
   void
   XPath::Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext,
                        MutableNodeRefList&             result) const
   {
  @@ -2181,21 +2181,22 @@
   
   const XObjectPtr
   XPath::literal(
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
  -     assert(m_expression.m_opMap.size() > unsigned(opPos + 2));
  -     assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[opPos + 2]));
  +     assert(m_expression.opCodeMapSize() > opPos + 2);
  +     assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 2));
   
  -     const XToken&   theLiteral = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 2]];
  +    const XToken* const          theLiteral = 
m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 2));
  +    assert(theLiteral != 0);
   
        if (m_inStylesheet == true)
        {
  -             return 
executionContext.getXObjectFactory().createString(theLiteral);
  +             return 
executionContext.getXObjectFactory().createString(*theLiteral);
        }
        else
        {
  -             return 
executionContext.getXObjectFactory().createString(theLiteral.str());
  +             return 
executionContext.getXObjectFactory().createString(theLiteral->str());
        }
   }
   
  @@ -2203,156 +2204,177 @@
   
   void
   XPath::literal(
  -                     int             opPos,
  -                     bool&   theResult) const
  +                     OpCodePositionType      opPos,
  +                     bool&               theResult) const
   {
  -     assert(m_expression.m_opMap.size() > unsigned(opPos + 2));
  -     assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[opPos + 2]));
  +     assert(m_expression.opCodeMapSize() > opPos + 2);
  +    assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 2));
   
  -     const XToken&   theLiteral = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 2]];
  +    const XToken* const          theLiteral = 
m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 2));
  +    assert(theLiteral != 0);
   
  -     theResult = theLiteral.boolean();
  +     theResult = theLiteral->boolean();
   }
   
   
   
   void
   XPath::literal(
  -                     int                     opPos,
  -                     double&         theResult) const
  +                     OpCodePositionType      opPos,
  +                     double&                 theResult) const
   {
  -     assert(m_expression.m_opMap.size() > unsigned(opPos + 2));
  -     assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[opPos + 2]));
  +     assert(m_expression.opCodeMapSize() > opPos + 2);
  +    assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 2));
   
  -     const XToken&   theLiteral = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 2]];
  +    const XToken* const          theLiteral = 
m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 2));
  +    assert(theLiteral != 0);
   
  -     theResult = theLiteral.num();
  +     theResult = theLiteral->num();
   }
   
   
   
   void
   XPath::literal(
  -                     int                                     opPos,
  +                     OpCodePositionType      opPos,
                        XalanDOMString&         theString) const
   {
  -     assert(m_expression.m_opMap.size() > unsigned(opPos + 2));
  -     assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[opPos + 2]));
  +     assert(m_expression.opCodeMapSize() > opPos + 2);
  +    assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 2));
   
  -     const XToken&   theLiteral = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 2]];
  +    const XToken* const          theLiteral = 
m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 2));
  +    assert(theLiteral != 0);
   
  -     theLiteral.str(theString);
  +     theLiteral->str(theString);
   }
   
   
   
   void
   XPath::literal(
  -                     int                                     opPos,
  +                     OpCodePositionType      opPos,
                        FormatterListener&      formatterListener,
                        MemberFunctionPtr       function) const
   {
  -     assert(m_expression.m_opMap.size() > unsigned(opPos + 2));
  -     assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[opPos + 2]));
  +     assert(m_expression.opCodeMapSize() > opPos + 2);
  +    assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 2));
   
  -     const XToken&   theLiteral = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 2]];
  +    const XToken* const          theLiteral = 
m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 2));
  +    assert(theLiteral != 0);
   
  -     theLiteral.str(formatterListener, function);
  +     theLiteral->str(formatterListener, function);
   }
   
   
   
   const XObjectPtr
   XPath::variable(
  -                     int                                             opPos,
  +                     OpCodePositionType          opPos,
                        XPathExecutionContext&  executionContext) const
   {
  -     const XObject&  ns = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 2]];
  +     assert(m_expression.opCodeMapSize() > opPos + 3);
  +    assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 3));
   
  -     const XObject&  varName = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 3]];
  +    const XToken* const          ns =
  +        m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 2));
  +    assert(ns != 0);
  +
  +     const XToken* const         varName =
  +        m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 3));
  +    assert(varName != 0);
   
  -     return executionContext.getVariable(XalanQNameByReference(ns.str(), 
varName.str()), m_locator);
  +     return executionContext.getVariable(XalanQNameByReference(ns->str(), 
varName->str()), m_locator);
   }
   
   
   
   const XObjectPtr
   XPath::numberlit(
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
  -     assert(m_expression.m_opMap.size() > unsigned(opPos + 3));
  -     assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[opPos + 3]));
  +     assert(m_expression.opCodeMapSize() > opPos + 3);
  +    assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 3));
   
  -     const XToken&   theLiteral = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 3]];
  +     const XToken* const         theLiteral =
  +        m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 3));
  +    assert(theLiteral != 0);
   
        if (m_inStylesheet == true)
        {
  -             return 
executionContext.getXObjectFactory().createNumber(theLiteral);
  +             return 
executionContext.getXObjectFactory().createNumber(*theLiteral);
        }
        else
        {
  -             return 
executionContext.getXObjectFactory().createNumber(theLiteral.num());
  +             return 
executionContext.getXObjectFactory().createNumber(theLiteral->num());
        }
   }
   
   
   
   double
  -XPath::numberlit(int opPos) const
  +XPath::numberlit(OpCodePositionType  opPos) const
   {
  -     assert(m_expression.m_opMap.size() > unsigned(opPos + 3));
  -     assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[opPos + 3]));
  +     assert(m_expression.opCodeMapSize() > opPos + 3);
  +    assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 3));
   
  -     const XToken&   theLiteral = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 3]];
  +     const XToken* const         theLiteral =
  +        m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 3));
  +    assert(theLiteral != 0);
   
  -     return theLiteral.num();
  +     return theLiteral->num();
   }
   
   
   
   void
   XPath::numberlit(
  -                     int             opPos,
  -                     bool&   theResult) const
  +                     OpCodePositionType      opPos,
  +                     bool&               theResult) const
   {
  -     assert(m_expression.m_opMap.size() > unsigned(opPos + 3));
  -     assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[opPos + 3]));
  +     assert(m_expression.opCodeMapSize() > opPos + 3);
  +    assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 3));
   
  -     const XToken&   theLiteral = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 3]];
  +     const XToken* const         theLiteral =
  +        m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 3));
  +    assert(theLiteral != 0);
   
  -     theResult = theLiteral.boolean();
  +     theResult = theLiteral->boolean();
   }
   
   
   
   void
   XPath::numberlit(
  -                     int                                     opPos,
  +                     OpCodePositionType      opPos,
                        XalanDOMString&         theString) const
   {
  -     assert(m_expression.m_opMap.size() > unsigned(opPos + 3));
  -     assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[opPos + 3]));
  +     assert(m_expression.opCodeMapSize() > opPos + 3);
  +    assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 3));
   
  -     const XToken&   theLiteral = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 3]];
  +     const XToken* const         theLiteral =
  +        m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 3));
  +    assert(theLiteral != 0);
   
  -     theLiteral.str(theString);
  +     theLiteral->str(theString);
   }
   
   
   
   void
   XPath::numberlit(
  -                     int                                     opPos,
  +                     OpCodePositionType      opPos,
                        FormatterListener&      formatterListener,
                        MemberFunctionPtr       function) const
   {
  -     assert(m_expression.m_opMap.size() > unsigned(opPos + 3));
  -     assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[opPos + 3]));
  +     assert(m_expression.opCodeMapSize() > opPos + 3);
  +    assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(opPos + 3));
   
  -     const XToken&   theLiteral = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos + 3]];
  +     const XToken* const         theLiteral =
  +        m_expression.getToken(m_expression.getOpCodeMapValue(opPos + 3));
  +    assert(theLiteral != 0);
   
  -     theLiteral.str(formatterListener, function);
  +    theLiteral->str(formatterListener, function);
   }
   
   
  @@ -2360,7 +2382,7 @@
   const XObjectPtr
   XPath::locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {    
        assert(context != 0);
  @@ -2379,7 +2401,7 @@
   void
   XPath::locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        bool&                                   theResult) const
   {
  @@ -2399,7 +2421,7 @@
   void
   XPath::locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        double&                                 theResult) const
   {
  @@ -2419,7 +2441,7 @@
   void
   XPath::locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        XalanDOMString&                 theResult) const
   {
  @@ -2439,7 +2461,7 @@
   void
   XPath::locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const
  @@ -2460,20 +2482,22 @@
   const XObjectPtr
   XPath::runExtFunction(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
        assert(context != 0);
   
  -     const int       endExtFunc = opPos + m_expression.m_opMap[opPos + 1] - 
1;
  +     const OpCodePositionType        endExtFunc = opPos + 
m_expression.getOpCodeMapValue(opPos + 1) - 1;
   
        opPos += 2;
   
  -     const XalanDOMString&   ns = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos]].str();
  +     const XToken* const         ns = 
m_expression.getToken(m_expression.getOpCodeMapValue(opPos));
  +    assert(ns != 0);
   
        ++opPos;
   
  -     const XalanDOMString&   funcName = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos]].str();
  +     const XToken* const         funcName = 
m_expression.getToken(m_expression.getOpCodeMapValue(opPos));
  +    assert(funcName != 0);
   
        ++opPos;
   
  @@ -2483,14 +2507,14 @@
   
        while(opPos < endExtFunc)
        {
  -             const int       nextOpPos = 
m_expression.getNextOpCodePosition(opPos);
  +             const OpCodePositionType        nextOpPos = 
m_expression.getNextOpCodePosition(opPos);
   
                args.push_back(executeMore(context, opPos, executionContext));
   
                opPos = nextOpPos;
        }
   
  -     return extfunction(context, opPos, ns, funcName, args, 
executionContext);
  +     return extfunction(context, opPos, ns->str(), funcName->str(), args, 
executionContext);
   }
   
   
  @@ -2498,21 +2522,21 @@
   const XObjectPtr
   XPath::runFunction(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
   {
  -     const int       endFunc = opPos + m_expression.m_opMap[opPos + 1] - 1;
  +     const OpCodePositionType        endFunc = opPos + 
m_expression.getOpCodeMapValue(opPos + 1) - 1;
   
        opPos += 2;
   
        // This is index into the function table for the
        // function.
  -     const int       funcID = m_expression.getOpCodeMapValue(opPos);
  +     const OpCodeMapValueType        funcID = 
m_expression.getOpCodeMapValue(opPos);
   
        opPos++;
   
        // Number of args is next.
  -     const int       argCount = m_expression.getOpCodeMapValue(opPos);
  +     const OpCodeMapValueType        argCount = 
m_expression.getOpCodeMapValue(opPos);
   
        opPos++;
   
  @@ -2589,7 +2613,7 @@
   double
   XPath::functionCount(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext) const
   {
        assert(context != 0);
  @@ -2615,7 +2639,7 @@
   const XalanDOMString&
   XPath::functionName(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext) const
   {
        assert(context != 0);
  @@ -2676,7 +2700,7 @@
   const XalanDOMString&
   XPath::functionLocalName(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext) const
   {
        assert(context != 0);
  @@ -2722,7 +2746,7 @@
   double
   XPath::functionStringLength(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext) const
   {
        assert(context != 0);
  @@ -2739,7 +2763,7 @@
   double
   XPath::functionSum(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType                                      
        opPos,
                        XPathExecutionContext&  executionContext) const
   {
        assert(context != 0);
  @@ -2785,7 +2809,7 @@
   XPath::locationPathPattern(
                        XPathExecutionContext&  executionContext,
                        XalanNode&                              context, 
  -                     int                                     opPos) const
  +                     OpCodePositionType                                      
opPos) const
   {
        eMatchScore     score = eMatchScoreNone;
   
  @@ -2800,15 +2824,15 @@
   XPath::step(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        MutableNodeRefList&     queryResults) const
   {
        const XPathExpression&  currentExpression = getExpression();
   
  -     const int       stepType =
  +     const OpCodeMapValueType   stepType =
                currentExpression.getOpCodeMapValue(opPos);
   
  -     int             argLen = 0;
  +     OpCodePositionType              argLen = 0;
   
        typedef XPathExecutionContext::BorrowReturnMutableNodeRefList   
BorrowReturnMutableNodeRefList;
   
  @@ -2895,7 +2919,7 @@
   
        opPos += argLen;
   
  -     int             nextStepType = 
currentExpression.getOpCodeMapValue(opPos);
  +     OpCodeMapValueType  nextStepType = 
currentExpression.getOpCodeMapValue(opPos);
   
        // Push and pop the context node list...
                XPathExecutionContext::ContextNodeListPushAndPop        
thePushAndPop(
  @@ -2978,13 +3002,13 @@
   XPath::stepPattern(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        eMatchScore&                    scoreHolder) const
   {
        const XPathExpression&  currentExpression = getExpression();
   
  -     const int       endStep = 
currentExpression.getNextOpCodePosition(opPos);
  -     int             nextStepType = 
currentExpression.getOpCodeMapValue(endStep);
  +     const OpCodePositionType    endStep = 
currentExpression.getNextOpCodePosition(opPos);
  +     OpCodeMapValueType          nextStepType = 
currentExpression.getOpCodeMapValue(endStep);
   
        if(XPathExpression::eENDOP != nextStepType)
        {
  @@ -3023,12 +3047,13 @@
   
        assert(context != 0);
   
  -     int                             argLen = 0;
  +     OpCodePositionType      argLen = 0;
   
  -     eMatchScore             score = eMatchScoreNone;
  +     eMatchScore                 score = eMatchScoreNone;
   
  -     const int               startOpPos = opPos;
  -     const int               stepType = 
currentExpression.getOpCodeMapValue(opPos);
  +     const OpCodePositionType        startOpPos = opPos;
  +     const OpCodeMapValueType        stepType =
  +        currentExpression.getOpCodeMapValue(opPos);
   
        switch(stepType)
        {
  @@ -3109,8 +3134,8 @@
                        }
                        else
                        {
  -                             const int   prevPos = 
currentExpression.getNextOpCodePosition(startOpPos);              
  -                             const int       prevStepType = 
currentExpression.getOpCodeMapValue(prevPos);
  +                             const OpCodePositionType    prevPos = 
currentExpression.getNextOpCodePosition(startOpPos);              
  +                             const OpCodeMapValueType        prevStepType = 
currentExpression.getOpCodeMapValue(prevPos);
   
                                if (eMatchScoreNone == score  && 
                                    (prevStepType == 
XPathExpression::eMATCH_ANY_ANCESTOR ||
  @@ -3311,7 +3336,7 @@
   XPath::handleFoundIndex(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              localContext, 
  -                     int                                     startOpPos) 
const
  +                     OpCodePositionType                                      
startOpPos) const
   {
        // We have an index somewhere in our pattern.  So, we have 
        // to do a full search for our step, using the parent as 
  @@ -3350,7 +3375,7 @@
   XPath::handleFoundIndexPositional(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              localContext,
  -                     int                                     startOpPos) 
const
  +                     OpCodePositionType                                      
startOpPos) const
   {
        XalanNode* const        parentContext =
                                DOMServices::getParentOfNode(*localContext);
  @@ -3382,12 +3407,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findNodeSet(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     /* stepType */,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              /* stepType */,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3410,12 +3435,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findRoot(
                        XPathExecutionContext&  /* executionContext */,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     /* stepType */,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              /* stepType */,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3424,7 +3449,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        XalanNode* const        docContext = XalanNode::DOCUMENT_NODE == 
context->getNodeType() ?
  @@ -3441,12 +3466,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findParent(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3456,7 +3481,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                        currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        XalanNode* const        theParent = 
DOMServices::getParentOfNode(*context);
  @@ -3495,12 +3520,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findSelf(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3510,7 +3535,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        if(argLen == 0)
  @@ -3545,12 +3570,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findAncestors(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3562,7 +3587,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                        currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        if (context != 0)
  @@ -3598,12 +3623,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findAncestorsOrSelf(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3613,7 +3638,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        opPos += 3;
  @@ -3646,12 +3671,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findAttributes(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3661,7 +3686,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        if(context->getNodeType() == XalanNode::ELEMENT_NODE)
  @@ -3708,12 +3733,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findChildren(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3725,7 +3750,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        if (child != 0)
  @@ -3761,12 +3786,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findDescendants(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType          opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3776,7 +3801,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        // Perform a pre-order traversal of descendents...
  @@ -3837,12 +3862,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findFollowing(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3852,7 +3877,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        opPos += 3;
  @@ -3934,12 +3959,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findFollowingSiblings(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -3949,7 +3974,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        XalanNode*      pos = context->getNextSibling();
  @@ -4033,12 +4058,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findPreceeding(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -4048,7 +4073,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        opPos += 3;
  @@ -4157,12 +4182,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findPreceedingSiblings(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -4172,7 +4197,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
   #if 1
  @@ -4252,12 +4277,12 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findNamespace(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(subQueryResults.empty() == true);
  @@ -4267,7 +4292,7 @@
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        if(context->getNodeType() == XalanNode::ELEMENT_NODE)
  @@ -4369,19 +4394,19 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::findNodesOnUnknownAxis(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     /* stepType */,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType          /* stepType */,
                        MutableNodeRefList&     /* subQueryResults */) const
   {
        const XPathExpression&  currentExpression = getExpression();
   
        // $$ ToDO: Can we reduce this to some call on the
        // XPathExpression interface?
  -     const int       argLen =
  +     const OpCodePositionType        argLen =
                currentExpression.getOpCodeMapValue(opPos + 
XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
   
        executionContext.error(
  @@ -4399,9 +4424,9 @@
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context,
                        XalanNode::NodeType             nodeType,
  -                     int                                     opPos,
  -                     int                                     argLen,
  -                     int                                     stepType) const
  +                     OpCodePositionType              opPos,
  +                     OpCodePositionType              argLen,
  +                     OpCodeMapValueType              stepType) const
   {
        assert(context->getNodeType() == nodeType);
   
  @@ -4409,7 +4434,7 @@
   
        eMatchScore             score = eMatchScoreNone;
   
  -     const int       testType = currentExpression.getOpCodeMapValue(opPos);
  +     const OpCodeMapValueType        testType = 
currentExpression.getOpCodeMapValue(opPos);
   
        switch(testType)
        {
  @@ -4440,7 +4465,7 @@
                        {
                                opPos++;
   
  -                             const int                               
tokenPosition =
  +                             const OpCodeMapValueType        tokenPosition =
                                        
currentExpression.getOpCodeMapValue(opPos);
   
                                const XObject* const    name =
  @@ -4492,7 +4517,7 @@
                        {
                                bool                                    test = 
false;
   
  -                             int                                     
queueIndex = currentExpression.getOpCodeMapValue(opPos);
  +                             OpCodeMapValueType              queueIndex = 
currentExpression.getOpCodeMapValue(opPos);
   
                                const XalanDOMString&   targetNS = queueIndex 
>= 0 ?
                                                                                
currentExpression.getToken(queueIndex)->str() :
  @@ -4673,10 +4698,10 @@
   
   
   
  -int
  +XPath::OpCodePositionType
   XPath::predicates(
                        XPathExecutionContext&  executionContext,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        MutableNodeRefList&     subQueryResults) const
   {
        assert(&executionContext.getContextNodeList() == &subQueryResults);
  @@ -4695,7 +4720,7 @@
                // update endPredicatePos.
                if (theLength > 0)
                {
  -                     const int       predOpPos = opPos + 2;
  +                     const OpCodePositionType        predOpPos = opPos + 2;
   
                        // OK, this is a huge hack/optimization.  If the 
predicate is
                        // simple a number, such as [2], we can just get the
  @@ -4708,7 +4733,7 @@
                        // our node lists index from 0.
                        if (m_expression.getOpCodeMapValue(predOpPos) == 
XPathExpression::eOP_NUMBERLIT)
                        {
  -                             assert(m_expression.m_tokenQueue.size() > 
unsigned(m_expression.m_opMap[predOpPos + 3]));
  +                             assert(m_expression.tokenQueueSize() > 
m_expression.getOpCodeMapValue(predOpPos + 3));
   
                                // Get the value of the number...
                                const double    theIndex =
  @@ -4770,7 +4795,7 @@
   
                opPos = currentExpression.getNextOpCodePosition(opPos);
   
  -             const int       nextStepType = 
currentExpression.getOpCodeMapValue(opPos);
  +             const OpCodeMapValueType        nextStepType = 
currentExpression.getOpCodeMapValue(opPos);
   
                if (nextStepType != XPathExpression::eOP_PREDICATE &&
                    nextStepType != 
XPathExpression::eOP_PREDICATE_WITH_POSITION)
  @@ -4791,9 +4816,9 @@
   XPath::NodeTester::NodeTester(
                        const XPath&                    xpath,
                        XPathExecutionContext&  executionContext,
  -                     int                                     opPos,
  -                     int                                     argLen,
  -                     int                                     stepType) :
  +                     OpCodePositionType              opPos,
  +                     OpCodePositionType              argLen,
  +                     OpCodeMapValueType              stepType) :
        m_executionContext(executionContext),
        m_targetNamespace(0),
        m_targetLocalName(0),
  
  
  
  1.5       +211 -209  xml-xalan/c/src/xalanc/XPath/XPath.hpp
  
  Index: XPath.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPath.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XPath.hpp 6 Jan 2004 02:41:32 -0000       1.4
  +++ XPath.hpp 11 Feb 2004 01:08:30 -0000      1.5
  @@ -104,6 +104,9 @@
   
        typedef XERCES_CPP_NAMESPACE_QUALIFIER Locator  LocatorType;
   
  +    typedef XPathExpression::OpCodeMapSizeType      OpCodePositionType;
  +    typedef XPathExpression::OpCodeMapValueType     OpCodeMapValueType;
  +
        static const XalanDOMChar       PSEUDONAME_ANY[];
        static const XalanDOMChar       PSEUDONAME_ROOT[];
        static const XalanDOMChar       PSEUDONAME_TEXT[];
  @@ -857,14 +860,14 @@
         * Evaluate a predicate.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @return pointer to either a boolean or a number
         */
        const XObjectPtr
        predicate(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
        {
                return executeMore(context, opPos + 2, executionContext);
  @@ -917,7 +920,7 @@
        static bool
        uninstallFunction(const XalanDOMString&         funcName)
        {
  -             return  s_functions.UninstallFunction(funcName);
  +             return s_functions.UninstallFunction(funcName);
        }
   
        /**
  @@ -929,7 +932,7 @@
        static bool
        uninstallFunction(const XalanDOMChar*   funcName)
        {
  -             return  s_functions.UninstallFunction(funcName);
  +             return s_functions.UninstallFunction(funcName);
        }
   
        /**
  @@ -1021,28 +1024,28 @@
         * Execute a location path.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Mpa
         * @param executionContext current execution context
         * @return node-set
         */
        const XObjectPtr
        locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Execute a location path.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @param theResult            the result as a node list
         */
        void
        locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        bool&                                   theResult) 
const;
   
  @@ -1050,14 +1053,14 @@
         * Execute a location path.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @param theResult            the result as a node list
         */
        void
        locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        double&                                 theResult) 
const;
   
  @@ -1065,14 +1068,14 @@
         * Execute a location path.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @param theResult            the result as a node list
         */
        void
        locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        XalanDOMString&                 theResult) const;
   
  @@ -1080,7 +1083,7 @@
         * Execute a location path.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
  @@ -1088,7 +1091,7 @@
        void
        locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const;
  @@ -1097,14 +1100,14 @@
         * Execute a location path.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @param theResult            the result as a node list
         */
        void
        locationPath(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        MutableNodeRefList&             theResult) const
        {
  @@ -1115,28 +1118,28 @@
         * Execute the XPath from the provided context.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @return pointer to union of node-set operands
         */
        const XObjectPtr
        executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Execute the XPath from the provided context.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @param theResult        The result of the execution
         */
        void
        executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        bool&                                   theResult) 
const;
   
  @@ -1144,14 +1147,14 @@
         * Execute the XPath from the provided context.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @param theResult        The result of the execution
         */
        void
        executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        double&                                 theResult) 
const;
   
  @@ -1160,14 +1163,14 @@
         * is appended to the supplied string.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @param theResult        The result of the execution
         */
        void
        executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        XalanDOMString&                 theResult) const;
   
  @@ -1175,7 +1178,7 @@
         * Execute the XPath from the provided context.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
  @@ -1183,7 +1186,7 @@
        void
        executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const;
  @@ -1192,7 +1195,7 @@
         * Execute the XPath from the provided context.
         *
         * @param context          current source tree context node
  -      * @param opPos            current position in the m_opMap array
  +      * @param opPos            current position in the Op Map
         * @param executionContext current execution context
         * @param theResult        The result of the execution
         * @return the node-set result, if the result was not returned in the 
parameter
  @@ -1200,7 +1203,7 @@
        const XObjectPtr
        executeMore(
                        XalanNode*                              context,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        MutableNodeRefList&             theResult) const;
   
  @@ -1219,124 +1222,124 @@
        /**
         * OR two expressions and return the boolean result.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return true if the one of the two arguments are true.
         */
        bool
        Or(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * OR two expressions and return the boolean result.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return true if the two arguments are both true.
         */
        bool
        And(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Tell if two expressions are functionally not equal.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return true if the two arguments are not equal.
         */
        bool
        notequals(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Tell if two expressions are functionally equal.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return true if the two arguments are equal.
         */
        bool
        equals(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Tell if one argument is less than or equal to the other argument.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return true if arg 1 is less than or equal to arg 2.
         */
        bool
        lte(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Tell if one argument is less than the other argument.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return true if arg 1 is less than arg 2.
         */
        bool
        lt(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Tell if one argument is greater than or equal to the other argument.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return true if arg 1 is greater than or equal to arg 2.
         */
        bool
        gte(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Tell if one argument is greater than the other argument.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return true if arg 1 is greater than arg 2.
         */
        bool
        gt(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Give the sum of two arguments.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return sum of arg1 and arg2.
         */
        double
        plus(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Give the sum of two arguments.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
  @@ -1344,7 +1347,7 @@
        void
        plus(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const;
  @@ -1352,20 +1355,20 @@
        /**
         * Give the difference of two arguments.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return difference of arg1 and arg2.
         */
        double
        minus(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Give the difference of two arguments.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
  @@ -1373,7 +1376,7 @@
        void
        minus(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const;
  @@ -1381,20 +1384,20 @@
        /**
         * Multiply two arguments.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return arg1 * arg2.
         */
        double
        mult(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Multiply two arguments.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
  @@ -1402,7 +1405,7 @@
        void
        mult(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const;
  @@ -1410,20 +1413,20 @@
        /**
         * Divide a number.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return arg1 / arg2.
         */
        double
        div(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Divide a number.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
  @@ -1431,7 +1434,7 @@
        void
        div(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const;
  @@ -1439,20 +1442,20 @@
        /**
         * Return the remainder from a truncating division.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return arg1 mod arg2.
         */
        double
        mod(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Return the remainder from a truncating division.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
  @@ -1460,7 +1463,7 @@
        void
        mod(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const;
  @@ -1468,20 +1471,20 @@
        /**
         * Return the negation of a number.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return -arg.
         */
        double
        neg(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Return the negation of a number.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
  @@ -1489,7 +1492,7 @@
        void
        neg(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const;
  @@ -1497,28 +1500,28 @@
        /**
         * Computes the union of its operands which must be node-sets.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the union of node-set operands.
         */
        const XObjectPtr
        Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Computes the union of its operands which must be node-sets.
         *
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @result the result of the union of node-set operands.
         */
        void
        Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        bool&                                   result) const;
   
  @@ -1526,14 +1529,14 @@
         * Computes the union of its operands which must be node-sets.
         *
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @result the result of the union of node-set operands.
         */
        void
        Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        double&                                 result) const;
   
  @@ -1541,14 +1544,14 @@
         * Computes the union of its operands which must be node-sets.
         *
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @result the result of the union of node-set operands.
         */
        void
        Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        XalanDOMString&                 result) const;
   
  @@ -1556,7 +1559,7 @@
         * Computes the union of its operands which must be node-sets.
         *
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
  @@ -1564,7 +1567,7 @@
        void
        Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const;
  @@ -1572,96 +1575,96 @@
        /**
         * Computes the union of its operands which must be node-sets.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @result the result of the union of node-set operands.
         */
        void
        Union(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        MutableNodeRefList&             result) const;
   
        /**
         * Get a literal value.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return an XObject object.
         */
        const XObjectPtr
        literal(
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
     
        /**
         * Get a literal value as a boolean.
         *
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param theResult The value.
         */
        void
        literal(
  -                     int             opPos,
  -                     bool&   theResult) const;
  +                     OpCodePositionType      opPos,
  +                     bool&               theResult) const;
   
        /**
         * Get a literal value as a number.
         *
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param theResult The value.
         */
        void
        literal(
  -                     int                     opPos,
  -                     double&         theResult) const;
  +                     OpCodePositionType      opPos,
  +                     double&                 theResult) const;
   
        /**
         * Get a literal value.  The value is appended to the
         * supplied string.
         *
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param theResult The string.
         */
        void
        literal(
  -                     int                                     opPos,
  +                     OpCodePositionType      opPos,
                        XalanDOMString&         theResult) const;
   
        /**
         * Get a literal value.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return The result as a double.
         */
        void
        literal(
  -                     int                                     opPos,
  +                     OpCodePositionType      opPos,
                        FormatterListener&      formatterListener,
                        MemberFunctionPtr       function) const;
   
        /**
         * Get the value of a variable.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return an XObject object.
         */
        const XObjectPtr
        variable(
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Execute an expression as a group.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return arg.
         */
        const XObjectPtr
        group(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
        {
                return executeMore(context, opPos + 2, executionContext);
  @@ -1670,14 +1673,14 @@
        /**
         * Execute an expression as a group.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param theResult The result of the execution
         */
        void
        group(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        bool&                                   theResult) const
        {
  @@ -1687,14 +1690,14 @@
        /**
         * Execute an expression as a group.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param theResult The result of the execution
         */
        void
        group(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        double&                                 theResult) const
        {
  @@ -1704,14 +1707,14 @@
        /**
         * Execute an expression as a group.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param theResult The result of the execution
         */
        void
        group(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        XalanDOMString&                 theResult) const
        {
  @@ -1722,7 +1725,7 @@
         * Execute an expression as a group.
         *
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
  @@ -1730,7 +1733,7 @@
        void
        group(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        FormatterListener&              formatterListener,
                        MemberFunctionPtr               function) const
  @@ -1741,14 +1744,14 @@
        /**
         * Execute an expression as a group.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @param theResult The result of the execution
         */
        void
        group(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext,
                        MutableNodeRefList&             theResult) const
        {
  @@ -1757,85 +1760,84 @@
   
        /**
         * Get a literal value.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @return The result as a double.
         */
        double
  -     numberlit(int   opPos) const;
  +     numberlit(OpCodePositionType    opPos) const;
   
        /**
         * Get a literal value.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @return The result as a double.
         */
        const XObjectPtr
        numberlit(
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Get a literal value as a boolean.
         *
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param theResult The string.
         */
        void
        numberlit(
  -                     int             opPos,
  -                     bool&   theResult) const;
  +                     OpCodePositionType      opPos,
  +                     bool&               theResult) const;
   
        /**
         * Get a literal value.  The value is appended to the
         * supplied string.
         *
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param theResult The string.
         */
        void
        numberlit(
  -                     int                                     opPos,
  +                     OpCodePositionType      opPos,
                        XalanDOMString&         theResult) const;
   
        /**
         * Get a literal value.
         *
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param formatterListener the FormatterListener instance to receive 
the result
         * @param function A pointer to the member function of 
FormatterListener to call
         */
        void
        numberlit(
  -                     int                                     opPos,
  +                     OpCodePositionType      opPos,
                        FormatterListener&      formatterListener,
                        MemberFunctionPtr       function) const;
   
        /**
         * Setup for and run an extension function.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        const XObjectPtr
        runExtFunction(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Handle an extension function.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param theNamespace The namespace of the function.
         * @param functionName The name of the function.
  -      * @param opPos The current position in the m_opMap array.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        const XObjectPtr
        extfunction(
                        XalanNode*                                              
                context,
  -                     int                                                     
                        /* opPos */,
  +                     OpCodePositionType                                      
        /* opPos */,
                        const XalanDOMString&                                   
theNamespace,
                        const XalanDOMString&                                   
functionName, 
                        const Function::XObjectArgVectorType&   argVec,
  @@ -1851,20 +1853,20 @@
        /**
         * Setup for and run a function.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        const XObjectPtr
        runFunction(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Handle a built-in function.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param funcID The function ID.
         * @param argVec The arguments for the function.
         * @param executionContext current execution context
         * @return the result of the function.
  @@ -1872,7 +1874,7 @@
        const XObjectPtr
        function(
                        XalanNode*                                              
                context,
  -                     int                                                     
                        funcID,
  +                     OpCodeMapValueType                                      
        funcID,
                        const Function::XObjectArgVectorType&   argVec,
                        XPathExecutionContext&                                  
executionContext) const
        {
  @@ -1912,28 +1914,28 @@
         * Handle the built-in function "count".
         *
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        double
        functionCount(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Handle the built-in function "not".
         *
         * @param context The current source tree context node, which must not 
be 0.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        bool
        functionNot(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
        {
                assert(context != 0);
  @@ -1945,14 +1947,14 @@
         * Handle the built-in function "boolean".
         *
         * @param context The current source tree context node, which must not 
be 0.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        bool
        functionBoolean(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
        {
                assert(context != 0);
  @@ -1982,14 +1984,14 @@
         * Handle the built-in function "name".
         *
         * @param context The current source tree context node, which must not 
be 0.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        const XalanDOMString&
        functionName(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
  @@ -2005,14 +2007,14 @@
         * Handle the built-in function "local-name".
         *
         * @param context The current source tree context node, which must not 
be 0.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        const XalanDOMString&
        functionLocalName(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
  @@ -2036,14 +2038,14 @@
         * Handle the built-in function "number".
         *
         * @param context The current source tree context node, which must not 
be 0.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        double
        functionNumber(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
        {
                double  result;
  @@ -2057,14 +2059,14 @@
         * Handle the built-in function "floor".
         *
         * @param context The current source tree context node, which must not 
be 0.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        double
        functionFloor(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
        {
                return DoubleSupport::floor(functionNumber(context, opPos, 
executionContext));
  @@ -2074,14 +2076,14 @@
         * Handle the built-in function "ceiling".
         *
         * @param context The current source tree context node, which must not 
be 0.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        double
        functionCeiling(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
        {
                return DoubleSupport::ceiling(functionNumber(context, opPos, 
executionContext));
  @@ -2091,14 +2093,14 @@
         * Handle the built-in function "round".
         *
         * @param context The current source tree context node, which must not 
be 0.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        double
        functionRound(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const
        {
                return DoubleSupport::round(functionNumber(context, opPos, 
executionContext));
  @@ -2117,41 +2119,41 @@
         * Handle the built-in function "string-length".
         *
         * @param context The current source tree context node, which must not 
be 0.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        double
        functionStringLength(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Handle the built-in function "sum".
         *
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return the result of the function.
         */
        double
        functionSum(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
        /**
         * Get a numeric operand for an expression.
         * @param context The current source tree context node.
  -      * @param opPos The current position in the m_opMap array.
  +      * @param opPos The current position in the Op Map.
         * @param executionContext current execution context
         * @return The value of the operand.
         */
        double
        getNumericOperand(
                        XalanNode*                              context,
  -                     int                                             opPos,
  +                     OpCodePositionType              opPos,
                        XPathExecutionContext&  executionContext) const;
   
   private:
  @@ -2175,7 +2177,7 @@
        locationPathPattern(
                        XPathExecutionContext&  executionContext,
                        XalanNode&                              context, 
  -                     int                                     opPos) const;
  +                     OpCodePositionType              opPos) const;
   
        class NodeTester
        {
  @@ -2184,9 +2186,9 @@
                NodeTester(
                        const XPath&                    xpath,
                        XPathExecutionContext&  executionContext,
  -                     int                                     opPos,
  -                     int                                     argLen,
  -                     int                                     stepType);
  +                     OpCodePositionType              opPos,
  +                     OpCodePositionType              argLen,
  +                     OpCodeMapValueType              stepType);
   
                eMatchScore
                operator()(
  @@ -2319,7 +2321,7 @@
        step(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        MutableNodeRefList&             queryResults) const;
   
        /**
  @@ -2336,127 +2338,127 @@
        stepPattern(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        eMatchScore&                    scoreHolder) const;
   
  -     int
  +     OpCodePositionType
        findNodeSet(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType          stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findRoot(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findParent(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findSelf(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findAncestors(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findAncestorsOrSelf(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findAttributes(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findChildren(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findDescendants(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findFollowing(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findFollowingSiblings(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findPreceeding(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findPreceedingSiblings(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findNamespace(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
  -     int
  +     OpCodePositionType
        findNodesOnUnknownAxis(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context, 
  -                     int                                     opPos,
  -                     int                                     stepType,
  +                     OpCodePositionType              opPos,
  +                     OpCodeMapValueType              stepType,
                        MutableNodeRefList&     subQueryResults) const;
   
        eMatchScore
  @@ -2464,27 +2466,27 @@
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              context,
                        XalanNode::NodeType             nodeType,
  -                     int                                     opPos,
  -                     int                                     argLen,
  -                     int                                     stepType) const;
  +                     OpCodePositionType              opPos,
  +                     OpCodePositionType              argLen,
  +                     OpCodeMapValueType              stepType) const;
   
  -     int
  +     OpCodePositionType
        predicates(
                        XPathExecutionContext&  executionContext,
  -                     int                                     opPos,
  +                     OpCodePositionType              opPos,
                        MutableNodeRefList&     subQueryResults) const;
   
        eMatchScore
        handleFoundIndex(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              localContext,
  -                     int                                     startOpPos) 
const;
  +                     OpCodePositionType              startOpPos) const;
   
        eMatchScore
        handleFoundIndexPositional(
                        XPathExecutionContext&  executionContext,
                        XalanNode*                              localContext,
  -                     int                                     startOpPos) 
const;
  +                     OpCodePositionType              startOpPos) const;
   
   private:
   
  @@ -2492,7 +2494,7 @@
        unknownOpCodeError(
                        XalanNode*                              context,
                        XPathExecutionContext&  executionContext,
  -                     int                                             opPos) 
const;
  +                     OpCodePositionType              opPos) const;
   
        void
        notNodeSetError(
  
  
  
  1.7       +5 -5      xml-xalan/c/src/xalanc/XPath/XPathExpression.cpp
  
  Index: XPathExpression.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPathExpression.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XPathExpression.cpp       6 Feb 2004 08:57:08 -0000       1.6
  +++ XPathExpression.cpp       11 Feb 2004 01:08:30 -0000      1.7
  @@ -836,7 +836,7 @@
        m_opMap.push_back(thePosition);
   
        // Update the op map length.
  -     m_opMap[s_opCodeMapLengthIndex]++;
  +     ++m_opMap[s_opCodeMapLengthIndex];
   }
   
   
  @@ -857,7 +857,7 @@
        m_opMap.push_back(thePosition);
   
        // Update the op map length.
  -     m_opMap[s_opCodeMapLengthIndex]++;
  +     ++m_opMap[s_opCodeMapLengthIndex];
   }
   
   
  @@ -880,7 +880,7 @@
        m_opMap.push_back(thePosition);
   
        // Update the op map length.
  -     m_opMap[s_opCodeMapLengthIndex]++;
  +     ++m_opMap[s_opCodeMapLengthIndex];
   }
   
   
  @@ -897,7 +897,7 @@
        m_opMap.push_back(theIndex);
   
        // Update the op map length.
  -     m_opMap[s_opCodeMapLengthIndex]++;
  +     ++m_opMap[s_opCodeMapLengthIndex];
   
        m_numberLiteralValues.push_back(theNumber);
   }
  @@ -917,7 +917,7 @@
        m_opMap.push_back(thePosition);
   
        // Update the op map length.
  -     m_opMap[s_opCodeMapLengthIndex]++;
  +     ++m_opMap[s_opCodeMapLengthIndex];
   }
   
   
  
  
  
  1.5       +28 -36    xml-xalan/c/src/xalanc/XPath/XPathExpression.hpp
  
  Index: XPathExpression.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPathExpression.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XPathExpression.hpp       6 Feb 2004 08:57:08 -0000       1.4
  +++ XPathExpression.hpp       11 Feb 2004 01:08:30 -0000      1.5
  @@ -858,6 +858,23 @@
                return m_opMap[opPos];
        }
   
  +     /**
  +      * Retrieve the value of an operation code at a specified position in 
the
  +      * list.
  +      * 
  +      * @param opPos position in list
  +      * @return value of operation code
  +      */
  +     void
  +     setOpCodeMapValue(
  +            OpCodeMapSizeType                opPos,
  +            const OpCodeMapValueType&   theValue)
  +     {
  +        assert(opPos < opCodeMapLength());
  +
  +             m_opMap[opPos] = theValue;
  +     }
  +
        OpCodeMapValueType
        getOpCodeArgumentLength(OpCodeMapSizeType       opPos) const
        {
  @@ -1030,7 +1047,7 @@
        bool
        hasMoreTokens() const
        {
  -             return tokenQueueSize() - m_currentPosition > 0 ? true : false;
  +             return tokenQueueSize() > m_currentPosition ? true : false;
        }
   
        /**
  @@ -1054,37 +1071,12 @@
        }
   
        /**
  -      * Set the current position in the token queue to a specified value.
  -      *
  -      * @param thePosition value of position to set
  -      */
  -     void
  -     setTokenPosition(TokenQueueSizeType             thePosition)
  -     {
  -             const TokenQueueSizeType        theSize = tokenQueueSize();
  -
  -             m_currentPosition = thePosition > theSize ? theSize : 
thePosition;
  -     }
  -
  -#if 0
  -     /**
  -      * Set the current position in the token queue to a specified value.
  -      *
  -      * @param thePosition value of position to set
  -      */
  -     void
  -     setTokenPosition(int    thePosition)
  -     {
  -             setTokenPosition(thePosition > 0 ? 
TokenQueueSizeType(thePosition) : 0);
  -     }
  -#endif
  -     /**
         * Retrieve a token at the specified position in the token queue.
         * 
         * @param thePosition position in queue
         * @return pointer to XObject token
         */
  -     const XObject*
  +     const XToken*
        getToken(TokenQueueSizeType             thePosition) const
        {
                assert(thePosition < tokenQueueSize());
  @@ -1097,7 +1089,7 @@
         * 
         * @return pointer to XObject token
         */
  -     const XObject*
  +     const XToken*
        getNextToken()
        {
                if (hasMoreTokens() == true)
  @@ -1115,7 +1107,7 @@
         * 
         * @return pointer to XObject token
         */
  -     const XObject*
  +     const XToken*
        getPreviousToken()
        {
                if (m_currentPosition > 0)
  @@ -1135,7 +1127,7 @@
         * @param theOffset offset from current position
         * @return pointer to XObject token
         */
  -     const XObject*
  +     const XToken*
        getRelativeToken(int    theOffset) const
        {
                const int       thePosition = int(m_currentPosition) + 
theOffset;
  @@ -1229,7 +1221,7 @@
         * Replace a token in the token queue.
         * 
         * @param theOffset the offset at which to replace the token.
  -      * @param theString The string data for the token.  The instance will 
keep a point to this string, so it must be persistent.
  +      * @param theString The string data for the token.  The instance will 
keep a pointer to this string, so it must be persistent.
         */
        void
        replaceRelativeToken(
  @@ -1320,7 +1312,7 @@
                m_opMap.push_back(theValue);
   
                // Update the op map length.
  -             m_opMap[s_opCodeMapLengthIndex]++;
  +             ++m_opMap[s_opCodeMapLengthIndex];
        }
   
        /**
  @@ -1336,7 +1328,7 @@
         * Push a token onto the token queue and its index onto the operations 
code
         * map.
         *
  -      * @param theString The string data for the token.  The instance will 
keep a point to this string, so it must be persistent.
  +      * @param theString The string data for the token.  The instance will 
keep a pointer to this string, so it must be persistent.
         */
        void
        pushArgumentOnOpCodeMap(const XalanDOMString&   theString);
  @@ -1346,7 +1338,7 @@
         * map.
         *
         * @param theNumber The numeric data for the token.  This must be 
consistent with the lexical value in theString.
  -      * @param theString The string data for the token.  The instance will 
keep a point to this string, so it must be persistent.
  +      * @param theString The string data for the token.  The instance will 
keep a pointer to this string, so it must be persistent.
         */
        void
        pushArgumentOnOpCodeMap(
  @@ -1407,6 +1399,8 @@
                return *m_currentPattern;
        }
   
  +private:
  +
        /**
         * An operations map is used instead of a proper parse tree.  It 
contains
         * operations codes and indexes into the m_tokenQueue. We use an array
  @@ -1437,8 +1431,6 @@
         * The current pattern string, for diagnostics purposes.
         */
        const XalanDOMString*   m_currentPattern;
  -
  -private:
   
        // Default vector allocation sizes.
        enum
  
  
  
  1.6       +5 -15     xml-xalan/c/src/xalanc/XPath/XPathProcessorImpl.cpp
  
  Index: XPathProcessorImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPathProcessorImpl.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XPathProcessorImpl.cpp    6 Jan 2004 02:41:32 -0000       1.5
  +++ XPathProcessorImpl.cpp    11 Feb 2004 01:08:30 -0000      1.6
  @@ -477,7 +477,7 @@
   
        }
   
  -     m_expression->setTokenPosition(0);
  +     m_expression->resetTokenPosition();
   }
   
   
  @@ -754,16 +754,6 @@
   
   
   void
  -XPathProcessorImpl::resetTokenMark(int       mark)
  -{
  -     m_expression->setTokenPosition(mark);
  -
  -     nextToken();
  -}
  -
  -
  -
  -void
   XPathProcessorImpl::consumeExpected(XalanDOMChar     expected)
   {
        if(tokenIs(expected) == true)
  @@ -1567,7 +1557,7 @@
   
                default:
                        {
  -                             // The position must be at least zero, since
  +                             // The position must be at least 1, since
                                // we've looked at a token.
                                assert(m_expression->getTokenPosition() > 0);
   
  @@ -1595,10 +1585,10 @@
                                // Get the arguments, and the argument count...
                                const int       argCount = 
FunctionCallArguments();
   
  -                             assert(m_expression->m_opMap[opPos + 3] == 0);
  +                             assert(m_expression->getOpCodeMapValue(opPos + 
3) == 0);
   
                                // update the arg count in the op map...
  -                             m_expression->m_opMap[opPos + 3] = argCount;
  +                             m_expression->setOpCodeMapValue(opPos + 3, 
argCount);
                        }
                }
        }
  @@ -2718,7 +2708,7 @@
        {
                assert(m_expression->opCodeMapLength() > matchTypePos);
   
  -             m_expression->m_opMap[matchTypePos] = 
XPathExpression::eMATCH_ANY_ANCESTOR;
  +             m_expression->setOpCodeMapValue(matchTypePos, 
XPathExpression::eMATCH_ANY_ANCESTOR);
        }
   
        m_expression->updateOpCodeLength(opPos);
  
  
  
  1.3       +0 -7      xml-xalan/c/src/xalanc/XPath/XPathProcessorImpl.hpp
  
  Index: XPathProcessorImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPathProcessorImpl.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XPathProcessorImpl.hpp    6 Jan 2004 02:41:32 -0000       1.2
  +++ XPathProcessorImpl.hpp    11 Feb 2004 01:08:30 -0000      1.3
  @@ -282,13 +282,6 @@
        prevToken();
   
        /**
  -      * Reset token queue mark and m_token to a 
  -      * given position.
  -      */
  -     void
  -     resetTokenMark(int      mark);
  -
  -     /**
         * Consume an expected token, throwing an exception if it 
         * isn't there.
         */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to