Jam is a general purpose programming language that tries to combine the advantages of dynamic, interpreted programming languages with those of static, compiled ones.
See the website for more information.
Currently the compiler is being written in python, speed being a secondary concern. The plan is to bootstrap the compiler once the language is capable.
The compiler currently requires Python 3.4, the llvm-3.6 shared library and clang-3.6
See http://llvm.org/apt/ for instructions on how to set up your system to fetch the llvm 3.6 packages, then follow instructions for newer Ubuntu versions.
sudo apt-get install python3 libllvm3.6 llvm-runtime clang-3.6
brew install python3
Download the source for llvm 3.6 from http://llvm.org/releases/download.html and build with:
./configure --enable-shared --disable-assertions
make install
See tutorial.
Jam uses the py.test framework.
To run the tests, simply execute py.test inside the project.
py.test
Certain parts of jam make extensive use of logging. By default only WARNING
level logs are shown. The logging level is bound to the verbosity option. Simply
passing in a verbosity of 1 (-v
) enables INFO
and 2 (-vv
) enables DEBUG
.
py.test -vv
To check test coverage, use pytest-cov:
# Vague report in console
py.test --cov=compiler
# Full html report, written to htmlcov/
py.test --cov=compiler --cov-report=html
To run all executables created by tests with valgrind to check for leaks and
other memory issues, pass the --valgrind
option to py.test
. Do note that
valgrind is slow and the tests will take a significantly longer time to run.
py.test --valgrind