IP Library Granted Patent US 6,862,728
Granted Patent B2
US 6,862,728 · App. 09/859,133 · Granted Mar 1, 2005

Hash table dispatch mechanism for interface methods

Assignee: Esmertec AG
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 6,862,728
App. No.
09/859,133
Granted
Mar 1, 2005
Kind
B2
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.

Claims (65)

1. A method of reducing the dispatch times of a virtual dispatch during the execution of an object-oriented language program in a system having a host machine and a virtual machine, the program having interface Methods and functions including individual functions and associated functions associated with the interface Methods, the method comprising:

providing hierarchical relationships between functions represented by super class and sub class definitions of the functions, wherein super class functions have super class attributes, and sub class functions have inherited sub class attributes inherited from a corresponding super class function and non inherited class attributes not inherited from a super class function;

creating a plurality of dispatch tables including interface Methods and individual functions having both inherited attributes and non inherited attributes;

creating an interface hash table for a dispatch table, the interface hash table having a pointer as an index for a selected one of an interface Method or an individual function and recovery and search routines for recovering from a hash table collision and searching a list of functions;

the dispatch table receiving and re-routing the call to the interface hash table during a call of a virtual dispatch requiring an interface Method or requiring an individual function;

determining whether a collision has occurred in the hash table in response to the call and selectively executing the recovery routine or the fallback routine in response to the collision determination;

the interface hash table selecting one of the interface Methods or one of the individual functions to provide a selected routine; and

executing the selected routine in accordance with both the inherited attributes and the non inherited attributes.

2. A method as claimed in claim 1 , further comprising determining whether two or more hash values in the interface hash table conflict.

3. A method as claimed in claim 2 , further comprising calling a recovery Method when two or more hash values in the interface hash table conflict.

4. A method as claimed in claim 1 , further comprising creating hash values that reduce the frequency of conflicts between two or more hash values in the interface hash table.

5. A method as claimed in claim 4 , further comprising creating hash values for the interface hash table by deriving pseudo-random values based on the attributes of the interface Methods.

6. A method as claimed in claim 1 , further comprising choosing a starting hash value and allocating other hash values sequentially from the starting hash value.

7. A method as claimed in claim 1 , further comprising configuring the interface hash table to contain one of the group of a slot numbers of the dispatch table and function pointers.

8. A method as claimed in claim 1 , further comprising defining each class of the program and a set of the interface Methods implemented by each class.

9. A method as claimed in claim 8 , further comprising creating a fixed size interface hash table for each class, each fixed size interface hash table mapping an interface Method hash value to a dispatch table index.

10. A method as claimed in claim 1 , in a system comprising:

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.

11. A computer system as claimed in claim 10 , wherein the interface hash table includes values derived from pseudo-random values based on attributes of the interface Methods.

12. A computer system as claimed in claim 10 , wherein the interface hash table includes a starting hash value and a plurality of other hash values allocated sequentially from the starting hash value.

13. A computer system as claimed in claim 10 , wherein the interface hash table includes one of the group consisting of a slot number of the dispatch table and function pointers.

14. A computer system as claimed in claim 10 , wherein the execution history recorder is arranged to record a path of execution from a first fragment to a second fragment.

15. A computer system as claimed in claim 10 , wherein the system is multi-threaded and the compiler runs on a thread separate from the thread executing the code.

16. A computer system as claimed in claim 10 , further comprising a queue coupled to the compiler.

17. A computer system as claimed in claim 10 , wherein the compiler, compiler manager and interpreter are part of the virtual machine.

18. A computer system as claimed in claim 10 , further comprising a memory manager that monitors memory available to the compiler.

19. A computer system as claimed in claim 18 , further comprising a deleter coupled to the memory manager.

20. A computer system as claimed in claim 18 , wherein only dominant path or near dominant path fragments of code are compiled.

21. A method of reducing the dispatch times of a virtual dispatch during the execution of an object-oriented language program in a system having a host machine and a virtual machine, the program having interface Methods and functions including individual functions and associated functions associated with the interface Methods, the method comprising:

providing hierarchical relationships between functions represented by super class and sub class definitions of the functions, wherein super class functions have super class attributes, and sub class functions have inherited sub class attributes inherited from a corresponding super class function and non inherited class attributes not inherited from a super class function;

creating a plurality of dispatch tables including interface Methods and individual functions having both inherited attributes and non inherited attributes;

