corda/classpath/avian
Joel Dice 866c057f0d fix Class.getDeclaredMethods
getDeclaredMethods was returning methods which were inherited from
interfaces but not (re)declared in the class itself, due to the VM's
internal use of VMClass.methodTable differing from its role in
reflection.  For reflection, we must only include the declared
methods, not the inherited but un-redeclared ones.

Previously, we saved the original method table in
ClassAddendum.methodTable before creating a new one which contains
both declared and inherited methods.  That wasted space, so this patch
replaces ClassAddendum.methodTable with
ClassAddendum.declaredMethodCount, which specifies how many of the
methods in VMClass.methodTable were declared in that class.

Alternatively, we could ensure that undeclared methods always have
their VMMethod.class_ field set to the declaring class instead of the
inheriting class.  I tried this, but it led to subtle crashes in
interface method lookup.  The rest of the VM relies not only on
VMClass.methodTable containing all inherited interface methods but
also that those methods point to the inheriting class, not the
declaring class.  Changing those assumptions would be a much bigger
(and more dangerous in terms of regression potential) effort than I
care to take on right now.  The solution I chose is a bit ugly, but
it's safe.
2014-03-10 08:51:00 -06:00
..
avianvmresource update copyright years 2013-07-02 20:52:38 -06:00
file update copyright years 2013-07-02 20:52:38 -06:00
http update copyright years 2013-07-02 20:52:38 -06:00
jar add jdk-test target, and fix failures 2013-12-06 15:00:02 -07:00
Addendum.java update copyright years 2013-07-02 20:52:38 -06:00
AnnotationInvocationHandler.java Use the default value in annotations' proxies 2013-11-26 15:28:20 -06:00
Assembler.java add jdk-test target, and fix failures 2013-12-06 15:00:02 -07:00
Atomic.java add bare-bones ConcurrentLinkedQueue implementation 2011-09-29 18:26:50 -06:00
Callback.java update copyright years 2013-07-02 20:52:38 -06:00
CallbackReceiver.java update copyright years 2013-07-02 20:52:38 -06:00
Cell.java update copyright years 2013-07-02 20:52:38 -06:00
ClassAddendum.java fix Class.getDeclaredMethods 2014-03-10 08:51:00 -06:00
Classes.java fix Class.getDeclaredMethods 2014-03-10 08:51:00 -06:00
ConstantPool.java update copyright years 2013-07-02 20:52:38 -06:00
Continuations.java update copyright years 2013-07-02 20:52:38 -06:00
FieldAddendum.java update copyright years 2013-07-02 20:52:38 -06:00
IncompatibleContinuationException.java update copyright years 2013-07-02 20:52:38 -06:00
InnerClassReference.java Implement Class#getDeclaredClasses 2013-11-06 09:07:58 -06:00
Iso88591.java update copyright years 2013-07-02 20:52:38 -06:00
LegacyObjectInputStream.java Implement a rudimentary Java-compatible ObjectInputStream 2013-11-06 09:10:51 -06:00
LegacyObjectOutputStream.java Implement a Java-compatible ObjectOutputStream 2013-11-06 09:10:50 -06:00
Machine.java add jdk-test target, and fix failures 2013-12-06 15:00:02 -07:00
MethodAddendum.java update copyright years 2013-07-02 20:52:38 -06:00
PersistentSet.java modify TreeSet.MyIterator to support both ascending and descending iteration 2013-12-04 17:52:27 -07:00
Singleton.java update copyright years 2013-07-02 20:52:38 -06:00
Stream.java update copyright years 2013-07-02 20:52:38 -06:00
SystemClassLoader.java Teach SystemClassLoader#getResources to not stop at the first match 2013-11-04 16:49:34 -06:00
Traces.java add avian.trace.port property 2013-03-08 14:47:27 -07:00
Utf8.java update copyright years 2013-07-02 20:52:38 -06:00
VMClass.java fix Class.getDeclaredMethods 2014-03-10 08:51:00 -06:00
VMField.java update copyright years 2013-07-02 20:52:38 -06:00
VMMethod.java update copyright years 2013-07-02 20:52:38 -06:00