tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler SmapStratum.java
Date Tue, 12 Aug 2003 16:19:52 GMT
remm        2003/08/12 09:19:52

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        SmapStratum.java
  Log:
  - Don't merge SMAP entries in the outptStartLines aren't consecutive
    (note: the input numbers are still incorrect, for example when using a tag
    invocation and it has been extracted out of the main _jspService).
  
  Revision  Changes    Path
  1.8       +7 -5      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/SmapStratum.java
  
  Index: SmapStratum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/SmapStratum.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SmapStratum.java	10 Aug 2003 08:35:39 -0000	1.7
  +++ SmapStratum.java	12 Aug 2003 16:19:52 -0000	1.8
  @@ -208,7 +208,7 @@
        * Combines consecutive LineInfos wherever possible
        */
       public void optimizeLineSection() {
  -        
  +
           //Incorporate each LineInfo into the previous LineInfo's 
           //outputLineIncrement, if possible
           int i=0;
  @@ -216,15 +216,17 @@
               LineInfo li = (LineInfo)lineData.get(i);
               LineInfo liNext = (LineInfo)lineData.get(i+1);
               if (liNext.inputStartLine == li.inputStartLine
  -             && liNext.inputLineCount==1
  -              && li.inputLineCount==1) {
  -                li.setOutputLineIncrement(liNext.outputStartLine - li.outputStartLine +
liNext.outputLineIncrement);
  +                && liNext.inputLineCount==1
  +                && li.inputLineCount==1
  +                && liNext.outputStartLine == li.outputStartLine + li.inputLineCount*li.outputLineIncrement)
{
  +                li.setOutputLineIncrement
  +                    (liNext.outputStartLine - li.outputStartLine + liNext.outputLineIncrement);
                   lineData.remove(i+1);
               } else {
                   i++; 
               }
           }
  -        
  +
           //Incorporate each LineInfo into the previous LineInfo's
           //inputLineCount, if possible
           i=0;
  
  
  

Mime
View raw message