creating an interface hash table for a dispatch table, the interface hash table having a pointer as an index for a selected one of an interface Method or an individual function and recovery and search routines for recovering from a hash table collision and searching a list of functions, an address and a plurality of slots, each slot having a hash value related to one interface Method or one individual friction;

the dispatch table receiving and re-routing the call to the interface hash table during a call of a virtual dispatch requiring an interface Method or requiring an individual function;

determining whether a collision has occurred in the hash table in response to the call and selectively executing the recovery routine or the fallback routine in response to the collision determination;

loading the address of the interface hash table in a memory location;

retrieving a slot number for a particular interface Method or individual function using its respective hash value;

loading a unique identifier for a destination interface Method and individual function into a register; and

performing a virtual invocation using its respective hash value in accordance with the inherited and non inherited attributes.

22. A method as claimed in claim 21 , wherein the interface hash table is included in at least one of the plurality of dispatch tables.

23. A method as claimed in claim 21 , wherein the interface hash table includes Method pointers.

24. A method as claimed in claim 21 , 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; and

compiling the one fragment of the program.

25. A method as claimed in claim 24 , further comprising adjusting the threshold after it is established.

26. A method as claimed in claim 24 , further comprising monitoring memory available to the compiler.

27. A method as claimed in claim 24 , further comprising deleting code from memory to meet the requirements of the compiler.

28. A method as claimed in claim 24 , further comprising running the compiler on a thread that is separate from the thread of the interpreter.

29. A method as claimed in claim 24 , further comprising recording a transfer of control into one fragment of code and a transfer out of the one fragment of code.

30. A method as claimed in claim 24 , further comprising searching cache for preexisting compiled versions of fragments of code.

31. A method as claimed in claim 24 , wherein the computer code includes at least one interface Method, and at least one of the fragments of code includes less than the entire at least one Method.

32. A method as claimed in claim 24 , further comprising performing an exception check.

33. A method as claimed in claim 24 , further comprising performing a code optimization.

34. A method as claimed in claim 24 , further comprising interpreting exception code when an exception occurs.

35. A method as claimed in claim 24 , further comprising establishing a link to a bailout device.

36. A method as claimed in claim 35 , further comprising passing control to an interpreter.

37. A method as claimed in claim 24 , further comprising updating condition states.

38. A method as claimed in claim 37 , further comprising interpreting exception code after updating the condition states.

Assignments (9)
RELEASE OF SECURITY INTEREST Recorded Oct 26, 2020
From: JEFFERIES FINANCE LLC
To: RPX CORPORATION
Reel/Frame 054486/0422 →
SECURITY INTEREST Recorded Jun 29, 2018
From: RPX CORPORATION
To: JEFFERIES FINANCE LLC
Reel/Frame 046486/0433 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 10, 2017
From: MYRIAD GROUP, AG
To: RPX CORPORATION
Reel/Frame 044087/0323 →
PATENTEE CHANGE OF ADDRESS Recorded Feb 5, 2016
From: MYRIAD GROUP, AG
To: MYRIAD GROUP, AG
Reel/Frame 037701/0866 →
CHANGE OF NAME Recorded Jul 9, 2009
From: ESMERTEC AG
To: MYRIAD GROUP AG
Reel/Frame 022928/0730 →
CHANGE OF NAME Recorded Jul 7, 2009
From: ESMERTEC AG
To: MYRIAD GROUP AG
Reel/Frame 022917/0525 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 7, 2004
From: INSIGNIA SOLUTIONS, INC.
To: ESMERTEC AG
Reel/Frame 014852/0297 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 9, 2003
From: INSIGNIA SOLUTIONS, PLC
To: ESMERTEC AG
Reel/Frame 014250/0761 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 17, 2001
From: DARNELL, STEPHEN; CHARNELL, WILLIAM THOMAS; PLUMMER, WAYNE; DIAS, BLAISE ABEL ALEC; GUTHRIE, PHILIPPA JOY; KRAMSKOY, JEREMY PAUL; SEXTON, JEREMY JAMES; WYNN, MICHALE JOHN; RAUTENBACH, KEITH; THOMAS, STEPHEN PAUL
To: INSIGNIA SOLUTIONS, PLC
Reel/Frame 012093/0258 →
Priority Claims (1)
GB 9825102 · Nov 16, 1998 · national
Continuity (2)
Continuation PCTGB990078800 · Mar 16, 1999
Related Publication 20020108107A1 · Aug 8, 2002