System and method for generating an object structure at run time in an object-oriented programming language
    1.
    发明授权
    System and method for generating an object structure at run time in an object-oriented programming language 失效
    用于在面向对象编程语言中运行时生成对象结构的系统和方法

    公开(公告)号:US6446259B2

    公开(公告)日:2002-09-03

    申请号:US92992097

    申请日:1997-09-15

    Inventor: BRETT BEVIN R

    CPC classification number: G06F9/4433

    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.

    Abstract translation: 提供了一种语言翻译器,其在编译时确定包括至少一个虚拟基类和从其派生的至少一个类的多个对象类的存储器结构。 在编译时,在每个类对象中放置指针空间(b指针),该对象将具有与之相关的基表(b表)。 b指针在运行时指向包含派生类的基类之间的内存偏移量的关联b表。 在运行时,构造函数构造类对象,从最传统的类对象开始,并继续到基类对象。 然而,在编译时,语言翻译器不会生成虚拟表和关联的指针以及调整功能,而是在运行时生成这些操作的代码。 然后在运行时,为基类生成一个虚拟函数表。 由于在运行时已知必要的偏移量,因此可以生成所有调整功能,虚拟功能表和虚拟指针。 因此,系统完成对象的构造。

Patent Agency Ranking