Java patch: Re: gcj producing bad code

Bryce McKinlay bryce@waitaki.otago.ac.nz
Sat Apr 6 19:34:00 GMT 2002


Per Bothner wrote:

> I suspect the problem is that the variable 'from_super' isn't
> being reset in resolve_qualified_expression_name.  Alex?

Right. resolve_qualified_expression_name iterates through each element 
in a WFL, setting the from_super flag if it sees a "super.". But in the 
case of a "super" qualified method call it forgets to clear the flag 
before it is done, so in the case of:

super.getX().getY()

the getY() is treated as if it were a "super" call also, and is emitted 
as a non-virtual call when it should not be.

The patch below fixes the problem. I'm testing it now. OK to commit 
assuming no problems?

regards

Bryce.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: java-fromsuper.patch
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20020406/ce73b52e/attachment.ksh>


More information about the Java-patches mailing list