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: Code generation problem?


Dominique Boucher wrote:
What do you think? What is the rationale about that optimization?

[I’m using an old version of Kawa (pre 1.8), so this problem may have been
fixed by now. I just wanted to know your opinion on all this.]

I checked in a fix for this. The fix is to move the non-capturing function "out" so it uses the module class's frame.

I don't know if that will help you if you're using an old version.
You can try my patch, but it might not apply cleanly.  Alternatively,
you can try you this patch to "disable" the optimizaton, courtesy
of Dead Ferreyra of Merced Systems.


Index: gnu/expr/LambdaExp.java =================================================================== RCS file: /usr/local/cvsroot/kawa/src/gnu/expr/LambdaExp.java,v retrieving revision 1.1.2.17 diff -u -r1.1.2.17 LambdaExp.java --- gnu/expr/LambdaExp.java 10 Mar 2006 00:11:10 -0000 1.1.2.17 +++ gnu/expr/LambdaExp.java 17 Aug 2007 19:44:41 -0000 @@ -569,7 +569,7 @@ else { fname = fname + "$Fn" + ++comp.localFieldIndex; - if (! getNeedsClosureEnv()) + if (! getNeedsClosureEnv() && comp.curLambda.heapFrame == null) fflags = (fflags | Access.STATIC) & ~Access.FINAL; } ClassType frameType = getOwningLambda().getHeapFrameType(); -- --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]