Re: [cp-patches] [PATCH] Fix raw type references in AnnotationInvocationHandler

2011-10-12 Thread Ian Rogers
On 12 October 2011 03:52, Mark Wielaard wrote: > On Wed, 2011-10-12 at 10:29 +0300, Pekka Enberg wrote: >> On Wed, Oct 12, 2011 at 1:28 AM, Dr Andrew John Hughes >> wrote: >> > If we're going to change that, it should happen after the next release >> > and with plenty of discussion / heads up for

Re: [cp-patches] FYI: Add VM updates in 0.98

2009-02-09 Thread Ian Rogers
Hi, I've attached a revision for the reflection classes that is applied to Jikes RVM and has been updated for 0.98. This patch removes the messy backlink mechanism in reflection and better supports eliminating reflection overhead in Jikes RVM. Due to the problems it would cause to VMs thought is n

Re: [cp-patches] FYI: ThreadLocal optimisation

2008-09-12 Thread Ian Rogers
Andrew Haley wrote: Andrew John Hughes wrote: Daniel's copyright assignment is finally through, so I'm committing this patch which optimises the use of ThreadLocals by replacing the use of the generic java.util.WeakHashMap with a ThreadLocal-specific implementation. It's slightly weird

[cp-patches] RFC: Try to reduce char[] copying in jlr.Proxy

2008-08-29 Thread Ian Rogers
Hi, the attached patch is trying to continue Andrew's good work and reduce the amount of redundant array copying, in this case in jlr.Proxy. There is a TODO in that we have no back door to turn a char[] in to a String without copying. Thanks, Ian Index: java/lang/reflect/Proxy.java =

[cp-patches] RFC: Avoid back references in java.lang.reflect VMXXX classes

2008-08-18 Thread Ian Rogers
This patch is part of Jikes RVM JIRA issue 443: http://jira.codehaus.org/browse/RVM-443 committed here: http://jikesrvm.svn.sourceforge.net/viewvc/jikesrvm?view=rev&revision=14905 The patch avoids back references in java.lang.reflect.VM* classes and instead passes the parent object as a param

Re: [cp-patches] [rvm-core] State of Jikes RVM patches waiting to go into Classpath

2008-08-18 Thread Ian Rogers
Andrew John Hughes wrote: On 18/08/2008, Ian Rogers <[EMAIL PROTECTED]> wrote: Thanks Andrew, Andrew John Hughes wrote: On 18/08/2008, Ian Rogers <[EMAIL PROTECTED]> wrote: Hi, currently there are 3 patches waiting to go into GNU Classpath fro

[cp-patches] RFC: AIX build fix - paths too long in check_jni.sh

2008-08-18 Thread Ian Rogers
Dave Grove fixed an AIX build issue for the Jikes RVM with the attached patch. Jikes RVM tracker here: http://jira.codehaus.org/browse/RVM-526 Regards, Ian Rogers Index: scripts/check_jni_methods.sh.in === RCS file: /sources

Re: [cp-patches] [rvm-core] State of Jikes RVM patches waiting to go into Classpath

2008-08-18 Thread Ian Rogers
Thanks Andrew, Andrew John Hughes wrote: On 18/08/2008, Ian Rogers <[EMAIL PROTECTED]> wrote: Hi, currently there are 3 patches waiting to go into GNU Classpath from Jikes RVM: Note that 0.98 is very imminent i.e. I'd like it to be released this week and most of it

[cp-patches] State of Jikes RVM patches waiting to go into Classpath

2008-08-18 Thread Ian Rogers
someone chase up the paper work? Thanks, Ian Rogers

Re: [cp-patches] RFC: changes to java.lang.Integer, Long...

2008-06-03 Thread Ian Rogers
Andrew Haley wrote: Ian Rogers wrote: please give your comments on the attached patch. It tries to reduce the size of char[] for strings used to hold numbers. It changes Float/Double equals to use bit based comparisons rather than division. It increases the use of valueOf methods. It adds a

[cp-patches] RFC: Change to ArrayList.ensureCapacity

2008-05-27 Thread Ian Rogers
This patch changes the array list size increase to ~50% rather than doubling in line with what OpenJDK does. OpenJDK still doubles the size of vectors, as that's documented behavior. Feedback appreciated, Ian -- http://www.cs.man.ac.uk/~irogers/ --- components/classpath/97.1p6/classpath/java/ut

Re: [cp-patches] RFC: Move exception handling out of common case: java.util.Vector/ArrayList

