@article{oai:ipsj.ixsq.nii.ac.jp:00016561, author = {Seiji, Umatani and Hirokazu, Shobayashi and Masahiro, Yasugi and Taiichi, Yuasa and Seiji, Umatani and Hirokazu, Shobayashi and Masahiro, Yasugi and Taiichi, Yuasa}, issue = {SIG6(PRO29)}, journal = {情報処理学会論文誌プログラミング(PRO)}, month = {May}, note = {An important issue in implementing high-level programming languages for use by translators into C is how to support high-level language features not available in C. Java’s exception handling is one such feature and translating it into portable C which only uses C-style control structures involves some challenges. Previous studies have proposed ways of translating the Java-style try-catch construct into C. In this paper we propose a new scheme for implementing it in an efficient and portable manner. We use our parallel language OPA which is an extended Java language and its translator. In our scheme we do not use troublesome setjmp/longjmp routines for non-local jumps. Instead we check the occurrences of exceptions using functions’ return values. Java also has the try-finally construct mainly used for cleaning up which cannot be translated directly into C-style control structures. To implement it we developed a new scheme with integer values corresponding to continuation targets. Compared with other techniques ours has advantages in both the runtime overhead and the generated code size. For these two features using some benchmark programs we measured the performance of our scheme and compared it with those of some other schemes., An important issue in implementing high-level programming languages for use by translators into C is how to support high-level language features not available in C. Java’s exception handling is one such feature, and translating it into portable C, which only uses C-style control structures, involves some challenges. Previous studies have proposed ways of translating the Java-style try-catch construct into C. In this paper, we propose a new scheme for implementing it in an efficient and portable manner. We use our parallel language OPA, which is an extended Java language, and its translator. In our scheme, we do not use troublesome setjmp/longjmp routines for non-local jumps. Instead, we check the occurrences of exceptions using functions’ return values. Java also has the try-finally construct, mainly used for cleaning up, which cannot be translated directly into C-style control structures. To implement it, we developed a new scheme with integer values corresponding to continuation targets. Compared with other techniques, ours has advantages in both the runtime overhead and the generated code size. For these two features, using some benchmark programs, we measured the performance of our scheme and compared it with those of some other schemes.}, pages = {1--10}, title = {Efficient and Portable Implementation of Java-style Exception Handling in C}, volume = {47}, year = {2006} }