Invention Grant
US6446259B2 System and method for generating an object structure at run time in an object-oriented programming language
失效
用于在面向对象编程语言中运行时生成对象结构的系统和方法
- Patent Title: System and method for generating an object structure at run time in an object-oriented programming language
- Patent Title (中): 用于在面向对象编程语言中运行时生成对象结构的系统和方法
-
Application No.: US92992097Application Date: 1997-09-15
-
Publication No.: US6446259B2Publication Date: 2002-09-03
- Inventor: BRETT BEVIN R
- Applicant: COMPAQ COMPUTER CORP
- Priority: US92992097 1997-09-15
- Main IPC: G06F9/44
- IPC: G06F9/44

Abstract:
A language translator is provided which determines memory structure at compile time for a plurality of object classes including at least one virtual base class and at least one class derived therefrom. At compile time, space for pointers (b-pointers) is set aside in each class object that will have a base table (b-table) associated therewith. The b-pointers point, at run time, to an associated b-table containing memory offsets between the base classes of the derived class. At run time, constructors construct the class objects, starting from the most derived class object and proceeding through to the base class object. However, instead of generating the virtual tables and associated pointers, as well as the adjusting functions, at compile time, the language translator generates the code for these operation to be executed at run time. Then at run time, a virtual function table is generated for the base class. Since the necessary offsets are known at run time, all of the adjusting functions, the virtual function tables, and the virtual pointers may be generated. Thus, the system completes the construction of an object.
Information query