japitools-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Fw: [Japi] stacktraces running japitools on harmony


From: Jeroen Frijters
Subject: RE: Fw: [Japi] stacktraces running japitools on harmony
Date: Thu, 16 Nov 2006 14:25:35 +0100

Stuart Ballard wrote:
> On 11/16/06, Jeroen Frijters <address@hidden> wrote:
> > The generic signature does not include the implicit first 
> parameter, so
> > it is indeed a Japi bug, because I assumed that the 
> Signature attribute
> > would always match with the real method signature. I guess 
> the easiest
> > fix would be to add the first parameter type from the real 
> signature, if
> > the real signature contains an additional element.
> 
> Ouch. So the generic signature actually contains what we really want,
> but the fix is to add in the implicit parameter just so we can find it
> to take it back out again later? Yuck.
> 
> The sad thing is I kinda agree with you that might be the way to go.
> Since not every class is going to *have* a generic signature, we can't
> just ignore the real signature and use the generic one.
> 
> The other alternative - which is nicer, but might be harder to
> implement - would be to move the code from getParameterTypes() into
> the place that parses the signature, and skip the extra parameter
> right there at the lowest level - but ONLY if you're using a real
> signature, not if you're using a generic one. The only reason I put it
> in getParameterTypes in the first place was that that's closer to the
> layer at which I understand the code ;)
> 
> What do you think?

It's funny how this demonstrates our two different worldviews :-)

To me (VM centric worldview), the real signature is correct, to you (JLS
centric worldview) the generic signature is the one that is correct.

When I wrote my respone I hadn't looked at the actual code yet, but now
that I have, I think that your alternative approach is easier to
implement. I've attached a patch that attempts to do this (untested).

Regards,
Jeroen

Attachment: ClassFile.java.patch
Description: ClassFile.java.patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]