Method and apparatus for resolving data references in generated code
DC CAFCFirst Claim
1. In a computer system comprising a program in source code form, a method for generating executable code for said program and resolving data references in said generated code, said method comprising the steps of:
- a) generating executable code in intermediate form for said program in source code form with data references being made in said generated code on a symbolic basis, said generated code comprising a plurality of instructions of said computer system;
b) interpreting said instructions, one at a time, in accordance to a program execution control;
c) resolving said symbolic references to corresponding numeric references, replacing said symbolic references with their corresponding numeric references, and continuing interpretation without advancing program execution, as said symbolic references are encountered while said instructions are being interpreted; and
d) obtaining data in accordance to said numeric references, and continuing interpretation after advancing program execution, as said numeric references are encountered while said instruction are being interpreted;
said steps b) through d) being performed iteratively and interleaving.
0 Assignments
Litigations
0 Petitions
Reexamination
Accused Products
Abstract
A hybrid compiler-interpreter comprising a compiler for “compiling” source program code, and an interpreter for interpreting the “compiled” code, is provided to a computer system. The compiler comprises a code generator that generates code in intermediate form with data references made on a symbolic basis. The interpreter comprises a main interpretation routine, and two data reference handling routines, a dynamic field reference routine for handling symbolic references, and a static field reference routine for handling numeric references. The dynamic field reference routine, when invoked, resolves a symbolic reference and rewrites the symbolic reference into a numeric reference. After re-writing, the dynamic field reference routine returns to the main interpretation routine without advancing program execution to the next instruction, thereby allowing the rewritten instruction with numeric reference to be reexecuted. The static field reference routine, when invoked, obtain data for the program from a data object based on the numeric reference. After obtaining data, the static field reference routine advances program execution to the next instruction before returning to the interpretation routine. The main interpretation routine selectively invokes the two data reference handling routines depending on whether the data reference in an interaction in a symbolic or a numeric reference.
27 Citations
41 Claims
-
1. In a computer system comprising a program in source code form, a method for generating executable code for said program and resolving data references in said generated code, said method comprising the steps of:
-
a) generating executable code in intermediate form for said program in source code form with data references being made in said generated code on a symbolic basis, said generated code comprising a plurality of instructions of said computer system;
b) interpreting said instructions, one at a time, in accordance to a program execution control;
c) resolving said symbolic references to corresponding numeric references, replacing said symbolic references with their corresponding numeric references, and continuing interpretation without advancing program execution, as said symbolic references are encountered while said instructions are being interpreted; and
d) obtaining data in accordance to said numeric references, and continuing interpretation after advancing program execution, as said numeric references are encountered while said instruction are being interpreted;
said steps b) through d) being performed iteratively and interleaving. - View Dependent Claims (2, 3, 4, 5, 14, 15, 16)
said continuing interpretation in said step d) is achieved by performing said step b) after said d) after incrementing said program counter.
-
-
14. The method of claim 3, wherein said substep of storing said numerical reference comprises the substep of replacing said symbolic reference with said numerical reference.
-
15. The method of claim 3, wherein said step of resolving said symbolic reference further comprises the substep of executing said instruction containing said symbolic reference using the stored numerical reference.
-
16. The method of claim 3, wherein said step of resolving said symbolic reference further comprises the substep of advancing program execution control after said substep of executing said instruction containing said symbolic reference.
-
6. In a computer system comprising a program in source code form, an apparatus for generating executable code for said program and resolving data references in said generated code, said apparatus comprising:
-
a) compilation means for receiving said program in source code form and generating executable code in intermediate form for said program in source code form with data references being made in said generated code on a symbolic basis, said generated code comprising a plurality of instructions of said computer system;
b) interpretation means for receiving said generated code and interpreting said instructions, one at a time;
c) dynamic reference handling means coupled to said interpretation means for resolving said symbolic references to corresponding numeric references, replacing said symbolic references with their corresponding numeric references, and continuing interpretation by said interpretation means without advancing program execution, as said symbolic references are encountered while said instructions are being interpreted by said interpretation means; and
d) static reference handling means coupled to said interpretation means for obtaining data in accordance to said numeric references, and continuing interpretation by said interpretation means after advancing program execution, as said numeric references are encountered while said instruction are being interpreted by said interpretation means;
said interpretation means, said dynamic reference handling means, and said static reference handling means performing their corresponding functions iteratively and interleavingly. - View Dependent Claims (7, 8, 9, 10)
-
-
11. An apparatus comprising:
-
12. A computer-readable medium containing instructions for controlling a data processing system to perform a method for interpreting intermediate form object code comprised of instructions, certain of said instructions containing one or more symbolic references, said method comprising the steps of:
-
13. A computer-implemented method for executing instructions, certain of said instructions containing one or more symbolic references, said method comprising the steps of:
-
17. In a computer system comprising a program, a method for executing said program comprising the steps of:
-
18. A computer-implemented method for executing program operations, each operation being comprised of a set of instructions, certain of said instructions containing one or more symbolic references, said method comprising the steps of:
-
19. A memory for use in executing a program by a processor, the memory comprising:
-
20. A computer-implemented method comprising:
-
21. A data processing system, comprising:
-
22. An apparatus comprising:
-
23. A computer-implemented method, comprising:
-
24. A computer-implemented method for executing a program comprised of bytecodes, the method comprising:
-
25. A data processing system, comprising:
-
26. A computer program product containing instructions for causing a computer to perform a method for executing a program comprised of bytecodes, the method comprising:
-
27. A computer-implemented method comprising:
-
28. A data processing system, comprising:
-
29. A computer program product containing instructions for causing a computer to perform a method, the method comprising:
-
30. A computer-implemented method comprising:
-
31. A data processing system, comprising:
-
32. A computer program product containing control instructions for causing a computer to perform a method, the method comprising:
-
33. A computer-implemented method, comprising:
-
34. A data processing system, comprising:
-
35. A computer program product containing control instructions for causing a computer to perform a method, the method comprising:
-
36. A computer-implemented method for executing a program comprised of bytecodes, the method comprising:
-
37. A data processing system, comprising:
-
38. A computer program product containing instructions for causing a computer to perform a method for executing a program comprised of bytecodes, the method comprising:
-
39. A computer-implemented method comprising:
-
40. A data processing system, comprising:
-
41. A computer program product containing control instructions for causing a computer to perform a method, the method comprising:
Specification