The Hyper Programming Language

Compiler with back end

This page is about an experimental version of the compiler for Hyper that also has a back end, using the LLVM project.

The version of the compiler that is advertised for download on this website cannot generate an executable from valid Hyper sourcecode; it only checks if the sourcefile you provide is without errors. So to make the project more interesting (not just to get other people interested, but to keep the fun in it for myself as well) I decided to start developing a version of the compiler with a back end, so that you could actually run (some of) your small Hyper programs.

Only the front-end-only version is released on this website on a regular basis, because the compiler with back end is still very primitive. So if you want to try the latter, you will need to download the sourcecode directly from its development branch on Launchpad:

https://code.launchpad.net/~hyperquantum/hyper/llvm-new

The compiler doesn't generate an executable directly yet, it only prints LLVM assembly. A simple shell script ("simplecompile.sh") is included to make it easier to get an executable.

When I started to use LLVM, I first wrote a simple CMake-based build system for it. I did this because I already used CMake for the front end, and I didn't want to switch to another build system just to have LLVM compiled and linked to my code. That build system was experimental and contained some hacks to get everything compiled. I submitted my changes to the LLVM project, and after some time someone picked them up in order to write a real CMake-based build system for LLVM. Since then, I am using that build system instead of the one I hacked together.

Status

The work is still in an early stage of development. I will post some info about my progress here.

See also


Valid HTML 4.01 Strict Valid CSS!