Patent ID: 7263532

Claim:
A method for compiling an object-oriented program, the program executed in a system employing region-based memory management and the method comprising: receiving source code for an object-oriented program; performing a points-to analysis on the source code to develop at least one shape graph for the program; adding instrumentation to the program, the instrumentation configured: to cause objects to be created in regions based on information in the shape graph and to cause deletion of all objects in a region when a determination is made that no objects in the region are referenced by any fields outside the region; compiling the program to produce executable code for the program; and storing the executable code in a computer-readable storage medium; wherein performing a points-to analysis comprises: creating alias sets for parameters based on statements contained in the methods of the object-oriented program; unifying the alias sets based on statements contained in the methods of the program; creating at least one shape graph with nodes defined by alias sets and edges defined by field mappings between alias sets; and associating the nodes of the shape graph with potential memory regions.