IP Library Granted Patent US 8,327,386
Granted Patent B2
US 8,327,386 · App. 13/357,695 · Granted Dec 4, 2012

Mechanism that provides more efficient event handler processing

Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,327,386
App. No.
13/357,695
Granted
Dec 4, 2012
Kind
B2
Abstract

Disclosed is an apparatus, method, service product, and program product which each provide an enhanced, registration-based event handler mechanism. Listener programs are located and compiled before notification is needed. When notification is ultimately required, the pre-located listeners can be called directly without incurring the performance expense associated with first locating and then calling each listener.

Claims (33)

1. A method of optimizing a computer program, comprising the computer-executed steps of:

receiving registration of a plurality of sub-programs to be called upon the occurrence of corresponding events in a computer system, said plurality of sub-programs being registered in an event structure which records, for each said event, a respective set of sub-programs to be called upon the occurrence of the corresponding event, each set comprising at least one sub-program;

receiving a first version of said computer program, said computer program being capable of handling one or more said events by causing, for each said event, the respective set of sub-programs to be called;

with respect to each of at least one event registered in said event structure, generating respective event response programming code, each respective event response programming code making a respective direct call within said computer program to each sub-program which has been registered to be notified upon the occurrence of the respective event; and

incorporating each respective event response programming code generated by said step of generating respective event response programming code in said computer program to create a second version of said computer program.

2. The method of claim 1 , wherein said computer program and said sub-programs are programs in a virtual machine environment.

3. The method of claim 2 wherein said virtual machine environment is a Common Language Runtime (CLR) virtual machine environment.

4. The method of claim 2 wherein said virtual machine is a Java Virtual Machine (JVM) environment.

5. The method of claim 2 , wherein said second version of said computer program comprises executable code produced by a just-in-time (JIT) compiler.

6. The method of claim 1 wherein said computer program is an event handler program.

7. The method of claim 1 , further comprising:

creating a stack structure; and

locating direct call statements for each of said sub-programs in said stack structure.

8. A program product for optimizing a computer program in a virtual machine environment, comprising:

a non-transitory computer-readable medium tangibly embodying a plurality of instructions executable by a machine to perform the method comprising:

receiving a first version of a computer program embodied as programming code in said virtual machine environment, said computer program being capable of handling one or more said events in said computer system by causing, for each said event, a respective set of sub-programs to be called, each set comprising at least one sub-program;

accessing an event structure in which a plurality of sub-programs have been registered to be called upon the occurrence of corresponding events in said computer system, said event structure recording, for each said event, the respective set of sub-programs to be called upon the occurrence of the corresponding event;

with respect to each of at least one event registered in said event structure, generating respective event response programming code in said virtual machine environment, each respective event response programming code making a respective direct call within said computer program to each sub-program which has been registered to be notified upon the occurrence of the respective event; and

incorporating in said computer program each respective event response programming code generated by said generating respective event response programming code, to create a second version of said computer program.

9. The program product of claim 8 wherein said virtual machine is a Common Language Runtime (CLR) virtual machine.

10. The program product of claim 8 wherein said virtual machine is a Java Virtual Machine (JVM).

11. The program product of claim 8 wherein said computer program is an event handler program.

12. The program product of claim 8 , wherein said program product comprises a just-in-time (JIT) compiler.

13. A method of optimizing a computer program in a virtual machine environment of a computer system, comprising:

modifying a virtual machine which executes computer programs in the virtual machine environment to:

receive a first version of a computer program embodied as programming code in said virtual machine environment, said computer program being capable of handling one or more said events in said computer system by causing, for each said event, a respective set of sub-programs to be called, each set comprising at least one sub-program;

access an event structure in which a plurality of sub-programs have been registered to be called upon the occurrence of corresponding events in said computer system, said event structure recording, for each said event, the respective set of sub-programs to be called upon the occurrence of the corresponding event;

with respect to each of at least one event registered in said event structure, generate respective event response programming code in said virtual machine environment, each respective event response programming code making a respective direct call within said computer program to each sub-program which has been registered to be notified upon the occurrence of the respective event; and

incorporate in said computer program each respective event response programming code generated by said virtual machine environment generating respective event response programming code, to create a second version of said computer program.

14. The method of claim 13 wherein said virtual machine is a Common Language Runtime (CLR) virtual machine.

15. The method of claim 13 wherein said virtual machine is a Java Virtual Machine (JVM).

16. The method of claim 13 , wherein said second version of said computer program comprises executable code produced by a just-in-time (JIT) compiler.

17. The method of claim 13 , wherein said computer program is an event handler program.

Assignments (3)
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE PATENT NUMBERS 10342096;10671117; 10716375; 10716376;10795407;10795408; AND 10827591 PREVIOUSLY RECORDED AT REEL: 58314 FRAME: 657. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Feb 29, 2024
From: RAKUTEN, INC.
To: RAKUTEN GROUP, INC.
Reel/Frame 068066/0103 →
CHANGE OF NAME Recorded Dec 6, 2021
From: RAKUTEN, INC.
To: RAKUTEN GROUP, INC.
Reel/Frame 058314/0657 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 17, 2015
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: RAKUTEN, INC.
Reel/Frame 035176/0391 →
Continuity (3)
Continuation 12407139 · Mar 19, 2009
Continuation 11035553 · Jan 14, 2005
Related Publication 20120131598A1 · May 24, 2012