jkesselm    01/08/10 10:57:37

  Modified:    java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
                        DTMDocumentImpl.java DTMManagerDefault.java
  Log:
  Increasing the number of bits used to identify DTM nodes, at the expense of 
decreasing the number of DTMs that a DTMManager can track simultaneously. Some 
other code has been updated to track this change (and to better track posible 
future changes), as have the IDKEY testcases.
  
  Revision  Changes    Path
  1.15      +3 -4      
xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDefaultBase.java
  
  Index: DTMDefaultBase.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDefaultBase.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DTMDefaultBase.java       2001/07/30 13:48:21     1.14
  +++ DTMDefaultBase.java       2001/08/10 17:57:37     1.15
  @@ -152,9 +152,6 @@
      */
     protected static final int NOTPROCESSED = DTM.NULL - 1;
   
  -  /** Not sure if this is used? */
  -  protected static final int NODEIDENTITYBITS = 0x000FFFFF;
  -
     /**
      * The DTM manager who "owns" this DTM.
      */
  @@ -163,7 +160,9 @@
     /** The document identity, which is OR'd with node indexes to make 
handles. */
     protected int m_dtmIdent;
   
  -  /** The mask for the identity.  %REVIEW% static constant? */
  +  /** The mask for the identity.
  +      %REVIEW% Should this really be set to the _DEFAULT? What if
  +      a particular DTM wanted to use another value? */
     protected final static int m_mask = DTMManager.IDENT_NODE_DEFAULT;
   
     /** The base URI for this document. */
  
  
  
  1.5       +1 -1      
xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDocumentImpl.java
  
  Index: DTMDocumentImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDocumentImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DTMDocumentImpl.java      2001/07/20 18:48:11     1.4
  +++ DTMDocumentImpl.java      2001/08/10 17:57:37     1.5
  @@ -103,7 +103,7 @@
   {
   
           // Number of lower bits used to represent node index.
  -        protected static final byte DOCHANDLE_SHIFT = 20;
  +        protected static final byte DOCHANDLE_SHIFT = 22;
           // Masks the lower order of node handle.
           // Same as [EMAIL PROTECTED] DTMConstructor.IDENT_NODE_DEFAULT}
           protected static final int NODEHANDLE_MASK = (1 << (DOCHANDLE_SHIFT 
+ 1)) - 1; 
  
  
  
  1.19      +2 -2      
xml-xalan/java/src/org/apache/xml/dtm/ref/DTMManagerDefault.java
  
  Index: DTMManagerDefault.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMManagerDefault.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DTMManagerDefault.java    2001/07/28 00:25:59     1.18
  +++ DTMManagerDefault.java    2001/08/10 17:57:37     1.19
  @@ -181,7 +181,7 @@
         System.out.println("Starting source: "+source.getSystemId());
       XMLStringFactory xstringFactory = m_xsf;
       int dtmPos = getFirstFreeDTMID();
  -    int documentID = dtmPos << 20;
  +    int documentID = dtmPos << IDENT_DTM_NODE_BITS;
   
       if ((null != source) && source instanceof DOMSource)
       {
  @@ -546,7 +546,7 @@
     {
   
       // Performance critical function.
  -    return m_dtms[nodeHandle >> 20];
  +    return m_dtms[nodeHandle >> IDENT_DTM_NODE_BITS];
     }
   
     /**
  
  
  

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

Reply via email to