IP Library Granted Patent US 7,216,333
Granted Patent B2
US 7,216,333 · App. 10/410,020 · Granted May 8, 2007

Fingerprint subtype checking

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,216,333
App. No.
10/410,020
Granted
May 8, 2007
Kind
B2
Abstract

One or more fingerprints may be utilized in each class in order to allow for faster subtype checking. A subclass fingerprint may be utilized to track the superclasses of a class, and an interface fingerprint may be utilized to track the locally declared interfaces of the class and any interfaces which it inherits. This allows for subtype checking that is extremely fast and efficient by utilizing comparison and other logical operations during the checking.

Claims (100)

1. A method for loading a simple class in a virtual machine, comprising:

determining if the simple class has a superclass;

if the simple class has a superclass, assigning a subclass fingerprint for the simple class, said subclass fingerprint being unique within said virtual machine and parsable to determine a subclass fingerprint for any superclasses of the simple class; and

if the simple class does not have a superclass, initializing a subclass fingerprint for the simple class;

wherein said assigning includes:

copying a subclass fingerprint from said superclass into a subclass fingerprint for the simple class;

incrementing a subclass count of said superclass; and

shifting said incremented subclass count of said superclass into the subclass fingerprint for the simple class.

2. The method of claim 1 , wherein said shifting includes:

finding a first empty subclass index field in said subclass fingerprint; and

performing an OR operation of said subclass count of said superclass into said first empty subclass index field of the simple class.

3. The method of claim 2 , further comprising:

setting a subclass shift count of the simple class equal to a number of unused memory locations in a subclass index portion of said subclass fingerprint.

4. The method of claim 1 , wherein said copying comprises:

copying a subclass fingerprint from said superclass into a java.lang.Object subclass index of a subclass fingerprint in the simple class if said superclass is java.lang.Object; and

copying a subclass fingerprint from said superclass into a subclass index portion of a subclass fingerprint in the simple class if said superclass is not java.lang.Object.

5. A method for loading a simple class in a virtual machine, comprising:

determining if the simple class has a superclass;

if the simple class has a superclass, assigning an interface fingerprint for the simple class, said interface fingerprint being parsable to determine locally declared interfaces for the simple class and any superclasses of the simple class; and

if the simple class does not have a superclass, initializing an interface fingerprint for the simple class;

wherein said assigning includes:

copying an interface fingerprint from said superclass into an interface fingerprint for the simple class;

finding an interface index for each locally declared interface of the simple class, the interface index being unique for each interface in said virtual machine; and

performing an OR operation of each found interface index into said copied interface fingerprint.

6. The method of claim 5 , wherein each interface index is separate from its closest interface index by two, and wherein a first interface index in the virtual machine is assigned a binary one.

7. A method for loading a simple class in a virtual machine, comprising:

determining if the simple class has a superclass;

if the simple class has a superclass:

assigning a subclass fingerprint for the simple class, said subclass fingerprint being unique within said virtual machine and parsable to determine a subclass fingerprint for any superclasses of the simple class;

assigning an interface fingerprint for the simple class, said interface fingerprint being parsable to determine locally declared interfaces for the simple class and any superclasses of the simple class;

if the simple class does not have a superclass:

initializing a subclass fingerprint for the simple class; and

initializing an interface fingerprint for the simple class;

wherein said assigning a subclass fingerprint includes:

copying a subclass fingerprint from said superclass into a subclass fingerprint for the simple class;

incrementing a subclass count of said superclass; and

shifting said incremented subclass count of said superclass into the subclass fingerprint for the simple class.

8. The method of claim 7 , wherein said shifting includes:

finding a first empty subclass index field in said subclass fingerprint; and

performing an OR operation of said subclass count of said superclass into said first empty subclass index field of the simple class.

9. The method of claim 8 , further comprising:

setting a subclass shift count of the simple class equal to a number of unused memory locations in a subclass index portion of said subclass fingerprint.

10. The method of claim 7 , wherein said copying comprises:

copying a subclass fingerprint from said superclass into a java.lang.Object subclass index of a subclass fingerprint in the simple class if said superclass is java.lang.Object; and

copying a subclass fingerprint from said superclass into a subclass index portion of a subclass fingerprint in the simple class if said superclass is not java.lang.Object.

11. The method of claim 10 , wherein said assigning an interface fingerprint includes:

copying an interface fingerprint from said superclass into an interface fingerprint for the simple class;

finding an interface index for each locally declared interface of the simple class, the interface index being unique for each interface in said virtual machine; and

performing an OR operation of each found interface index into said copied interface fingerprint.

