×

Method and apparatus for transforming Java Native Interface function calls into simpler operations during just-in-time compilation

  • US 7,490,320 B2
  • Filed: 02/18/2005
  • Issued: 02/10/2009
  • Est. Priority Date: 02/18/2005
  • Status: Expired due to Fees
First Claim
Patent Images

1. A computer-implemented method in a data processing system for transforming native interface function calls into simpler operations during just-in-time (JIT) compilation, the computer-implemented method comprising:

  • generating a list of shapes rendered in an intermediate language of a JIT compiler and representing a plurality of native interface function calls, wherein the generated list of shapes comprises intermediate representation of the plurality of native interface function calls and usage of a native interface environment variable and user arguments by the plurality of native function calls;

    identifying a list of native interface function calls for possible transformation by matching the plurality of native interface function calls made in the native language program against the generated list of shapes;

    determining, for each of the list of identified native interface function calls, if the native interface environment variable is used in a same manner as in a shape in the list of generated shapes;

    responsive to the native interface environment variable being used in the same manner as a shape in the generated list of shapes, determining is a match exists between the shape and an intermediate representation of the native interface function call,wherein a match exists if the intermediate representation of the native interface function call has a same number of arguments and each argument in the native interface function call is compatible with a type of argument in the shape;

    responsive to a match existing between the shape and the intermediate representation of the native interface function call, adding the native interface function call to the list of native interface function calls,wherein the list of native interface function calls is sorted in an order of appearance in the intermediate representation of the plurality of native interface function calls;

    performing a definition and use analysis on each native interface function call in the list of identified native interface function calls by tracking a plurality of values passed as parameters to a plurality of arguments of native interface functions, wherein the definition and use analysis included tracking a plurality of objects passed to the list of native interface function calls to point where the plurality of objects are passed as arguments to a native interface function;

    determining if the definition and use analysis returns a conclusive result; and

    responsive to the definition and use analysis returning a conclusive result, determining a type of the native interface function call; and

    transforming a portion of the list of native interface function calls into one of a constant value, an internal JIT compiler operation, and a simpler intermediate representation based on a result of the definition and use analysis.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×