forked from tsee/jit-experiments
claesjac/jit-experiments
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Idle Experimentation with libjit ================================ In a nutshell, this can just JIT a very simple AST. It comes with the definition of the AST, so it's easy to create one for testing from C. The language only supports addition, subtraction, multiplication, and division (all binary), variables (int, double) and constants (also int, double). Any compiled function uses either ints or doubles as in- and output. If any type is a double, then all are upgraded to doubles. The Makefile is very rudimentary. Sorry. As stated above, this uses libjit. To get started you need to make sure you have flex, bison (Berkely yacc won't work), autoconf and libtool. Then this is basically what you need to do (after getting a checkout of this repo): Install libjit locally: $ git clone git://git.sv.gnu.org/dotgnu-pnet/libjit.git $ cd libjit $ mkdir m4 $ autoreconf -i -f $ ./configure --prefix=$PWD/../libjit-install $ make install $ cd .. Compile and run: (optionally run make regen) $ make $ LD_LIBRARY_PATH=libjit-install/lib ./jit_test
About
Just experimenting with JITing simple arithmetics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published