12. The method of claim 11 , wherein each interface index is separate from its closest interface index by two, and wherein a first interface index in the virtual machine is assigned a binary one.

13. An apparatus for loading a simple class in a virtual machine, comprising:

means for determining if the simple class has a superclass;

means for, if the simple class has a superclass, assigning a subclass fingerprint for the simple class, said subclass fingerprint being unique within said virtual machine and parsable to determine a subclass fingerprint for any superclasses of the simple class; and

means for, if the simple class does not have a superclass, initializing a subclass fingerprint for the simple class;

wherein said means for assigning includes:

means for copying a subclass fingerprint from said superclass into a subclass fingerprint for the simple class;

means for incrementing a subclass count of said superclass; and

means for shifting said incremented subclass count of said superclass into the subclass fingerprint for the simple class.

14. The apparatus of claim 13 , wherein said means for shifting includes:

means for finding a first empty subclass index field in said subclass fingerprint; and

means for performing an OR operation of said subclass count of said superclass into said first empty subclass index field of the simple class.

15. The apparatus of claim 14 , further comprising:

means for setting a subclass shift count of the simple class equal to a number of unused memory locations in a subclass index portion of said subclass fingerprint.

16. The apparatus of claim 15 , wherein said means for copying comprises:

means for copying a subclass fingerprint from said superclass into a java.lang.Object subclass index of a subclass fingerprint in the simple class if said superclass is java.lang.Object; and

means for copying a subclass fingerprint from said superclass into a subclass index portion of a subclass fingerprint in the simple class if said superclass is not java.lang.Object.

17. An apparatus for loading a simple class in a virtual machine, comprising:

means for determining if the simple class has a superclass;

means for, if the simple class has a superclass, assigning an interface fingerprint for the simple class, said interface fingerprint being parsable to determine locally declared interfaces for the simple class and any superclasses of the simple class; and

means for, if the simple class does not have a superclass, initializing an interface fingerprint for the simple class;

wherein said means for assigning includes:

means for copying an interface fingerprint from said superclass into an interface fingerprint for the simple class;

means for finding an interface index for each locally declared interface of the simple class, the interface index being unique for each interface in said virtual machine; and

means for performing an OR operation of each found interface index into said copied interface fingerprint.

18. The apparatus of claim 17 , wherein each interface index is separate from its closest interface index by two, and wherein a first interface index in the virtual machine is assigned a binary one.

19. An apparatus for loading a simple class in a virtual machine, comprising:

means for determining if the simple class has a superclass;

if the simple class has a superclass:

means for assigning a subclass fingerprint for the simple class, said subclass fingerprint being unique within said virtual machine and parsable to determine a subclass fingerprint for any superclasses of the simple class;

means for assigning an interface fingerprint for the simple class, said interface fingerprint being parsable to determine locally declared interfaces for the simple class and any superclasses of the simple class;

if the simple class does not have a superclass:

means for initializing a subclass fingerprint for the simple class; and

means for initializing an interface fingerprint for the simple class;

wherein said means f or assigning a subclass fingerprint includes:

means for copying a subclass fingerprint from said superclass into a subclass fingerprint for the simple class;

means for incrementing a subclass count of said superclass; and

means for shifting said incremented subclass count of said superclass into the subclass fingerprint for the simple class.

20. The apparatus of claim 19 , wherein said means for shifting includes:

means for finding a first empty subclass index field in said subclass fingerprint; and

means for performing an OR operation of said subclass count of said superclass into said first empty subclass index field of the simple class.

21. The apparatus of claim 20 , further comprising:

means for setting a subclass shift count of the simple class equal to a number of unused memory locations in a subclass index portion of said subclass fingerprint.

22. The apparatus of claim 19 , wherein said means for copying comprises:

means for copying a subclass fingerprint from said superclass into a java.lang.Object subclass index of a subclass fingerprint in the simple class if said superclass is java.lang.Object; and

means for copying a subclass fingerprint from said superclass into a subclass index portion of a subclass fingerprint in the simple class if said superclass is not Java.lang.Object.

23. The apparatus of claim 22 , wherein said means for assigning an interface fingerprint includes:

means for copying an interface fingerprint from said superclass into an interface fingerprint for the simple class;

means for finding an interface index for each locally declared interface of the simple class, the interface index being unique for each interface in said virtual machine; and

means for performing an OR operation of each found interface index into said copied interface fingerprint.

24. The apparatus of claim 23 , wherein each interface index is separate from its closest interface index by two, and wherein a first interface index in the virtual machine is assigned a binary one.

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 Apr 8, 2003
From: NEUENHOFEN, KAY A.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 013963/0515 →