This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: PR java/16927 [Was Re: PATCH for better assertion control.]
Tom Tromey writes:
> Andrew> Indeed. However, I'm pretty sure that patch_string does do the right
> Andrew> thing, and that calling it at this point solves the problem. But the
> Andrew> whole approach of patching tree nodes is fraught with problems.
>
> In the particular case of assert, I see the problem as being that the
> front end is generating trees for both analysis and code generation,
> so we wind up making "tricky" decisions like this in order to get the
> same structure past both of those passes. It would probably be
> cleaner to just introduce a new ASSERT_STMT tree for analysis, then
> lower that to something else (perhaps a nop if we aren't generating
> asserts) after analysis and before code generation.
Perhaps, but the analysis proceeds after the trees have been patched.
I suppose we could leave the lowering of ASSERT_STMT until
gimplification...
Andrew.