Re: Q: flowgraphs and exceptions (newbie)

chase@centerline.com (David Chase)
3 Sep 1996 22:05:22 -0400

          From comp.compilers

Related articles
Q: flowgraphs and exceptions (newbie) Daniel.Vogelheim@post.rwth-aachen.de (1996-09-02)
Re: Q: flowgraphs and exceptions (newbie) scooter@mccabe.com (Scott Stanchfield) (1996-09-03)
Re: Q: flowgraphs and exceptions (newbie) chase@centerline.com (1996-09-03)
Re: Q: flowgraphs and exceptions (newbie) hagerman@ece.cmu.edu (1996-09-05)
Re: Q: flowgraphs and exceptions (newbie) kanze@lts.sel.alcatel.de (1996-09-05)
Re: Q: flowgraphs and exceptions (newbie) scooter@mccabe.com (Scott Stanchfield) (1996-09-06)
| List of all articles for this month |

From: chase@centerline.com (David Chase)
Newsgroups: comp.compilers
Date: 3 Sep 1996 22:05:22 -0400
Organization: CenterLine Software
References: 96-09-009
Keywords: analysis, errors

Daniel.Vogelheim@post.rwth-aachen.de (Daniel Vogelheim) writes:
> this question may be silly, but I have not found an answer in the
> usual compiler construction literature:
>
> What are useful ways of representing (C++/Java-style) exceptions and
> their handlers in flowgraphs?


For synchronous exception handling (C++ style, and some Java exceptions),
you can represent an exception and handler as an additional edge in the
control flow graph connecting a procedure call to the handler. This
sounds like a lot more edges, but since the exception-handler are
simply replacing error-checks following a call (don't all C programmers
check all the return codes all the time ? :-), the net number of edges
shouldn't change much (in fact, it will increase, because
people generally don't check error codes following calls).


Asynchronous exceptions are more of a pain.


> Thank you for any explanations or literature references...


I wrote a couple of articles for JCLT a few years back that attempted
to explain this in gory detail (among other gory details). I don't
know if I succeeded, or if it was merely gory. I've still got the
source, and the comp.compilers moderator (publisher of JCLT at the time)
might have some advice as well.


speaking for myself,


David Chase
[I don't know of any refs on this topic better than Chase's paper.
Whatever you do, it's messy. -John]


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.