Tail Call Optimization in the Java HotSpot ™ VM
Saved in:
| Title: | Tail Call Optimization in the Java HotSpot ™ VM |
|---|---|
| Authors: | Arnold Schwaighofer |
| Contributors: | The Pennsylvania State University CiteSeerX Archives |
| Source: | http://www.ssw.uni-linz.ac.at/Research/Papers/Schwaighofer09Master/schwaighofer09master.pdf. |
| Publication Year: | 2009 |
| Collection: | CiteSeerX |
| Subject Terms: | Viele Programmiersprachen Implementierungen kompilieren zu Java Bytecodes, welche |
| Description: | Many programming language implementations compile to Java bytecode, which is executed by a virtual machine (e.g the Java HotSpot TM VM). Among these languages are functional languages, which require an optimization that guarantees that certain kinds of method calls do not cause the execution stack to grow unlimitedly. This optimization is called tail call optimization and is currently not supported by the HotSpot TM VM. Implementations of functional languages have to resort to alternative techniques to guarantee that the stack space does not increase unboundedly. These techniques complicate the implementation and also incur a performance penalty. This thesis presents techniques for supporting tail call optimization in the Java HotSpot TM Virtual Machine. Our optimization is implemented in the interpreter, the client compiler and the server compiler. Tail call optimization normally removes stack frames to guarantee that the stack space stays bounded. However, some stack frames are required for the Java access security mechanism to work and hence cannot be removed. virtual machine features a mechanism called deoptimization that allows one to rewrite stack frames. We describe an approach that uses the deoptimization infrastructure to compress stack frames when tail call optimization was disabled because of the security mechanism. This approach allows a series of tail calls to execute in bounded stack space in the presence of a stack-based security mechanism. |
| Document Type: | text |
| File Description: | application/pdf |
| Language: | English |
| Relation: | http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.192.2104 |
| Availability: | http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.192.2104 http://www.ssw.uni-linz.ac.at/Research/Papers/Schwaighofer09Master/schwaighofer09master.pdf |
| Rights: | Metadata may be used without restrictions as long as the oai identifier remains attached to it. |
| Accession Number: | edsbas.17186A05 |
| Database: | BASE |
| Abstract: | Many programming language implementations compile to Java bytecode, which is executed by a virtual machine (e.g the Java HotSpot TM VM). Among these languages are functional languages, which require an optimization that guarantees that certain kinds of method calls do not cause the execution stack to grow unlimitedly. This optimization is called tail call optimization and is currently not supported by the HotSpot TM VM. Implementations of functional languages have to resort to alternative techniques to guarantee that the stack space does not increase unboundedly. These techniques complicate the implementation and also incur a performance penalty. This thesis presents techniques for supporting tail call optimization in the Java HotSpot TM Virtual Machine. Our optimization is implemented in the interpreter, the client compiler and the server compiler. Tail call optimization normally removes stack frames to guarantee that the stack space stays bounded. However, some stack frames are required for the Java access security mechanism to work and hence cannot be removed. virtual machine features a mechanism called deoptimization that allows one to rewrite stack frames. We describe an approach that uses the deoptimization infrastructure to compress stack frames when tail call optimization was disabled because of the security mechanism. This approach allows a series of tail calls to execute in bounded stack space in the presence of a stack-based security mechanism. |
|---|
Nájsť tento článok vo Web of Science