A single intermediate language that supports multiple implementations of exceptions
- 1 May 2000
- journal article
- conference paper
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 35 (5) , 285-298
- https://doi.org/10.1145/358438.349337
Abstract
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.Keywords
This publication has 11 references indexed in Scilit:
- SSA is functional programmingACM SIGPLAN Notices, 1998
- VortexACM SIGPLAN Notices, 1996
- Representing control in the presence of one-shot continuationsACM SIGPLAN Notices, 1996
- Exception handling: Expecting the unexpectedComputer Languages, 1994
- Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machineJournal of Functional Programming, 1992
- Detecting equality of variables in programsPublished by Association for Computing Machinery (ACM) ,1988
- Program optimization and exception handlingPublished by Association for Computing Machinery (ACM) ,1981
- Exception Handling in CLUIEEE Transactions on Software Engineering, 1979
- Aspects Of Implementing CLUPublished by Association for Computing Machinery (ACM) ,1978
- Proposal for an UNCOLCommunications of the ACM, 1958