IP Library Granted Patent US 7,228,532
Granted Patent B1
US 7,228,532 · App. 10/603,438 · Granted Jun 5, 2007

Method and apparatus to facilitate code verification and garbage collection in a platform-independent virtual machine

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,228,532
App. No.
10/603,438
Granted
Jun 5, 2007
Kind
B1
Abstract

One embodiment of the present invention provides a system that facilitates code verification and garbage collection in a platform-independent virtual machine. The system operates by first receiving a code module written in a platform-independent language. Next, the system examines the code module to locate calls to program methods within the code module. The system then transforms the code module so that all operands remaining on the evaluation stack only relate to the called method when the method is called, thereby simplifying verification and garbage collection of the code module.

Claims (33)

1. A method to facilitate code verification and garbage collection in a platform-independent virtual machine, comprising:

receiving a code module written in a platform-independent language;

examining the code module to locate a call to a program method within the code module; and

transforming the code module so that all operands remaining on an evaluation stack when the program method is called relate to the program method, wherein transforming the code module involves ensuring that the evaluation stack includes only elements related to a bytecode that may trigger garbage collection when the bytecode is executed;

whereby verification and garbage collection of the code module is simplified.

2. The method of claim 1 , wherein transforming the code module involves ensuring that local variables hold only values of a single type and do not hold variables of different types at different times.

3. The method of claim 1 , wherein transforming the code module further comprises spilling to memory stack slots that do not include operands for the call to the program method.

4. The method of claim 3 , further comprising filling stack slots that were previously spilled upon return from the program method.

5. The method of claim 4 , wherein the program method is associated with a single typemap to indicate a type for each variable on the evaluation stack.

6. An apparatus to facilitate code verification and garbage collection in a platform-independent virtual machine, comprising:

a central processing unit;

a memory system;

a receiving mechanism configured to receive a code module written in a platform-independent language;

an examining mechanism configured to examine the code module to locate a call to a program method within the code module; and

a transforming mechanism configured to transform the code module so that all operands remaining on an evaluation stack when the program method is called relate to the program method, wherein transforming the code module involves ensuring that the evaluation stack includes only elements related to a bytecode that may trigger garbage collection when the bytecode is executed;

whereby verification and garbage collection of the code module is simplified.

7. The apparatus of claim 6 , wherein transforming the code module involves ensuring that local variables hold only values of a single type and do not hold variables of different types at different times.

8. The apparatus of claim 6 , further comprising a spilling mechanism configured to spill to memory stack slots that do not include operands for the call to the program method when transforming the code module.

9. The apparatus of claim 8 , further comprising a filling mechanism configured to fill stack slots that were previously spilled upon return from the program method.

10. The apparatus of claim 9 , wherein the program method is associated with a single typemap to indicate a type for each variable on the evaluation stack.

11. A computer system to facilitate code verification and garbage collection in a platform-independent virtual machine, comprising:

a central processing unit;

a memory system;

a port for communicating with an external client;

a bus to couple the central processing unit, the memory system, and the port;

a receiving mechanism within the central processing unit configured to receive a code module written in a platform-independent language;

an examining mechanism configured to examine the code module to locate a call to a program method within the code module; and

a transforming mechanism configured to transform the code module so that all operands remaining on an evaluation stack when the program method is called relate to the program method, wherein transforming the code module involves ensuring that the evaluation stack includes only elements related to a bytecode that may trigger garbage collection when the bytecode is executed;

whereby verification and garbage collection of the code module is simplified.

12. The computer system of claim 11 , wherein transforming the code module involves ensuring that local variables hold only values of a single type and do not hold variables of different types at different times.

13. The computer system of claim 11 , further comprising a spilling mechanism configured to spill to memory stack slots that do not include operands for the call to the program method when transforming the code module.

14. The computer system of claim 13 , further comprising a filling mechanism configured to fill stack slots that were previously spilled upon return from the program method.

15. The computer system of claim 14 , wherein the program method is associated with a single typemap to indicate a type for each variable on the evaluation stack.

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/0772 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 24, 2003
From: SHAYLOR, NICHOLAS; SIMON, DOUGLAS N.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 014256/0583 →