gambas-source-code/gb.jit
Emil Lenngren 856af1cd45 [GB.JIT]
* NEW: Partially support callbacks for extern functions. You can only convert functions in the current class to pointers 
currently, i.e. functions that are referenced directly by their name.



git-svn-id: svn://localhost/gambas/trunk@4851 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-19 22:08:59 +00:00
..
src [GB.JIT] 2012-06-19 22:08:59 +00:00
acinclude.m4 [INTERPRETER] 2012-05-23 19:26:15 +00:00
AUTHORS [INTERPRETER] 2012-05-23 19:26:15 +00:00
ChangeLog [INTERPRETER] 2012-05-23 19:26:15 +00:00
component.am [INTERPRETER] 2012-05-23 19:26:15 +00:00
configure.ac [GB.JIT] 2012-05-30 14:11:38 +00:00
COPYING [INTERPRETER] 2012-05-23 19:26:15 +00:00
gambas.h [INTERPRETER] 2012-05-23 19:26:15 +00:00
gb_common.h [INTERPRETER] 2012-05-23 19:26:15 +00:00
INSTALL [INTERPRETER] 2012-05-23 19:26:15 +00:00
m4 [INTERPRETER] 2012-05-23 19:26:15 +00:00
Makefile.am [INTERPRETER] 2012-05-23 19:26:15 +00:00
missing [INTERPRETER] 2012-05-23 19:26:15 +00:00
NEWS [INTERPRETER] 2012-05-23 19:26:15 +00:00
README [CONFIGURATION] 2012-05-23 21:35:58 +00:00
reconf [INTERPRETER] 2012-05-23 19:26:15 +00:00

You should use the latest version of LLVM. To check it out, run:

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm
mkdir build
cd build
../configure --prefix=/usr --enable-optimized --enable-jit --enable-shared
make -j4
sudo make install

You might need to edit the configure.ac file in order to set the llvm
location settings appropriate, followed by ./reconf.

To enable the JIT for all functions in a Gambas class, add the word "Fast"
on a separate line at the top of the class file. The functions will then be
JIT compiled to native machine code, instead of letting the interpreter to
run it, if gb.jit is available.