Java exception handling mechanism for statically compiled with optimization
- Author
- CaoZhiWei
- Advisor
- ZuoBinYu
- School
- Fudan University
- Major
- Computer System Architecture
- Classification
- TP312.1 Programming language ALGOL
- Degree
- Master's thesis
- Year
- 2009
- Downloads
- 78
- Citations
- 0
Abstract
Exception handling is a widely used mechanism for improving the software robustness and stability, which is supported by many kinds of object-oriented programming language. As two popular object-oriented programming languages, both C++ and Java include exception handling mechanism as an important component. Exception handling mechanism is usually implemented by both compiler and exception handling library functions. As a result, how to make exception handling works correctly and efficiently becomes critical to both compiler design and exception handling library implementation.There are two ways to run a Java program: the first one is compiling Java program into class files and then using a Java Virtual Machine to run them dynamically; the second one is compiling Java program into executable file and then running it statically. Under certain circumstance, running a Java program statically could outperform running it dynamically, and this fact makes Java static compiler more and more useful. This paper proposes an algorithm to implement Java exception mechanism in a Java static compiler, and presents an implementation of this algorithm based on Open64 open source compiler. After this implementation, Open64 compiler could compile Java program correctly.Stack unwinding is a common way to implement exception handling mechanism, and it could be used by both compiler and JVM. This paper proposes an improved stack unwinding algorithm to overcome some shortcomings which exist in the conventional stack unwinding algorithm. Based on the stack unwinding library which is an affiliated part of Open64 compiler, we implemented our algorithm and did some test. According to the test result, our algorithm could correctly support both C++ exception and Java exception and effectively improve the programs which have a lot of exceptions thrown during run time.
Table of contents
Directory 2-4
Summary 4-5
ABSTRACT 5-6
first chapter 6-11
1.1 exception handling mechanism for the development of the background and current situation of 6-7
1.2 The traditional way of dealing with unusual circumstances 7-8
1.3 language support for exception handling mechanism 8-9
1.4 subject source 9
1.5 research 9-10
1.6 chapter structure 10-11
exception handling mechanism 11-18
2.1 exception handling mechanism needs 11-12
2.2 stack unwinding algorithm 12-15
2.2.1 compiler stack unwinding algorithm support 12-14
2.2.2 stack unwinding algorithm exception handling run-time support functions 14-15
2.3 stack switching algorithm 15-17
2.3.1 compiler support of the stack switching algorithm 15-16
2.3.2 stack switching algorithm exception handling runtime support functions 16-17
2.4 stack unwinding and stack switch comparison 17
2.5 Summary 17-18
The third chapter in Open64 Java exception mechanism 18-35
3.1 Java static compiler 18-19
3.2 Open64 open source compiler 19-21
3.2.1 the Open64 of background 19-20
3.2.2 Open64 of is architecture 20-21
3.3 Open64 C exception handling mechanism algorithm 21-25
data structures 3.3.1 C exception mechanism 21-23
3.3.2 C exception mechanism algorithm logic 23-24
3.3.3 C exception mechanism algorithm results 24-25
3.4 C exception similarities and differences between Java exception 25-26
3.5 C algorithm Java exception exception 26-28
the 3.6 Open64 the Java exception mechanism algorithm 28-34
3.6.1 the data structure of the Java exception mechanism 28-29
3.6.2 of the Java exception mechanism algorithm logic 29-32
3.6.3 algorithm instance of the Java exception mechanism 32-34
3.7 Summary 34-35
the Open64 the exception handling optimization 35-45
4.1 exception handling mechanisms on program performance 35-37
4.2 stack to expand the limitations of the algorithm 37-38
4.3 Improved stack unwinding algorithm theory 38-39
4.4 abnormal optimized 39-40
4.5 improvement stack unwinding algorithm 40-44
4.5.1 Improved stack unwinding algorithm's data structures 40-41
4.5.2 Improved stack unwinding algorithm algorithm logic 41-43
4.5.3 Improved stack unwinding algorithm summary 43-44
4.6 Summary 44-45
Chapter test results and analysis 45-49
5.1 test method 45-46
5.2 test results 46-47
5.3 Analysis of test results 47-48
5.4 Summary 48-49
Chapter VI Summary and Outlook 49-50
6.1 research summary 49
6.2 work Outlook 49-50
References 50-52
thank 52-53
Related dissertations
- Research on the Optimization of the System of Urban-rural Integrated Residents Social Pension Insurance of Laiwu City
- Optimization Study of a Insurance Company Ningxia Branch’s Business Structure
- The Optimization of Fund Contract in the Perspective of Governance Structure
- The Personal Loans Centre Process Optimization Study of Ccb Shaanxi Branch
- Research on Optimization of commercial bank loans business processes Chinese micro enterprise
- Optimization of Commercial Bank Credit Rating Index System for SMEs
- An Optimization Study on Proscenium Support Facilities of Commercial Banks on Queuing Theory
- The Credit Process Optimization of A Bank
- The branches of commercial banks, credit risk management process - a case study of A bank D branch cases
- The Research of Mode of Corporate Governance of China’s Trust Industry Defect and Optimization
- Under the New Situation of the International Monetary System Unbalance Influence on China’s Foreign Exchange Reserves and Its Optimization
- The Study on Constructing Harmony in Urban Communities
- An Investigation of the Management System of Yancheng Local Tax Inspection
- Based on the Subjective Well-being to Optimize the China’s Rural Public Expenditure
- Research on China’s Tax Cost and Optimization
- Analysis on Tax Scale Optimization of Liaoning Province
- Study on the optimization of tax system of China's current stock market
- The Optimal Decision of Slotting Fee and Percentage of Revenue under the Consignment Model
- Developing Strategy for Service Industry of the Nankai District Tianjin
- Fuzhou Mail Processing Center Optimization Research