This is the mail archive of the java@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]

Re: gcj producing bad code


Per Bothner wrote:

> The getY() isn't a super invocation - it's the same as
>   (super.getX()).getY()
> or even:
>   X t = super.getX();
>   return t.getY();
>
> If we're emitting invokespecial to call getY, then I don't think
> the flaw in actually in the bytecode-generation, but more likely
> the front-end (resolve_qualified_expression_name in parse.y)
> incorrectly setting CALL_WITH_SUPER. 


Yes, there is definately a problem here. super.getX().getY() produces a 
different result to x = super.getX(); x.getY(). We need to fix this for 3.1.

regards

Bryce.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]