Method and apparatus for performing native binding to execute native code
DCFirst Claim
Patent Images
1. A method of translating subject program code executable by a subject processor into target program code executable by a target processor, said method comprising:
- dividing the subject program code into a plurality of subject program code units;
translating one or more of the subject program code units into one or more target program code units; and
executing the one or more target program code units on the target processor;
wherein the translating step includes identifying a subject function in the subject program code having a corresponding native function of native code, wherein the native code is code executable by the target processor, and identifying the native function of the native code which corresponds to the identified subject function; and
wherein the executing step includes executing the native function on the target processor instead of executing a translated version of the identified subject function, including transforming zero or more function parameters from a target code representation to a native code representation, invoking the native function with the transformed zero or more function parameters according to a prototype of the native function, and transforming zero or more return values of the invoked native function from a native code representation to a target code representation.
4 Assignments
Litigations
1 Petition
Accused Products
Abstract
A native binding technique is provided for inserting calls to native functions during translation of subject code to target code, such that function calls in the subject program to subject code functions are replaced in target code with calls to native equivalents of the same functions. Parameters of native function calls are transformed from target code representations to be consistent with native code representations, native code calling conventions, and native function prototypes.
32 Citations
114 Claims
-
1. A method of translating subject program code executable by a subject processor into target program code executable by a target processor, said method comprising:
-
dividing the subject program code into a plurality of subject program code units; translating one or more of the subject program code units into one or more target program code units; and executing the one or more target program code units on the target processor; wherein the translating step includes identifying a subject function in the subject program code having a corresponding native function of native code, wherein the native code is code executable by the target processor, and identifying the native function of the native code which corresponds to the identified subject function; and wherein the executing step includes executing the native function on the target processor instead of executing a translated version of the identified subject function, including transforming zero or more function parameters from a target code representation to a native code representation, invoking the native function with the transformed zero or more function parameters according to a prototype of the native function, and transforming zero or more return values of the invoked native function from a native code representation to a target code representation. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38)
-
-
39. A computer-readable storage medium having software resident thereon in the form of computer-readable code executable by a computer having a target processor to perform the steps of:
-
dividing a subject program in subject program code executable by a subject processor into a plurality of subject program code units; translating one or more of the subject program code units into one or more target program code units of target program code; and executing the one or more target program code units on the target processor; wherein the translating step includes identifying a subject function in the subject program code having a corresponding native function of native code, wherein the native code is code executable by the target processor, and identifying the native function of the native code which corresponds to the identified subject function; and wherein the executing step includes executing the native function on the target processor instead of executing a translated version of the identified subject function, including transforming zero or more function parameters from a target code representation to a native code representation, invoking the native function with the transformed zero or more function parameters according to a prototype of the native function, and transforming zero or more return values of the invoked native function from a native code representation to a target code representation. - View Dependent Claims (40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76)
-
-
77. A computer apparatus, comprising:
-
a target processor; and a memory containing translator code executed by the target processor to perform the steps of; dividing a subject program in subject program code executable by a subject processor into a plurality of subject program code units; translating one or more of the subject program code units into one or more target program code units of target program code; and executing the one or more target program code units on the target processor; wherein the translating step includes identifying a subject function in the subject program code having a corresponding native function of native code, wherein the native code is code executable by the target processor, and identifying the native function of the native code which corresponds to the identified subject function; and wherein the executing step includes executing the native function on the target processor instead of executing a translated version of the identified subject function, including transforming zero or more function parameters from a target code representation to a native code representation, invoking the native function with the transformed zero or more function parameters according to a prototype of the native function, and transforming zero or more return values of the invoked native function from a native code representation to a target code representation. - View Dependent Claims (78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114)
-
Specification