Title: Implementation of a Java just-in-time compiler in Haskell
Language: English
Authors: Urban, Bernhard 
Qualification level: Diploma
Keywords: Just-In-Time Compilation; JVM; LSRA; Haskell; DFA; Backend
Just-In-Time Compilation; JVM; LSRA; Haskell; DFA; Backend
Advisor: Krall, Andreas
Issue Date: 2013
Number of Pages: 72
Qualification level: Diploma
Just-in-time compilation became popular lately, among others, due to the success of the Java programming language. In this thesis we successfully demonstrate a modern prototype of the Java virtual machine implemented as method-based just-in-time compiler in the purely functional programming language Haskell. Motivated by the powerful abstraction mechanism provided by the language, we were able to build a sophisticated compiler. Since a high-level language is used, we had to solve problems regarding the interface between Haskell and native code.
Existing libraries from the Haskell community are used. hs-java for processing Java class files. Hoopl to implement a sophisticated compiler, that supports data-flow analysis on an intermediate representation by making extensive use of the type system. Harpy is used to generate machine code for the target architecture x86 in the manner of a domain specific language. We tried to keep as much as possible in pure code to gain the elegance of Haskell. The compilation pipeline, e.g. JVM stack elimination or linear scan register allocation, is presented in detail in this thesis.
Basic features of a run-time system in order to complete a JVM, such as method invocation, lazy class loading, dynamic type checking or exception handling, are presented.
Although implemented in Haskell and therefore at a high abstraction level, our prototype performs well. The performance is compared to mainstream JVMs.
URI: https://resolver.obvsg.at/urn:nbn:at:at-ubtuw:1-56149
Library ID: AC07815300
Organisation: E185 - Institut für Computersprachen 
Publication Type: Thesis
Appears in Collections:Thesis

Files in this item:

File Description SizeFormat
Implementation of a Java just-in-time compiler in Haskell.pdf626.65 kBAdobe PDFThumbnail
Show full item record

Page view(s)

checked on Feb 18, 2021


checked on Feb 18, 2021

Google ScholarTM


Items in reposiTUm are protected by copyright, with all rights reserved, unless otherwise indicated.