On Sun, Mar 05, 2006 at 11:36:51AM -0700, Tom Tromey wrote: > I've been looking into 1.5 support a bit lately, and I think there are > a number of changes we will need to make to the VM layer. Some of > them look quite invasive :-(, but I thought I'd start with a > relatively simple one. > > 1.5 adds some new methods to the reflection classes, e.g., > isVarArgs(). These simply test a bit in the modifiers of the member, > but these new modifier bits (AIUI) should not be returned by > getModifiers(). > > Right now getModifiers() is native in our VM layer, e.g. from Method: > > public native int getModifiers(); > > I propose changing the name of the native method to > getModifiersInternal(), making it private, and having it return all > the bits that are given in the class file. > > Then we would rewrite getModifiers in Java. It would call > getModifiersInternal and strip the appropriate bits. > > Then new things such as isVarArgs or isSynthetic are also trivial to > write in terms of getModifiersInternal. > > This is a breaking change so would require some buy-in from VM > developers. Note however that as it is local to Method (and Field and > Constructor), and since VMs typically copy these in their entirety, it > probably would not result in actual breakage per se. Instead it would > require an update of the code in the VMs in order to make the new > feature available. > > Any comments? Sounds good. When mentioned in the NEWS file properly this change should be obvious for our consumers. Cheers, Michael -- Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html Join the community at http://planet.classpath.org/