You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by au...@locus.apache.org on 2000/11/08 18:03:42 UTC

cvs commit: xml-xalan/c/src/XPath XPath.hpp XPathExecutionContextDefault.cpp XPathExecutionContextDefault.hpp

auriemma    00/11/08 09:03:38

  Modified:    c/src/XPath XPath.hpp XPathExecutionContextDefault.cpp
                        XPathExecutionContextDefault.hpp
  Log:
  Removed obsolete class PushPopArgVector. This is no longer needed since it was only used to handle  variable arguments.
  
  Revision  Changes    Path
  1.18      +1 -2      xml-xalan/c/src/XPath/XPath.hpp
  
  Index: XPath.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPath.hpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- XPath.hpp	2000/10/03 15:27:01	1.17
  +++ XPath.hpp	2000/11/08 17:03:12	1.18
  @@ -828,8 +828,7 @@
   	// Default vector allocation sizes.
   	enum
   	{
  -		eDefaultTargetStringsSize = 5,
  -		eDefaultArgVectorSize = 5	// for function call parameters
  +		eDefaultTargetStringsSize = 5
   	};
   
   	// Data members...
  
  
  
  1.23      +1 -56     xml-xalan/c/src/XPath/XPathExecutionContextDefault.cpp
  
  Index: XPathExecutionContextDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExecutionContextDefault.cpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- XPathExecutionContextDefault.cpp	2000/11/02 01:46:01	1.22
  +++ XPathExecutionContextDefault.cpp	2000/11/08 17:03:15	1.23
  @@ -95,9 +95,7 @@
   	m_prefixResolver(thePrefixResolver),
   	m_throwFoundIndex(false),
   	m_availableCachedNodeLists(),
  -	m_busyCachedNodeLists(),
  -	m_argVectorsStack(),
  -	m_argVectorsStackPosition(m_argVectorsStack.end())
  +	m_busyCachedNodeLists()
   {
   	m_availableCachedNodeLists.reserve(eMutableNodeRefListCacheMax);
   
  @@ -121,8 +119,6 @@
   	m_xobjectFactory.reset();
   
   	assert(m_busyCachedNodeLists.size() == 0);
  -	assert(m_argVectorsStackPosition == m_argVectorsStack.begin() ||
  -		   m_argVectorsStack.size() == 0);
   
   #if !defined(XALAN_NO_NAMESPACES)
   	using std::for_each;
  @@ -134,10 +130,6 @@
   		DeleteFunctor<MutableNodeRefList>());
   
   	m_availableCachedNodeLists.clear();
  -
  -	m_argVectorsStack.clear();
  -
  -	m_argVectorsStackPosition = m_argVectorsStack.end();
   }
   
   
  @@ -311,53 +303,6 @@
   			const XalanDOMString&	functionName) const
   {
   	return m_xpathEnvSupport.functionAvailable(theNamespace, functionName);
  -}
  -
  -
  -
  -XPathExecutionContextDefault::XObjectArgVectorType&
  -XPathExecutionContextDefault::pushArgVector()
  -{
  -	// m_argVectorsStackPosition always points one past
  -	// the current top of the stack.
  -	if (m_argVectorsStackPosition != m_argVectorsStack.end())
  -	{
  -		return *m_argVectorsStackPosition++;
  -	}
  -	else
  -	{
  -		m_argVectorsStack.push_back(XObjectArgVectorType());
  -
  -		m_argVectorsStackPosition = m_argVectorsStack.end();
  -
  -		XObjectArgVectorType&	theResult =
  -			m_argVectorsStack.back();
  -
  -		theResult.reserve(eCachedArgVectorDefaultSize);
  -
  -		return theResult;
  -	}
  -}
  -
  -
  -
  -void
  -XPathExecutionContextDefault::popArgVector()
  -{
  -	assert(m_argVectorsStackPosition != m_argVectorsStack.begin());	
  -
  -	if (m_argVectorsStack.size() > eArgVectorStackMax)
  -	{
  -		m_argVectorsStack.pop_back();
  -
  -		m_argVectorsStackPosition = m_argVectorsStack.end();
  -	}
  -	else
  -	{
  -		--m_argVectorsStackPosition;
  -
  -		(*m_argVectorsStackPosition).clear();
  -	}
   }
   
   
  
  
  
  1.23      +1 -14     xml-xalan/c/src/XPath/XPathExecutionContextDefault.hpp
  
  Index: XPathExecutionContextDefault.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExecutionContextDefault.hpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- XPathExecutionContextDefault.hpp	2000/11/02 01:46:01	1.22
  +++ XPathExecutionContextDefault.hpp	2000/11/08 17:03:19	1.23
  @@ -189,12 +189,6 @@
   			const XalanDOMString&	theNamespace, 
   			const XalanDOMString&	functionName) const;
   
  -	virtual XObjectArgVectorType&
  -	pushArgVector();
  -
  -	virtual void
  -	popArgVector();
  -
   	virtual const XObject*
   	extFunction(
   			const XalanDOMString&			theNamespace,
  @@ -320,18 +314,15 @@
   
   #if defined(XALAN_NO_NAMESPACES)
   	typedef vector<MutableNodeRefList*>			NodeRefListCacheType;
  -	typedef deque<XObjectArgVectorType>			XObjectArgVectorStackType;
   #else
   	typedef std::vector<MutableNodeRefList*>	NodeRefListCacheType;
  -	typedef std::deque<XObjectArgVectorType>	XObjectArgVectorStackType;
   #endif
   
  -	typedef XObjectArgVectorStackType::iterator		ArgVectorStackIteratorType;
   
  +
   protected:
   
   	enum { eMutableNodeRefListCacheMax = 50,
  -		   eArgVectorStackMax = 25,
   		   eCachedArgVectorDefaultSize = 10 };
   
   	XPathEnvSupport&				m_xpathEnvSupport;
  @@ -353,10 +344,6 @@
   	NodeRefListCacheType			m_availableCachedNodeLists;
   
   	NodeRefListCacheType			m_busyCachedNodeLists;
  -
  -	XObjectArgVectorStackType		m_argVectorsStack;
  -
  -	ArgVectorStackIteratorType		m_argVectorsStackPosition;
   
   	static const NodeRefList		s_dummyList;
   };