Patent ID: 7058943

Claim:
An apparatus comprising: at least one processor; a memory coupled to the at least one processor; a first compilation unit residing in the memory, the first compilation unit comprising a plurality of object oriented classes that are part of an object oriented program, wherein the object oriented program is defined by the combination of the first compilation unit and at least one other compilation unit; and a compiler residing in the memory and executed by the at least one processor in a partial compilation environment, the compiler allocating at least one object in the first compilation unit to an invocation stack frame for a method in the first compilation unit that allocates the at least one object, wherein the compiler comprises: an escape analysis mechanism that operates on the first compilation unit prior to a second compilation unit and marks each instruction in the first compilation unit that allocates a new object as one of global escape, no escape, and arg escape based on information available from classes visible in the first compilation unit but not visible in the uncompiled second compilation unit; and an object allocation mechanism that allocates at least one object that is created by an instruction marked as no escape by the escape analysis mechanism to an invocation stack frame for a method that allocates the object prior to compilation of the second compilation unit.