IP Library Granted Patent US 7,086,039
Granted Patent B2
US 7,086,039 · App. 10/293,457 · Granted Aug 1, 2006

Compiler for optimizing source code with computed goto statements

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,086,039
App. No.
10/293,457
Granted
Aug 1, 2006
Kind
B2
Abstract

A method of translating computer source code into optimized object code. The computer source code contains a first label statement defining a first label, a second label statement defining a second label, a third label statement defining a third label, and a computed goto statement for instructing a computer to branch to the first label or to the second label, but not to the third label. The method includes generating a list of labels contained within at least a portion of the computer source code. The list of labels includes the first label and the second label, but not the third label. The method also includes translating the computer source code into an intermediate language. The translation of the computer source code includes translating the computed goto statement into an indirect goto statement within the intermediate language. The method also includes generating object code that includes the first label and the second label but does not include the third label.

Claims (30)

1. A method, performed by a computer, of translating computer source code into optimized object code, the computer source code containing a first label statement defining a first label, a second label statement defining a second label, and a third label statement defining a third label, the first label, the second label and the third label not being case labels, the computer source code also containing a computed goto statement for instructing a computer to branch to the first label or to the second label, but not to the third label, the method comprising:

a) generating a list of labels contained within at least a portion of the computer source code, the list of labels including the first label and the second label, but not the third label;

b) translating the computer source code into an intermediate language, the act of translating the computer source code including translating the computed goto statement into an indirect goto statement within the intermediate language; and

c) generating object code that includes the first label and the second label but does not include the third label.

2. The method of claim 1 , wherein the list of labels is generated before the computer source code is translated into the intermediate language.

3. The method of claim 1 , wherein the list of labels is generated concurrently with the translation of the computer source code into the intermediate language.

4. The method of claim 1 , wherein the list of labels is generated after the computer source code is translated into the intermediate language.

5. The method of claim 1 , wherein generating the list of labels includes generating a list of labels that includes all labels to which the computed goto statement can branch.

6. The method of claim 1 , wherein generating the list of labels includes generating a linked-list.

7. The method of claim 1 , wherein a compiler front-end generates the list of labels.

8. The method of claim 1 , wherein a compiler back-end generates the object source code.

9. The method of claim 1 , wherein the translation of the computer source code into the intermediate language includes translating the computed goto statement into an intermediate language indirect goto statement that refers to a complete list of labels to which the indirect goto statement can branch.

10. The method of claim 1 , wherein the translation of the computer source code into the intermediate language includes translating the computed goto statement into an intermediate language indirect goto statement that refers to an partial list of labels to which the indirect goto statement can branch.

11. The method of claim 1 , wherein the translation of the computer source code into the intermediate language includes translating the computed goto statement into an intermediate language indirect goto statement that refers to an empty list of labels.

12. A method, performed by a computer, of translating computer source code into optimized object code, the computer source code containing a first label statement defining a first label, a second label statement defining a second label, and a third label statement defining a third label, the first label, the second label and the third label not being case labels, the computer source code also containing a computed goto statement for instructing a computer to branch to the first label or to the second label, but not to the third label, the method comprising:

a) generating a list of labels contained within at least a portion of the computer source code, the list of labels including the first label and the second label, but not the third label;

b) translating the computer source code into object code that includes the first label and the second label but does not include the third label.

13. The method of claim 12 , wherein the list of labels is generated before the computer source code is translated into object code.

14. The method of claim 12 , wherein the list of labels is generated concurrently with the translation of the computer source code into object code.

15. A program storage device containing computer readable instructions that when executed by a computer performs a method of translating computer source code into optimized object code, the computer source code containing a first label statement defining a first label, a second label statement defining a second label, and a third label statement defining a third label, the first label, the second label and the third label not being case labels, the computer source code also containing a computed goto statement for instructing a computer to branch to the first label or to the second label, but not to the third label, the method comprising:

a) generating a list of labels contained within at least a portion of the computer source code, the list of labels including the first label and the second label, but not the third label;

b) translating the computer source code into an intermediate language, the act of translating the computer source code including translating the computed goto statement into an indirect goto statement within the intermediate language; and

c) generating object code that includes the first label and the second label but does not include the third label.

16. The program storage device of claim 15 , further containing instructions for generating the list of labels before the computer source code is translated into the intermediate language.

17. The program storage device of claim 15 , further containing instructions for generating the list of labels concurrently with the translation of the computer source code into the intermediate language.

18. The program storage device of claim 15 , further containing instructions for generating the list of labels after the computer source code is translated into the intermediate language.

19. A computer program stored in computer storage media that is generated by performing a method of translating computer source code into optimized object code, the computer source code containing a first label statement defining a first label, a second label statement defining a second label, a third label statement defining a third label, the first label, the second label and the third label not being case labels, the computer source code also containing a computed goto statement for instructing a computer to branch to the first label or to the second label, but not to the third label, the method comprising the following acts, which are performed by a computer system:

a) generating a list of labels contained within at least a portion of the computer source code, the list of labels including the first label and the second label, but not the third label;

b) translating the computer source code into an intermediate language, the act of translating the computer source code including translating the computed goto statement into an indirect goto statement within the intermediate language; and

c) generating object code that includes the first label and the second label but does not include the third label.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037302/0579 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 13, 2002
From: LAM, MICHAEL SHUNGKAI
To: SUN MICROSYSTEMS, INC.
Reel/Frame 013490/0481 →