Patent ID: 8887131

Claim:
A method for reducing object code size of an application that requires run-time dispatching of object oriented methods, comprising: scanning an object file corresponding to the application for references to object oriented methods in a dispatch table that performs run-time object oriented method binding; determining whether the object code or source code contains calls to the object-oriented methods that are capable of being dispatched to implementations of the object-oriented methods; finding, in a hierarchy of inheritance levels where a highest level of the hierarchy is configured to not inherit from other levels of the hierarchy and where the highest level of hierarchy is above a level that inherits from the highest level, the highest inheritance level associated with an object oriented method; designating as unused all references to object oriented methods above the highest inheritance level and all references that are not called by the application; designating as used all references to object oriented methods below the highest inheritance level; deleting from the dispatch table all references to object oriented methods that are designated as unused; eliminating a reference to the object-oriented method in the dispatch table when it is determined that the source code does not call the object-oriented method; and eliminating all of the object-oriented method implementations that are not capable of being dispatched based on the determining step by modifying the object code or a linking process.