This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [JAVA] Avoid use of CHAR_TYPE tree codes.
Roger Sayle writes:
>
> On 27 Jan 2006, Tom Tromey wrote:
> > The last time removing CHAR_TYPE came up, Jim Wilson pointed out that
> > this affects debug information..
>
> Now that the handling of dwarf2 debug information for character types
> has been cleaned up in the middle-end, there's no longer a reason for
> the Java front-end to use CHAR_TYPE nodes, as the same information can
> be represented using TYPE_STRING_FLAG on INTEGER_TYPE nodes.
>
> The following patch is a repost of the original to eradicate the use
> of CHAR_TYPE from the Java front-end, updated to set and preserve
> TYPE_STRING_FLAG appropriately. For testing to show why this is
> safe see: http://gcc.gnu.org/ml/gcc-patches/2006-01/msg01974.html
>
> Tested on x86_64-unknown-linux-gnu with a full "make bootstrap",
> including java, and regression tested with a top-level "make -k check"
> with no new failures.
>
> Ok for mainline?
>
>
>
> 2006-02-04 Roger Sayle <roger@eyesopen.com>
>
> * decl.c (java_init_decl_processing): Create char_type_node as a
> regular INTEGER_TYPE node.
> (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
> * typeck.c (convert): No longer check for CHAR_TYPEs but instead
> test for char_type_node and promoted_char_type_node as special
> instances of INTEGER_TYPE tree codes.
> (promote_type,build_java_signature): Likewise.
> * jcf-write.c (adjust_typed_op): Likewise.
> * mangle.c (mangle_type): Likewise.
> * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
> * parse.h (JINTEGRAL_TYPE_P): Likewise.
Yes, thanks. This change is quite delicate becasue it affects the
mangling, but AFAICS you've do the right thing.
Andrew.