← Back to Patent Explorer
US5367685A Expired / Lapsed US ⏱️ 0.0 years remaining

Method and apparatus for resolving data references in generated code

Assignee: Sun Microsystems Inc
•
Filing: 1992-12-22
•
Granted: 1994-11-22
•
Expires: 2012-12-22
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

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 rewriting, 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 instruction is a symbolic or a numeric reference.

Inventors

  • 👤 James Gosling

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-29 18:26
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/40; G06F8/41; G06F8/44; G06F8/447; G06F8/54; G06F9/00; G06F9/06; G06F9/44; G06F9/445; G06F9/44521; G06F9/455; G06F9/45504; G06F9/45508

Claims Analysis

Total Claims: 12
Claim 1
Independent Claim 164 words
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 interleavingly.
Claim 2
Dependent Claim 164 words
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 interleavingly.
Claim 3
Dependent Claim 27 words
The method as set forth in claim 1, wherein, said program in source code form is implemented in source code form of an object oriented programming language.
Claim 4
Dependent Claim 14 words
The method as set forth in claim 2, wherein, said programming language is C.
Claim 5
Dependent Claim 14 words
The method as set forth in claim 2, wherein, said programming language is C++.
Claim 6
Dependent Claim 62 words
The method as set forth in claim 1, wherein, said program execution control is a program counter; said continuing interpretation in step c) is achieved by performing said step b) after said step c) without incrementing said program counter; and said continuing interpretation in said step d) is achieved by performing said step b) after said d) after incrementing said program counter.
Claim 7
Dependent Claim 220 words
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.
Claim 8
Dependent Claim 220 words
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.
Claim 9
Dependent Claim 27 words
The apparatus as set forth in claim 6, wherein, said program in source code form is implemented in source code form of an object oriented programming language.
Claim 10
Dependent Claim 14 words
The apparatus as set forth in claim 7, wherein, said programming language is C.
Claim 11
Dependent Claim 14 words
The apparatus as set forth in claim 7, wherein, said programming language is C++.
Claim 12
Dependent Claim 17 words
The apparatus as set forth in claim 6, wherein, said program execution control is a program counter.

References Cited (Backward Citations)

US4667290A Cited
US4729096A Cited
US5313614A Cited
US5201050A Cited
US5307492A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 1997-11-21 1998-05-23 1998-11-22 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2001-11-21 2002-05-23 2002-11-22 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2005-11-21 2006-05-23 2006-11-22 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag