Patent ID: 6308315
Filing Date: 2001-10-23
Classification: G06F

Abstract:
A code generator for generating, from code in a program, native code executable by a computer system, the computer system including a memory subsystem including a heap in which objects are stored and a stack in which method variables are stored, the code generator comprising:A. a code portion receiver configured to receive a portion of the program code for which the native executable code is to be generated;B. an object instantiation detector configured to determine whether the received program code portion includes an operator for enabling instantiation of a new object;C. a variable promotion eligibility detector configured to, in response to a positive determination by said object instantiation detector, determine whether the object to be instantiated contains a variable to be used in processing of the received program code portion which can be promoted to a method variable, andD. a native code generator configured to, in response to positive determination by said variable promotion eligibility detector, generate native code to enable said variable to be instantiated on the stack.