Patent ID: 8307350

Claim:
A method performed by a computer processor, said method comprising: compiling source code to create object code, said source code comprising a plurality of classes, each of said classes having references to at least one method; for each of said classes, creating a temporary virtual function table, said temporary virtual function table comprising pointers to methods called within said classes; analyzing said temporary virtual function tables to identify chunks of virtual function tables that may be shared by two or more of said classes; creating chunks of virtual function tables, each of said chunks of virtual function tables comprising a plurality of pointers, each of said pointers being a pointer to one of said methods; for each of said classes, creating a second level virtual function table having indirection pointers, each of said indirection pointers being a pointer to one of said chunks of virtual function tables; and for each method call within said object code, creating a first instruction to retrieve a chunk from said second level virtual function table, and creating a second instruction to retrieve a pointer to one of said methods from said chunk.