Claims
- 1. A method of tracking references to objects of an object oriented programming environment, said method comprising:
determining whether a command is likely to place a reference to an object on an execution stack of said object-oriented programming environment; translating said command into another command when said determining determines that said command is likely to place a reference to an object on an execution stack of said object-oriented programming environment; and placing a reference to said object on a reference stack associated with said execution stack when said another command is executed.
- 2. A method as recited in claim 1, wherein said object-oriented programming environment is a Java operating environment.
- 3. A method as recited in claim 2, wherein said determining of whether a command is likely to place a reference on said execution stack is performed during Java Bytecode verification.
- 4. A method as recited in claim 3, wherein said determining of whether a command is likely to place a reference on said execution stack operates to determine whether a Getfield, Aload, Getstatic, or Return command is being performed.
- 5. A method as recited in claim 4, wherein said determining of whether a command is likely to place a reference on said execution stack further comprises:
determining whether there is a change in the flow control.
- 6. A method as recited in claim 4, wherein said determining of whether a command is likely to place a reference on said execution stack further comprises:
determining whether a Putfield command is likely to overwrite a reference to an object on the execution stack before said reference is used.
- 7. A method as recited in claim 1, wherein said reference stack and said execution stack have the same size.
- 8. A method as recited in claim 1, wherein at least one reference to an object is stored in an entry with an offset that is the same as the offset used to store said at least one reference in said execution stack, when said another command is executed.
- 9. A method of tracking references to Java objects in a Java programming environment, said method comprising:
determining whether said Java command is likely to place the only reference to a Java object on the execution stack; translating said command into another command when said determining determines that said Java command is likely to place the only reference to a Java object on the execution stack; executing said Java command; placing a reference to said object on a reference stack associated with said execution stack when said another command is executed; and wherein said determining of whether said Java command is likely to place the only reference to a Java object on the execution stack is performed during Java Bytecode verification.
- 10. A method as recited in claim 9, wherein said determining that said Java command is likely to place the only reference to a Java object on the execution stack further comprises:
determining whether a Getfield, Aload, Getstatic, or Areturn command is being performed.
- 11. A method as recited in claim 10, wherein said Java command is likely to place the only reference to a Java object on the execution stack further comprises:
determining whether there is a change in the flow control.
- 12. A method as recited in claim 11, wherein said determining of whether said Java command is likely to place the only reference to a Java object on the execution stack further comprises:
determining whether a Putfield command is likely to overwrite a reference to an object on the execution stack before said reference is used.
- 13. A method as recited in claim 12, wherein said reference stack and said execution stack have the same size.
- 14. A method as recited in claim 13, wherein at least one reference to a Java object is stored in an entry with an offset that is the same as the offset used to store said at least one reference in said execution stack, when said another command is executed.
- 15. A Java Bytecode verifier suitable for operating in a Java operating environment,
wherein said Bytecode verifier operates to determine whether there is at least one Java command in a stream of Java Bytecode commands such that said at least one Java command is likely to place the only reference to a Java object on the execution stack; wherein said Bytecode verifier operates to translate said Java command into another Java command when said Java command is likely to place the only reference to a Java object on the execution stack; and wherein a reference associated with said command is placed on a reference stack as well as said execution stack when said another command is executed.
- 16. A Java Bytecode verifier as recited in claim 15, wherein said Bytecode verifier operates to determine whether a Getfield, Aload, Getstatic, or Areturn command is being performed
- 17. A Java Bytecode verifier as recited in claim 16, wherein said Bytecode verifier operates to determine whether there is a change in the flow control.
- 18. A Java Bytecode verifier as recited in claim 16, wherein said Bytecode verifier operates to determine whether a Putfield command is likely to overwrite a reference to an object on the execution stack before said reference is used.
- 19. A Java Bytecode verifier as recited in claim 16, wherein said Bytecode verifier operates to:
determine whether there is a change in the flow control; and determine whether a Putfield command is likely to overwrite a reference to an object on the execution stack before said reference is used.
- 20. A computer readable medium including computer program code for tracking references to objects of an object-oriented programming environment, said computer readable medium comprising:
computer program code for determining whether a command is likely to place a reference to an object on an execution stack of said object-oriented programming environment; computer program code for translating said command into another command when said determining determines that said command is likely to place a reference to an object on an execution stack of said object-oriented programming environment; and computer program code for placing a reference to said object on a reference stack associated with said execution stack when said another command is executed.
- 21. A computer readable medium as recited in claim 1, wherein said object-oriented programming environment is a Java operating environment.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is related to U.S. patent application Ser. No. ______ (Att. Dkt. No. SUN1P821/P5972), entitled “IDENTIFYING AND TRACKING OBJECT REFERENCES IN A JAVA PROGRAMMING ENVIRONMENT”, filed on an even date, and hereby incorporated herein by reference for all purposes.