This is the mail archive of the java-patches@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: [PATCH] New predicate covering NOP_EXPR and CONVERT_EXPR


On Thu, 1 Dec 2005, Roger Sayle wrote:

> The only thing preventing this unification, at that time, was the
> Java front-end which inadvertantly distinguishes between CONVERT_EXPR
> and via parse.y:patch_cast.  It turns out that in the Java front-end

I remain of the view, as I stated in 
<http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01326.html>, that an audit 
of every use of NOP_EXPR and CONVERT_EXPR is needed to identify all places 
where they are distinguished and replace them by a check of the real 
property being distinguished.  Are you saying that you did that audit (and 
have a means to update it to current mainline without redoing it) and only 
found that one place?  If so, I think more details of it are needed, given 
the comment I pointed out referring to "Proper functioning of many things 
assumes ...".

I think NOP_CONVERSION_P (and something similar for case labels) is the 
right way to go for an incremental conversion.  That way we don't need to 
rely on an audit not having missed any cases and not getting out of date, 
instead each part of the audit is represented by a separately reviewed 
patch adding uses of NOP_CONVERSION_P and, where appropriate, checks of 
other conditions, and when the only references distinguishing NOP_EXPR 
from CONVERT_EXPR are creations of those nodes rather than distinguishing 
what's used by an existing tree node, they can be merged.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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