Hi,

After checking a few things here and there it appears that we are too strict. The VM must only rely on access flags of the class to check the accessibility. The inner class flags are used by the other compiler and the reflections. So we may remove everything related to inner/nested classes in access.c and take care of returning the right flags to the java library.

I have checked:
* gnu/testlet/java/lang/Class/newInstance and it works like the JDK
* our regression tests (these two had to be updated because they were also not working on the JDK)
* the test http://www.kaffe.org/pipermail/kaffe/2003-November/096187.html
* my own test
* eclipse.

Regards,

Guilhem.

Kaffe CVS wrote:

PatchSet 7032 Date: 2005/12/22 17:51:17
Author: guilhem
Branch: HEAD
Tag: (none) Log:
More (and hopefully final) fixes for access.

       * kaffe/kaffevm/access.c
       (checkAccess): Simplified to the maximum according to Sun's VM
       spec we must not check for specific inner classes flags.

       * kaffe/kaffevm/classMethod.c
       (addInnerClasses): Do not merge inner class access flags with the
       class flags.

       * libraries/clib/native/Class.c
       (java_lang_VMClass_getModifiers): Return the right access flags
       depending on what we are asked and whether the class is nested.

       * test/regression/TestSerialFields.java,
       test/regression/TestSerialVersions.java: Removed private modifier
       to be able to run the tests (as for JDK).

Members: ChangeLog:1.4551->1.4552 kaffe/kaffevm/access.c:1.15->1.16 kaffe/kaffevm/classMethod.c:1.149->1.150 libraries/clib/native/Class.c:1.86->1.87 test/regression/TestSerialFields.java:1.3->1.4 test/regression/TestSerialVersions.java:1.3->1.4


_______________________________________________
kaffe mailing list
[email protected]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to