This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk 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: Patch: minor efficiency improvement in Host


Tom,
this works around a bug in gcj; it has been found to corrupt final parameters used in nested classes.


Andrew

Tom Tromey wrote:
Andrew got me cvs write access but I'm not comfortable simply
committing stuff yet.  I'd prefer to get "ok"s for things more
complicated than typo fixes.

This patch makes a couple anonymous classes from 'Host' slight more
efficient.  The compiler will already generate fields in an anonymous
class to capture 'final' variables from the method which are used in
the anonymous class body.

Having an explicit field is only needed if it will be modified in the
anonymous class.  Otherwise we're just duplicating things for no benefit.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* Host.java (requestRefreshXXX): Remove extra field from anonymous
	class.
	(requestCreateAttachedProc): Likewise.

Index: Host.java
===================================================================
RCS file: /cvs/frysk/frysk-core/frysk/proc/Host.java,v
retrieving revision 1.40
diff -u -r1.40 Host.java
--- Host.java 7 Sep 2006 23:59:05 -0000 1.40
+++ Host.java 8 Sep 2006 00:15:18 -0000
@@ -176,12 +176,11 @@
* refreshing the internal structure to match. Optionally refresh
* each processes task list.
*/
- public void requestRefreshXXX (final boolean refreshAllArg)
+ public void requestRefreshXXX (final boolean refreshAll)



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