IP Library Granted Patent US 7,197,750
Granted Patent B2
US 7,197,750 · App. 09/896,016 · Granted Mar 27, 2007

Java Bytecode instruction for determining hashcode values

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 7,197,750
App. No.
09/896,016
Granted
Mar 27, 2007
Kind
B2
Abstract

Improved techniques for determining Java hashcode values for Java objects are disclosed. The techniques can be implemented to use a new Java Bytecode instruction which is suitable for execution by a Java virtual machine. As such, the new Java Bytecode instruction can be executed to determine Java hashcode value. Moreover, as will be appreciated, the Java hashcode values can be determined without invoking the Java method which is conventionally used to determine hashcode values. This means that the costly overhead associated with repeatedly invoking Java methods is avoided. In other words, operations that are conventionally performed each time this method is invoked need not be performed. As a result, the performance of virtual machines, especially those operating with limited resources (e.g., embedded systems), can be improved.

Claims (37)

1. A computer readable medium for storing a Java Bytecode instruction for determining a hashcode value for a Java object, wherein said hashcode value uniquely identifies said Java object among all other Java objects in said Java computing environment, and said Java Bytecode instruction is suitable for execution by a Java virtual machine in a Java computing environment, wherein said Java Bytecode instruction when interpreted at runtime by said virtual machine operates to determine and store, a hashcode value for said Java object on an execution stack used by said virtual machine to interpret said Java Bytecode instruction, by accessing a field of said Java object which stores said hashcode value for said Java object, thereby allowing said virtual machine to determine said hashcode value for said java object without invoking a Java method;

wherein said Java Bytecode instruction when executed further operates to:

pop a reference to said Java object from the top of an execution stack when said Bytecode instruction is executed;

determine a hashcode for said Java object by accessing the field of said Java object after said reference has been popped; and

push said hashcode on top of said execution stack after said hashcode has been calculated.

2. A Java Bytecode instruction as recited in claim 1 , wherein said Java Bytecode instruction is executed in an embedded system.

3. A Java virtual machine operating in a Java computing environment, wherein said Java virtual machine is capable of determining hashcode values for one or more Java objects wherein each of said one or more hashcode values uniquely identifies a Java object among all other Java objects in said Java computing environment and said one or more hashcode values are determined by executing a Bytecode instruction for determining hashcode values which when interpreted by said Java virtual machine operates to determine and store, a hashcode value for a Java object on an execution stack used by said virtual machine, by accessing a field of said Java object which provides said hashcode for said Java object, thereby allowing said hashcode value for said java object to be determined by said virtual machine without invoking a Java method;

wherein said Java Bytecode instruction when executed further operates to:

pop a reference to said Java object from the top of an execution stack when said Bytecode instruction is executed;

determine a hashcode for said Java object by accessing the field of said Java object after said reference has been popped; and

push said hashcode on top of said execution stack after said hashcode has been calculated.

4. A Java virtual machine as recited in claim 3 , wherein said Java virtual machine operates in an embedded system.

5. A method as recited in claim 4 , wherein said method further comprises:

pushing a reference to said Java object on said execution stack.

6. A method as recited in claim 3 , wherein said virtual machine operates in a mobile or handheld device.

7. In a Java computing environment, a computer implemented method of determining hashcode values for Java objects, said method comprising:

receiving a Java Bytecode instruction in a stream of Java Bytecodes suitable for execution by a virtual machine operating in said Java computing environment, wherein said Java Bytecode instruction is designated as a determining hashcode instruction that operates to determine a hashcode value for a Java object, wherein said hashcode value uniquely identifies a Java object among other Java objects in said java computing environment; and

interpreting at runtime said Java Bydecode instruction after said Java Bytecode is received, wherein said interpreting comprises accessing a field of said Java object which stores a hashcode value for said Java object and storing said hashcode value on an execution stack used for interpreting said stream of Java Bvtecodes; thereby determining said hashcode value without invoking a Java hashcode method;

wherein said method further comprises:

popping a reference to a Java object from an execution stack;

calculating a hashcode value for said Java object by accessing said field of said Java object which provides said hashcode value for said Java object; and

pushing said hashcode value on said execution stack.

8. A method as recited in claim 7 , wherein said pushing of a reference to said Java object is performed by execution of a Java Aload execution.

9. A method as recited in claim 8 , wherein said method is performed by a virtual machine.

10. A method as recited in claim 9 , wherein said virtual machine is operating in an embedded system.

11. A computer readable media including computer program code for determining hashcode values for Java objects, said compute readable media comprising:

computer program code for receiving a Java Bytecode instruction in a stream of Java Bytecodes suitable for execution by a virtual machine operating in a Java computing environment, wherein said Java Bytecode instruction is designated as a determining hashcode instruction that operates to determine a hashcode value wherein said hashcode value uniquely identifies a Java object among all other Java objects in said Java computing environment; and

executing said Java Bytecode instruction after said Java Bvtecode is received, wherein said executing comprises accessing a field of said Java object which stores a hashcode value for said object and storing said hashcode value on an execution stack used to execute said stream of Java Bvtecodes, thereby determining said hashcode value for said Java object without invoking a Java method;

wherein said computer readable media further comprises;

computer program code for popping a reference to a Java object from an execution stack;

computer program code for calculating a hashcode value for said Java object value by accessing said field of said Java object which provides said hashcode value for said Java object; and

computer program code for pushing said hashcode value on said execution stack.

12. A computer readable media as recited in claim 11 , wherein said computer readable media further comprises:

computer program code for pushing a reference to said Java object on said execution stack.

13. A computer readable media as recited in claim 11 , wherein said computer program code for pushing said reference is performed by a Java Aload execution.

14. A computor readable media as recited in claim 13 , wherein said computor readable media is read by a Java virtual machine.

15. A computor readable media as recited in claim 14 , wherein said virtual machine is operating in an embedded system.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037302/0732 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 28, 2001
From: WALLMAN, DAVID; SOKOLOV, STEPAN
To: SUN MICROSYSTEMS, INC.
Reel/Frame 011960/0561 →