Automatic conversion of source code from 32-bit to 64-bit
First Claim
Patent Images
1. A method in a data processing system, comprising the steps of:
- receiving 32-bit source code;
generating, from the 32-bit source code, a 32-bit interface file including statements describing characteristics of parameters in the 32-bit source code, wherein generating a 32-bit interface file includes invoking an interface generator that;
scans the 32-bit source code and creates the interface file according to a definition; and
adds to the interface file the statements describing characteristics of the parameters by parsing the 32-bit source code; and
automatically generating, based on the statements in the 32-bit interface file, a 32-bit to 64-bit conversion stub that is used by the 32-bit source code to invoke 64-bit code, wherein automatically generating a 32-bit to 64-bit conversion stub includes invoking a stub generator that;
reads the 32-bit interface file to populate a hash table with information identifying the parameters in the interface file;
re-reads the 32-bit interface file to populate the hash table with information indicating processing that occurs for the statements in the interface file; and
generates the 32-bit to 64-bit conversion stub using the hash table.
2 Assignments
0 Petitions
Accused Products
Abstract
In accordance with methods and systems consistent with the present invention, a system that automatically generates 32-bit to 64 bit interfaces to 64-bit code is provided. These interfaces provide for the use of optional parameters and, because they are written in 64-bit code, also allow for parameter checking. These interfaces are automatically generated to allow a programmer to maintain compatibility with 64-bit libraries from 32-bit source code.
136 Citations
27 Claims
-
1. A method in a data processing system, comprising the steps of:
-
receiving 32-bit source code; generating, from the 32-bit source code, a 32-bit interface file including statements describing characteristics of parameters in the 32-bit source code, wherein generating a 32-bit interface file includes invoking an interface generator that; scans the 32-bit source code and creates the interface file according to a definition; and adds to the interface file the statements describing characteristics of the parameters by parsing the 32-bit source code; and automatically generating, based on the statements in the 32-bit interface file, a 32-bit to 64-bit conversion stub that is used by the 32-bit source code to invoke 64-bit code, wherein automatically generating a 32-bit to 64-bit conversion stub includes invoking a stub generator that; reads the 32-bit interface file to populate a hash table with information identifying the parameters in the interface file; re-reads the 32-bit interface file to populate the hash table with information indicating processing that occurs for the statements in the interface file; and generates the 32-bit to 64-bit conversion stub using the hash table. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computer-readable memory device containing instructions for controlling a data processing system to perform a method comprising the steps of:
-
receiving 32-bit source code; generating, from the 32-bit source code, a 32-bit interface file including statements describing characteristics of parameters in the 32-bit source code, wherein generating a 32-bit interface file includes invoking an interface generator that scans the 32-bit source code and creates the interface file according to a definition; and adds to the interface file the statements describing characteristics of the parameters by parsing the 32-bit source code; and automatically generating, based on the statements in the 32-bit interface file, a 32-bit to 64-bit conversion stub that is used by the 32-bit source code to invoke 64-bit code, wherein automatically generating a 32-bit to 64-bit conversion stub includes invoking a stub generator that reads the 32-bit interface file to populate a hash table with information identifying the parameters in the interface file; re-reads the 32-bit interface file to populate the hash table with information indicating processing that occurs for the statements in the interface file; and generates the 32-bit to 64-bit conversion stub using the hash table. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A data processing system comprising:
-
means for receiving 32-bit source code; means for generating, from the 32-bit source code, a 32-bit interface file including statements describing characteristics of parameters in the 32-bit source code, wherein the means for generating a 32-bit interface file includes means for invoking an interface generator that scans the 32-bit source code and creates the interface file according to a definition; and adds to the interface file the statements describing characteristics of the parameters by parsing the 32-bit source code; and means for automatically generating, based on the statements in the 32-bit interface file, a 32-bit to 64-bit conversion stub that is used by the 32-bit source code to invoke 64-bit code, wherein the means for automatically generating a 32-bit to 64-bit conversion stub includes means for invoking a stub generator that reads the 32-bit interface file to populate a hash table with information identifying the parameters in the interface file; re-reads the 32-bit interface file to populate the hash table with information indicating processing that occurs for the statements in the interface file; and generates the 32-bit to 64-bit conversion stub using the hash table. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26, 27)
-
Specification