RubyComp: A Ruby-to-LLVM Compiler Prototype
Anders Alexandersson, M.S. Thesis


Dynamic programming languages are not generally precompiled, but are interpreted at run-time. This approach has some serious drawbacks, e.g. complex deployment, human readable source code not preserving the intellectual properties of the developers and no ability to do optimizations at compile-time or run-time.

In this paper we study the possibility to precompile the Ruby language, a dynamic object-oriented language, into Low Level Virtual Machine (LLVM) code for execution by the LLVM run-time, a compiler framework for lifelong optimization of an application. The result of the project is a Ruby compiler prototype, describing the infrastructure and overall design principles to map the highly dynamic properties of the Ruby language into low-level static constructs of the LLVM language.

The LLVM framework supports different hardware platforms, and by using LLVM as the target of compilation the benefits of that portability are gained.


"RubyComp - A Ruby-to-LLVM Compiler Prototype", Anders Alexandersson.
Masters Thesis, Division of Computer Science at the Department of Informatics and Mathematics, University of Trollhättan/Uddevalla, Sweden