You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by zo...@apache.org on 2007/04/02 17:52:16 UTC

svn commit: r524815 - /xalan/java/trunk/src/org/apache/xpath/jaxp/JAXPVariableStack.java

Author: zongaro
Date: Mon Apr  2 08:52:15 2007
New Revision: 524815

URL: http://svn.apache.org/viewvc?view=rev&rev=524815
Log:
Part of fix for Jira issue XALANJ-2375.

Added a new constructor and corresponding reset method that allow the caller
to specify the initial size for the arrays contained in a VariableStack.  This
is important for XPath expression evaluation, where additional stack entries
are never needed.  Previously, the arrays were always allocated based on the
maximum recursion depth permitted by the XSLT processor, which was caused
unnecessary initialization overhead using the various XPath APIs.

In the case of JAXPVariableStack, which extends VariableStack, the default
constructor can always use specify the minimal stack size on the super class's
constructor.

Reviewed by Christine Li (jycli () ca ! ibm ! com).

Modified:
    xalan/java/trunk/src/org/apache/xpath/jaxp/JAXPVariableStack.java

Modified: xalan/java/trunk/src/org/apache/xpath/jaxp/JAXPVariableStack.java
URL: http://svn.apache.org/viewvc/xalan/java/trunk/src/org/apache/xpath/jaxp/JAXPVariableStack.java?view=diff&rev=524815&r1=524814&r2=524815
==============================================================================
--- xalan/java/trunk/src/org/apache/xpath/jaxp/JAXPVariableStack.java (original)
+++ xalan/java/trunk/src/org/apache/xpath/jaxp/JAXPVariableStack.java Mon Apr  2 08:52:15 2007
@@ -42,6 +42,7 @@
     private final XPathVariableResolver resolver;
 	
     public JAXPVariableStack(XPathVariableResolver resolver) {
+        super(2);
         this.resolver = resolver;
     }
 	



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org