peteb / thesis

Experimental LLVM compiler for a dynamic programming language. For my school thesis work.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Read INSTALL for help on building thorn-llvm!

Directory listing:
        /llvm-2.6/		-- full source code for llvm-2.6.
                                           ./configure && make && make clean
                                   sorry, I've removed this. Too big. Just get LLVM
                                   somewhere else and build it with exceptions enabled.

        /gc-7.1/		-- Boehm's garbage collector
                                   But you'll probably want to install a newer one, especially
                                   for Mac OS X due to ASLR etc. 7.2 has been verified to work
                                   with 10.10.5. You might need to configure like this:
                                   ./configure CFLAGS=-D_XOPEN_SOURCE

        /experiments/           -- a playground for trying out fun things
        /src/			-- base folder for thorn-llvm compiler code
        /src/libthorn/          -- thorn runtime library
        /libs/			-- external libraries
        /tests/			-- stuff in here might or might not work
        /utests/		-- unit tests. they should work.
        /jsoncpp/               -- json parser, build it using the old SCons version
                                   and manually install the lib file built
        /anita/                 -- anita parser, outputs ast as json

To compile stuff using bundled llvm:
        Examine compile script in /experiments/first/; it makes use of the
        /llvm-config script which generates flags for gcc using currently available
        llvm base, prefering local (/llvm-2.6) over global.

The phases of compiling an .anita file:
  * Build the tlc compiler (`make` in root or /src)
  * Build the standard library libthorn (`cd libthorn; make`)
  * Parse .anita file into an AST (json)
    `anita/bin/anita code.anita > code.json`
  * Compile AST into LLVM BC
    `./tlc code.json -o code.bc`
  * Link with libthorn
    `llvm-link code.bc libthorn/libthorn.o -o app.o`
  * Compile to native and link with external dependencies
    `clang -lgc app.o`

About

Experimental LLVM compiler for a dynamic programming language. For my school thesis work.


Languages

Language:C 37.6%Language:LLVM 15.0%Language:Shell 13.1%Language:Makefile 10.5%Language:C++ 10.1%Language:Assembly 8.8%Language:HTML 2.6%Language:Python 0.7%Language:GAP 0.5%Language:M4 0.5%Language:Java 0.3%Language:Ruby 0.2%Language:Roff 0.2%Language:PHP 0.0%