Patent ID: 7181732

Claim:
A method for type tagging values in a compiled activation frame to facilitate garbage collection, wherein the method operates in a mixed-mode system that supports both interpretation of byte codes and execution of compiled native code, the method comprising: receiving an invocation of a method; creating an activation frame for the method on the execution stack; interpreting byte code methods; wherein if the method is executing in interpreted mode, the interpretation involves maintaining a tag for each value in the activation frame during execution, wherein a given tag indicates whether a given value is a reference type or a primitive type; and wherein if the method is executing in compiled mode, prior to receiving the invocation for the method, the method further comprises: compiling byte codes of the method into native code; wherein the compilation process involves gathering type information for each value in the activation frame of the method and embedding the type information into the native code associated with the method, and creating the activation frame involves allocating space for tags for each value in the activation frame, wherein a given tag indicates whether a given value is a reference type or a primitive type; wherein operations to store type information into the tags in the activation frame are deferred until a subsequent garbage collection operation takes place.