|C--||Harvard EECS C-- Home Papers Support for exceptions|
|C-- Home | Specification & Downloads | Old News | Papers | Mailing List | People | FAQ|
We present mechanisms that enable our compiler-target language, C--, to express four of the best known techniques for implementing exceptions, all within a single, uniform framework. We define the mechanisms precisely, using a formal operational semantics. We also show that exceptions need not require special treatment in the optimizer; by introducing extra dataflow edges, we make standard optimization techniques work even on programs that use exceptions. Our approach clarifies the design space of exception-handling techniques, and it allows a single optimizer to handle a variety of implementation techniques. Our ultimate goal is to allow a source-language compiler the freedom to choose its exception-handling policy, while encapsulating the (architecture-dependent) mechanisms and their optimization in an implementation of C-- that can be used by compilers for many source languages.
The paper appeared in the ACM SIGPLAN '00 Conference on Programming Language Design and Implementation (PLDI), in SIGPLAN Notices 35(5):285--298. A reprint is available in PostScript (116K) or PDF (196K). (The ACM proceedings format supports US Letter size only.)
The slides and audio
from the PLDI talk are also available.