Runtime type identification of an object utilizing class inheritance relationships
Embodiments of the present disclosure relate to runtime type identification (RTTI) of an object. In an embodiment, a computer-implemented method is disclosed. A class inheritance relationship between a plurality of classes in at least one source code section is generated. Respective type identifications are assigned to identify the classes in the class inheritance relationship. In accordance with presence of a first operation related to accessing a target pointer to an object of a target class of the classes, a type identification for the target class is caused to be recorded with at least one bit of a memory address of the target pointer that can be omitted in addressing the target pointer. RTTI is caused to be performed based on the class inheritance relationship and the at least one bit of the memory address of the target pointer. In other embodiments, a system and a computer program product are disclosed.
International Business Machines Corporation
G G G G
G06F G06F G06F G06F
additional inventional inventional inventional
Ke Wen Kang Zixuan Qing Shan
Lin Zhang Wu Zhang