You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sa...@apache.org on 2002/05/11 16:22:49 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Text.java

santiagopg    02/05/11 07:22:49

  Modified:    java/src/org/apache/xalan/xsltc/compiler Text.java
  Log:
  Optimized calls to setEscaping().
  
  Revision  Changes    Path
  1.10      +8 -11     xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Text.java
  
  Index: Text.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Text.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Text.java	1 Feb 2002 20:07:09 -0000	1.9
  +++ Text.java	11 May 2002 14:22:49 -0000	1.10
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Text.java,v 1.9 2002/02/01 20:07:09 tmiller Exp $
  + * @(#)$Id: Text.java,v 1.10 2002/05/11 14:22:49 santiagopg Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -162,12 +162,7 @@
   	    // Turn off character escaping if so is wanted.
   	    final int esc = cpg.addInterfaceMethodref(OUTPUT_HANDLER,
   						      "setEscaping", "(Z)Z");
  -	    // set escaping value in output handler 
  -	    if (_escaping) {
  -		il.append(methodGen.loadHandler());
  -		il.append(new PUSH(cpg,true));
  -		il.append(new INVOKEINTERFACE(esc, 2));
  -	    } else {
  +	    if (!_escaping) {
   		il.append(methodGen.loadHandler());
   		il.append(new PUSH(cpg, false));
   		il.append(new INVOKEINTERFACE(esc, 2));
  @@ -187,10 +182,12 @@
   
   	    // Restore character escaping setting to whatever it was.
   	    // Note: setEscaping(bool) returns the original (old) value
  -	    il.append(methodGen.loadHandler());
  -	    il.append(SWAP);
  -	    il.append(new INVOKEINTERFACE(esc, 2));
  -	    il.append(POP);
  +	    if (!_escaping) {
  +		il.append(methodGen.loadHandler());
  +		il.append(SWAP);
  +		il.append(new INVOKEINTERFACE(esc, 2));
  +		il.append(POP);
  +	    }
   	}
   	translateContents(classGen, methodGen);
       }
  
  
  

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