ilene 2003/05/28 19:01:42
Modified: java/src/org/apache/xalan/templates StylesheetRoot.java
Log:
Activate redundant expression elimination!
Revision Changes Path
1.51 +11 -0
xml-xalan/java/src/org/apache/xalan/templates/StylesheetRoot.java
Index: StylesheetRoot.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/StylesheetRoot.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- StylesheetRoot.java 1 Apr 2003 20:16:27 -0000 1.50
+++ StylesheetRoot.java 29 May 2003 02:01:42 -0000 1.51
@@ -299,6 +299,17 @@
for (int i = recomposableElements.size() - 1; i >= 0; i--)
((ElemTemplateElement)
recomposableElements.elementAt(i)).recompose(this);
+
+ // This has to be done before the initialization of the compose state,
because
+ // eleminateRedundentGlobals will add variables to the m_variables
vector, which
+ // it then copied in the ComposeState constructor.
+ if(true && org.apache.xalan.processor.TransformerFactoryImpl.m_optimize)
+ {
+ RedundentExprEliminator ree = new RedundentExprEliminator();
+ callVisitors(ree);
+ ree.eleminateRedundentGlobals(this);
+ }
+
initComposeState();
// Need final composition of TemplateList. This adds the wild cards
onto the chains.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]