2008-04-26 Thread Ian Rogers
patch applied. Ian -- Third International Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (ICOOOLPS 2008) July 7, Paphos (Cyprus) http://icoolps.loria.fr /

Re: [cp-patches] RFC: Move exception handling out of common case: java.util.Vector/ArrayList

2008-04-25 Thread Ian Rogers
Andrew John Hughes wrote: Looks okay, overlooking the obvious formatting issues. Is there an overhead to the method call or would most VMs inline this? So, most code shouldn't access an element beyond the length of the Vector or ArrayList - so the exception handling code will never normally

[cp-patches] RFC: Move exception handling out of common case: java.util.Vector/ArrayList

2008-04-25 Thread Ian Rogers
Hi, the attached patch moves exception handling code out of the common case for elementAt of both java.util.Vector and java.util.elementAt, this helps JIT compilation inline the common non-exception throwing case (and avoid expense incurred by considering StringBuilders, etc.). Other than fix

[cp-patches] Re: RFC: changes to java.nio buffers

2008-04-18 Thread Ian Rogers
Committed. 2008-04-18 Ian Rogers <[EMAIL PROTECTED]> * java/nio/Buffer.java (cap): make field private and final. (address): make field final. (Buffer): add address argument to package protected constructor t

Re: [cp-patches] RFC: changes to java.lang.Integer, Long...

2008-04-18 Thread Ian Rogers
Committed. 2008-04-18 Ian Rogers <[EMAIL PROTECTED]> * java/lang/Byte.java (static): initialize byteCache. (valueOf(String,int)): use valueOf(byte) rather than new. (valueOf(String)): likewise. (valueOf(byte)): Switch from lazy initialization of cached val

Re: [cp-patches] RFC: changes to java.lang.Integer, Long...

2008-04-14 Thread Ian Rogers
David Daney wrote: Ian Rogers wrote: Hi, please give your comments on the attached patch. It tries to reduce the size of char[] for strings used to hold numbers. It changes Float/Double equals to use bit based comparisons rather than division. It increases the use of valueOf methods. It

[cp-patches] RFC: changes to java.lang.Integer, Long...

2008-04-14 Thread Ian Rogers
-r1.9572 ChangeLog --- ChangeLog 9 Apr 2008 20:23:11 - 1.9572 +++ ChangeLog 14 Apr 2008 13:54:25 - @@ -1,3 +1,50 @@ +2008-04-14 Ian Rogers <[EMAIL PROTECTED]> + + * java/lang/Byte.java (static): initialize byteCache. + (valueOf(String,int)): use valueOf(byte) rathe

Re: [cp-patches] RFC: File bug Fix and small VM interface change

2008-04-09 Thread Ian Rogers
Hi Mario, this looks like a good patch so +1 from me. Just to note that we've been discussing the VMFile interface in a Jikes RVM tracker [1] and that on IRC MJW pointed out that GCJ's implementation appeared to vary from that of Classpath [2] [3] [4]. Regards, Ian [1] http://jira.codehaus.

[cp-patches] RFC: changes to java.nio buffers

2008-04-08 Thread Ian Rogers
Hi, the attached patch makes more fields in java.nio final, restructuring constructors to enable this. This simplifies the code sufficiently that it aids the Jikes RVM's escape analysis so that it can remove memory allocations associated with buffers in certain key areas. When some fields cou

Re: [cp-patches] RFC: Double.doubleToLongBits simplified

2008-02-08 Thread Ian Rogers
Dalibor Topic wrote: Hi all, I've implemented doubleToLongBits without requring a VMDouble method of the same name. It would let us remove one method from the VM interface for the next version, and the corresoponding native code. OK to commit? (I'd do the equivalent patch for Float, too). *

Re: [cp-patches] RFC: tweaks to java.util.zip.ZipEntry

2008-02-07 Thread Ian Rogers
Mark Wielaard wrote: On Tue, 2008-02-05 at 06:07 -0700, Tom Tromey wrote: "Ian" == Ian Rogers <[EMAIL PROTECTED]> writes: Ian> the attached patch stops the lazy initialization of a Calendar object Ian> in ZipEntry and instead uses a static final one.

Re: [cp-patches] RFC: use helper method to clone char array in java.lang.String

2008-02-07 Thread Ian Rogers
Tom Tromey wrote: "Ian" == Ian Rogers <[EMAIL PROTECTED]> writes: Ian> Please let me know if you think this patch is suitable for Ian> inclusion. It looks fine. I do have one nit, which is that we put spaces around operators... this problem is pervasive in

