Hash table dispatch mechanism for interface methods
First Claim
Patent Images
10. A computer system comprising:
- a program having a plurality of interface Methods;
a plurality of dispatch tables;
an interface hash table for at least one of the plurality of dispatch tables, the interface hash table having a pointer as an index for one of the group consisting of a specific location in the corresponding dispatch table and one interface Method of the program.
9 Assignments
0 Petitions
Accused Products
Abstract
A hash table dispatch mechanism for interface Methods. The mechanism reduces dispatch times during the execution of an object-oriented language program. An interface hash table having a pointer as an index for either a specific location in a corresponding dispatch table or an interface Method of the program is created for a dispatch table. The interface hash table has an address and a plurality of slots having a hash value related to an interface Method. The mechanism includes a recovery Method for resolving conflicts when two or more slots in the interface hash table contain clashing values.
114 Citations
43 Claims
-
10. A computer system comprising:
-
a program having a plurality of interface Methods;
a plurality of dispatch tables;
an interface hash table for at least one of the plurality of dispatch tables, the interface hash table having a pointer as an index for one of the group consisting of a specific location in the corresponding dispatch table and one interface Method of the program. - View Dependent Claims (11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29)
-
-
15. A computer system comprising:
-
a program having a plurality of interface Methods;
a compiler for compiling code of the program, the compiler arranged to compile a fragment of the code of the program;
a compiler manager coupled to the compiler;
an interpreter for interpreting the code of the program, the interpreter coupled to an execution history recorder, the execution history recorder arranged to record the number of times a fragment of code is executed, to record information regarding execution of fragments of code, and to alert the compiler manager when a fragment of code has been executed a threshold number of times;
a plurality of dispatch tables;
an interface hash table for at least one of the plurality of dispatch tables, the interface hash table having a pointer as an index for one of the group consisting of a specific location in the corresponding dispatch table and one interface Method of the program.
-
-
27. A method of invoking an interface Method for an object of a program, the method comprising:
-
creating a plurality of dispatch tables;
creating an interface hash table for at least one of the plurality of dispatch tables, the interface hash table having a pointer as an index for one of the group consisting of a specific location in the corresponding dispatch table and a Method of the program, the interface hash table having an address and a plurality of slots, each slot having a hash value related to one interface Method; and
loading the address of the interface hash table in a memory location;
retrieving a slot number for a particular interface Method using its respective hash value;
loading a unique identifier for a destination interface Method into a register; and
performing a virtual invocation.
-
-
30. A method of compiling an object-oriented language program, the program having a plurality of interface Methods, the method comprising:
-
establishing an execution threshold;
executing a number of fragments of the program;
recording the number of times each of the fragments of the program is executed;
queuing one fragment of the program for compilation when the number of times the one fragment of the program has been executed matches the threshold;
compiling the one fragment of the program;
creating a plurality of dispatch tables;
creating an interface hash table for at least one of the plurality of dispatch tables, the interface hash table having a pointer as an index for one of the group consisting of a specific location in the corresponding dispatch table and one interface Method of the program; and
when the program executes an instruction requiring one of the interface Methods, looking up the one of the interface Methods using the interface hash table. - View Dependent Claims (1, 2, 3, 4, 5, 6, 7, 8, 9, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43)
-
-
33-1. A method as claimed in claim 30, further comprising running the compiler on a thread that is separate from the thread of the interpreter.
Specification