This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: KawaPageServlet save class problem.


I am trying to use this for debugging.  I am trying to see the constant
strings produced by the compilation process.  Can you suggest an
existing function for this?

Dan Stanger
Eaton Vance Management
Two International Place 
Boston, MA 02110
Mobile: 617 646 9682
Office: 617 672 8261
-----Original Message-----
From: Per Bothner [mailto:per@bothner.com] 
Sent: Tuesday, September 29, 2009 5:56 PM
To: Dan Stanger
Cc: kawa@sources.redhat.com
Subject: Re: KawaPageServlet save class problem.

On 09/29/2009 01:27 PM, Dan Stanger wrote:
> If saveClass is set, the code at line 202:
>      if (saveClass)
>        comp.outputClass(context.getRealPath("WEB-INF/classes")+'/');
> throws a null pointer exception.  I think this is because the array
> classes is null in cleanupAfterCompilation, which is called by
> evalModule1 at line 183.  Can this problem be corrected by moving the
> outputClass before this, or is there some class processing that
> evalModule1 does which would prevent this.

You need to call wait with outputClass until after loadByStages,
which is called in evalClass.  And evalToClass could be called
multiple times, when there are dependent modules (as a brl-init
file).  So it could be a little tricky to cleanly and safely
untangle this all.

Another minor complication is that outputClass calls
cleanupAfterCompilation.

The simplest "fix" for now is just remove/ignore the saveClass
functionality.  I don't think it's much use anymore - I'm not
sure it adds any performance benefit, so it's mainly useful
for debugging, and people may be mislead thinking it has any
other benefit.  (Of course we could work out a mechanism
so saved classes could speed up future loading; there are
some hooks for that, but they may need cleanup and testing.)

Another alternative is write the classes from the
ArrayClassLoader, though that is more work.

I suggest setting this issue aside for now, though it needs to be
resolved before we "release" the new BRL.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]