[cp-patches] FYI: changes of StringBuffer to StringBuilder, new Number(x) to Number.valueOf(x), add final to a few private fields and avoid creating Integer objects for the sake of comparison

2008-02-06 Thread Ian Rogers
Apologies this was committed yesterday and I should have posted the patch here earlier. Ian CVSROOT:/sources/classpath Module name:classpath Changes by: Ian Rogers 08/02/05 14:59:06 Modified files: gnu/java/lang/reflect: TypeSignature.java java/io

[cp-patches] RFC: tweaks to java.util.zip.ZipEntry

2008-02-05 Thread Ian Rogers
Hi, the attached patch stops the lazy initialization of a Calendar object in ZipEntry and instead uses a static final one. It also modifies the clone method to instead of using Object.clone to use the ZipEntry's own copy constructor. This patch has implications to bootstrapping and subtly cha

Re: [cp-patches] RFC: use helper method to clone char array in java.lang.String

2008-02-05 Thread Ian Rogers
Hello all, here's a revised patch that removes the use of clone in preference to just array copying the "live" portion of the String. Here are the DaCapo xalan figures: run 1: 97972ms run 2: 97837ms run 3: 95290ms which represents anything from a 0.04% slow down to a 2.8% speed up. There wi

Re: [cp-patches] RFC: use helper method to clone char array in java.lang.String

2008-02-05 Thread Ian Rogers
Robert Lougher wrote: Hi, On 2/4/08, Ian Rogers <[EMAIL PROTECTED]> wrote: Hi, xalan performs 1.4 million char array clones per iteration of the normal size DaCapo benchmark. All of the character array clones are coming from java.lang.String. The attached patch changes the use o

[cp-patches] RFC: use helper method to clone char array in java.lang.String

2008-02-04 Thread Ian Rogers
Hi, xalan performs 1.4 million char array clones per iteration of the normal size DaCapo benchmark. All of the character array clones are coming from java.lang.String. The attached patch changes the use of char[].clone (which maps to java.lang.Object.clone) to a helper method that allocates t

Re: [cp-patches] Fix for GTk peers with Classpath 0.96.1

2007-11-23 Thread Ian Rogers
Committed. Ian Rogers wrote: Hi, attached is a patch required to make JNI GTk peers work on 32bit architectures. Regards, Ian

Re: [cp-patches] Patch to gnu.java.nio.charset

2007-11-23 Thread Ian Rogers
Committed. Ian Rogers wrote: Hi, the attached patch adds efficient support for array encoding/decoding character sets to all ByteCharsets, US_ASCII and ISO_8859_1. It does this by using 2 package private helper classes. The patch also makes fields and classes that can be final, final. The

Re: [cp-patches] Streamline String.toUpper/LowerCase

2007-11-23 Thread Ian Rogers
Committed. Ian Rogers wrote: Hi, the attached patch separates out the special case of making a string upper and lower case for the Turkish Locale. As Locale's language should be interned, the "tr".equals test is replaced with "tr" ==. Thanks, Ian

Re: [cp-patches] Make fields that aren't final, final

2007-11-23 Thread Ian Rogers
committed. Ian Rogers wrote: Hi, the attached patch makes a few fields that could be final, final. Thanks, Ian

[cp-patches] FYI: java.lang.Long remove unnecessary synchronized

2007-11-23 Thread Ian Rogers
Hi, Committed. Regards, Ian Index: Long.java === RCS file: /cvsroot/classpath/classpath/java/lang/Long.java,v retrieving revision 1.24 diff -u -r1.24 Long.java --- Long.java 10 Dec 2006 20:25:44 - 1.24 +++ Long.java 23

[cp-patches] Streamline String.toUpper/LowerCase

2007-10-20 Thread Ian Rogers
Hi, the attached patch separates out the special case of making a string upper and lower case for the Turkish Locale. As Locale's language should be interned, the "tr".equals test is replaced with "tr" ==. Thanks, Ian Index: java/lang/String.java ==

[cp-patches] Make fields that aren't final, final

2007-10-20 Thread Ian Rogers
Hi, the attached patch makes a few fields that could be final, final. Thanks, Ian Index: java/io/FileOutputStream.java === RCS file: /sources/classpath/classpath/java/io/FileOutputStream.java,v retrieving revision 1.38 diff -u -r1.3

[cp-patches] Greater use of ".valueOf" rather than "new "

