Electrical computers and digital processing systems: interprogra – Event handling or event notification
Reexamination Certificate
1999-12-17
2004-05-18
Lee, Thomas (Department: 2126)
Electrical computers and digital processing systems: interprogra
Event handling or event notification
C719S310000
Reexamination Certificate
active
06738976
ABSTRACT:
FIELD OF THE INVENTION
The present invention relates generally to a method, system, and apparatus for minimizing run-time exception handling overhead from invoked function calls.
BACKGROUND OF THE INVENTION
Computer-based compiler technologies typically include operations that manage invocation of functions. The functions may be methods and the invoking method may be a caller and the invoked method may be a callee. Also, compiler technologies manage exception handling so that the occurrence of a hardware or software error condition during execution of code will change the normal flow of control in a program. An exception that occurs during the execution of a callee is typically handled by the caller upon return from the callee.
More particularly, when a caller receives a return transmission from a callee, a check for an exception is performed. Therefore, as shown in
FIG. 1
, even when both the caller and the callee are compiled methods
105
thereby making the callee capable of managing exception checking explicitly, the callee does not have sufficient information about the caller
101
to explicitly return to the caller exception handling code. Therefore, as shown in element
102
, after the execution of a function call
330
(as shown in
FIG. 3
) from a compiled method
105
to another compiled method
105
, the callee may encounter an exception as shown in element
104
. Then the callee
103
determines if the method can handle the exception as shown in element
106
. When the test of element
106
is true, the exception is handled and execution proceeds, as shown in
108
, until the flow of execution returns to the caller as shown in element
110
.
Alternatively, when the test of element
106
fails the callee
103
returns to the caller
101
as shown in element
110
. Then the exception checking code of the caller
101
is executed as shown in element
112
. More particularly, the test for the exception is performed by the caller as shown in element
114
. If the test of element
114
is false then the exception handling label is executed as shown in element
116
. Alternatively, if the test of element
114
is true normal execution continues as shown in element
118
.
It would be useful if fewer checks for exceptions were required upon a return from a function call. More particularly, it would be useful if invoked compiled methods were able to avoid executing extra exception checking and handling code.
SUMMARY OF THE INVENTION
The present invention relates generally to a method, system, and apparatus for minimizing run-time exception handling overhead from invoked function calls.
The present embodiment novelly eliminates redundant exception checking code in a caller when the callee is a compiled method. More particularly, when the callee has encountered an exception during execution that it cannot handle, the callee explicitly returns to the exception handling label of the caller. Thereby the callee eliminates the execution of exception checking code in the caller method.
In the present embodiment the callee novelly treats the caller as a compiled method thereby enabling location of both the exception handling label and the point of normal execution that follows the exception handling code of the caller. Thereby the callee may return to the exception handling label of the caller if an exception needs to be handled and may return to the caller to continue normal code execution if an exception does not need to be handled. Therefore, the present embodiment novelly eliminates redundant execution of exception checking code and executes exception handling code only when it is necessary.
A compiled method is typically generated during the run-time portion of execution and a native method is typically generated during the compile-time portion of execution. Therefore, in the present embodiment the callee novelly takes advantage of the structure of a caller that is a compiled method to locate both the exception handling label and the point of normal execution that follows the exception handling code of the caller, and thereby eliminate execution of the exception checking code of the caller.
Further, the present embodiment novelly creates code with the layout of a compiled method when a caller is not a compiled method. Thereby the callee that is a compiled method eliminates redundant exception checking code in a caller regardless of whether the caller is a compiled method.
REFERENCES:
patent: 6151703 (2000-11-01), Crelier
patent: 6247169 (2001-06-01), DeLong
patent: 6282702 (2001-08-01), Ungar
Venners, Exception in Java, JavaWorld, Jul. 1998, pp. 1-21.*
Brown, ExceptionHandling, Dec. 26, 1998, pp. 1-5.*
Venners, How the Java virtual machine handles exceptions, JavaWorld, Jan. 1997, pp. 1-6.*
Bjarne Stroustrup, “The C++ Programming Language”, Second Edition, 1991, AT&T Bell Telephone Laboratories Inc, pp. 293-324.*
Norton et al., “Java Programming”, 1996 by Peter Norton, Chapter 8—Tying It All Together: Threads, Exceptions, and More.*
Zukowski, “Mastering Java 2”, 1998 by Bybex, Chapter 7—Exception Handling.
Luo Yuhua
Meshenberg Ruslan
Pradhan Salil
Cao Diem
Hewlett--Packard Development Company, L.P.
Lee Thomas
Smith Christine H.
LandOfFree
Method, system, and apparatus to minimize exception handling... does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Method, system, and apparatus to minimize exception handling..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method, system, and apparatus to minimize exception handling... will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-3219188