This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Representing EH in GENERIC


On Wed, 27 Nov 2002 11:55:46 -0800, Richard Henderson <rth@redhat.com> wrote:

> On Wed, Nov 27, 2002 at 02:27:52PM -0500, Jason Merrill wrote:
>> It probably makes sense to always represent an EH region with a
>> TRY_CATCH_EXPR, and distinguish between the different varieties based on
>> the handler operand.
>
> I dunno.  I don't want to make it difficult to recreate the
> proper form of the EH region after the fact.  Something that
> seems particularly awkward with ALLOWED_EXCEPTIONS.
>
> If we had some *very* special handler operand for ALLOWED and
> MUST_NOT_THROW, then fine.  Otherwise I'd rather we added 
> extra tree codes.

I actually meant that regardless of whether or not they have separate tree
codes.  If there are distinct tree codes, they would still go in the
handler operand of the TRY_CATCH_EXPR, the idea being that the notion of an
EH region can be separated from what you do if you see an exception.

So, in addition to CATCH_EXPR, there would be something like an
ALLOWED_EXCEPTIONS_EXPR which would take a vector of types and an
expression to evaluate on failure.  MUST_NOT_THROW could just be a
degenerate case.

Jason


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