Method for implementing virtual function tables in a compiler for an object-oriented programming language
AssigneeMicrosoft Corporation
InventorJames L. Adcock
Life of this patent
Estimating the term…
Loading patent…
AssigneeMicrosoft Corporation
InventorJames L. Adcock
Estimating the term…
A method for a computer compiler for an object-oriented programming language for implementing virtual functions is provided. In preferred embodiments of the present invention, the virtual function table for a class contains a tile table and a plurality of sub-tables. The tile table contains pointers to the sub-tables, and the sub-tables contain pointers to the virtual function members of the class. Each child class shares a sub-table of the parent class when the child class does not override a function in that sub-table. If the child class overrides a function, then the child is allocated its own sub-table. Each virtual function member for a class is identified by a tile table offset and a sub-table offset.
A method in a computer system for generating a virtual function table for a class, the class specifying an object type in an object-oriented environment, the computer system having memory, the class having a plurality of virtual function members, each virtual function member having associated executable code, the virtual function table having a tile table and a plurality of sub-tables, the method comprising the steps of:
A method in a computer system for generating a virtual function table for a child class, the computer system having an associated memory, the child class defined in terms of a parent class and function members, the parent class having a plurality of virtual function members, the parent class having a virtual function table, the parent virtual function table comprising a parent tile table and a plurality of parent sub-tables, the parent tile table containing pointers to the parent sub-tables, the parent sub-tables containing pointers to the parent virtual function members, the child class having a function member that overrides a virtual function member of the parent class, the method comprising the steps of:
A method in a computer system for accessing a virtual function member for a class, the class having a virtual function table and a plurality of virtual function members, the virtual function members having associated executable code, the virtual function table having a tile table and a plurality of sub-tables, the tile table containing pointers to the sub-tables, the sub-tables containing pointers to the executable code of the virtual function members, each virtual function member having a unique identifier, the unique identifier indicating a tile table entry and a sub-table entry, the method comprising the steps of:
A method in a computer system for compiling a computer program, the computer program having a class definition for a class, the method comprising the steps of:
A method in a computer system for compiling a computer program, the program having a parent class definition for a parent class, the parent class definition including a plurality of virtual function members, the parent class having a tile table and a plurality of sub-tables, the tile table containing reference to the sub-tables, the sub-tables containing references to the virtual function members of the parent class, the method comprising the steps of:
A method in a computer system for accessing a virtual function member of a class during execution of an object-oriented program, the method comprising the steps of:
A method in a computer system for generating a virtual function table from a class definition of a class, the method comprising the steps of:
A method in a computer system for generating a virtual function for a child class, the computer system having an associated memory, the child class defined in terms of a parent class and function members, the parent class having a plurality of virtual function members, the parent class having a virtual function table, the parent virtual function table comprising a parent tile table and a plurality of parent sub-tables, the parent tile table containing pointers to the parent sub-tables, the parent sub-tables containing pointers to the parent virtual function members, the child class having a function member that overrides a virtual function member of the parent class, the method comprising the steps of:
A method in a computer system for compiling a computer program, the computer system having a class, the class having a class definition, the method comprising the steps of:
A method in a computer system for compiling a computer program, the computer program having a parent class definition of a parent class and having a child class definition of a child class, the parent class and the child class having a plurality of virtual functions, the child class inheriting the parent class, the method comprising the steps of:
Dependencies are inferred from the claim text.