Method and system for implementing pointers to members in a compiler for an object-oriented programming language
US5617569A · kind A · utility
Assignee
Inventors
Key dates
| Filing date | Apr 10, 1995 |
| Grant date | Apr 1, 1997 |
| Priority date | — |
| Expiry date | Apr 10, 2015 |
Classification
- Technology area (CPC Y)Emerging Cross-Sectional Technologies
- CPC primaryY10S707/99944
- WIPO fieldComputer technology
- WIPO sectorElectrical engineering
Abstract
A method and system in an object-oriented environment for determining the offset of a data member of a derived class when the derived class has a virtually inherited base class and the data member is defined in the base class. In a preferred embodiment, the base class has a data structure and a class address. The base class data structure has the data member located at a data member offset from the base class address. The derived class has a data structure and a class address. The derived class data structure includes an occurrence of the base class data structure. The occurrence of the base class data structure is located at a base class offset from the derived class address. In a preferred embodiment, the base class offset is stored at a memory location, a first field and a second field for a pointer to the data member are allocated, the data member offset is stored in the first field, an indicator of the stored base class offset is stored in the second field, the pointer is dereferenced by retrieving the base class offset using the indicator stored in the second field, retrieving the data member offset from the first field, and adding the retrieved base class offset to the retri…
Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.