Diplomarbeit DIP-1617

Bibliograph.
Daten
Kienle, Holger Michael: A SUIF Java Compiler.
Universität Stuttgart, Fakultät Informatik, Diplomarbeit Nr. 1617 (1998).
139 Seiten, englisch.
CR-Klassif.D.3.4 (Programming Languages Processors)
D.3.3 (Language Constructs and Features)
D.1.5 (Object-oriented Programming)
E.2 (Data Storage Representations)
KeywordsSUIF; Java Virtual Machine; compiler
Kurzfassung

To compete with optimized C, object-oriented languages need classical optimizations as well as specific object-oriented optimizations. Therefore, a compiler infrastructure that enables object-oriented compiler research is of great interest for the research community. The SUIF compiler system with the OSUIF extension offers such a research environment. SUIF defines an intermediate representation for procedural languages and offers standard optimization passes. OSUIF extends SUIF with an intermediate representation tailored towards object-oriented languages, hence allowing specific object-oriented optimizations.

To enable Java-related compiler research in (O)SUIF, we have implemented j2s, a Java bytecode front end for the OSUIF/SUIF 2.0 compiler system. Our compiler uses off-line compilation, so that the whole program is known at compile time. Thus, static whole-program optimizations such as class hierarchy analysis and type inference can be implemented with (O)SUIF and applied during the compilation.

j2s supports the complete Java Virtual Machine specification, except for threads and exception handling, which are currently not supported by the runtime system and (O)SUIF. Because we implemented an off-line compiler, the dynamic loading of classes is also not supported.

The compiler is divided into the (O)SUIF front end and the runtime system. The main part of the thesis describes the compilation passes, which consist of Java class loading, resolution of symbolic references in class files, control flow graph generation, data flow analysis to recover lost type information in class files, and finally the actual (O)SUIF code generation. The compiler generates either plain SUIF 2.0 or OSUIF code.

Java, in contrast to C, requires a sophisticated runtime system. This thesis contains a detailed description of the interface between j2s and the runtime system; the runtime system itself has been written by Andrew Rutz as part of his Master's thesis.

The current version of j2s compiles Java applications that require neither threads nor exception handling during program execution. Despite these restrictions a large number of Java applications compiles and executes. For example, our compiler can handle the transitive closure of the JDK1.2beta2 javac compiler, which consists of 538 Java classes. The javac executable generated with our compiler runs about twice as fast as the JDK1.2beta2 Virtual Machine.

Volltext und
andere Links
PostScript (2053737 Bytes)
Zugriff auf studentische Arbeiten aufgrund vorherrschender Datenschutzbestimmungen nur innerhalb der Fakultät möglich
Abteilung(en)Universität Stuttgart, Institut für Informatik, Programmiersprachen und Übersetzerbau
Eingabedatum11. Juli 1998
   Publ. Informatik