2007-10-20 Thread Ian Rogers
Hi, the attached patch increases the use of ".valueOf " rather than "new ". Thanks, Ian Index: java/beans/PropertyChangeSupport.java === RCS file: /sources/classpath/classpath/java/beans/PropertyChangeSupport.java,v retrieving rev

[cp-patches] Greater use of StringBuilder rather than StringBuffer

2007-10-20 Thread Ian Rogers
Hi, the attached patch increases the use of StringBuilder in Classpath rather than StringBuffer. Thanks, Ian Index: gnu/java/lang/reflect/TypeSignature.java === RCS file: /sources/classpath/classpath/gnu/java/lang/reflect/TypeSig

[cp-patches] Patch to java.io.OutputStreamWriter

2007-10-19 Thread Ian Rogers
Hi, the attached patch makes fields of OutputStreamWriter that can be final, final. Thanks, Ian --- java/io/OutputStreamWriter.java 2007-10-12 13:01:47.0 +0100 +++ java/io/OutputStreamWriter.java 2007-10-19 15:46:37.0 +0100 @@ -91,17 +91,17 @@ /** * The charset e

[cp-patches] Fix for GTk peers with Classpath 0.96.1

2007-10-17 Thread Ian Rogers
Hi, attached is a patch required to make JNI GTk peers work on 32bit architectures. Regards, Ian --- native/jni/gtk-peer/gtkpeer.c 2007-05-08 01:00:54.0 +0100 +++ native/jni/gtk-peer/gtkpeer.c 2007-10-17 10:49:25.0 +0100 @@ -102,11 +102,13 @@ #else #if SIZEOF_VOID

[cp-patches] Fix for GTk peers and portable native sync

2007-09-27 Thread Ian Rogers
Hi, this patch removes a call to atexit from GtkToolkit. The comment didn't give sufficient detail as to why the atexit call was necessary and the failure I witnessed in the Jikes RVM was as follows: 1) VM runs some AWT code that causes the atexit routine in GtkToolkit to be registered 2) V

Re: [Jikesrvm-core] [cp-patches] Changes to ThreadLocal

2007-08-23 Thread Ian Rogers
Hi, here is a revision of Daniel's patch, from Daniel, that revises a bug with InheritableThreadLocals not calling childValue. This bug was found through the JSR 166 TCK, which now passes its thread local tests. Thanks, Ian Daniel Frampton wrote: In order to tease out where the performance

Re: [cp-patches] Changes to ThreadLocal

2007-08-22 Thread Ian Rogers
Jeroen Frijters wrote: No, any VM that implements the spec is vulnerable. Here's an example of a possible attack: class Attacker { static ArrayList resurrected; ArrayList list = new ArrayList(); Attacker() { for (int i = 0; i < 1000; i++) { list.add(new ThreadLocal());

Re: [cp-patches] Changes to ThreadLocal

2007-08-21 Thread Ian Rogers
Ian Rogers wrote: Jeroen Frijters wrote: This is not true. Once an object becomes "finalizer reachable" the finalizer can run, but that doesn't mean all references are gone. Any object with a finalizer can still have references to objects that have already been finalized. In i

Re: [cp-patches] Changes to ThreadLocal

2007-08-21 Thread Ian Rogers
al whose value is inherited by child Threads. The value of the @@ -56,12 +56,22 @@ * @author Eric Blake ([EMAIL PROTECTED]) * @author Tom Tromey ([EMAIL PROTECTED]) * @author Andrew John Hughes ([EMAIL PROTECTED]) + * @author Ian Rogers ([EMAIL PROTECTED]) * @see ThreadLocal * @since

Re: [cp-patches] Changes to ThreadLocal

2007-08-21 Thread Ian Rogers
Jeroen Frijters wrote: Ian Rogers wrote: here is the revised patch. + int arraySize = group.activeCount(); + Thread[] threadList = new Thread[arraySize]; + int filled = group.enumerate(threadList); + while (filled == arraySize) + { +arraySize *= 2

Re: [cp-patches] Changes to ThreadLocal

2007-08-21 Thread Ian Rogers
Andrew Haley wrote: Ian Rogers writes: > Jeroen Frijters wrote: > > Ian Rogers wrote: > > > >> the attached patch modifies ThreadLocal to use an array of Objects hung > >> off Thread rather than a weak hash map hung off Thread. On DaCapo's >

Re: [cp-patches] Changes to ThreadLocal

2007-08-21 Thread Ian Rogers
Jeroen Frijters wrote: Ian Rogers wrote: the attached patch modifies ThreadLocal to use an array of Objects hung off Thread rather than a weak hash map hung off Thread. On DaCapo's Jython benchmark this can improve the performance of the Jikes RVM by more than 10%. It also improves

[cp-patches] Changes to ThreadLocal

2007-08-20 Thread Ian Rogers
EMAIL PROTECTED]) * @author Tom Tromey ([EMAIL PROTECTED]) * @author Andrew John Hughes ([EMAIL PROTECTED]) + * @author Ian Rogers ([EMAIL PROTECTED]) * @see ThreadLocal * @since 1.2 * @status updated to 1.4 @@ -93,29 +92,28 @@ * @param childThread the newly created thread, to inherit

Re: [cp-patches] Float/Double compare

2007-07-03 Thread Ian Rogers
Here's a revised version of the patch following suggestions from Andrew Haley. Ian --- java/lang/Float.java2006-12-10 15:25:44.0 -0500 +++ java/lang/Float.java2007-07-02 12:17:29.0 -0400 @@ -596,16 +596,25 @@ */ public static int compare(float x, float y)

