This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Stop java making non-canonical trees
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Tom Tromey <tromey at redhat dot com>, java-patches at gcc dot gnu dot org
- Date: Mon, 08 Aug 2005 15:54:47 +0100
- Subject: Re: Stop java making non-canonical trees
- References: <42F76D54.8080106@codesourcery.com> <17143.28788.294943.175829@zapata.pink>
Andrew Haley wrote:
> 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
>
> * class.c (build_class_ref): Wrap the primary class type in a
> NOP_EXPR.
> * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
> primary class type from the NOP_EXPR in which it was placed.
>
This looks okay, but I'm just hoping that there isn't any code that
relies on the type being there.
AFAICT java_complete_lhs is the only place that looks inside a COMPONENT_REF,
and as you can see, it rips it apart to create something else. I can't see how
any other bit of generic code could expect a _TYPE as operand 0, because that's
not what a PLUS_EXPR looks like for instance.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk