This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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] | |
Hi, On Thu, 2004-05-20 at 16:35, Bryce McKinlay wrote: > Mark Wielaard wrote: > > >The following patch adds explicit initialization of interface classes to > >Method.invoke() and also does the test whether the declaringClass is an > >interface only when the method involved isn't a static method since > >interfaces cannot contain static methods. > > If other implementations initialize interfaces during Method.invoke(), > which apparently from our discussions on IRC, they do, then we should do > the same for compatibility - so your patch is fine. However, an > interface should not have to be initialized in order to call > Method.invoke() on it, assuming the method being invoked is not static. This is the behavior of kaffe. But it seems your reading of the spec is correct. My new mauve test seems to strict (also in the other direction, it seems the VM spec actually allows initializing an interface as soon as a object that implements the interface is created, but it does not need to). I'll relax my mauve test. > So, I think the real bug here is that we layout the interface methods at > the wrong time, ie during initialization when it should be done during > linking/preparation. So, I suggest the following patch (untested): If that works then I think that is better then my patch. Maybe only keep the part of the patch that moves the isInterface() and iface assignment into the else branch of the Modifier::isStatic() (as micro optimization). Cheers, Mark
Attachment:
signature.asc
Description: This is a digitally signed message part
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |