Claims
- 1. In a computer system, a method of implementing message dispatch for an object-oriented program, comprising:
collecting receiver type information at a site of a method that dispatches messages to receiver objects; and saving the receiver type information for a subsequent execution of the program.
- 2. The method of claim 1, wherein the receiver type information includes each different receiver type to which messages were dispatched from the site.
- 3. The method of claim 1, wherein the receiver type information includes references to call sites for each different receiver type to which messages were dispatched from the site.
- 4. The method of claim 1, wherein the receiver type information includes receiver types encountered at call sites of inlined methods.
- 5. The method of claim 1, wherein the receiver type information is collected while the program is being interpreted.
- 6. The method of claim 5, further comprising determining that is would be desirable to compile the method that includes the site that dispatches messages to receiver objects.
- 7. (Cancelled)
- 8. (Cancelled)
- 9. (Cancelled)
- 10. The method of claim 1, wherein the receiver type information is collected in a polymorphic inline cache.
- 11. The method of claim 1, wherein the receiver type information is saved in a class file for the method.
- 12. The method of claim 11, wherein the receiver type information is saved in an attributes section of the class file.
- 13. A computer program product that implements message dispatch for an object-oriented program, comprising:
computer code that collects receiver type information at a site of a method that dispatches messages to receiver objects; and computer code that saves the receiver type information for a subsequent execution of the program; and a computer readable medium that stores the computer code.
- 14. A computer system that implements message dispatch for an object-oriented program, comprising:
a processor that executes computer code; computer code that collects receiver type information at a site of a method that dispatches messages to receiver objects; and computer code that saves the receiver type information for a subsequent execution of the program; and a computer readable medium that stores the computer code for the processor to execute.
- 15. In a computer system, a method of implementing message dispatch for an object-oriented program, comprising:
during interpretation, collecting receiver type information at a site of a method that dispatches messages to receiver objects, wherein the receiver type information includes each different receiver type and a reference to the site for each different receiver type to which messages were dispatched from the site; determining that it would be desirable to compile the method that includes the site that dispatches messages to receiver objects; compiling the method to include the receiver type information at the site that dispatches messages to receiver objects; and saving the receiver type information for a subsequent execution of the program.
- 16. The method of claim 15, wherein the receiver type information includes receiver types encountered at call sites of inlined methods.
- 17. (Cancelled)
- 18. The method of claim 15, wherein the compiled method continues to collect receiver type information.
- 19. The method of claim 15, wherein the receiver type information is collected in a polymorphic inline cache.
- 20. The method of claim 15, wherein the receiver type information is saved in a Java class file for the method.
- 21. The method of claim 20, wherein the receiver type information is saved in an attributes section of the Java class file.
- 22. A computer program product that implements message dispatch for an object-oriented program, comprising:
computer code that during interpretation, collects receiver type information at a site of a method that dispatches messages to receiver objects, wherein the receiver type information includes each different receiver type and a reference to the site for each different receiver type to which messages were dispatched from the site; computer code that determines that it would be desirable to compile the method that includes the site that dispatches messages to receiver objects; computer code that compiles the method to include the receiver type information at the site that dispatches messages to receiver objects; and computer code that saves the receiver type information for a subsequent execution of the program; and a computer readable medium that stores the computer code.
- 23. A computer system that implements message dispatch for an object-oriented program, comprising:
a processor that executes computer code; computer code that during interpretation, collects receiver type information at a site of a method that dispatches messages to receiver objects, wherein the receiver type information includes each different receiver type and a reference to the site for each different receiver type to which messages were dispatched from the site; computer code that determines that it would be desirable to compile the method that includes the site that dispatches messages to receiver objects; computer code that compiles the method to include the receiver type information at the site that dispatches messages to receiver objects; and computer code that saves the receiver type information for a subsequent execution of the program; and a computer readable medium that stores the computer code for the processor to execute.
- 24. A computer readable medium having a data structure embodied thereon for use by an object-oriented method, said data structure embodied in the computer readable medium comprising:
at least one receiver type field for storing information indicative of a receiver type; and nested receiver type fields for storing information indicative of nested receiver types, the nested receiver types being of receiver types that were dispatched messages at message dispatch sites in the method.
- 25. The computer readable medium of claim 24, wherein the nested receiver types include references to message dispatch sites in the method.
- 26. The computer readable medium of claim 24, wherein the nested receiver types include receiver types that were dispatched messages at message dispatch sites in inlined methods.
- 27. The computer readable medium of claim 24, wherein the data structure is saved in a Java class file for the method.
- 28. The computer readable medium of claim 27, wherein the data structure is saved in an attributes section of the Java class file.
- 29. In a computer system, a method of handling messages received by objects in an object-oriented program, said messages being dispatched to said objects to invoke methods implemented by said objects; said method comprising:
collecting information relating to objects, said objects being dispatched messages from a call site of the object-oriented program, said call site being a location or an area of said object-oriented program that dispatches messages to said objects.
- 30. A method as recited in claim 29, wherein said method further comprises:
determining whether a method should be complied based on at least a portion of said collected information, said method being a method of one of said objects that receives a message dispatched from said call site to invoke said method; and compiling said method when it is determined that the method should be complied.
- 31. A method as recited in claim 30, wherein said method further comprises collecting additional information relating to objects that are dispatched messages from said call site after said compiling of said method.
- 32. A method as recited in claim 29, wherein said method further comprises storing said collected information in a portion of said object-oriented program.
- 33. A method as recited in claim 29, wherein said method further comprises providing said collected information for a subsequent execution of said object-oriented program.
- 34. A method as recited in claim 29, wherein said information relating to one or more objects includes at least one receiver type information, said at least one receiver type information indicating a class for at least one of said one or more objects that are dispatched messages.
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This application is a continuation of U.S. patent application Ser. No. 08/944,332, entitled “INLINE DATABASE FOR RECEIVER TYPES IN OBJECT-ORIENTED SYSTEMS.”
[0002] This application is related to U.S. patent application Ser. No. 08/944,331, entitled “SITE SPECIFIC MESSAGE DISPATCH IN OBJECT-ORIENTED SYSTEMS”; U.S. patent application Ser. No. 08/944,735, entitled “METHOD AND APPARATUS FOR PERFORMING BYTE-CODE OPTIMIZATION DURING PAUSES,” now U.S. Pat. No. 5,970,249; U.S. patent application Ser. No. 08/944,335, entitled “MIXED EXECUTION STACK AND EXCEPTION HANDLING,” now U.S. Pat. No. 6,009,517; U.S. patent application Ser. No. 08/944,326, entitled “METHOD AND APPARATUS FOR IMPLEMENTING MULTIPLE RETURN SITES”; U.S. patent application Ser. No. 08/944,334, entitled “METHOD AND APPARATUS FOR DYNAMICALLY OPTIMIZING BYTE-CODED PROGRAMS,” now U.S. Pat. No. 5,995,754; U.S. patent application Ser. No. 08/944,330, entitled “METHOD AND APPARATUS FOR DYNAMICALLY OPTIMIZING COMPILED ACTIVATIONS,” now U.S. Pat. No. 5,933,635; all filed concurrently herewith.
[0003] This application is also related to U.S. patent application Ser. No. 08/884,856, entitled “INTERPRETING FUNCTIONS UTILIZING A HYBRID OF VIRTUAL AND NATIVE MACHINE INSTRUCTIONS,” filed Jun. 30, 1997, and U.S. patent application Ser. No. 08/885,008, entitled “INTERPRETER GENERATION AND IMPLEMENTATION UTILIZING INTERPRETER STATES AND REGISTER CACHING,” now U.S. Pat. No. 6,021,273, filed Jun. 30, 1997, which are all incorporated herein by reference for all purposes in their entirety.
Continuations (1)
|
Number |
Date |
Country |
| Parent |
08944332 |
Oct 1997 |
US |
| Child |
09896075 |
Jun 2001 |
US |