摘要 |
A method for allowing faster data structure type checking. In one embodiment, successive type hierarchy references corresponding to a data object are cached within the data structure of the data objet. The data structure may include a sub-root log to store successive supertypes (type hierarchy references) of the data structure type hierarchy. This allows for fast type checking as only the sub-root log need be accessed to determine class membership. In one embodiment, three fields are used to store the three successive references to a given type's supertype hierarchy. In an alternative embodiment, all references to a given type's supertype hierarchy may be stored in a type data structure. In another alternative embodiment, the number of type hierarchy references used may be dynamically determined at run time for a given application. |