Eric,

I forgot about those generated Declartions.  It good to have an extra
pair of eyes to keep one honest.  Thanks.  :)

I have committed a fix for this and the last you reported.  Please see if
it works better now.  I have noticed that smap now contains lots of
overlaps, because of duplications in the unoptimized smap.  I'll leave
to you as an exercise to remove them in smap optimizations  :-)  Enough
smap for me for the time being.

-Kin-man

> Date: Sat, 20 Sep 2003 00:45:21 -0700
> From: Eric Carmichael <[EMAIL PROTECTED]>
> Subject: Re: cvs commit: 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler 
Generator.java
> X-Originating-IP: [64.203.49.21]
> To: Tomcat Developers List <[EMAIL PROTECTED]>
> X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> X-Priority: 3
> X-MSMail-priority: Normal
> X-Originating-Email: [EMAIL PROTECTED]
> X-OriginalArrivalTime: 20 Sep 2003 07:45:25.0789 (UTC) 
FILETIME=[2776FCD0:01C37F4B]
> 
> This SMAPs all declaration nodes, including the ones tacked on to the root 
node by ELFunctionMapper.java.  So for instance the SMAP for 
jsp2/el/functions.jsp from the jsp-examples webapp ends with
> 
> 43,6:120
> 1,3:10
> 1,5:13
> 
> thus SMAPping 
> 
>   <%@ taglib prefix="my" 
uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%>
> 
> to
> 
>   static private org.apache.jasper.runtime.ProtectedFunctionMapper 
_jspx_fnmap_0;
>   static private org.apache.jasper.runtime.ProtectedFunctionMapper 
_jspx_fnmap_1;
> 
> and
> 
>   static {
>     _jspx_fnmap_0= 
org.apache.jasper.runtime.ProtectedFunctionMapper.getMapForFunction("my:reverse"
, jsp2.examples.el.Functions.class, "reverse", new Class[] 
{java.lang.String.class});
>     _jspx_fnmap_1= 
org.apache.jasper.runtime.ProtectedFunctionMapper.getMapForFunction("my:countVow
els", jsp2.examples.el.Functions.class, "numVowels", new Class[] 
{java.lang.String.class});
>   }
> 
> which is clearly wrong.
> 
> Eric
> 
> ----- Original Message ----- 
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, September 19, 2003 4:38 PM
> Subject: cvs commit: 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler 
Generator.java
> 
> 
> > kinman      2003/09/19 16:38:09
> > 
> >   Modified:    jasper2/src/share/org/apache/jasper/compiler Generator.java
> >   Log:
> >   - Make sure scriptlet declarations get properly mapped.  This fixes 22833
> >   
> >   Revision  Changes    Path
> >   1.211     +7 -6      
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.jav
a
> >   
> >   Index: Generator.java
> >   ===================================================================
> >   RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Gen
erator.java,v
> >   retrieving revision 1.210
> >   retrieving revision 1.211
> >   diff -u -r1.210 -r1.211
> >   --- Generator.java 19 Sep 2003 18:30:09 -0000 1.210
> >   +++ Generator.java 19 Sep 2003 23:38:08 -0000 1.211
> >   @@ -196,9 +196,7 @@
> >                 */
> >                public void visit(Node.PageDirective n) throws 
JasperException {
> >    
> >   -                if (!getServletInfoGenerated) {
> >   -                    getServletInfoGenerated = true;
> >   -                } else {
> >   +                if (getServletInfoGenerated) {
> >                        return;
> >                    }
> >    
> >   @@ -206,6 +204,7 @@
> >                    if (info == null)
> >                        return;
> >    
> >   +                getServletInfoGenerated = true;
> >                    out.printil("public String getServletInfo() {");
> >                    out.pushIndent();
> >                    out.printin("return ");
> >   @@ -217,8 +216,10 @@
> >                }
> >    
> >                public void visit(Node.Declaration n) throws JasperException 
{
> >   +                n.setBeginJavaLine(out.getJavaLine());
> >                    out.printMultiLn(new String(n.getText()));
> >                    out.println();
> >   +                n.setEndJavaLine(out.getJavaLine());
> >                }
> >    
> >                // Custom Tags may contain declarations from tag plugins.
> >   
> >   
> >   
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to