IPC분류정보
국가/구분 |
United States(US) Patent
등록
|
국제특허분류(IPC7판) |
|
출원번호 |
US-0859133
(2001-05-16)
|
우선권정보 |
GB-0025102 (1998-11-16) |
발명자
/ 주소 |
- Darnell, Stephen
- Charnell, William Thomas
- Plummer, Wayne
- Dias, Blaise Abel Alec
- Guthrie, Philippa Joy
- Kramskoy, Jeremy Paul
- Sexton, Jeremy James
- Wynn, Michael John
- Rautenback, Keith
- Thomas,
|
출원인 / 주소 |
|
대리인 / 주소 |
Caesar, Rivise, Bernstein, Cohen &
|
인용정보 |
피인용 횟수 :
16 인용 특허 :
46 |
초록
▼
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
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.
대표청구항
▼
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
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.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.