Re: [cp-patches] Float/Double compare

2007-06-30 Thread Ian Rogers
Andrew Pinski wrote: On 6/30/07, Ian Rogers <[EMAIL PROTECTED]> wrote: Attached is a patch that improves the performance of an Float/Double compare by exploiting information carried in their bit integer/long versions sign bit. It removes one comparison from the normal path, as well as

[cp-patches] Float/Double compare

2007-06-30 Thread Ian Rogers
Attached is a patch that improves the performance of an Float/Double compare by exploiting information carried in their bit integer/long versions sign bit. It removes one comparison from the normal path, as well as making other compares with ints/longs. When sorting an array of floats this can

[cp-patches] Problem in native/jni/classpath/jcl.c

2006-09-27 Thread Ian Rogers
There's a bug in the Classpath CVS head that's crashing the Jikes RVM (thanks to Mark for helping me to find it). It's in jcl.c where we delete a global ref which is actually only a local ref. The following fixes it. Thanks, Ian Rogers Index: native/jni/

Re: [cp-patches] Revise threading description in vmintegration.texinfo

2006-08-19 Thread Ian Rogers
Hi, I'm resending this updated patch with a hope that someone will commit it now that I've got all the FSF paper work through. Thanks, Ian Rogers Ian Rogers wrote: > Hi, > > this patch revises the discussion of threading in the VM integration > guide, as well as fixing a

[cp-patches] Revise threading description in vmintegration.texinfo

2006-04-19 Thread Ian Rogers
e on this subject, although maybe my description of the problems is a little verbose. Regards, Ian Rogers -- http://www.cs.man.ac.uk/~irogers Index: vmintegration.texinfo === RCS file: /sources/classpath/classpath/doc/vmintegration

Re: [cp-patches] Patch: Reduce number of compilation warnings

2006-04-13 Thread Ian Rogers
Hi Audrius, Wouldn't it be better to regenerate the sources rather than manually remove the $ signs? I don't know how the RMI compiler generated the sources. I'm happy to modify the files by hand otherwise. Thanks! Ian Audrius Meskauskas wrote: >any idea on how to stop the $ symbols being g

Re: [cp-patches] Patch: Reduce number of compilation warnings

2006-04-13 Thread Ian Rogers
Thanks Tom, I thought I'd fix all the warnings and wait for people to complain. I agree with what you say and I've attached a fixed patch for just MD4 and MD5, any idea on how to stop the $ symbols being generated by rmic? They are on private fields so altering the names shouldn't matter. Ia

[cp-patches] Patch: Reduce number of compilation warnings

2006-04-13 Thread Ian Rogers
by rmic, and I couldn't see in rmic where the $ signs were creeping in :-( The patch is just a suggestion, but it cleans up watching a build for me, which could potentially help spot new bugs in the future. Regards, Ian Rogers -- http://www.cs.man.ac.uk/~irogers Index: ext

Re: [cp-patches] RFC: gnu.java.math.MPN "optimizations"

2006-03-23 Thread Ian Rogers
. Interest welcomed. Many thanks, Ian Rogers -- http://www.cs.man.ac.uk/~irogers/

[cp-patches] RFC: gnu.java.math.MPN "optimizations"

2006-03-22 Thread Ian Rogers
just does an unsigned integer compare on the two registers. In any case the revised code has fewer long/int operations, I believe. I've also not tested the code, so I'm really just putting it here to generate discussion. Thanks, Ian Rogers -- http://www.cs.man.ac.uk/~irogers --- MP