Patent ID: 6948156

Claim:
A method of type checking class types by a virtual machine, said method comprising: generating, at load time, when a first class is loaded into the virtual machine, a class hierarchy for said first class, wherein said class hierarchy represents all parent classes of said first class in a hierarchical parent to child relationship, and wherein said class hierarchy is arranged as a first array of parent references to consecutive parents of said first class organized in accordance with said hierarchical relationship; loading, at load time, said class hierarchy in a first internal class representation of said first class inside said virtual machine, thereby enabling all parents of said first class to be determined without referencing another internal class representation of the parent classes; receiving, by said virtual machine, at runtime after said internal class representation has been loaded inside said virtual machine, a first and a second reference, wherein said first and second references respectively reference said first and a second class; finding, by said virtual machine at runtime, said first internal class representation for said first class; reading said class hierarchy in said first internal class representation; and determining whether said second class is represented in said class hierarchy by accessing said first array of parent references.