Compiling method with exception handling
First Claim
1. A compiling method for converting, into machine language, source code for a target program prepared using a programming language, said method comprising the steps of:
- (a) performing the inlining of a function in said target program and generating information concerning said inling;
(b) generating, based on said information concerning said inlining, lock data concerning a lock set for a resource using said function; and
(c) adding, based on said lock data, a lock count set upon the execution of an exception handler in said target program.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention aims to reduce the operating costs for obtaining the lock data required for an exception handling, and to reduce the affect of the exception handling on the operating costs. When an execution program is to be compiled, based on information for the inlining of a function in this program, data concerning is generated for a lock for a resource due to the inlined function. Further, based on the lock data, the data concerning a lock count set upon the execution of code for the target program is added to this program. Then, when an exception has occurred during the execution of the program, the data concerning the lock count is employed to obtain the lock count at the time of execution of the code whereat the exception occurred, and the lock count set at the time of execution of an exception handler for this exception. After the locks for the resource have been released in a number equivalent to a difference between the two lock counts, the process for this exception is initiated.
23 Citations
10 Claims
-
1. A compiling method for converting, into machine language, source code for a target program prepared using a programming language, said method comprising the steps of:
-
(a) performing the inlining of a function in said target program and generating information concerning said inling;
(b) generating, based on said information concerning said inlining, lock data concerning a lock set for a resource using said function; and
(c) adding, based on said lock data, a lock count set upon the execution of an exception handler in said target program. - View Dependent Claims (2, 3, 4)
-
-
5. A computer comprising:
-
a compiler program, for compiling source code for a target program and converting said source code into machine language code; and
a processor, for executing said machine language code for said target program, wherein said compiler includes a lock data generator for, based on inlining data for a function in said target program, generating lock data for a resource by using said obtained inlined function, and a data addition unit for employing said lock data to add, to said target program, data concerning a lock count upon the execution of code for said target program, and wherein, when an exception has occurred during the execution of said target program, based on said data concerning said lock count, said processor obtains a lock count upon the execution of code wherein said exception occurred and a lock count upon the execution of an exception handler, and performs a process for said exception after the locks of said resource are released in a number equivalent to the difference between those two lock counts. - View Dependent Claims (6)
-
-
7. A program storage device readable by a computing machine, tangibly embodying a compiler program of instructions executable by the machine to perform method steps of a compiling method for converting, into machine language, source code for a target program prepared using a programming language, said method comprising the steps of:
-
(a) performing the inlining of a function in said target program and generating information concerning said inlining by an inlining unit of said compiler program;
(b) generating, based on said information concerning said inlining, lock data concerning a lock set for a resource using said function by a lock data generator of said compiler program; and
(c) adding, based on said lock data, a lock count set upon the execution of an exception handler in said target program by a data addition unit of said compiler program. - View Dependent Claims (8, 9, 10)
-
Specification