Method and apparatus for generating platform-standard object files containing machine-independent code
First Claim
1. A method for generating a platform-standard object file, the method comprising the steps of:
- a) providing a machine-independent software module, wherein the machine-independent software module contains abstract code defining at least one procedure;
b) analyzing said abstract code to determine whether any global variables are defined in said machine-independent software module;
c) if any global variables are defined in said machine-independent software module, thenc1) generating a list of definitions of said any global variables;
c2) storing said list of definitions in said platform-standard object file;
d) analyzing said abstract code to determine whether said at least one procedure references any external variables or external procedures;
e) if said at least one procedure references any external variables or external procedures, thene1) generating a list of symbol references indicative of said any external variables or external procedures;
e2) storing said list of symbol references in said platform-standard object file;
f) generating a sequence of machine instructions for calling an execution routine when a client calls said at least one procedure;
g) storing said sequence of machine instructions in said platform-standard object file; and
h) storing said abstract code in said platform-standard object file.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for generating a platform-standard object file containing machine-independent abstract code. Source code which defines a procedure is convened into abstract code which makes no assumptions about the platform on which the procedure will be executed. An abstract code platform-standard object file is generated based on the abstract code. The abstract code platform-standard object file includes a list of definitions of any global variables defined in the abstract code, a list of symbol references indicative of any external variables or external procedures referenced in the abstract code, a sequence of machine instructions for calling an execution routine when a client calls the procedure, and the abstract code which defines the procedure. The abstract code is preferably compressed before it is stored in the abstract code platform-standard object file. When a program including the abstract code platform-standard object file is executed, it is dynamically linked to the execution routine. When the procedure is called, the execution routine is invoked. The execution routine executes the procedure by interpreting the abstract code or generating machine-code responsive to the abstract code. The execution routine may be an execution control unit which selects between various execution techniques based on runtime factors, such as the frequency with which the procedure is called.
129 Citations
21 Claims
-
1. A method for generating a platform-standard object file, the method comprising the steps of:
-
a) providing a machine-independent software module, wherein the machine-independent software module contains abstract code defining at least one procedure; b) analyzing said abstract code to determine whether any global variables are defined in said machine-independent software module; c) if any global variables are defined in said machine-independent software module, then c1) generating a list of definitions of said any global variables; c2) storing said list of definitions in said platform-standard object file; d) analyzing said abstract code to determine whether said at least one procedure references any external variables or external procedures; e) if said at least one procedure references any external variables or external procedures, then e1) generating a list of symbol references indicative of said any external variables or external procedures; e2) storing said list of symbol references in said platform-standard object file; f) generating a sequence of machine instructions for calling an execution routine when a client calls said at least one procedure; g) storing said sequence of machine instructions in said platform-standard object file; and h) storing said abstract code in said platform-standard object file. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method for executing a computer program on a platform, said computer program including a first procedure implemented in a first platform-standard object file which calls a second procedure defined in a software module, the method comprising the steps of:
-
a) generating a second platform-standard object file based on said software module, said second platform-standard object file including machine-independent abstract code; b) statically linking said first platform-standard object file to said second platform-standard object file; c) dynamically linking said second platform-standard object file to an execution routine during execution of said program; d) invoking said execution routine when said first procedure calls said second procedure; and e) causing said execution routine to execute said second procedure responsive to said code in said second platform-standard object file. - View Dependent Claims (8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. An apparatus for generating a platform-standard object file from a machine-independent software module stored on a storage unit, wherein the machine-independent software module contains abstract code defining at least one procedure, the apparatus comprising:
-
a global variable processing unit for analyzing said abstract code to determine whether any global variables are defined in said machine-independent software module, if any global variables are defined in said machine-independent software module, then said global variable processing unit generating a list of definitions of said any global variables and storing said list of definitions in said platform-standard object file; an external reference processing unit for analyzing said abstract code to determine whether said at least one procedure references any external variables or external procedures, if said at least one procedure references any external variables or external procedures, then said external reference processing unit generating a list of symbol references indicative of said any external variables or external procedures and storing said list of symbol references in said platform-standard object file; a call routine generation unit for generating a sequence of machine instructions for calling an execution routine when a client calls said at least one procedure and storing said sequence of machine instructions in said platform-standard object file; and an abstract code encapsulating unit for storing said abstract code in said platform-standard object file. - View Dependent Claims (17, 18, 19, 20, 21)
-
Specification