JIT: first commit 95/14995/1
Calixte DENIZET [Thu, 7 Aug 2014 08:25:35 +0000 (10:25 +0200)]
Change-Id: Ic78a15108c93ee8e52cc2aaa436ff0bacb4e35e6

110 files changed:
scilab/Makefile.am
scilab/Makefile.in
scilab/aclocal.m4
scilab/configure
scilab/configure.ac
scilab/contrib/Makefile.in
scilab/desktop/Makefile.in
scilab/desktop/images/icons/Makefile.in
scilab/m4/llvm.m4
scilab/modules/Makefile.in
scilab/modules/action_binding/Makefile.in
scilab/modules/api_scilab/Makefile.in
scilab/modules/arnoldi/Makefile.in
scilab/modules/ast/Makefile.am
scilab/modules/ast/Makefile.in
scilab/modules/ast/includes/analysis/AnalysisVisitor.hxx [new file with mode: 0644]
scilab/modules/ast/includes/exps/doubleexp.hxx
scilab/modules/ast/includes/exps/exp.hxx
scilab/modules/ast/includes/exps/listexp.hxx
scilab/modules/ast/includes/jit/JITValues.hxx [new file with mode: 0644]
scilab/modules/ast/includes/jit/JITVisitor.hxx [new file with mode: 0644]
scilab/modules/ast/includes/jit/ScilabJITTraits.hxx [new file with mode: 0644]
scilab/modules/ast/includes/jit/jit_operations.hxx [new file with mode: 0644]
scilab/modules/ast/includes/operations/types_addition.hxx
scilab/modules/ast/includes/operations/types_multiplication.hxx
scilab/modules/ast/includes/operations/types_substraction.hxx
scilab/modules/ast/includes/types/internal.hxx
scilab/modules/ast/src/cpp/jit/JITValues.cpp [new file with mode: 0644]
scilab/modules/ast/src/cpp/jit/JITVisitor.cpp [new file with mode: 0644]
scilab/modules/ast/src/cpp/jit/operations.cpp [new file with mode: 0644]
scilab/modules/ast/src/cpp/types/internal.cpp [new file with mode: 0644]
scilab/modules/atoms/Makefile.in
scilab/modules/boolean/Makefile.in
scilab/modules/cacsd/Makefile.in
scilab/modules/call_scilab/Makefile.in
scilab/modules/commons/Makefile.in
scilab/modules/compatibility_functions/Makefile.in
scilab/modules/completion/Makefile.in
scilab/modules/console/Makefile.in
scilab/modules/core/Makefile.in
scilab/modules/data_structures/Makefile.in
scilab/modules/demo_tools/Makefile.in
scilab/modules/development_tools/Makefile.in
scilab/modules/development_tools/src/fake/Makefile.in
scilab/modules/differential_equations/Makefile.in
scilab/modules/dynamic_link/Makefile.in
scilab/modules/elementary_functions/Makefile.in
scilab/modules/external_objects/Makefile.in
scilab/modules/external_objects_java/Makefile.in
scilab/modules/fftw/Makefile.in
scilab/modules/fileio/Makefile.in
scilab/modules/functions/Makefile.am
scilab/modules/functions/Makefile.in
scilab/modules/functions/includes/functions_gw.hxx
scilab/modules/functions/sci_gateway/cpp/sci_jit.cpp [new file with mode: 0644]
scilab/modules/functions/sci_gateway/functions_gateway.xml
scilab/modules/functions_manager/Makefile.in
scilab/modules/genetic_algorithms/Makefile.in
scilab/modules/graph/Makefile.in
scilab/modules/graphic_export/Makefile.in
scilab/modules/graphic_objects/Makefile.in
scilab/modules/graphics/Makefile.in
scilab/modules/gui/Makefile.in
scilab/modules/hdf5/Makefile.in
scilab/modules/helptools/Makefile.in
scilab/modules/history_browser/Makefile.in
scilab/modules/history_manager/Makefile.in
scilab/modules/integer/Makefile.in
scilab/modules/interpolation/Makefile.in
scilab/modules/io/Makefile.in
scilab/modules/javasci/Makefile.in
scilab/modules/jvm/Makefile.in
scilab/modules/linear_algebra/Makefile.in
scilab/modules/localization/Makefile.in
scilab/modules/m2sci/Makefile.in
scilab/modules/matio/Makefile.in
scilab/modules/mexlib/Makefile.in
scilab/modules/modules_manager/Makefile.in
scilab/modules/mpi/Makefile.in
scilab/modules/optimization/Makefile.in
scilab/modules/output_stream/Makefile.in
scilab/modules/overloading/Makefile.in
scilab/modules/parallel/Makefile.in
scilab/modules/parameters/Makefile.in
scilab/modules/polynomials/Makefile.in
scilab/modules/prebuildjava/Makefile.in
scilab/modules/preferences/Makefile.in
scilab/modules/randlib/Makefile.in
scilab/modules/renderer/Makefile.in
scilab/modules/scicos/Makefile.in
scilab/modules/scicos_blocks/Makefile.in
scilab/modules/scinotes/Makefile.in
scilab/modules/signal_processing/Makefile.in
scilab/modules/simulated_annealing/Makefile.in
scilab/modules/sound/Makefile.in
scilab/modules/sparse/Makefile.in
scilab/modules/special_functions/Makefile.in
scilab/modules/spreadsheet/Makefile.in
scilab/modules/statistics/Makefile.in
scilab/modules/string/Makefile.in
scilab/modules/symbolic/Makefile.in
scilab/modules/tclsci/Makefile.in
scilab/modules/threads/Makefile.in
scilab/modules/time/Makefile.in
scilab/modules/types/Makefile.in
scilab/modules/ui_data/Makefile.in
scilab/modules/umfpack/Makefile.in
scilab/modules/windows_tools/Makefile.in
scilab/modules/xcos/Makefile.in
scilab/modules/xml/Makefile.in

index d58c9f0..dd8e8ad 100644 (file)
@@ -54,6 +54,8 @@ scilab_cli_bin_LDFLAGS += -lstdc++
 #-static-libgfortran
 endif
 
+scilab_bin_LDFLAGS += $(LLVM_LDFLAGS) $(LLVM_LIBS)
+scilab_cli_bin_LDFLAGS += $(LLVM_LDFLAGS) $(LLVM_LIBS)
 
 if IS_MACOSX
 scilab_bin_LDFLAGS             += -framework Cocoa
@@ -79,6 +81,7 @@ scilab_bin_CPPFLAGS = \
     -I$(top_srcdir)/modules/localization/includes/ \
     -I$(top_srcdir)/modules/core/src/c/ \
     -I$(top_srcdir)/modules/dynamic_link/includes/ \
+    $(LLVM_INCLUDE) $(LLVM_CPPFLAGS) \
     $(EIGEN_CPPFLAGS) \
     $(AM_CPPFLAGS)
 
index f24b298..cf3faaa 100644 (file)
@@ -113,7 +113,6 @@ bin_PROGRAMS = scilab-bin$(EXEEXT) scilab-cli-bin$(EXEEXT)
 @USE_STATIC_SYSTEM_LIB_FALSE@am__append_4 = -lstdc++
 # -static-libgfortran
 @USE_STATIC_SYSTEM_LIB_FALSE@am__append_5 = -lstdc++
-#-static-libgfortran
 @IS_MACOSX_TRUE@am__append_6 = -framework Cocoa
 @NEED_JAVA_TRUE@am__append_7 = \
 @NEED_JAVA_TRUE@                       $(top_builddir)/modules/console/libsciconsole.la \
@@ -639,7 +638,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
@@ -820,10 +819,11 @@ AM_LDFLAGS = $(SCI_LDFLAGS)
 changelogs = CHANGES CHANGES_5.1.X CHANGES_5.2.X CHANGES_5.3.X CHANGES_5.4.X CHANGES_5.5.X CHANGES_6.0.X
 bin_SCRIPTS = bin/scilab bin/scilab-adv-cli bin/scilab-cli \
        bin/scinotes bin/xcos $(am__append_1)
+#-static-libgfortran
 scilab_bin_LDFLAGS = $(AM_LDFLAGS) $(OPENMPI_LIBS) $(am__append_2) \
-       $(am__append_4) $(am__append_6)
+       $(am__append_4) $(LLVM_LDFLAGS) $(LLVM_LIBS) $(am__append_6)
 scilab_cli_bin_LDFLAGS = $(AM_LDFLAGS) $(OPENMPI_LIBS) $(am__append_3) \
-       $(am__append_5)
+       $(am__append_5) $(LLVM_LDFLAGS) $(LLVM_LIBS)
 scilab_bin_CPPFLAGS = -I$(top_srcdir)/modules/ast/includes/ast/ \
        -I$(top_srcdir)/modules/ast/includes/exps/ \
        -I$(top_srcdir)/modules/ast/includes/operations/ \
@@ -842,8 +842,9 @@ scilab_bin_CPPFLAGS = -I$(top_srcdir)/modules/ast/includes/ast/ \
        -I$(top_srcdir)/modules/api_scilab/includes/ \
        -I$(top_srcdir)/modules/localization/includes/ \
        -I$(top_srcdir)/modules/core/src/c/ \
-       -I$(top_srcdir)/modules/dynamic_link/includes/ \
-       $(EIGEN_CPPFLAGS) $(AM_CPPFLAGS) $(am__append_10)
+       -I$(top_srcdir)/modules/dynamic_link/includes/ $(LLVM_INCLUDE) \
+       $(LLVM_CPPFLAGS) $(EIGEN_CPPFLAGS) $(AM_CPPFLAGS) \
+       $(am__append_10)
 
 # --no-undefined --relax
 
index e15e8e6..6e9f348 100644 (file)
@@ -2943,7 +2943,8 @@ to "yes", and re-run configure.
 END
     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
   fi
-fi])
+fi
+])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
index d7a8ffc..a9d76d1 100755 (executable)
@@ -849,7 +849,7 @@ LEXLIB
 LEX_OUTPUT_ROOT
 LEX
 LLVM_CPPFLAGS
-LLVM_LIBSA
+LLVM_LIBS_STATIC
 LLVM_LIBS
 LLVM_LDFLAGS
 LLVM_INCLUDE
@@ -6204,7 +6204,8 @@ to "yes", and re-run configure.
 END
     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
   fi
-fi # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation
+fi
+ # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation
 
 
 
@@ -10667,8 +10668,8 @@ fi
 
 LLVM_INCLUDE="-I`${LLVM_CONFIG_BIN} --includedir`"
 LLVM_LDFLAGS="-L`${LLVM_CONFIG_BIN} --libdir`"
-LLVM_LIBS="`${LLVM_CONFIG_BIN} --libs`"
-LLVM_LIBS_STATIC="`${LLVM_CONFIG_BIN} --libfiles`"
+LLVM_LIBS="-lLLVM-${LLVM_MAJOR}.${LLVM_MINOR}"
+LLVM_LIBS_STATIC="`${LLVM_CONFIG_BIN} --libfiles core mcjit native`"
 LLVM_CPPFLAGS="`${LLVM_CONFIG_BIN} --cppflags | sed 's/-I[^ ]*[ ]*//g'`"
 
 
@@ -11711,7 +11712,7 @@ $as_echo "$ac_java_classpath" >&6; }
 $as_echo_n "checking to see if the java compiler works... " >&6; }
 
     cat << \EOF > conftest.java
-// #line 11714 "configure"
+// #line 11715 "configure"
 import java.util.regex.Pattern;
 
 
@@ -11798,7 +11799,7 @@ $as_echo_n "checking type of jvm... " >&6; }
     if test "x$ac_java_jvm_name" = "x" ; then
 
     cat << \EOF > conftest.java
-// #line 11801 "configure"
+// #line 11802 "configure"
 import java.util.regex.Pattern;
 
 import gnu.java.io.EncodingManager;
@@ -11882,7 +11883,7 @@ $as_echo_n "checking java API version... " >&6; }
     # The class java.nio.charset.Charset is new to 1.4
 
     cat << \EOF > conftest.java
-// #line 11885 "configure"
+// #line 11886 "configure"
 import java.util.regex.Pattern;
 
 import java.nio.charset.Charset;
@@ -11947,7 +11948,7 @@ EOF
     # The class java.lang.StringBuilder is new to 1.5
 
     cat << \EOF > conftest.java
-// #line 11950 "configure"
+// #line 11951 "configure"
 import java.util.regex.Pattern;
 
 import java.lang.StringBuilder;
@@ -12012,7 +12013,7 @@ EOF
     # The class java.util.ArrayDeque is new to 1.6
 
     cat << \EOF > conftest.java
-// #line 12015 "configure"
+// #line 12016 "configure"
 import java.util.regex.Pattern;
 
 import java.util.ArrayDeque;
@@ -12077,7 +12078,7 @@ EOF
     # The class java.nio.file.Path is new to 1.7
 
     cat << \EOF > conftest.java
-// #line 12080 "configure"
+// #line 12081 "configure"
 import java.util.regex.Pattern;
 
 import java.nio.file.Path;
@@ -12142,7 +12143,7 @@ EOF
     # The class java.util.stream.DoubleStream is new to 1.8
 
     cat << \EOF > conftest.java
-// #line 12145 "configure"
+// #line 12146 "configure"
 import java.util.regex.Pattern;
 
 import java.util.stream.DoubleStream;
@@ -13520,7 +13521,7 @@ $as_echo_n "checking jgraphx... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 13523 "configure"
+// #line 13524 "configure"
 import java.util.regex.Pattern;
 
 import com.mxgraph.model.mxCell;
@@ -13627,7 +13628,7 @@ $as_echo_n "checking minimal version (2.0.0.1) of jgraphx... " >&6; }
    if test "x" == "x"; then
 
     cat << \EOF > conftest.java
-// #line 13630 "configure"
+// #line 13631 "configure"
 import java.util.regex.Pattern;
 
 import com.mxgraph.view.mxGraph;
@@ -13699,7 +13700,7 @@ EOF
    else
 
     cat << \EOF > conftest.java
-// #line 13702 "configure"
+// #line 13703 "configure"
 import java.util.regex.Pattern;
 
 import com.mxgraph.view.mxGraph;
@@ -13793,7 +13794,7 @@ $as_echo_n "checking scirenderer... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 13796 "configure"
+// #line 13797 "configure"
 import java.util.regex.Pattern;
 
 import org.scilab.forge.scirenderer.PackageInfo;
@@ -13900,7 +13901,7 @@ $as_echo_n "checking minimal version (1.1.0) of scirenderer... " >&6; }
    if test "x" == "x"; then
 
     cat << \EOF > conftest.java
-// #line 13903 "configure"
+// #line 13904 "configure"
 import java.util.regex.Pattern;
 
 import org.scilab.forge.scirenderer.PackageInfo;
@@ -13972,7 +13973,7 @@ EOF
    else
 
     cat << \EOF > conftest.java
-// #line 13975 "configure"
+// #line 13976 "configure"
 import java.util.regex.Pattern;
 
 import org.scilab.forge.scirenderer.PackageInfo;
@@ -14071,7 +14072,7 @@ $as_echo_n "checking flexdock... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 14074 "configure"
+// #line 14075 "configure"
 import java.util.regex.Pattern;
 
 import org.flexdock.docking.DockingManager;
@@ -14178,7 +14179,7 @@ $as_echo_n "checking minimal version (1.2.4) of flexdock... " >&6; }
    if test "x" == "x"; then
 
     cat << \EOF > conftest.java
-// #line 14181 "configure"
+// #line 14182 "configure"
 import java.util.regex.Pattern;
 
 import org.flexdock.util.Utilities;
@@ -14250,7 +14251,7 @@ EOF
    else
 
     cat << \EOF > conftest.java
-// #line 14253 "configure"
+// #line 14254 "configure"
 import java.util.regex.Pattern;
 
 import org.flexdock.util.Utilities;
@@ -14341,7 +14342,7 @@ $as_echo_n "checking looks... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 14344 "configure"
+// #line 14345 "configure"
 import java.util.regex.Pattern;
 
 import com.jgoodies.looks.common.MenuItemRenderer;
@@ -14458,7 +14459,7 @@ $as_echo_n "checking jgoodies-looks... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 14461 "configure"
+// #line 14462 "configure"
 import java.util.regex.Pattern;
 
 import com.jgoodies.looks.common.MenuItemRenderer;
@@ -14576,7 +14577,7 @@ $as_echo_n "checking skinlf... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 14579 "configure"
+// #line 14580 "configure"
 import java.util.regex.Pattern;
 
 import com.l2fprod.util.AccessUtils;
@@ -14693,7 +14694,7 @@ $as_echo_n "checking jogl2... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 14696 "configure"
+// #line 14697 "configure"
 import java.util.regex.Pattern;
 
 import javax.media.opengl.glu.GLUnurbs;
@@ -14916,7 +14917,7 @@ $as_echo_n "checking gluegen2-rt... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 14919 "configure"
+// #line 14920 "configure"
 import java.util.regex.Pattern;
 
 import jogamp.common.os.MachineDescriptionRuntime;
@@ -15090,7 +15091,7 @@ $as_echo_n "checking jhall... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 15093 "configure"
+// #line 15094 "configure"
 import java.util.regex.Pattern;
 
 import javax.help.JHelp;
@@ -15205,7 +15206,7 @@ $as_echo_n "checking javahelp2... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 15208 "configure"
+// #line 15209 "configure"
 import java.util.regex.Pattern;
 
 import javax.help.JHelp;
@@ -15323,7 +15324,7 @@ $as_echo_n "checking jrosetta-API... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 15326 "configure"
+// #line 15327 "configure"
 import java.util.regex.Pattern;
 
 import com.artenum.rosetta.interfaces.core.ConsoleConfiguration;
@@ -15437,7 +15438,7 @@ $as_echo_n "checking jrosetta-api... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 15440 "configure"
+// #line 15441 "configure"
 import java.util.regex.Pattern;
 
 import com.artenum.rosetta.interfaces.core.ConsoleConfiguration;
@@ -15555,7 +15556,7 @@ $as_echo_n "checking jrosetta-engine... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 15558 "configure"
+// #line 15559 "configure"
 import java.util.regex.Pattern;
 
 import com.artenum.rosetta.core.action.AbstractConsoleAction;
@@ -15661,7 +15662,7 @@ $as_echo_n "checking minimal version (1.0.4) of jrosetta-engine... " >&6; }
    if test "x" == "x"; then
 
     cat << \EOF > conftest.java
-// #line 15664 "configure"
+// #line 15665 "configure"
 import java.util.regex.Pattern;
 
 import com.artenum.rosetta.util.ConfigurationBuilder;
@@ -15733,7 +15734,7 @@ EOF
    else
 
     cat << \EOF > conftest.java
-// #line 15736 "configure"
+// #line 15737 "configure"
 import java.util.regex.Pattern;
 
 import com.artenum.rosetta.util.ConfigurationBuilder;
@@ -15826,7 +15827,7 @@ $as_echo_n "checking jeuclid-core... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 15829 "configure"
+// #line 15830 "configure"
 import java.util.regex.Pattern;
 
 import net.sourceforge.jeuclid.LayoutContext;
@@ -15945,7 +15946,7 @@ $as_echo_n "checking fop... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 15948 "configure"
+// #line 15949 "configure"
 import java.util.regex.Pattern;
 
 import org.apache.fop.pdf.PDFInfo;
@@ -16069,7 +16070,7 @@ $as_echo_n "checking freehep-graphics2d... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 16072 "configure"
+// #line 16073 "configure"
 import java.util.regex.Pattern;
 
 import org.freehep.graphics2d.VectorGraphics;
@@ -16186,7 +16187,7 @@ $as_echo_n "checking freehep-graphicsio-emf... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 16189 "configure"
+// #line 16190 "configure"
 import java.util.regex.Pattern;
 
 import org.freehep.graphicsio.emf.EMFGraphics2D;
@@ -16303,7 +16304,7 @@ $as_echo_n "checking freehep-graphicsio... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 16306 "configure"
+// #line 16307 "configure"
 import java.util.regex.Pattern;
 
 import org.freehep.graphicsio.VectorGraphicsIO;
@@ -16420,7 +16421,7 @@ $as_echo_n "checking freehep-io... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 16423 "configure"
+// #line 16424 "configure"
 import java.util.regex.Pattern;
 
 import org.freehep.util.io.XMLSequence;
@@ -16537,7 +16538,7 @@ $as_echo_n "checking freehep-util... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 16540 "configure"
+// #line 16541 "configure"
 import java.util.regex.Pattern;
 
 import org.freehep.util.StringUtilities;
@@ -16655,7 +16656,7 @@ $as_echo_n "checking batik-all... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 16658 "configure"
+// #line 16659 "configure"
 import java.util.regex.Pattern;
 
 import org.apache.batik.parser.Parser;
@@ -16772,7 +16773,7 @@ $as_echo_n "checking batik... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 16775 "configure"
+// #line 16776 "configure"
 import java.util.regex.Pattern;
 
 import org.apache.batik.parser.Parser;
@@ -16879,7 +16880,7 @@ $as_echo_n "checking minimal version (1.7) of batik... " >&6; }
    if test "x" == "x"; then
 
     cat << \EOF > conftest.java
-// #line 16882 "configure"
+// #line 16883 "configure"
 import java.util.regex.Pattern;
 
 import org.apache.batik.Version;
@@ -16951,7 +16952,7 @@ EOF
    else
 
     cat << \EOF > conftest.java
-// #line 16954 "configure"
+// #line 16955 "configure"
 import java.util.regex.Pattern;
 
 import org.apache.batik.Version;
@@ -17042,7 +17043,7 @@ $as_echo_n "checking commons-io... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 17045 "configure"
+// #line 17046 "configure"
 import java.util.regex.Pattern;
 
 import org.apache.commons.io.output.CountingOutputStream;
@@ -17159,7 +17160,7 @@ $as_echo_n "checking xmlgraphics-commons... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 17162 "configure"
+// #line 17163 "configure"
 import java.util.regex.Pattern;
 
 import org.apache.xmlgraphics.util.Service;
@@ -17276,7 +17277,7 @@ $as_echo_n "checking avalon-framework... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 17279 "configure"
+// #line 17280 "configure"
 import java.util.regex.Pattern;
 
 import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -17393,7 +17394,7 @@ $as_echo_n "checking xml-apis-ext... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 17396 "configure"
+// #line 17397 "configure"
 import java.util.regex.Pattern;
 
 import org.w3c.dom.svg.SVGDocument;
@@ -17510,7 +17511,7 @@ $as_echo_n "checking xml-commons-apis-ext... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 17513 "configure"
+// #line 17514 "configure"
 import java.util.regex.Pattern;
 
 import org.w3c.dom.svg.SVGDocument;
@@ -17631,7 +17632,7 @@ $as_echo_n "checking commons-logging... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 17634 "configure"
+// #line 17635 "configure"
 import java.util.regex.Pattern;
 
 import org.apache.commons.logging.LogFactory;
@@ -17748,7 +17749,7 @@ $as_echo_n "checking jlatexmath... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 17751 "configure"
+// #line 17752 "configure"
 import java.util.regex.Pattern;
 
 import org.scilab.forge.jlatexmath.TeXFormula;
@@ -17855,7 +17856,7 @@ $as_echo_n "checking minimal version (1.0.3) of jlatexmath... " >&6; }
    if test "x" == "x"; then
 
     cat << \EOF > conftest.java
-// #line 17858 "configure"
+// #line 17859 "configure"
 import java.util.regex.Pattern;
 
 import org.scilab.forge.jlatexmath.TeXFormula;
@@ -17927,7 +17928,7 @@ EOF
    else
 
     cat << \EOF > conftest.java
-// #line 17930 "configure"
+// #line 17931 "configure"
 import java.util.regex.Pattern;
 
 import org.scilab.forge.jlatexmath.TeXFormula;
@@ -18018,7 +18019,7 @@ $as_echo_n "checking jlatexmath-fop... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 18021 "configure"
+// #line 18022 "configure"
 import java.util.regex.Pattern;
 
 import org.scilab.forge.jlatexmath.fop.JLaTeXMathObj;
@@ -18141,7 +18142,7 @@ $as_echo_n "checking checkstyle... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 18144 "configure"
+// #line 18145 "configure"
 import java.util.regex.Pattern;
 
 import com.puppycrawl.tools.checkstyle.CheckStyleTask;
@@ -18258,7 +18259,7 @@ $as_echo_n "checking commons-beanutils... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 18261 "configure"
+// #line 18262 "configure"
 import java.util.regex.Pattern;
 
 import org.apache.commons.beanutils.Converter;
@@ -18375,7 +18376,7 @@ $as_echo_n "checking antlr... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 18378 "configure"
+// #line 18379 "configure"
 import java.util.regex.Pattern;
 
 import antlr.TokenStreamException;
@@ -18492,7 +18493,7 @@ $as_echo_n "checking junit4... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 18495 "configure"
+// #line 18496 "configure"
 import java.util.regex.Pattern;
 
 import org.junit.Assert;
@@ -18606,7 +18607,7 @@ $as_echo_n "checking junit... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 18609 "configure"
+// #line 18610 "configure"
 import java.util.regex.Pattern;
 
 import org.junit.Assert;
@@ -18727,7 +18728,7 @@ $as_echo_n "checking cobertura... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 18730 "configure"
+// #line 18731 "configure"
 import java.util.regex.Pattern;
 
 import net.sourceforge.cobertura.merge.Main;
@@ -18844,7 +18845,7 @@ $as_echo_n "checking asm3... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 18847 "configure"
+// #line 18848 "configure"
 import java.util.regex.Pattern;
 
 import org.objectweb.asm.Type;
@@ -18958,7 +18959,7 @@ $as_echo_n "checking asm... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 18961 "configure"
+// #line 18962 "configure"
 import java.util.regex.Pattern;
 
 import org.objectweb.asm.Type;
@@ -19075,7 +19076,7 @@ $as_echo_n "checking ecj... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 19078 "configure"
+// #line 19079 "configure"
 import java.util.regex.Pattern;
 
 import org.eclipse.jdt.core.compiler.batch.BatchCompiler;
@@ -23310,7 +23311,7 @@ CHK_EIGEN_MINOR=0
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Eigen is version $CHK_EIGEN_WORLD.$CHK_EIGEN_MAJOR.$CHK_EIGEN_MINOR or later" >&5
 $as_echo_n "checking if Eigen is version $CHK_EIGEN_WORLD.$CHK_EIGEN_MAJOR.$CHK_EIGEN_MINOR or later... " >&6; }
 cat > conftest.$ac_ext <<EOF
-#line 23313 "configure"
+#line 23314 "configure"
 #include "confdefs.h"
 
 #include "$PATH_TO_EIGEN/Eigen/Sparse"
@@ -27861,7 +27862,7 @@ CPPFLAGS="$CPPFLAGS -I$CHK_TCL_INCLUDE_PATH"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later" >&5
 $as_echo_n "checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later... " >&6; }
 cat > conftest.$ac_ext <<EOF
-#line 27864 "configure"
+#line 27865 "configure"
 #include "confdefs.h"
 
 #include "$CHK_TCL_INCLUDE_PATH/$CHK_TCL_INC_NAME"
@@ -28172,7 +28173,7 @@ CPPFLAGS="$CPPFLAGS $TCL_INC_PATH -I$CHK_TK_INCLUDE_PATH $X_CFLAGS"
 $as_echo_n "checking if tk is version $CHK_TK_MAJOR.$CHK_TK_MINOR or later... " >&6; }
 
 cat > conftest.$ac_ext <<EOF
-#line 28175 "configure"
+#line 28176 "configure"
 #include "confdefs.h"
 
 #include "$CHK_TK_INCLUDE_PATH/$CHK_TK_INC_NAME"
@@ -28756,7 +28757,7 @@ $as_echo_n "checking saxon9he... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 28759 "configure"
+// #line 28760 "configure"
 import java.util.regex.Pattern;
 
 import net.sf.saxon.Version;
@@ -28871,7 +28872,7 @@ $as_echo_n "checking saxon... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 28874 "configure"
+// #line 28875 "configure"
 import java.util.regex.Pattern;
 
 import net.sf.saxon.Version;
@@ -28987,7 +28988,7 @@ $as_echo_n "checking saxon... " >&6; }
             export ac_java_classpath="$jar_resolved:$ac_java_classpath"
 
     cat << \EOF > conftest.java
-// #line 28990 "configure"
+// #line 28991 "configure"
 import java.util.regex.Pattern;
 
 import com.icl.saxon.Loader;
@@ -46786,6 +46787,7 @@ echo "  LLVM_CONFIG_BIN .... = $LLVM_CONFIG_BIN"
 echo "  LLVM_INCLUDE ....... = $LLVM_INCLUDE"
 echo "  LLVM_CPPFLAGS ...... = $LLVM_CPPFLAGS"
 echo "  LLVM_LDFLAGS ....... = $LLVM_LDFLAGS"
+echo "  LLVM_LIBS .......... = $LLVM_LIBS"
 
 echo ""
 echo "Libtool config:"
index 7ce5ac0..6aa79a3 100644 (file)
@@ -2369,6 +2369,7 @@ echo "  LLVM_CONFIG_BIN .... = $LLVM_CONFIG_BIN"
 echo "  LLVM_INCLUDE ....... = $LLVM_INCLUDE"
 echo "  LLVM_CPPFLAGS ...... = $LLVM_CPPFLAGS"
 echo "  LLVM_LDFLAGS ....... = $LLVM_LDFLAGS"
+echo "  LLVM_LIBS .......... = $LLVM_LIBS"
 
 echo ""
 echo "Libtool config:"
index 91cdefa..26713a7 100644 (file)
@@ -261,7 +261,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index e44ac4b..f7a38c0 100644 (file)
@@ -355,7 +355,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 4a35f7a..489d312 100644 (file)
@@ -294,7 +294,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index ad45b28..c843153 100644 (file)
@@ -53,8 +53,8 @@ fi
 
 LLVM_INCLUDE="-I`${LLVM_CONFIG_BIN} --includedir`"
 LLVM_LDFLAGS="-L`${LLVM_CONFIG_BIN} --libdir`"
-LLVM_LIBS="`${LLVM_CONFIG_BIN} --libs`"
-LLVM_LIBS_STATIC="`${LLVM_CONFIG_BIN} --libfiles`"
+LLVM_LIBS="-lLLVM-${LLVM_MAJOR}.${LLVM_MINOR}"
+LLVM_LIBS_STATIC="`${LLVM_CONFIG_BIN} --libfiles core mcjit native`"
 LLVM_CPPFLAGS="`${LLVM_CONFIG_BIN} --cppflags | sed 's/-I[[^ ]]*[[ ]]*//g'`"
 
 AC_SUBST(LLVM_VERSION)
@@ -62,7 +62,7 @@ AC_SUBST(LLVM_CONFIG_BIN)
 AC_SUBST(LLVM_INCLUDE)
 AC_SUBST(LLVM_LDFLAGS)
 AC_SUBST(LLVM_LIBS)
-AC_SUBST(LLVM_LIBSA)
+AC_SUBST(LLVM_LIBS_STATIC)
 AC_SUBST(LLVM_CPPFLAGS)
 
 AC_DEFINE([WITH_LLVM_CONFIG], [], [With llvm-config])
index 8f158d1..42ab58a 100644 (file)
@@ -432,7 +432,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 42a0aff..d44cc17 100644 (file)
@@ -417,7 +417,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index ef28ec4..29ba16e 100644 (file)
@@ -397,7 +397,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 82fc8f3..347668f 100644 (file)
@@ -377,7 +377,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 2c8f06d..3e96db9 100644 (file)
@@ -85,6 +85,7 @@ libsciast_la_SOURCES = \
     src/cpp/types/struct.cpp \
     src/cpp/types/macrofile.cpp \
     src/cpp/types/callable.cpp \
+    src/cpp/types/internal.cpp \
     src/cpp/system_env/dynamic_module.cpp \
     src/cpp/system_env/setenvvar.cpp \
     src/cpp/system_env/sci_home.cpp \
@@ -100,7 +101,10 @@ libsciast_la_SOURCES = \
     src/cpp/system_env/sci_tmpdir.cpp \
     src/cpp/system_env/reference_modules.cpp \
     src/cpp/system_env/formatmode.cpp \
-    src/cpp/system_env/warningmode.cpp
+    src/cpp/system_env/warningmode.cpp \
+    src/cpp/jit/JITVisitor.cpp \
+    src/cpp/jit/JITValues.cpp \
+    src/cpp/jit/operations.cpp
 
 if ENABLE_DEBUG
 libsciast_la_SOURCES += src/cpp/types/inspector.cpp
@@ -115,8 +119,10 @@ libsciast_la_CPPFLAGS = \
        -Iincludes/symbol \
        -Iincludes/system_env \
        -Iincludes/types \
+       -Iincludes/jit \
+       -Iincludes/analysis \
        -Isrc/cpp \
-    -I$(top_srcdir)/modules/dynamic_link/includes \
+        -I$(top_srcdir)/modules/dynamic_link/includes \
        -I$(top_srcdir)/modules/functions_manager/includes \
        -I$(top_srcdir)/modules/console/includes \
        -I$(top_srcdir)/modules/elementary_functions/includes \
@@ -127,7 +133,10 @@ libsciast_la_CPPFLAGS = \
        -I$(top_srcdir)/modules/localization/includes \
        -I$(top_srcdir)/modules/io/includes \
        -I$(top_srcdir)/modules/fileio/includes \
-    $(EIGEN_CPPFLAGS) \
+       $(LLVM_INCLUDE) \
+       $(LLVM_CPPFLAGS) \
+       $(LLVM_LDFLAGS) $(LLVM_LIBS) \
+       $(EIGEN_CPPFLAGS) \
        $(AM_CPPFLAGS)
 
 
@@ -144,6 +153,8 @@ libsciast_la_etc_DATA = \
     etc/ast.quit \
     etc/ast.start
 
+#libsciast_la_LIBADD = $(LLVM_LIBS_STATIC)
+
 
 #### ast : include files ####
 libsciast_scilab_la_includedir=$(pkgincludedir)
index 004abe9..7c99bae 100644 (file)
@@ -210,7 +210,7 @@ am__libsciast_la_SOURCES_DIST = src/cpp/ast/runvisitor.cpp \
        src/cpp/types/listundefined.cpp src/cpp/types/string.cpp \
        src/cpp/types/implicitlist.cpp src/cpp/types/macro.cpp \
        src/cpp/types/struct.cpp src/cpp/types/macrofile.cpp \
-       src/cpp/types/callable.cpp \
+       src/cpp/types/callable.cpp src/cpp/types/internal.cpp \
        src/cpp/system_env/dynamic_module.cpp \
        src/cpp/system_env/setenvvar.cpp \
        src/cpp/system_env/sci_home.cpp \
@@ -225,7 +225,9 @@ am__libsciast_la_SOURCES_DIST = src/cpp/ast/runvisitor.cpp \
        src/cpp/system_env/home.cpp src/cpp/system_env/sci_tmpdir.cpp \
        src/cpp/system_env/reference_modules.cpp \
        src/cpp/system_env/formatmode.cpp \
-       src/cpp/system_env/warningmode.cpp src/cpp/types/inspector.cpp
+       src/cpp/system_env/warningmode.cpp src/cpp/jit/JITVisitor.cpp \
+       src/cpp/jit/JITValues.cpp src/cpp/jit/operations.cpp \
+       src/cpp/types/inspector.cpp
 am__dirstamp = $(am__leading_dot)dirstamp
 @ENABLE_DEBUG_TRUE@am__objects_1 =  \
 @ENABLE_DEBUG_TRUE@    src/cpp/types/libsciast_la-inspector.lo
@@ -300,6 +302,7 @@ am_libsciast_la_OBJECTS = src/cpp/ast/libsciast_la-runvisitor.lo \
        src/cpp/types/libsciast_la-struct.lo \
        src/cpp/types/libsciast_la-macrofile.lo \
        src/cpp/types/libsciast_la-callable.lo \
+       src/cpp/types/libsciast_la-internal.lo \
        src/cpp/system_env/libsciast_la-dynamic_module.lo \
        src/cpp/system_env/libsciast_la-setenvvar.lo \
        src/cpp/system_env/libsciast_la-sci_home.lo \
@@ -316,7 +319,9 @@ am_libsciast_la_OBJECTS = src/cpp/ast/libsciast_la-runvisitor.lo \
        src/cpp/system_env/libsciast_la-reference_modules.lo \
        src/cpp/system_env/libsciast_la-formatmode.lo \
        src/cpp/system_env/libsciast_la-warningmode.lo \
-       $(am__objects_1)
+       src/cpp/jit/libsciast_la-JITVisitor.lo \
+       src/cpp/jit/libsciast_la-JITValues.lo \
+       src/cpp/jit/libsciast_la-operations.lo $(am__objects_1)
 libsciast_la_OBJECTS = $(am_libsciast_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -530,7 +535,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
@@ -744,7 +749,7 @@ libsciast_la_SOURCES = src/cpp/ast/runvisitor.cpp \
        src/cpp/types/listundefined.cpp src/cpp/types/string.cpp \
        src/cpp/types/implicitlist.cpp src/cpp/types/macro.cpp \
        src/cpp/types/struct.cpp src/cpp/types/macrofile.cpp \
-       src/cpp/types/callable.cpp \
+       src/cpp/types/callable.cpp src/cpp/types/internal.cpp \
        src/cpp/system_env/dynamic_module.cpp \
        src/cpp/system_env/setenvvar.cpp \
        src/cpp/system_env/sci_home.cpp \
@@ -759,7 +764,9 @@ libsciast_la_SOURCES = src/cpp/ast/runvisitor.cpp \
        src/cpp/system_env/home.cpp src/cpp/system_env/sci_tmpdir.cpp \
        src/cpp/system_env/reference_modules.cpp \
        src/cpp/system_env/formatmode.cpp \
-       src/cpp/system_env/warningmode.cpp $(am__append_1)
+       src/cpp/system_env/warningmode.cpp src/cpp/jit/JITVisitor.cpp \
+       src/cpp/jit/JITValues.cpp src/cpp/jit/operations.cpp \
+       $(am__append_1)
 libsciast_la_CPPFLAGS = \
        -Iincludes/ast \
        -Iincludes/exps \
@@ -768,8 +775,10 @@ libsciast_la_CPPFLAGS = \
        -Iincludes/symbol \
        -Iincludes/system_env \
        -Iincludes/types \
+       -Iincludes/jit \
+       -Iincludes/analysis \
        -Isrc/cpp \
-    -I$(top_srcdir)/modules/dynamic_link/includes \
+        -I$(top_srcdir)/modules/dynamic_link/includes \
        -I$(top_srcdir)/modules/functions_manager/includes \
        -I$(top_srcdir)/modules/console/includes \
        -I$(top_srcdir)/modules/elementary_functions/includes \
@@ -780,7 +789,10 @@ libsciast_la_CPPFLAGS = \
        -I$(top_srcdir)/modules/localization/includes \
        -I$(top_srcdir)/modules/io/includes \
        -I$(top_srcdir)/modules/fileio/includes \
-    $(EIGEN_CPPFLAGS) \
+       $(LLVM_INCLUDE) \
+       $(LLVM_CPPFLAGS) \
+       $(LLVM_LDFLAGS) $(LLVM_LIBS) \
+       $(EIGEN_CPPFLAGS) \
        $(AM_CPPFLAGS)
 
 libsciast_la_includedir = $(pkgincludedir)
@@ -796,6 +808,8 @@ libsciast_la_etc_DATA = \
     etc/ast.start
 
 
+#libsciast_la_LIBADD = $(LLVM_LIBS_STATIC)
+
 #### ast : include files ####
 libsciast_scilab_la_includedir = $(pkgincludedir)
 libsciast_scilab_la_include_HEADERS = \
@@ -1347,6 +1361,8 @@ src/cpp/types/libsciast_la-macrofile.lo:  \
        src/cpp/types/$(DEPDIR)/$(am__dirstamp)
 src/cpp/types/libsciast_la-callable.lo: src/cpp/types/$(am__dirstamp) \
        src/cpp/types/$(DEPDIR)/$(am__dirstamp)
+src/cpp/types/libsciast_la-internal.lo: src/cpp/types/$(am__dirstamp) \
+       src/cpp/types/$(DEPDIR)/$(am__dirstamp)
 src/cpp/system_env/$(am__dirstamp):
        @$(MKDIR_P) src/cpp/system_env
        @: > src/cpp/system_env/$(am__dirstamp)
@@ -1401,6 +1417,18 @@ src/cpp/system_env/libsciast_la-formatmode.lo:  \
 src/cpp/system_env/libsciast_la-warningmode.lo:  \
        src/cpp/system_env/$(am__dirstamp) \
        src/cpp/system_env/$(DEPDIR)/$(am__dirstamp)
+src/cpp/jit/$(am__dirstamp):
+       @$(MKDIR_P) src/cpp/jit
+       @: > src/cpp/jit/$(am__dirstamp)
+src/cpp/jit/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/cpp/jit/$(DEPDIR)
+       @: > src/cpp/jit/$(DEPDIR)/$(am__dirstamp)
+src/cpp/jit/libsciast_la-JITVisitor.lo: src/cpp/jit/$(am__dirstamp) \
+       src/cpp/jit/$(DEPDIR)/$(am__dirstamp)
+src/cpp/jit/libsciast_la-JITValues.lo: src/cpp/jit/$(am__dirstamp) \
+       src/cpp/jit/$(DEPDIR)/$(am__dirstamp)
+src/cpp/jit/libsciast_la-operations.lo: src/cpp/jit/$(am__dirstamp) \
+       src/cpp/jit/$(DEPDIR)/$(am__dirstamp)
 src/cpp/types/libsciast_la-inspector.lo:  \
        src/cpp/types/$(am__dirstamp) \
        src/cpp/types/$(DEPDIR)/$(am__dirstamp)
@@ -1414,6 +1442,8 @@ mostlyclean-compile:
        -rm -f src/c/operations/*.lo
        -rm -f src/cpp/ast/*.$(OBJEXT)
        -rm -f src/cpp/ast/*.lo
+       -rm -f src/cpp/jit/*.$(OBJEXT)
+       -rm -f src/cpp/jit/*.lo
        -rm -f src/cpp/operations/*.$(OBJEXT)
        -rm -f src/cpp/operations/*.lo
        -rm -f src/cpp/parse/*.$(OBJEXT)
@@ -1447,6 +1477,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/ast/$(DEPDIR)/libsciast_la-runvisitor.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/ast/$(DEPDIR)/libsciast_la-shortcutvisitor.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/ast/$(DEPDIR)/libsciast_la-visitor_common.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/jit/$(DEPDIR)/libsciast_la-JITValues.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/jit/$(DEPDIR)/libsciast_la-JITVisitor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/jit/$(DEPDIR)/libsciast_la-operations.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/operations/$(DEPDIR)/libsciast_la-interface_addition.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/operations/$(DEPDIR)/libsciast_la-operations.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/operations/$(DEPDIR)/libsciast_la-types_addition.Plo@am__quote@
@@ -1494,6 +1527,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-implicitlist.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-inspector.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-int.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-internal.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-library.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-list.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-listdelete.Plo@am__quote@
@@ -2062,6 +2096,13 @@ src/cpp/types/libsciast_la-callable.lo: src/cpp/types/callable.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/types/libsciast_la-callable.lo `test -f 'src/cpp/types/callable.cpp' || echo '$(srcdir)/'`src/cpp/types/callable.cpp
 
+src/cpp/types/libsciast_la-internal.lo: src/cpp/types/internal.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/types/libsciast_la-internal.lo -MD -MP -MF src/cpp/types/$(DEPDIR)/libsciast_la-internal.Tpo -c -o src/cpp/types/libsciast_la-internal.lo `test -f 'src/cpp/types/internal.cpp' || echo '$(srcdir)/'`src/cpp/types/internal.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/types/$(DEPDIR)/libsciast_la-internal.Tpo src/cpp/types/$(DEPDIR)/libsciast_la-internal.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/types/internal.cpp' object='src/cpp/types/libsciast_la-internal.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/types/libsciast_la-internal.lo `test -f 'src/cpp/types/internal.cpp' || echo '$(srcdir)/'`src/cpp/types/internal.cpp
+
 src/cpp/system_env/libsciast_la-dynamic_module.lo: src/cpp/system_env/dynamic_module.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/system_env/libsciast_la-dynamic_module.lo -MD -MP -MF src/cpp/system_env/$(DEPDIR)/libsciast_la-dynamic_module.Tpo -c -o src/cpp/system_env/libsciast_la-dynamic_module.lo `test -f 'src/cpp/system_env/dynamic_module.cpp' || echo '$(srcdir)/'`src/cpp/system_env/dynamic_module.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/system_env/$(DEPDIR)/libsciast_la-dynamic_module.Tpo src/cpp/system_env/$(DEPDIR)/libsciast_la-dynamic_module.Plo
@@ -2174,6 +2215,27 @@ src/cpp/system_env/libsciast_la-warningmode.lo: src/cpp/system_env/warningmode.c
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/system_env/libsciast_la-warningmode.lo `test -f 'src/cpp/system_env/warningmode.cpp' || echo '$(srcdir)/'`src/cpp/system_env/warningmode.cpp
 
+src/cpp/jit/libsciast_la-JITVisitor.lo: src/cpp/jit/JITVisitor.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/jit/libsciast_la-JITVisitor.lo -MD -MP -MF src/cpp/jit/$(DEPDIR)/libsciast_la-JITVisitor.Tpo -c -o src/cpp/jit/libsciast_la-JITVisitor.lo `test -f 'src/cpp/jit/JITVisitor.cpp' || echo '$(srcdir)/'`src/cpp/jit/JITVisitor.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/jit/$(DEPDIR)/libsciast_la-JITVisitor.Tpo src/cpp/jit/$(DEPDIR)/libsciast_la-JITVisitor.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/jit/JITVisitor.cpp' object='src/cpp/jit/libsciast_la-JITVisitor.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/jit/libsciast_la-JITVisitor.lo `test -f 'src/cpp/jit/JITVisitor.cpp' || echo '$(srcdir)/'`src/cpp/jit/JITVisitor.cpp
+
+src/cpp/jit/libsciast_la-JITValues.lo: src/cpp/jit/JITValues.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/jit/libsciast_la-JITValues.lo -MD -MP -MF src/cpp/jit/$(DEPDIR)/libsciast_la-JITValues.Tpo -c -o src/cpp/jit/libsciast_la-JITValues.lo `test -f 'src/cpp/jit/JITValues.cpp' || echo '$(srcdir)/'`src/cpp/jit/JITValues.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/jit/$(DEPDIR)/libsciast_la-JITValues.Tpo src/cpp/jit/$(DEPDIR)/libsciast_la-JITValues.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/jit/JITValues.cpp' object='src/cpp/jit/libsciast_la-JITValues.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/jit/libsciast_la-JITValues.lo `test -f 'src/cpp/jit/JITValues.cpp' || echo '$(srcdir)/'`src/cpp/jit/JITValues.cpp
+
+src/cpp/jit/libsciast_la-operations.lo: src/cpp/jit/operations.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/jit/libsciast_la-operations.lo -MD -MP -MF src/cpp/jit/$(DEPDIR)/libsciast_la-operations.Tpo -c -o src/cpp/jit/libsciast_la-operations.lo `test -f 'src/cpp/jit/operations.cpp' || echo '$(srcdir)/'`src/cpp/jit/operations.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/jit/$(DEPDIR)/libsciast_la-operations.Tpo src/cpp/jit/$(DEPDIR)/libsciast_la-operations.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/jit/operations.cpp' object='src/cpp/jit/libsciast_la-operations.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/jit/libsciast_la-operations.lo `test -f 'src/cpp/jit/operations.cpp' || echo '$(srcdir)/'`src/cpp/jit/operations.cpp
+
 src/cpp/types/libsciast_la-inspector.lo: src/cpp/types/inspector.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/types/libsciast_la-inspector.lo -MD -MP -MF src/cpp/types/$(DEPDIR)/libsciast_la-inspector.Tpo -c -o src/cpp/types/libsciast_la-inspector.lo `test -f 'src/cpp/types/inspector.cpp' || echo '$(srcdir)/'`src/cpp/types/inspector.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/types/$(DEPDIR)/libsciast_la-inspector.Tpo src/cpp/types/$(DEPDIR)/libsciast_la-inspector.Plo
@@ -2188,6 +2250,7 @@ clean-libtool:
        -rm -rf .libs _libs
        -rm -rf src/c/operations/.libs src/c/operations/_libs
        -rm -rf src/cpp/ast/.libs src/cpp/ast/_libs
+       -rm -rf src/cpp/jit/.libs src/cpp/jit/_libs
        -rm -rf src/cpp/operations/.libs src/cpp/operations/_libs
        -rm -rf src/cpp/parse/.libs src/cpp/parse/_libs
        -rm -rf src/cpp/symbol/.libs src/cpp/symbol/_libs
@@ -2379,6 +2442,8 @@ distclean-generic:
        -rm -f src/c/operations/$(am__dirstamp)
        -rm -f src/cpp/ast/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/cpp/ast/$(am__dirstamp)
+       -rm -f src/cpp/jit/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/cpp/jit/$(am__dirstamp)
        -rm -f src/cpp/operations/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/cpp/operations/$(am__dirstamp)
        -rm -f src/cpp/parse/$(DEPDIR)/$(am__dirstamp)
@@ -2400,7 +2465,7 @@ clean-am: clean-generic clean-libtool clean-local \
        clean-pkglibLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
-       -rm -rf src/c/operations/$(DEPDIR) src/cpp/ast/$(DEPDIR) src/cpp/operations/$(DEPDIR) src/cpp/parse/$(DEPDIR) src/cpp/symbol/$(DEPDIR) src/cpp/system_env/$(DEPDIR) src/cpp/types/$(DEPDIR)
+       -rm -rf src/c/operations/$(DEPDIR) src/cpp/ast/$(DEPDIR) src/cpp/jit/$(DEPDIR) src/cpp/operations/$(DEPDIR) src/cpp/parse/$(DEPDIR) src/cpp/symbol/$(DEPDIR) src/cpp/system_env/$(DEPDIR) src/cpp/types/$(DEPDIR)
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
        distclean-local distclean-tags
@@ -2448,7 +2513,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-       -rm -rf src/c/operations/$(DEPDIR) src/cpp/ast/$(DEPDIR) src/cpp/operations/$(DEPDIR) src/cpp/parse/$(DEPDIR) src/cpp/symbol/$(DEPDIR) src/cpp/system_env/$(DEPDIR) src/cpp/types/$(DEPDIR)
+       -rm -rf src/c/operations/$(DEPDIR) src/cpp/ast/$(DEPDIR) src/cpp/jit/$(DEPDIR) src/cpp/operations/$(DEPDIR) src/cpp/parse/$(DEPDIR) src/cpp/symbol/$(DEPDIR) src/cpp/system_env/$(DEPDIR) src/cpp/types/$(DEPDIR)
        -rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
diff --git a/scilab/modules/ast/includes/analysis/AnalysisVisitor.hxx b/scilab/modules/ast/includes/analysis/AnalysisVisitor.hxx
new file mode 100644 (file)
index 0000000..63cb242
--- /dev/null
@@ -0,0 +1,314 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __ANALYSIS_VISITOR_HXX__
+#define __ANALYSIS_VISITOR_HXX__
+
+#include <set>
+#include <memory>
+
+#include "visitor.hxx"
+#include "allexp.hxx"
+#include "allvar.hxx"
+
+namespace analysis
+{
+
+class AnalysisVisitor : public ast::ConstVisitor
+{
+
+    std::set<symbol::Symbol> SymRead;
+    std::set<symbol::Symbol> SymWrite;
+
+public:
+
+    AnalysisVisitor() { }
+
+    const std::set<symbol::Symbol> & get_read() const
+    {
+        return SymRead;
+    }
+    const std::set<symbol::Symbol> & get_write() const
+    {
+        return SymWrite;
+    }
+
+    bool is_read(const symbol::Symbol & s) const
+    {
+        std::set<symbol::Symbol>::const_iterator it = SymRead.find(s);
+
+        return it != SymRead.end();
+    }
+
+    bool is_write(const symbol::Symbol & s) const
+    {
+        std::set<symbol::Symbol>::const_iterator it = SymWrite.find(s);
+
+        return it != SymWrite.end();
+    }
+
+private:
+
+    /*            inline void result_set( & val)
+                  {
+                  _result = val;
+                  }
+
+                  inline void result_set( && val)
+                  {
+                  _result = val;
+                  }
+
+                  inline  & result_get()
+                  {
+                  return  _result;
+                  }
+    */
+    void visit(const ast::SimpleVar &e)
+    {
+        std::set<symbol::Symbol>::const_iterator it = SymWrite.find(e.name_get());
+        if (it == SymWrite.end())
+        {
+            SymRead.insert(e.name_get());
+        }
+    }
+
+    void visit(const ast::DollarVar &e)
+    {
+
+    }
+
+    void visit(const ast::ColonVar &e)
+    {
+
+    }
+
+    void visit(const ast::ArrayListVar &e)
+    {
+
+    }
+
+    void visit(const ast::IntExp &e)
+    {
+
+    }
+
+    void visit(const ast::FloatExp &e)
+    {
+
+    }
+
+    void visit(const ast::DoubleExp &e)
+    {
+
+    }
+
+    void visit(const ast::BoolExp &e)
+    {
+
+    }
+
+    void visit(const ast::StringExp &e)
+    {
+
+    }
+
+    void visit(const ast::CommentExp &e)
+    {
+        // ignored
+    }
+
+    void visit(const ast::NilExp &e)
+    {
+
+    }
+
+    void visit(const ast::CallExp &e)
+    {
+
+    }
+
+    void visit(const ast::CellCallExp &e)
+    {
+
+    }
+
+    void visit(const ast::OpExp &e)
+    {
+        e.left_get().accept(*this);
+        e.right_get().accept(*this);
+    }
+
+    void visit(const ast::LogicalOpExp &e)
+    {
+        e.left_get().accept(*this);
+        e.right_get().accept(*this);
+    }
+
+    void visit(const ast::AssignExp &e)
+    {
+        if (e.left_exp_get().is_simple_var())
+        {
+            ast::SimpleVar & var = static_cast<ast::SimpleVar &>(e.left_exp_get());
+            std::set<symbol::Symbol>::const_iterator it = SymRead.find(var.name_get());
+            if (it != SymRead.end())
+            {
+                SymRead.erase(it);
+            }
+
+            SymWrite.insert(var.name_get());
+        }
+        else
+        {
+            // TODO: handle this case
+        }
+
+        e.right_exp_get().accept(*this);
+    }
+
+    void visit(const ast::IfExp &e)
+    {
+
+    }
+
+    void visit(const ast::WhileExp &e)
+    {
+
+    }
+
+    void visit(const ast::ForExp &e)
+    {
+        e.vardec_get().accept(*this);
+        e.body_get().accept(*this);
+    }
+
+    void visit(const ast::BreakExp &e)
+    {
+
+    }
+
+    void visit(const ast::ContinueExp &e)
+    {
+
+    }
+
+    void visit(const ast::TryCatchExp &e)
+    {
+
+    }
+
+    void visit(const ast::SelectExp &e)
+    {
+
+    }
+
+    void visit(const ast::CaseExp &e)
+    {
+
+    }
+
+    void visit(const ast::ReturnExp &e)
+    {
+
+    }
+
+    void visit(const ast::FieldExp &e)
+    {
+
+    }
+
+    void visit(const ast::NotExp &e)
+    {
+
+    }
+
+    void visit(const ast::TransposeExp &e)
+    {
+
+    }
+
+    void visit(const ast::MatrixExp &e)
+    {
+
+    }
+
+    void visit(const ast::MatrixLineExp &e)
+    {
+
+    }
+
+    void visit(const ast::CellExp &e)
+    {
+
+    }
+
+    void visit(const ast::SeqExp &e)
+    {
+        for (std::list<ast::Exp *>::const_iterator i = e.exps_get().begin(), end = e.exps_get().end(); i != end; ++i)
+        {
+            (*i)->accept(*this);
+        }
+    }
+
+    void visit(const ast::ArrayListExp &e)
+    {
+
+    }
+
+    void visit(const ast::AssignListExp &e)
+    {
+
+    }
+
+    void visit(const ast::VarDec &e)
+    {
+        std::set<symbol::Symbol>::const_iterator it = SymRead.find(e.name_get());
+        if (it != SymRead.end())
+        {
+            SymRead.erase(it);
+        }
+
+        SymWrite.insert(e.name_get());
+        e.init_get().accept(*this);
+    }
+
+    void visit(const ast::FunctionDec &e)
+    {
+
+    }
+
+    void visit(const ast::ListExp &e)
+    {
+        double start = NAN, step = NAN, end = NAN;
+
+        if (e.start_get().is_double_exp())
+        {
+            start = static_cast<const ast::DoubleExp &>(e.start_get()).value_get();
+        }
+
+        if (e.step_get().is_double_exp())
+        {
+            step = static_cast<const ast::DoubleExp &>(e.step_get()).value_get();
+        }
+
+        if (e.end_get().is_double_exp())
+        {
+            end = static_cast<const ast::DoubleExp &>(e.end_get()).value_get();
+        }
+
+        const_cast<ast::ListExp &>(e).set_values(start, step, end);
+    }
+};
+
+} // namespace analysis
+
+#endif // __ANALYSIS_VISITOR_HXX__
index 69d74a7..eb57150 100644 (file)
@@ -95,6 +95,11 @@ public:
         _bigDouble->IncreaseRef();
     }
 
+    inline bool is_double_exp() const
+    {
+        return true;
+    }
+
 protected:
     double     _value;
     types::Double*    _bigDouble;
index ae20308..454ce36 100644 (file)
@@ -182,6 +182,16 @@ public:
         return false;
     }
 
+    inline virtual bool is_list_exp() const
+    {
+        return false;
+    }
+
+    inline virtual bool is_double_exp() const
+    {
+        return false;
+    }
+
 private:
     bool _verbose;
     bool _bBreak;
index c2368ac..f6b6e88 100644 (file)
@@ -23,6 +23,7 @@ namespace ast
 ** \b Example: 1:0.5:10 */
 class ListExp : public Exp
 {
+
 public:
     /** \name Ctor & dtor.
     ** \{ */
@@ -117,6 +118,23 @@ public:
         return *_end;
     }
 
+    inline virtual bool is_list_exp() const
+    {
+        return true;
+    }
+
+    inline void set_values(double start, double step, double end)
+    {
+        values[0] = start;
+        values[1] = step;
+        values[2] = end;
+    }
+
+    inline const double * get_values() const
+    {
+        return values;
+    }
+
     /** \} */
 
 protected:
@@ -126,6 +144,9 @@ protected:
     Exp* _step;
     /** \brief end expression of the list. */
     Exp* _end;
+
+    double values[3] = {NAN, NAN, NAN};
+    bool is_values_int[3] = {false, false, false};
 };
 
 } // namespace ast
diff --git a/scilab/modules/ast/includes/jit/JITValues.hxx b/scilab/modules/ast/includes/jit/JITValues.hxx
new file mode 100644 (file)
index 0000000..61ab6c9
--- /dev/null
@@ -0,0 +1,293 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __JIT_VALUES_HXX__
+#define __JIT_VALUES_HXX__
+
+#include "llvm/ExecutionEngine/GenericValue.h"
+#include "llvm/IR/Instructions.h"
+#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/IRBuilder.h"
+
+#include "internal.hxx"
+#include "JITVisitor.hxx"
+
+namespace jit
+{
+class JITVal
+{
+
+public:
+
+    JITVal(llvm::Value * _val, llvm::Type * _type) : val(_val), type(_type) { }
+
+    virtual bool is_scalar() const = 0;
+    virtual int get_type_size() const = 0;
+    virtual types::InternalType::ScilabId get_scilab_id() const = 0;
+    virtual void store(llvm::Value * x, JITVisitor & visitor) const = 0;
+    virtual void store(llvm::Value * x, llvm::Value * free, JITVisitor & visitor) const = 0;
+    virtual void storeR(llvm::Value * _r, JITVisitor & visitor) const = 0;
+    virtual void storeC(llvm::Value * _c, JITVisitor & visitor) const = 0;
+    virtual llvm::Value * load(JITVisitor & visitor) const = 0;
+    virtual llvm::Value * loadR(JITVisitor & visitor) const = 0;
+    virtual llvm::Value * loadC(JITVisitor & visitor) const = 0;
+    virtual llvm::Value * getR() const = 0;
+    virtual llvm::Value * getC() const = 0;
+    virtual llvm::Value * get_must_free() const = 0;
+    virtual void free() = 0;
+
+    inline llvm::Value * get_value() const
+    {
+        return val;
+    }
+    inline llvm::Type * get_type() const
+    {
+        return type;
+    }
+
+    inline bool is_null() const
+    {
+        return !val;
+    }
+
+    void store(JITVal & x, JITVisitor & visitor) const
+    {
+        if (is_scalar())
+        {
+            store(x.val, visitor);
+        }
+        else
+        {
+            store(x.val, x.get_must_free(), visitor);
+            storeR(x.getR(), visitor);
+            storeC(x.getC(), visitor);
+        }
+    }
+
+    static JITVal * get(JITVisitor & visitor, types::InternalType * const pIT, const bool alloc = false, const std::string & name = "");
+
+protected:
+
+    llvm::Value * val = nullptr;
+    llvm::Type * type = nullptr;
+
+    template<typename T>
+    inline static llvm::Value * load(llvm::Value * v, bool _scalar, llvm::IRBuilder<> & builder)
+    {
+        if (llvm::isa<llvm::AllocaInst>(v))
+        {
+            return builder.CreateAlignedLoad(llvm::cast<llvm::AllocaInst>(v), _scalar ? sizeof(T) : sizeof(T *));
+        }
+
+        return v;
+    }
+
+    template<typename T>
+    inline static void store(llvm::Value * v, llvm::Value * x, bool _scalar, llvm::IRBuilder<> & builder)
+    {
+        if (llvm::isa<llvm::AllocaInst>(v))
+        {
+            llvm::Value * _x = llvm::isa<llvm::AllocaInst>(x) ? builder.CreateAlignedLoad(llvm::cast<llvm::AllocaInst>(x), sizeof(T)) : x;
+
+            builder.CreateAlignedStore(_x, llvm::cast<llvm::AllocaInst>(v), _scalar ? sizeof(T) : sizeof(T *));
+        }
+        else
+        {
+            throw ast::ScilabError("Cannot store a value !");
+        }
+    }
+};
+
+template<typename T>
+class JITScalarVal : public JITVal
+{
+public:
+
+    JITScalarVal(JITVisitor & visitor, T _val, bool alloc = false, const std::string & name = "") : JITVal(alloc ? visitor.getAlloca(_val, name) : visitor.getConstant(_val), getLLVMTy<T>(visitor.getContext())) { }
+
+    JITScalarVal(JITVisitor & visitor, JITVal * _val, const std::string & name = "") : JITVal(visitor.getAlloca(_val->get_value(), _val->get_type(), _val->get_type_size(), name), _val->get_type()) { }
+
+    JITScalarVal(JITVisitor & visitor, llvm::Value * _val) : JITVal(_val, getLLVMTy<T>(visitor.getContext())) { }
+
+    inline bool is_scalar() const
+    {
+        return true;
+    }
+
+    inline int get_type_size() const
+    {
+        return sizeof(T);
+    }
+
+    inline types::InternalType::ScilabId get_scilab_id() const
+    {
+        return types::InternalType::getScilabId<T>();
+    }
+
+    inline void store(llvm::Value * x, JITVisitor & visitor) const
+    {
+        JITVal::store<T>(this->val, x, true, visitor.getBuilder());
+    }
+
+    inline void store(llvm::Value * x, llvm::Value * free, JITVisitor & visitor) const { }
+
+    inline void storeR(llvm::Value * _r, JITVisitor & visitor) const { }
+    inline void storeC(llvm::Value * _c, JITVisitor & visitor) const { }
+
+    llvm::Value * load(JITVisitor & visitor) const
+    {
+        return JITVal::load<T>(val, true, visitor.getBuilder());
+    }
+
+    inline llvm::Value * loadR(JITVisitor & visitor) const
+    {
+        return JITVisitor::ONE;
+    }
+    inline llvm::Value * loadC(JITVisitor & visitor) const
+    {
+        return JITVisitor::ONE;
+    }
+
+    inline llvm::Value * getR() const
+    {
+        return nullptr;
+    }
+    inline llvm::Value * getC() const
+    {
+        return nullptr;
+    }
+
+
+    inline llvm::Value * get_must_free() const
+    {
+        return nullptr;
+    }
+
+    inline void free() { }
+};
+
+template<typename T>
+class JITMatrixVal : public JITVal
+{
+    llvm::Value * r = nullptr;
+    llvm::Value * c = nullptr;
+    llvm::Value * must_be_freed = nullptr;
+
+public:
+
+    JITMatrixVal(JITVisitor & visitor, const int _r, const int _c, T * _val, const bool alloc = false, const std::string & name = "") : JITVal(alloc ? visitor.getAllocaPtr(_val, name) : visitor.getConstantPtr(_val), getLLVMTy<T *>(visitor.getContext())),
+        r(alloc ? visitor.getAlloca(_r, name + "_row") : visitor.getConstant(_r)),
+        c(alloc ? visitor.getAlloca(_c, name + "_col") : visitor.getConstant(_c)),
+        must_be_freed(alloc ? visitor.getAlloca<bool>(false, name + "_MBF") : visitor.getConstant(false))
+    {
+    }
+
+    JITMatrixVal(JITVisitor & visitor, llvm::Value * _r, llvm::Value * _c, llvm::Value * _val) : JITVal(/*visitor.getAllocaPtr<T>(_val)*/_val, getLLVMTy<T *>(visitor.getContext())), r(_r), c(_c), must_be_freed(visitor.getConstant(true/*visitor.getAlloca<bool>(true, "must_be_freed_t")*/))
+    {
+    }
+
+    inline llvm::Value * get_must_free() const
+    {
+        return must_be_freed;
+    }
+
+    inline void free() { }
+
+    inline bool is_scalar() const
+    {
+        return false;
+    }
+
+    inline int get_type_size() const
+    {
+        return sizeof(T*);
+    }
+
+    inline types::InternalType::ScilabId get_scilab_id() const
+    {
+        return types::InternalType::getScilabId<T*>();
+    }
+
+    static void debug(double * p)
+    {
+        std::cout << "free=" << (void*)p << std::endl;
+    }
+
+    inline void store(llvm::Value * x, llvm::Value * free, JITVisitor & visitor) const
+    {
+        llvm::Function * func = &visitor.getFunction();
+        llvm::LLVMContext & context = visitor.getContext();
+        llvm::IRBuilder<> & builder = visitor.getBuilder();
+        llvm::BasicBlock * cur_block = builder.GetInsertBlock();
+
+        llvm::BasicBlock * BBThen = llvm::BasicBlock::Create(context, "", func);
+        llvm::BasicBlock * BBElse = llvm::BasicBlock::Create(context, "", func);
+
+        builder.CreateCondBr(JITVal::load<bool>(must_be_freed, false, visitor.getBuilder()), BBThen, BBElse);
+
+        builder.SetInsertPoint(BBThen);
+
+        //llvm::Value * toCall = visitor.getPointer(reinterpret_cast<void *>(&debug), getLLVMPtrFuncTy<void, double *>(context));
+        //builder.CreateCall(toCall, load(visitor));
+        llvm::Value * _free = llvm::CallInst::CreateFree(load(visitor), BBThen);
+        BBThen->getInstList().push_back(llvm::cast<llvm::Instruction>(_free));
+
+        builder.CreateBr(BBElse);
+        builder.SetInsertPoint(BBElse);
+        store(x, visitor);
+        JITVal::store<bool>(must_be_freed, free, false, visitor.getBuilder());
+    }
+
+    inline void store(llvm::Value * x, JITVisitor & visitor) const
+    {
+        JITVal::store<T>(this->val, x, false, visitor.getBuilder());
+    }
+
+    inline void storeR(llvm::Value * _r, JITVisitor & visitor) const
+    {
+        JITVal::store<int>(this->r, _r, true, visitor.getBuilder());
+    }
+
+    inline void storeC(llvm::Value * _c, JITVisitor & visitor) const
+    {
+        JITVal::store<int>(this->c, _c, true, visitor.getBuilder());
+    }
+
+    inline llvm::Value * load(JITVisitor & visitor) const
+    {
+        return JITVal::load<T>(val, false, visitor.getBuilder());
+    }
+
+    inline llvm::Value * loadR(JITVisitor & visitor) const
+    {
+        return JITVal::load<int>(r, true, visitor.getBuilder());
+    }
+
+    inline llvm::Value * loadC(JITVisitor & visitor) const
+    {
+        return JITVal::load<int>(c, true, visitor.getBuilder());
+    }
+
+    inline llvm::Value * getR() const
+    {
+        return r;
+    }
+    inline llvm::Value * getC() const
+    {
+        return c;
+    }
+};
+
+
+} // namespace jit
+
+#endif // __JIT_VALUES_HXX__
diff --git a/scilab/modules/ast/includes/jit/JITVisitor.hxx b/scilab/modules/ast/includes/jit/JITVisitor.hxx
new file mode 100644 (file)
index 0000000..f4bec52
--- /dev/null
@@ -0,0 +1,254 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __JIT_VISITOR_HXX__
+#define __JIT_VISITOR_HXX__
+
+#include <map>
+#include <memory>
+
+//#include "llvm/IR/Verifier.h"
+#include "llvm/ExecutionEngine/GenericValue.h"
+#include "llvm/ExecutionEngine/Interpreter.h"
+#include "llvm/ExecutionEngine/MCJIT.h"
+#include "llvm/IR/Constants.h"
+#include "llvm/IR/DataLayout.h"
+#include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/Instructions.h"
+#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/Module.h"
+#include "llvm/Support/TargetSelect.h"
+//#include "llvm/Support/raw_ostream.h"
+#include "llvm/PassManager.h"
+#include "llvm/Analysis/Passes.h"
+#include "llvm/Transforms/Scalar.h"
+
+#include "visitor.hxx"
+#include "allexp.hxx"
+#include "allvar.hxx"
+#include "ScilabJITTraits.hxx"
+#include "AnalysisVisitor.hxx"
+
+namespace jit
+{
+
+class JITVal;
+
+class JITVisitor : public ast::ConstVisitor
+{
+    typedef std::map<symbol::Symbol, std::shared_ptr<JITVal>> JITSymbolMap;
+
+    static const bool __init__;
+
+    const analysis::AnalysisVisitor & analysis;
+
+    std::string err;
+    llvm::LLVMContext & context;
+    llvm::Module module;
+    llvm::ExecutionEngine * engine;
+    llvm::FunctionPassManager FPM;
+    llvm::Function * function;
+    llvm::IRBuilder<> builder;
+    llvm::Type * uintptrType;
+    std::shared_ptr<JITVal> _result;
+
+    //std::map<symbol::Symbol, llvm::Value *> symMap;
+    //std::map<symbol::Symbol, JITVal> symMap2;
+
+    JITSymbolMap symMap3;
+
+    llvm::Value * start = 0;
+    llvm::Value * step = 0;
+    llvm::Value * end = 0;
+
+public:
+
+    static llvm::Value * const ONE;
+    static llvm::Value * const TWO;
+    static llvm::Value * const THREE;
+    static llvm::Value * const FOUR;
+
+    JITVisitor(const analysis::AnalysisVisitor & _analysis);
+
+    void run();
+
+    void dump() const;
+
+    inline llvm::LLVMContext & getContext()
+    {
+        return context;
+    }
+
+    inline llvm::IRBuilder<> & getBuilder()
+    {
+        return builder;
+    }
+
+    inline llvm::Function & getFunction()
+    {
+        return *function;
+    }
+
+    inline llvm::Type * getPtrTy()
+    {
+        return uintptrType;
+    }
+
+    inline llvm::Value * getPointer(void * const ptr)
+    {
+        llvm::Value * v = llvm::ConstantInt::get(uintptrType, reinterpret_cast<uintptr_t>(ptr));
+        v = builder.CreateIntToPtr(v, llvm::PointerType::getInt8PtrTy(context));
+
+        return v;
+    }
+
+    inline llvm::Value * getPointer(void * const ptr, const char * const type)
+    {
+        llvm::Value * v = llvm::ConstantInt::get(uintptrType, reinterpret_cast<uintptr_t>(ptr));
+        v = builder.CreateIntToPtr(v, llvm::PointerType::getUnqual(module.getTypeByName(type)));
+
+        return v;
+    }
+
+    inline llvm::Value * getPointer(void * const ptr, llvm::Type * const type)
+    {
+        llvm::Value * v = llvm::ConstantInt::get(uintptrType, reinterpret_cast<uintptr_t>(ptr));
+        v = builder.CreateIntToPtr(v, type);
+
+        return v;
+    }
+
+    template<typename T>
+    llvm::Value * getConstant(const T val)
+    {
+        llvm::Value * const v = llvm::ConstantInt::get(getLLVMTy<T>(context), uint64_t(val), !std::is_unsigned<T>::value);
+
+        return v;
+    }
+
+    template<typename T>
+    llvm::Value * getConstantPtr(const T * val)
+    {
+        llvm::Value * const v = getPointer((void *)val, getLLVMTy<T *>(context));
+
+        return v;
+    }
+
+    template<typename T>
+    llvm::Value * getAlloca(const T val, const std::string & name)
+    {
+        llvm::AllocaInst * alloca = builder.CreateAlloca(getLLVMTy<T>(context), 0, name.c_str());
+        alloca->setAlignment(sizeof(T));
+        builder.CreateAlignedStore(getConstant<T>(val), alloca, sizeof(T));
+
+        return alloca;
+    }
+
+    llvm::Value * getAlloca(llvm::Value * val, llvm::Type * type, int type_size, const std::string & name)
+    {
+        llvm::AllocaInst * alloca = builder.CreateAlloca(type, 0, name.c_str());
+        alloca->setAlignment(type_size);
+        builder.CreateAlignedStore(val, alloca, type_size);
+
+        return alloca;
+    }
+
+    template<typename T>
+    llvm::Value * getAllocaPtr(const T * val, const std::string & name)
+    {
+        llvm::AllocaInst * alloca = builder.CreateAlloca(getLLVMTy<T *>(context), 0, name.c_str());
+        alloca->setAlignment(sizeof(T *));
+        builder.CreateAlignedStore(getPointer((void *)val, getLLVMTy<T *>(context)), alloca, sizeof(T));
+
+        return alloca;
+    }
+
+    template<typename T>
+    llvm::Value * getAllocaPtr(llvm::Value * val)
+    {
+        llvm::AllocaInst * alloca = builder.CreateAlloca(getLLVMTy<T *>(context), 0);
+        alloca->setAlignment(sizeof(T *));
+        builder.CreateAlignedStore(val, alloca, sizeof(T));
+
+        return alloca;
+    }
+
+private:
+
+    inline void result_set(std::shared_ptr<JITVal> & val)
+    {
+        _result = val;
+    }
+
+    inline void result_set(std::shared_ptr<JITVal> && val)
+    {
+        _result = val;
+    }
+
+    inline std::shared_ptr<JITVal> & result_get()
+    {
+        return  _result;
+    }
+
+    inline void call_throw(const char * msg)
+    {
+        llvm::Value * _msg = builder.CreateGlobalStringPtr(llvm::StringRef(msg));
+        llvm::Value * v = llvm::ConstantInt::get(uintptrType, reinterpret_cast<uintptr_t>(&jit::jit_throw));
+        v = builder.CreateIntToPtr(v, getLLVMPtrFuncTy<void, char *>(context));
+        builder.CreateCall(v, _msg);
+    }
+
+    void visit(const ast::SimpleVar &e);
+    void visit(const ast::DollarVar &e); //a=[1 2;3 4];b=[5 6;7 8];jit("a/b")
+    void visit(const ast::ColonVar &e);
+    void visit(const ast::ArrayListVar &e);
+    void visit(const ast::IntExp &e);
+    void visit(const ast::FloatExp &e);
+    void visit(const ast::DoubleExp &e);
+    void visit(const ast::BoolExp &e);
+    void visit(const ast::StringExp &e);
+    void visit(const ast::CommentExp &e);
+    void visit(const ast::NilExp &e);
+    void visit(const ast::CallExp &e);
+    void visit(const ast::CellCallExp &e);
+    void visit(const ast::OpExp &e);
+    void visit(const ast::LogicalOpExp &e);
+    void visit(const ast::AssignExp &e);
+    void visit(const ast::IfExp &e);
+    void visit(const ast::WhileExp &e);
+    void visit(const ast::ForExp &e);
+    void visit(const ast::BreakExp &e);
+    void visit(const ast::ContinueExp &e);
+    void visit(const ast::TryCatchExp &e);
+    void visit(const ast::SelectExp &e);
+    void visit(const ast::CaseExp &e);
+    void visit(const ast::ReturnExp &e);
+    void visit(const ast::FieldExp &e);
+    void visit(const ast::NotExp &e);
+    void visit(const ast::TransposeExp &e);
+    void visit(const ast::MatrixExp &e);
+    void visit(const ast::MatrixLineExp &e);
+    void visit(const ast::CellExp &e);
+    void visit(const ast::SeqExp &e);
+    void visit(const ast::ArrayListExp &e);
+    void visit(const ast::AssignListExp &e);
+    void visit(const ast::VarDec &e);
+    void visit(const ast::FunctionDec &e);
+    void visit(const ast::ListExp &e);
+};
+
+template<> llvm::Value * JITVisitor::getConstant<double>(const double val);
+
+} // namespace jit
+
+#endif // __JIT_VISITOR_HXX__
diff --git a/scilab/modules/ast/includes/jit/ScilabJITTraits.hxx b/scilab/modules/ast/includes/jit/ScilabJITTraits.hxx
new file mode 100644 (file)
index 0000000..0445059
--- /dev/null
@@ -0,0 +1,441 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __SCILAB_JIT_TRAITS_HXX__
+#define __SCILAB_JIT_TRAITS_HXX__
+
+#ifdef PACKAGE_BUGREPORT
+#undef PACKAGE_BUGREPORT
+#endif
+
+#ifdef PACKAGE_NAME
+#undef PACKAGE_NAME
+#endif
+
+#ifdef PACKAGE_STRING
+#undef PACKAGE_STRING
+#endif
+
+#ifdef PACKAGE_TARNAME
+#undef PACKAGE_TARNAME
+#endif
+
+#ifdef PACKAGE_VERSION
+#undef PACKAGE_VERSION
+#endif
+
+#include "llvm/Config/config.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Module.h"
+#include "llvm/Target/TargetOptions.h"
+
+namespace jit
+{
+// The returned type is an int type where its size is equal to sizeof(void *)
+// It is useful to pass a Scilab pointer into LLVM as an integer.
+inline static llvm::Type * getPtrAsIntTy(llvm::Module & module, llvm::LLVMContext & ctxt)
+{
+#if LLVM_VERSION_MAJOR >= 3 && LLVM_VERSION_MINOR == 4
+    return module.getPointerSize() == llvm::Module::Pointer32 ? llvm::Type::getInt32Ty(ctxt) : llvm::Type::getInt64Ty(ctxt);
+#else
+    return module.getDataLayout()->getPointerSize() == 32 ? llvm::Type::getInt32Ty(ctxt) : llvm::Type::getInt64Ty(ctxt);
+#endif
+}
+
+inline static llvm::FunctionPassManager initFPM(llvm::Module * module, llvm::ExecutionEngine * engine)
+{
+    llvm::FunctionPassManager FPM(module);
+
+#if LLVM_VERSION_MAJOR >= 3 && LLVM_VERSION_MINOR == 4
+    FPM.add(new llvm::DataLayout(*engine->getDataLayout()));
+#else
+    FPM.add(new llvm::DataLayoutPass(*engine->getDataLayout()));
+#endif
+
+    // createBasicAliasAnalysisPass - This pass implements the stateless alias
+    // analysis.
+    FPM.add(llvm::createBasicAliasAnalysisPass());
+
+    // Promote allocas to registers.
+    // PromoteMemoryToRegister - This pass is used to promote memory references to
+    // be register references. A simple example of the transformation performed by
+    // this pass is:
+    //
+    //        FROM CODE                           TO CODE
+    //   %X = alloca i32, i32 1                 ret i32 42
+    //   store i32 42, i32 *%X
+    //   %Y = load i32* %X
+    //   ret i32 %Y
+    FPM.add(llvm::createPromoteMemoryToRegisterPass());
+
+    // Do simple "peephole" optimizations and bit-twiddling optzns.
+    // This pass combines things like:
+    //    %Y = add int 1, %X
+    //    %Z = add int 1, %Y
+    // into:
+    //    %Z = add int 2, %X
+    FPM.add(llvm::createInstructionCombiningPass());
+
+    // Reassociate expressions.
+    // Reassociate - This pass reassociates commutative expressions in an order that
+    // is designed to promote better constant propagation, GCSE, LICM, PRE...
+    //
+    // For example:  4 + (x + 5)  ->  x + (4 + 5)
+    FPM.add(llvm::createReassociatePass());
+
+    // Eliminate Common SubExpressions.
+    // GVN - This pass performs global value numbering and redundant load
+    // elimination cotemporaneously.
+    FPM.add(llvm::createGVNPass());
+
+    // Simplify the control flow graph (deleting unreachable blocks, etc).
+    FPM.add(llvm::createCFGSimplificationPass());
+
+    FPM.doInitialization();
+
+    return FPM;
+}
+
+template<typename>
+inline static llvm::Type * getLLVMTy(llvm::LLVMContext & ctxt = llvm::getGlobalContext());
+
+template<bool, typename>
+struct _remove_u_helper;
+
+template<typename T>
+struct _remove_u_helper<true, T>
+{
+    typedef typename std::make_signed<T>::type type;
+};
+
+template<typename T>
+struct _remove_u_helper<false, T>
+{
+    typedef T type;
+};
+
+template<typename T>
+struct remove_u
+{
+    typedef typename _remove_u_helper<std::is_unsigned<T>::value, T>::type type;
+};
+
+template<typename T>
+struct remove_pucv
+{
+    typedef typename remove_u<typename std::remove_cv<typename std::remove_pointer<T>::type>::type>::type type;
+};
+
+template<typename>
+struct _get_llvm_ty;
+
+template<bool, typename>
+struct _get_llvm_ty_helper;
+
+template<typename T>
+struct _get_llvm_ty_helper<true, T>
+{
+    inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+    {
+        return llvm::PointerType::getUnqual(_get_llvm_ty<typename std::remove_pointer<T>::type>::get(ctxt));
+    }
+};
+
+template<typename T>
+struct _get_llvm_ty_helper<false, T>
+{
+    inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+    {
+        return _get_llvm_ty<typename remove_pucv<T>::type>::get(ctxt);
+    }
+};
+
+/*    template<bool, typename>
+    struct _get_llvm_int_ty_helper;
+
+    template<typename T>
+    struct _get_llvm_int_ty_helper<true, T>
+    {
+       inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+           {
+               return llvm::Type::get(ctxt, sizeof(T));
+           }
+    };
+
+    template<typename T>
+    struct _get_llvm_int_ty_helper<false, T>
+    {
+       inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+           {
+               return _get_llvm_ty<typename remove_pucv<T>::type>::get(ctxt);
+           }
+    };
+*/
+
+template<typename T>
+struct _get_llvm_ty
+{
+    inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+    {
+        return _get_llvm_ty_helper<std::is_pointer<T>::value, T>::get(ctxt);
+    }
+};
+
+template<>
+struct _get_llvm_ty<double>
+{
+    inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+    {
+        return llvm::Type::getDoubleTy(ctxt);
+    }
+};
+
+template<>
+struct _get_llvm_ty<bool>
+{
+    inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+    {
+        return llvm::Type::getInt1Ty(ctxt);
+    }
+};
+
+template<>
+struct _get_llvm_ty<char>
+{
+    inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+    {
+        return llvm::Type::getInt8Ty(ctxt);
+    }
+};
+
+template<>
+struct _get_llvm_ty<short>
+{
+    inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+    {
+        return llvm::Type::getInt16Ty(ctxt);
+    }
+};
+
+template<>
+struct _get_llvm_ty<int>
+{
+    inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+    {
+        return llvm::Type::getInt32Ty(ctxt);
+    }
+};
+
+template<>
+struct _get_llvm_ty<long long>
+{
+    inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+    {
+        return llvm::Type::getInt64Ty(ctxt);
+    }
+};
+
+template<>
+struct _get_llvm_ty<void>
+{
+    inline static llvm::Type * get(llvm::LLVMContext & ctxt)
+    {
+        return llvm::Type::getVoidTy(ctxt);
+    }
+};
+
+template<typename T>
+inline static llvm::Type * getLLVMTy(llvm::LLVMContext & ctxt)
+{
+    return _get_llvm_ty<T>::get(ctxt);
+}
+
+template<typename Out>
+inline llvm::Type * getLLVMFuncTy(llvm::LLVMContext & ctxt)
+{
+    return llvm::FunctionType::get(getLLVMTy<Out>(ctxt), false);
+}
+
+template<typename Out, typename In1>
+inline llvm::Type * getLLVMFuncTy(llvm::LLVMContext & ctxt)
+{
+    return llvm::FunctionType::get(getLLVMTy<Out>(ctxt), llvm::ArrayRef<llvm::Type *>(getLLVMTy<In1>(ctxt)), false);
+}
+
+template<typename Out, typename In1, typename In2>
+inline llvm::Type * getLLVMFuncTy(llvm::LLVMContext & ctxt)
+{
+    llvm::Type * args[] = { getLLVMTy<In1>(ctxt), getLLVMTy<In2>(ctxt) };
+    return llvm::FunctionType::get(getLLVMTy<Out>(ctxt), args, false);
+}
+
+template<typename Out, typename In1, typename In2, typename In3>
+inline llvm::Type * getLLVMFuncTy(llvm::LLVMContext & ctxt)
+{
+    llvm::Type * args[] = { getLLVMTy<In1>(ctxt), getLLVMTy<In2>(ctxt), getLLVMTy<In3>(ctxt) };
+    return llvm::FunctionType::get(getLLVMTy<Out>(ctxt), llvm::ArrayRef<llvm::Type *>(args), false);
+}
+
+template<typename Out, typename In1, typename In2, typename In3, typename In4>
+inline llvm::Type * getLLVMFuncTy(llvm::LLVMContext & ctxt)
+{
+    llvm::Type * args[] = { getLLVMTy<In1>(ctxt), getLLVMTy<In2>(ctxt), getLLVMTy<In3>(ctxt), getLLVMTy<In4>(ctxt) };
+    return llvm::FunctionType::get(getLLVMTy<Out>(ctxt), llvm::ArrayRef<llvm::Type *>(args), false);
+}
+
+template<typename Out, typename In1, typename In2, typename In3, typename In4, typename In5>
+inline llvm::Type * getLLVMFuncTy(llvm::LLVMContext & ctxt)
+{
+    llvm::Type * args[] = { getLLVMTy<In1>(ctxt), getLLVMTy<In2>(ctxt), getLLVMTy<In3>(ctxt), getLLVMTy<In4>(ctxt), getLLVMTy<In5>(ctxt) };
+    return llvm::FunctionType::get(getLLVMTy<Out>(ctxt), llvm::ArrayRef<llvm::Type *>(args), false);
+}
+
+template<typename T>
+inline llvm::Type * getLLVMPtrTy(llvm::LLVMContext & ctxt)
+{
+    return llvm::PointerType::getUnqual(getLLVMTy<T>(ctxt));
+}
+
+template<typename Out>
+inline llvm::Type * getLLVMPtrFuncTy(llvm::LLVMContext & ctxt)
+{
+    return llvm::PointerType::getUnqual(getLLVMFuncTy<Out>(ctxt));
+}
+
+template<typename Out, typename In1>
+inline llvm::Type * getLLVMPtrFuncTy(llvm::LLVMContext & ctxt)
+{
+    return llvm::PointerType::getUnqual(getLLVMFuncTy<Out, In1>(ctxt));
+}
+
+template<typename Out, typename In1, typename In2>
+inline llvm::Type * getLLVMPtrFuncTy(llvm::LLVMContext & ctxt)
+{
+    return llvm::PointerType::getUnqual(getLLVMFuncTy<Out, In1, In2>(ctxt));
+}
+
+template<typename Out, typename In1, typename In2, typename In3>
+inline llvm::Type * getLLVMPtrFuncTy(llvm::LLVMContext & ctxt)
+{
+    return llvm::PointerType::getUnqual(getLLVMFuncTy<Out, In1, In2, In3>(ctxt));
+}
+
+template<typename Out, typename In1, typename In2, typename In3, typename In4>
+inline llvm::Type * getLLVMPtrFuncTy(llvm::LLVMContext & ctxt)
+{
+    return llvm::PointerType::getUnqual(getLLVMFuncTy<Out, In1, In2, In3, In4>(ctxt));
+}
+
+template<typename Out, typename In1, typename In2, typename In3, typename In4, typename In5>
+inline llvm::Type * getLLVMPtrFuncTy(llvm::LLVMContext & ctxt)
+{
+    return llvm::PointerType::getUnqual(getLLVMFuncTy<Out, In1, In2, In3, In4, In5>(ctxt));
+}
+
+template<typename T, typename U>
+static void putInContext_S(symbol::Context * ctxt, symbol::Variable * var, U x)
+{
+    ctxt->put(var, new T(x));
+}
+
+template<typename T, typename U>
+static void putInContext_M(symbol::Context * ctxt, symbol::Variable * var, U * x, int r, int c)
+{
+    double * data;
+    ctxt->put(var, new T(r, c, &data));
+    memcpy(data, x, sizeof(U) * r * c);
+}
+
+static void jit_throw(const char * msg)
+{
+    throw ast::ScilabError(msg);
+}
+
+inline static bool InitializeLLVM()
+{
+    llvm::InitializeNativeTarget();
+    llvm::InitializeNativeTargetAsmPrinter();
+    llvm::InitializeNativeTargetAsmParser();
+
+    return true;
+}
+
+inline static llvm::ExecutionEngine * InitializeEngine(llvm::Module * module)
+{
+    std::string err;
+    llvm::TargetOptions opt;
+    opt.JITEmitDebugInfo = true;
+    return llvm::EngineBuilder(module).setErrorStr(&err).setUseMCJIT(true).setTargetOptions(opt).create();
+}
+
+
+
+/*    inline static preForLoop(llvm::Function * function, llvm::Context & context, llvm::IRBuilder<> & builder, const int start, const int step, const int end)
+      {
+      llvm::BasicBlock * BBBody = llvm::BasicBlock::Create(context, "for_body", function);
+      llvm::BasicBlock * BBAfter = llvm::BasicBlock::Create(context, "for_after", function);
+      llvm::Value * _start = llvm::ConstantInt::get(getLLVMTy<int>(context), start);
+      llvm::Value * _step = llvm::ConstantInt::get(getLLVMTy<int>(context), step);
+      llvm::Value * _end = llvm::ConstantInt::get(getLLVMTy<int>(context), end);
+
+      llvm::BasicBlock * cur_block = builder.GetInsertBlock();
+      llvm::Value * tmp = builder.CreateICmpSLT(_start, _end);
+      builder.CreateCondBr(tmp, BBBody, BBAfter);
+
+      builder.SetInsertPoint(BBBody);
+      llvm::PHINode * phi = builder.CreatePHI(getLLVMTy<int>(context), 2);
+      phi->addIncoming(_start, cur_block);
+
+      builder.SetInsertPoint(BBBody);
+
+      // put your body here
+
+      tmp = builder.CreateAdd(phi, _step);
+      phi->addIncoming(tmp, BBBody);
+
+      tmp = builder.CreateICmpSLT(tmp, _end);
+      builder.CreateCondBr(tmp, BBBody, BBAfter);
+
+      builder.SetInsertPoint(BBAfter);
+      }
+*/
+
+
+//template<typename> struct _Type { };
+
+template<typename T> struct _Type
+{
+    inline llvm::Type * operator()(llvm::LLVMContext & ctxt = llvm::getGlobalContext())
+    {
+        return std::is_pointer<T>::value ? llvm::PointerType::getUnqual(getLLVMTy<typename std::remove_pointer<typename std::remove_cv<T>::type>::type>(ctxt)) : std::is_reference<T>:: value ? llvm::PointerType::getUnqual(getLLVMTy<typename std::remove_reference<typename std::remove_cv<T>::type>::type>(ctxt)) : getLLVMTy<typename std::remove_cv<T>::type>(ctxt);
+    }
+};
+
+template<typename R, typename A1> struct _Type<R (*) (A1)>
+{
+    inline llvm::Type * operator()(llvm::LLVMContext & ctxt = llvm::getGlobalContext())
+{
+    return llvm::FunctionType::get(_Type<R>()(ctxt), llvm::ArrayRef<llvm::Type *>(_Type<A1>()(ctxt)), false);
+}
+};
+
+template<typename T>
+inline static llvm::Type * foo(llvm::LLVMContext & ctxt = llvm::getGlobalContext())
+{
+    return _Type<T>()(ctxt);
+}
+
+
+}
+
+#endif // __SCILAB_JIT_TRAITS_HXX__
diff --git a/scilab/modules/ast/includes/jit/jit_operations.hxx b/scilab/modules/ast/includes/jit/jit_operations.hxx
new file mode 100644 (file)
index 0000000..759a28e
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __OPERATIONS_HXX__
+#define __OPERATIONS_HXX__
+
+#include "JITValues.hxx"
+#include "types_addition.hxx"
+#include "types_substraction.hxx"
+#include "types_multiplication.hxx"
+
+namespace jit
+{
+template<typename, typename>
+inline static llvm::Value * add(llvm::Value * L, llvm::Value * R, llvm::IRBuilder<> & builder);
+
+template<typename, typename>
+inline static llvm::Value * sub(llvm::Value * L, llvm::Value * R, llvm::IRBuilder<> & builder);
+
+template<typename, typename>
+inline static llvm::Value * dotmul(llvm::Value * L, llvm::Value * R, llvm::IRBuilder<> & builder);
+
+template<typename T>
+inline static llvm::Value * add(llvm::Value * L, llvm::Value * R, llvm::IRBuilder<> & builder)
+{
+    return std::is_integral<T>::value ? builder.CreateAdd(L, R) : builder.CreateFAdd(L, R);
+}
+
+template<typename T>
+inline static llvm::Value * sub(llvm::Value * L, llvm::Value * R, llvm::IRBuilder<> & builder)
+{
+    return std::is_integral<T>::value ? builder.CreateSub(L, R) : builder.CreateFSub(L, R);
+}
+
+template<typename T>
+inline static llvm::Value * dotmul(llvm::Value * L, llvm::Value * R, llvm::IRBuilder<> & builder)
+{
+    return std::is_integral<T>::value ? builder.CreateMul(L, R) : builder.CreateFMul(L, R);
+}
+
+class JITVisitor;
+typedef std::shared_ptr<JITVal> (*add_function)(std::shared_ptr<JITVal> &, std::shared_ptr<JITVal> &, JITVisitor &);
+static add_function pAddfunction[types::InternalType::IdLast][types::InternalType::IdLast];
+
+/*template<typename>
+  inline static JITVal add(JITVal & L, JITVal & R, JITVisitor & visitor);*/
+
+std::shared_ptr<JITVal> add_D_D(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor);
+std::shared_ptr<JITVal> sub_D_D(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor);
+std::shared_ptr<JITVal> dotmul_D_D(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor);
+
+std::shared_ptr<JITVal> add_M_M(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor);
+std::shared_ptr<JITVal> sub_M_M(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor);
+std::shared_ptr<JITVal> dotmul_M_M(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor);
+
+}
+
+#endif // __OPERATIONS_HXX__
index e5f7cd2..ae68f7b 100644 (file)
@@ -122,9 +122,10 @@ template<> inline types::InternalType* add_M_M<types::Sparse, types::Double, typ
 //same type
 template<typename T, typename O> inline static void add(T* l, long long size, T* r, O* o)
 {
+    //std::cout << "out=" << (void*)o << ":::" << size << std::endl;
     for (int i = 0; i < size ; ++i)
     {
-        o[i] = (O)l[i] + (O)r[i];
+        //o[i] = (O)l[i] + (O)r[i];
     }
 }
 
index de3c31b..9188932 100644 (file)
@@ -35,4 +35,15 @@ int DotMultiplySparseByDouble(types::Sparse* _pSparse1, types::Double* _pDouble2
 int DotMultiplyDoubleByPoly(types::Double* _pDouble, types::Polynom* _pPoly, types::Polynom**  _pPolyOut);
 int DotMultiplyPolyByDouble(types::Polynom* _pPoly, types::Double* _pDouble, types::Polynom**  _pPolyOut);
 int DotMultiplyPolyByPoly(types::Polynom* _pPoly1, types::Polynom* _pPoly2, types::Polynom**  _pPolyOut);
+
+//dot multiply matrix + matrix ( double, int, bool )
+//same type
+template<typename T, typename O> inline static void dotmul(T* l, long long size, T* r, O* o)
+{
+    for (int i = 0; i < size ; ++i)
+    {
+        o[i] = (O)l[i] * (O)r[i];
+    }
+}
+
 #endif /* __TYPES_MULTIPLICATION_HXX__ */
index 0ccdf3a..4af967c 100644 (file)
@@ -32,4 +32,14 @@ int SubstractSparseToSparse(Sparse* _pSparse1, Sparse* _pSparse2, GenericType **
 int SubstractSparseToDouble(Sparse* _pSparse, Double* _pDouble, GenericType **_pDoubleOut);
 int SubstractDoubleToSparse(Double* _pDouble, Sparse* _pSparse, GenericType **_pDoubleOut);
 
+//sub matrix + matrix ( double, int, bool )
+//same type
+template<typename T, typename O> inline static void sub(T* l, long long size, T* r, O* o)
+{
+    for (int i = 0; i < size ; ++i)
+    {
+        o[i] = (O)l[i] - (O)r[i];
+    }
+}
+
 #endif /* __TYPES_SUB_H__ */
index a43df8a..04f3a37 100644 (file)
@@ -15,6 +15,7 @@
 #ifndef __INTERNAL_HXX__
 #define __INTERNAL_HXX__
 
+#include <complex> // for internal.cpp
 #include <vector>
 #include <map>
 #include <iostream>
@@ -213,6 +214,9 @@ public :
     }
     virtual InternalType*           clone(void) = 0;
 
+    /** this template is specialized in internal.cpp */
+    template<typename T> static InternalType::ScilabId getScilabId();
+
 #ifdef _SCILAB_DEBUGREF_
     inline void _killme(const char * f, int l)
     {
@@ -551,7 +555,6 @@ protected :
     int                     m_iCols2PrintState;
 
 };
-
 }
 
 #ifdef _SCILAB_DEBUGREF_
diff --git a/scilab/modules/ast/src/cpp/jit/JITValues.cpp b/scilab/modules/ast/src/cpp/jit/JITValues.cpp
new file mode 100644 (file)
index 0000000..5802f4f
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "JITValues.hxx"
+#include "JITVisitor.hxx"
+
+#include "alltypes.hxx"
+
+namespace jit
+{
+
+JITVal * JITVal::get(JITVisitor & visitor, types::InternalType * const pIT, const bool alloc, const std::string & name)
+{
+    if (pIT->isGenericType())
+    {
+        types::GenericType * pGT = static_cast<types::GenericType *>(pIT);
+        if (pGT->isScalar())
+        {
+            switch (pGT->getType())
+            {
+                case types::InternalType::ScilabInt8:
+                    return new JITScalarVal<char>(visitor, static_cast<types::Int8 *>(pGT)->get(0), alloc, name);
+                case types::InternalType::ScilabUInt8:
+                    return new JITScalarVal<unsigned char>(visitor, static_cast<types::UInt8 *>(pGT)->get(0), alloc, name);
+                case types::InternalType::ScilabInt16:
+                    return new JITScalarVal<short>(visitor, static_cast<types::Int16 *>(pGT)->get(0), alloc, name);
+                case types::InternalType::ScilabUInt16:
+                    return new JITScalarVal<unsigned short>(visitor, static_cast<types::UInt16 *>(pGT)->get(0), alloc, name);
+                case types::InternalType::ScilabInt32:
+                    return new JITScalarVal<int>(visitor, static_cast<types::Int32 *>(pGT)->get(0), alloc, name);
+                case types::InternalType::ScilabUInt32:
+                    return new JITScalarVal<unsigned int>(visitor, static_cast<types::UInt32 *>(pGT)->get(0), alloc, name);
+                case types::InternalType::ScilabInt64:
+                    return new JITScalarVal<long long>(visitor, static_cast<types::Int64 *>(pGT)->get(0), alloc, name);
+                case types::InternalType::ScilabUInt64:
+                    return new JITScalarVal<unsigned long long>(visitor, static_cast<types::UInt64 *>(pGT)->get(0), alloc, name);
+                case types::InternalType::ScilabDouble:
+                    return new JITScalarVal<double>(visitor, static_cast<types::Double *>(pGT)->get(0), alloc, name);
+                case types::InternalType::ScilabBool:
+                    return new JITScalarVal<bool>(visitor, static_cast<types::Bool *>(pGT)->get(0), alloc, name);
+                default:
+                    throw ast::ScilabError(std::wstring(L"Type not handled by JIT compiler: ") + pGT->getTypeStr());
+            }
+        }
+        else
+        {
+            switch (pGT->getType())
+            {
+                case types::InternalType::ScilabInt8:
+                {
+                    types::Int8 * p = static_cast<types::Int8 *>(pGT);
+                    return new JITMatrixVal<char>(visitor, p->getRows(), p->getCols(), p->get(), alloc, name);
+                }
+                case types::InternalType::ScilabUInt8:
+                {
+                    types::UInt8 * p = static_cast<types::UInt8 *>(pGT);
+                    return new JITMatrixVal<unsigned char>(visitor, p->getRows(), p->getCols(), p->get(), alloc, name);
+                }
+                case types::InternalType::ScilabInt16:
+                {
+                    types::Int16 * p = static_cast<types::Int16 *>(pGT);
+                    return new JITMatrixVal<short>(visitor, p->getRows(), p->getCols(), p->get(), alloc, name);
+                }
+                case types::InternalType::ScilabUInt16:
+                {
+                    types::UInt16 * p = static_cast<types::UInt16 *>(pGT);
+                    return new JITMatrixVal<unsigned short>(visitor, p->getRows(), p->getCols(), p->get(), alloc, name);
+                }
+                case types::InternalType::ScilabInt32:
+                {
+                    types::Int32 * p = static_cast<types::Int32 *>(pGT);
+                    return new JITMatrixVal<int>(visitor, p->getRows(), p->getCols(), p->get(), alloc, name);
+                }
+                case types::InternalType::ScilabUInt32:
+                {
+                    types::UInt32 * p = static_cast<types::UInt32 *>(pGT);
+                    return new JITMatrixVal<unsigned int>(visitor, p->getRows(), p->getCols(), p->get(), alloc, name);
+                }
+                case types::InternalType::ScilabInt64:
+                {
+                    types::Int64 * p = static_cast<types::Int64 *>(pGT);
+                    return new JITMatrixVal<long long>(visitor, p->getRows(), p->getCols(), p->get(), alloc, name);
+                }
+                case types::InternalType::ScilabUInt64:
+                {
+                    types::UInt64 * p = static_cast<types::UInt64 *>(pGT);
+                    return new JITMatrixVal<unsigned long long>(visitor, p->getRows(), p->getCols(), p->get(), alloc, name);
+                }
+                case types::InternalType::ScilabDouble:
+                {
+                    types::Double * p = static_cast<types::Double *>(pGT);
+                    return new JITMatrixVal<double>(visitor, p->getRows(), p->getCols(), p->get(), alloc, name);
+                }
+                case types::InternalType::ScilabBool:
+                {
+                    types::Bool * p = static_cast<types::Bool *>(pGT);
+                    return new JITMatrixVal<int>(visitor, p->getRows(), p->getCols(), p->get(), alloc, name);
+                }
+                default:
+                    throw ast::ScilabError(std::wstring(L"Type not handled by JIT compiler: ") + pGT->getTypeStr());
+            }
+        }
+    }
+
+    throw ast::ScilabError(std::wstring(L"Type not handled by JIT compiler: ") + pIT->getTypeStr());
+}
+}
diff --git a/scilab/modules/ast/src/cpp/jit/JITVisitor.cpp b/scilab/modules/ast/src/cpp/jit/JITVisitor.cpp
new file mode 100644 (file)
index 0000000..d558c71
--- /dev/null
@@ -0,0 +1,542 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "JITValues.hxx"
+#include "JITVisitor.hxx"
+#include "jit_operations.hxx"
+
+namespace jit
+{
+const bool JITVisitor::__init__ = InitializeLLVM();
+llvm::Value * const JITVisitor::ONE = llvm::ConstantInt::get(getLLVMTy<int>(), int(1));
+llvm::Value * const JITVisitor::TWO = llvm::ConstantInt::get(getLLVMTy<int>(), int(2));
+llvm::Value * const JITVisitor::THREE = llvm::ConstantInt::get(getLLVMTy<int>(), int(3));
+llvm::Value * const JITVisitor::FOUR = llvm::ConstantInt::get(getLLVMTy<int>(), int(4));
+
+JITVisitor::JITVisitor(const analysis::AnalysisVisitor & _analysis) : ast::ConstVisitor(),
+    analysis(_analysis),
+    context(llvm::getGlobalContext()),
+    module("JIT module", context),
+    engine(InitializeEngine(&module)),
+    FPM(initFPM(&module, engine)),
+    function(llvm::cast<llvm::Function>(module.getOrInsertFunction("jit_main", getLLVMTy<void>(context), nullptr))),
+    builder(context),
+    uintptrType(getPtrAsIntTy(module, context)),
+    _result(nullptr)
+{
+    module.setDataLayout(engine->getDataLayout()->getStringRepresentation());
+    llvm::BasicBlock * BB = llvm::BasicBlock::Create(context, "EntryBlock", function);
+    builder.SetInsertPoint(BB);
+
+    symbol::Context * ctxt = symbol::Context::getInstance();
+    const std::set<symbol::Symbol> & SymRead = analysis.get_read();
+    for (std::set<symbol::Symbol>::const_iterator it = SymRead.cbegin(), end = SymRead.cend(); it != end; ++it)
+    {
+        const std::wstring & name = it->name_get();
+        const std::string _name(name.begin(), name.end());
+        symbol::Variable * var = ctxt->getOrCreate(*it);
+        types::InternalType * pIT = symbol::Context::getInstance()->get(var);
+
+        if (pIT)
+        {
+            symMap3.emplace(*it, std::shared_ptr<JITVal>(JITVal::get(*this, pIT, false, _name)));
+        }
+    }
+
+    const std::set<symbol::Symbol> & SymWrite = analysis.get_write();
+    for (std::set<symbol::Symbol>::const_iterator it = SymWrite.cbegin(), end = SymWrite.cend(); it != end; ++it)
+    {
+        const std::wstring & name = it->name_get();
+        const std::string _name(name.begin(), name.end());
+        symbol::Variable * var = ctxt->getOrCreate(*it);
+        types::InternalType * pIT = symbol::Context::getInstance()->get(var);
+
+        if (pIT)
+        {
+            symMap3.emplace(*it, std::shared_ptr<JITVal>(JITVal::get(*this, pIT, true, _name)));
+        }
+    }
+
+}
+
+void JITVisitor::run()
+{
+    // on reinjecte les resultats ds l'environnement
+    symbol::Context * ctxt = symbol::Context::getInstance();
+    llvm::Value * llvmCtxt = getPointer(ctxt);
+    llvm::Value * toCall_S = getPointer(reinterpret_cast<void *>(&jit::putInContext_S<Double, double>), getLLVMPtrFuncTy<void, char *, char *, double>(context));
+    llvm::Value * toCall_M = getPointer(reinterpret_cast<void *>(&jit::putInContext_M<Double, double*>), getLLVMPtrFuncTy<void, char *, char *, double *, int, int>(context));
+
+    for (JITSymbolMap::const_iterator i = symMap3.begin(), end = symMap3.end(); i != end; ++i)
+    {
+        symbol::Variable * var = ctxt->getOrCreate(i->first);
+        llvm::Value * llvmVar = getPointer(var);
+        if (i->second.get()->is_scalar())
+        {
+            builder.CreateCall3(toCall_S, llvmCtxt, llvmVar, i->second.get()->load(*this));
+        }
+        else
+        {
+            builder.CreateCall5(toCall_M, llvmCtxt, llvmVar, i->second.get()->load(*this), i->second.get()->loadR(*this), i->second.get()->loadC(*this));
+        }
+    }
+
+    builder.CreateRetVoid();
+
+    //dump();
+
+    for (llvm::Module::iterator it = module.begin(), end = module.end(); it != end; ++it)
+    {
+        FPM.run(*it);
+    }
+
+    dump();
+
+    engine->finalizeObject();
+
+    //getLLVMTy<const char * const>(context)->dump();
+    //getLLVMTy<int (*)(double)>(context)->dump();
+
+    //foo<int (*) (double)>(context)->dump();
+
+    reinterpret_cast<void (*)()>(engine->getFunctionAddress("jit_main"))();
+}
+
+void JITVisitor::dump() const
+{
+    module.dump();
+    //function->dump();
+}
+
+template<>
+llvm::Value * JITVisitor::getConstant<double>(const double val)
+{
+    llvm::Value * v = llvm::ConstantFP::get(context, llvm::APFloat(val));
+    return v;
+}
+
+void JITVisitor::visit(const ast::SimpleVar &e)
+{
+    /*                symbol::Symbol & sym = e.name_get();
+                      std::map<symbol::Symbol, llvm::Value *>::iterator i = symMap.find(sym);
+                      if (i != symMap.end())
+                      {
+                      if (llvm::isa<llvm::AllocaInst>(i->second))
+                      {
+                      llvm::LoadInst * tmp = builder.CreateLoad(llvm::cast<llvm::AllocaInst>(i->second));
+                      tmp->setAlignment(sizeof(double));
+                      result_set(tmp);
+                      }
+                      else
+                      {
+                      result_set(i->second);
+                      }
+                      }
+                      else
+                      {
+                      std::wcout << L"que faire...=" << sym.name_get() << std::endl;
+                      }
+    */
+    /*              symbol::Symbol & sym = e.name_get();
+                    std::map<symbol::Symbol, JITVal>::iterator i = symMap2.find(sym);
+                    if (i != symMap2.end())
+                    {
+                    llvm::Value * r = llvm::ConstantInt::get(getLLVMTy<int>(context), 1);
+                    result_set(JITVal(r, r, i->second.load(builder)));
+                    }
+                    else
+                    {
+                    types::Double * pIT = static_cast<Double *>(symbol::Context::getInstance()->get(((ast::SimpleVar&)e).stack_get()));
+                    llvm::Value * r = llvm::ConstantInt::get(getLLVMTy<int>(context), pIT->getRows());
+                    llvm::Value * c = llvm::Cou onstantInt::get(getLLVMTy<int>(context), pIT->getCols());
+                    llvm::Value * ptr = getPointer(pIT->get(), getLLVMTy<double *>(context));
+
+                    result_set(JITVal(r, c, ptr));
+
+                    //std::wcout << L"que faire...=" << sym.name_get() << std::endl;
+                    }
+    */
+    symbol::Symbol & sym = e.name_get();
+    JITSymbolMap::iterator i = symMap3.find(sym);
+    if (i != symMap3.end())
+    {
+        result_set(i->second);
+    }
+    else
+    {
+        const std::wstring & name = sym.name_get();
+        const std::string _name(name.begin(), name.end());
+        /*types::InternalType * pIT = symbol::Context::getInstance()->get(((ast::SimpleVar&)e).stack_get());
+
+        result_set(std::shared_ptr<JITVal>(JITVal::get(*this, pIT, _name)));*/
+        throw ast::ScilabError("Variable not declared before JIT: " + _name);
+    }
+}
+
+void JITVisitor::visit(const ast::DollarVar &e) //a=[1 2;3 4];b=[5 6;7 8];jit("a/b")
+{
+
+}
+
+void JITVisitor::visit(const ast::ColonVar &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::ArrayListVar &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::IntExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::FloatExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::DoubleExp &e)
+{
+    result_set(std::shared_ptr<JITVal>(new JITScalarVal<double>(*this, e.value_get(), false)));
+}
+
+void JITVisitor::visit(const ast::BoolExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::StringExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::CommentExp &e)
+{
+    // ignored
+}
+
+void JITVisitor::visit(const ast::NilExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::CallExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::CellCallExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::OpExp &e)
+{
+    e.left_get().accept(*this);
+    std::shared_ptr<JITVal> pITL = result_get();
+
+    /*getting what to assign*/
+    e.right_get().accept(*this);
+    std::shared_ptr<JITVal> & pITR = result_get();
+
+    llvm::Value * pResult = NULL;
+
+    switch (e.oper_get())
+    {
+        case ast::OpExp::plus:
+        {
+            if (pITL.get()->is_scalar())
+            {
+                result_set(add_D_D(pITL, pITR, *this));
+            }
+            else
+            {
+                result_set(add_M_M(pITL, pITR, *this));
+            }
+            return;
+        }
+        case ast::OpExp::minus:
+        {
+            if (pITL.get()->is_scalar())
+            {
+                result_set(sub_D_D(pITL, pITR, *this));
+            }
+            else
+            {
+                result_set(sub_M_M(pITL, pITR, *this));
+            }
+            return;//a=1;b=1;for i=1:2:23;a=a+i*3+b;b=b-i*a;end;
+        }
+        case ast::OpExp::times:
+        {
+            if (pITL.get()->is_scalar())
+            {
+                result_set(dotmul_D_D(pITL, pITR, *this));
+            }
+            else
+            {
+                result_set(dotmul_M_M(pITL, pITR, *this));
+            }
+            return;
+        }
+        default:
+            if (pITL.get()->is_scalar())
+            {
+                result_set(add_D_D(pITL, pITR, *this));
+            }
+            else
+            {
+                result_set(add_M_M(pITL, pITR, *this));
+            }
+            return;
+    }
+
+    //llvm::Value * r = llvm::ConstantInt::get(getLLVMTy<int>(context), 1);
+    //result_set(JITVal(r, r, pResult));
+}
+
+void JITVisitor::visit(const ast::LogicalOpExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::AssignExp &e)
+{
+    if (e.left_exp_get().is_simple_var())
+    {
+        ast::SimpleVar & pVar = static_cast<ast::SimpleVar &>(e.left_exp_get());
+
+        e.right_exp_get().accept(*this);
+        std::shared_ptr<JITVal> & pITR = result_get();
+        llvm::Value * alloca = nullptr;
+        JITSymbolMap::const_iterator i = symMap3.find(pVar.name_get());
+
+        if (i != symMap3.end())
+        {
+            i->second.get()->store(*pITR.get(), *this);
+        }
+        else
+        {
+            const std::wstring & name = pVar.name_get().name_get();
+            const std::string _name(name.begin(), name.end());
+            // TODO: virer ce truc... le param <double> est force...
+            JITVal * jitV = new JITScalarVal<double>(*this, pITR.get(), _name);
+            symMap3.emplace(pVar.name_get(), std::shared_ptr<JITVal>(jitV));
+        }
+
+        result_set(std::shared_ptr<JITVal>(nullptr));
+    }
+}
+
+void JITVisitor::visit(const ast::IfExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::WhileExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::ForExp &e)
+{
+    //e.vardec_get().accept(*this);
+    const ast::VarDec & vardec = e.vardec_get();
+    symbol::Symbol & varName = vardec.name_get();
+    const ast::Exp & init = vardec.init_get();
+
+    if (init.is_list_exp())
+    {
+        const ast::ListExp & list = static_cast<const ast::ListExp &>(init);
+        const double * list_values = list.get_values();
+        llvm::Value * start, * step, * end;
+        bool use_int = false;
+        bool use_uint = false;
+
+        if (ISNAN(list_values[0]) || ISNAN(list_values[1]) || ISNAN(list_values[2]))
+        {
+            list.start_get().accept(*this);
+            start = result_get().get()->load(*this);
+
+            list.step_get().accept(*this);
+            step = result_get().get()->load(*this);
+
+            list.end_get().accept(*this);
+            end = result_get().get()->load(*this);
+        }
+        else
+        {
+            const double tstart = std::trunc(list_values[0]);
+            const double tstep = std::trunc(list_values[1]);
+            const double tend = std::trunc(list_values[2]);
+
+            if ((tstart == list_values[0]) && (tstep == list_values[1]))
+            {
+                if (tstart >= 0 && tstep >= 0 && tstart <= list_values[2])
+                {
+                    // we can use an unsigned int but take care to overflow...
+                    double k = std::floor(((double)std::numeric_limits<unsigned int>::max() - tstart) / tstep);
+                    if ((k * tstep + tstart) >= tend)
+                    {
+                        // no overflow
+                        start = getConstant((unsigned int)tstart);
+                        step = getConstant((unsigned int)tstep);
+                        end = getConstant((unsigned int)tend);
+
+                        use_int = true;
+                        use_uint = true;
+                    }
+                }
+            }
+        }
+
+        llvm::BasicBlock * BBBody = llvm::BasicBlock::Create(context, "for_body", function);
+        llvm::BasicBlock * BBAfter = llvm::BasicBlock::Create(context, "for_after", function);
+
+        llvm::BasicBlock * cur_block = builder.GetInsertBlock();
+        llvm::Value * tmp = use_int ? (use_uint ? builder.CreateICmpULE(start, end) : builder.CreateICmpSLE(start, end)) : builder.CreateFCmpOLE(start, end);
+        builder.CreateCondBr(tmp, BBBody, BBAfter);
+
+        builder.SetInsertPoint(BBBody);
+        llvm::PHINode * phi = use_int ? builder.CreatePHI(getLLVMTy<int>(context), 2) : builder.CreatePHI(getLLVMTy<double>(context), 2);
+
+        JITSymbolMap::const_iterator i = symMap3.find(varName);
+        tmp = use_int ? (use_uint ? builder.CreateUIToFP(phi, getLLVMTy<double>(context)) : builder.CreateSIToFP(phi, getLLVMTy<double>(context))) : phi;
+        i->second.get()->store(tmp, *this);
+
+        phi->addIncoming(start, cur_block);
+
+        builder.SetInsertPoint(BBBody);
+        e.body_get().accept(*this);
+
+        tmp = use_int ? builder.CreateAdd(phi, step) : builder.CreateFAdd(phi, step);
+        phi->addIncoming(tmp, builder.GetInsertBlock());
+
+        tmp = use_int ? (use_uint ? builder.CreateICmpULE(tmp, end) : builder.CreateICmpSLE(tmp, end)) : builder.CreateFCmpOLE(tmp, end);
+        builder.CreateCondBr(tmp, BBBody, BBAfter);
+
+        builder.SetInsertPoint(BBAfter);
+
+        dump();
+
+        //llvm::AllocaInst * cur = builder.CreateAlloca(getLLVMTy<double>(context));
+        //llvm::StoreInst * cur_store = builder.CreateAlignedStore(phi, cur, sizeof(double));
+
+        //symMap3.emplace(varName, std::shared_ptr<JITVal>(new JITScalarVal<double>(*this, cur)));
+    }
+    else
+    {
+        // Should not occured...
+        // Normally, if the init is an iterator the for exp itself is not jittable
+        // but take care of the case for i=int32(1:2:123)...
+    }
+
+    //function->dump();
+}
+
+void JITVisitor::visit(const ast::BreakExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::ContinueExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::TryCatchExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::SelectExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::CaseExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::ReturnExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::FieldExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::NotExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::TransposeExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::MatrixExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::MatrixLineExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::CellExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::SeqExp &e)
+{
+    for (std::list<ast::Exp *>::const_iterator i = e.exps_get().begin(), end = e.exps_get().end(); i != end; ++i)
+    {
+        result_set(std::shared_ptr<JITVal>(nullptr));
+        (*i)->accept(*this);
+    }
+}
+
+void JITVisitor::visit(const ast::ArrayListExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::AssignListExp &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::VarDec &e)
+{
+    e.init_get().accept(*this);
+}
+
+void JITVisitor::visit(const ast::FunctionDec &e)
+{
+
+}
+
+void JITVisitor::visit(const ast::ListExp &e)
+{
+
+}
+}
diff --git a/scilab/modules/ast/src/cpp/jit/operations.cpp b/scilab/modules/ast/src/cpp/jit/operations.cpp
new file mode 100644 (file)
index 0000000..c4e6a9b
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "JITVisitor.hxx"
+#include "jit_operations.hxx"
+
+namespace jit
+{
+std::shared_ptr<JITVal> add_D_D(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor)
+{
+    return std::shared_ptr<JITVal>(new JITScalarVal<double>(visitor, add<double>(L.get()->load(visitor), R.get()->load(visitor), visitor.getBuilder())));
+}
+
+std::shared_ptr<JITVal> sub_D_D(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor)
+{
+    return std::shared_ptr<JITVal>(new JITScalarVal<double>(visitor, sub<double>(L.get()->load(visitor), R.get()->load(visitor), visitor.getBuilder())));
+}
+
+std::shared_ptr<JITVal> dotmul_D_D(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor)
+{
+    return std::shared_ptr<JITVal>(new JITScalarVal<double>(visitor, dotmul<double>(L.get()->load(visitor), R.get()->load(visitor), visitor.getBuilder())));
+}
+
+static void debug(double * p)
+{
+    std::cout << "malloc=" << (void*)p << std::endl;
+}
+
+std::shared_ptr<JITVal> add_M_M(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor)
+{
+    // TODO: voir comment on peut avec l'analyzer recuperer une info sur le LHS de l'assignement pr eviter de reallouer
+    // un tableau a chaque fois et dc reutiliser le precedent... (pbs potentiels avec truc du genre a=a*b mais pas avec a=a+b)
+
+    llvm::LLVMContext & context = visitor.getContext();
+    llvm::IRBuilder<> & builder = visitor.getBuilder();
+    llvm::Value * size = builder.CreateMul(L.get()->loadR(visitor), L.get()->loadC(visitor));
+    llvm::Value * eight = llvm::ConstantInt::get(getLLVMTy<int>(context), int(8));
+    llvm::Value * malloc_size = builder.CreateMul(size, eight);
+    llvm::BasicBlock * cur_block = builder.GetInsertBlock();
+    llvm::Value * alloc = llvm::CallInst::CreateMalloc(cur_block, getLLVMTy<int>(context), getLLVMTy<double>(context), malloc_size);
+    cur_block->getInstList().push_back(llvm::cast<llvm::Instruction>(alloc));
+
+    llvm::Value * toCall = visitor.getPointer(reinterpret_cast<void *>((void (*)(double *, long long, double *, double*))&::add<double, double>), getLLVMPtrFuncTy<void, double *, long long, double *, double *>(context));
+
+    size = builder.CreateIntCast(size, getLLVMTy<long long>(context), false);
+    builder.CreateCall4(toCall, L.get()->load(visitor), size, R.get()->load(visitor), alloc);
+
+    //llvm::Value * toCall_debug = visitor.getPointer(reinterpret_cast<void *>(&debug), getLLVMPtrFuncTy<void, double *>(context));
+    //builder.CreateCall(toCall_debug, alloc);
+
+    return std::shared_ptr<JITVal>(new JITMatrixVal<double>(visitor, L.get()->getR(), L.get()->getC(), alloc));
+}
+
+std::shared_ptr<JITVal> sub_M_M(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor)
+{
+    llvm::LLVMContext & context = visitor.getContext();
+    llvm::IRBuilder<> & builder = visitor.getBuilder();
+    llvm::Value * size = builder.CreateMul(L.get()->loadR(visitor), L.get()->loadC(visitor));
+    llvm::Value * eight = llvm::ConstantInt::get(getLLVMTy<int>(context), int(8));
+    llvm::Value * malloc_size = builder.CreateMul(size, eight);
+    llvm::BasicBlock * cur_block = builder.GetInsertBlock();
+    llvm::Value * alloc = llvm::CallInst::CreateMalloc(cur_block, getLLVMTy<int>(context), getLLVMTy<double>(context), malloc_size);
+    cur_block->getInstList().push_back(llvm::cast<llvm::Instruction>(alloc));
+
+    llvm::Value * toCall = visitor.getPointer(reinterpret_cast<void *>((void (*)(double *, long long, double *, double*))&::sub<double, double>), getLLVMPtrFuncTy<void, double *, long long, double *, double *>(context));
+
+    size = builder.CreateIntCast(size, getLLVMTy<long long>(context), false);
+    builder.CreateCall4(toCall, L.get()->load(visitor), size, R.get()->load(visitor), alloc);
+
+    return std::shared_ptr<JITVal>(new JITMatrixVal<double>(visitor, L.get()->getR(), L.get()->getC(), alloc));
+}
+
+std::shared_ptr<JITVal> dotmul_M_M(std::shared_ptr<JITVal> & L, std::shared_ptr<JITVal> & R, JITVisitor & visitor)
+{
+    llvm::LLVMContext & context = visitor.getContext();
+    llvm::IRBuilder<> & builder = visitor.getBuilder();
+    llvm::Value * size = builder.CreateMul(L.get()->loadR(visitor), L.get()->loadC(visitor));
+    llvm::Value * eight = llvm::ConstantInt::get(getLLVMTy<int>(context), int(8));
+    llvm::Value * malloc_size = builder.CreateMul(size, eight);
+    llvm::BasicBlock * cur_block = builder.GetInsertBlock();
+    llvm::Value * alloc = llvm::CallInst::CreateMalloc(cur_block, getLLVMTy<int>(context), getLLVMTy<double>(context), malloc_size);
+    cur_block->getInstList().push_back(llvm::cast<llvm::Instruction>(alloc));
+
+    llvm::Value * toCall = visitor.getPointer(reinterpret_cast<void *>((void (*)(double *, long long, double *, double*))&::dotmul<double, double>), getLLVMPtrFuncTy<void, double *, long long, double *, double *>(context));
+
+    size = builder.CreateIntCast(size, getLLVMTy<long long>(context), false);
+    builder.CreateCall4(toCall, L.get()->load(visitor), size, R.get()->load(visitor), alloc);
+
+    return std::shared_ptr<JITVal>(new JITMatrixVal<double>(visitor, L.get()->getR(), L.get()->getC(), alloc));
+}
+
+}
diff --git a/scilab/modules/ast/src/cpp/types/internal.cpp b/scilab/modules/ast/src/cpp/types/internal.cpp
new file mode 100644 (file)
index 0000000..735c7e3
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "internal.hxx"
+
+namespace types
+{
+template<> InternalType::ScilabId InternalType::getScilabId<char>()
+{
+    return InternalType::IdScalarInt8;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<unsigned char>()
+{
+    return InternalType::IdScalarUInt8;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<short>()
+{
+    return InternalType::IdScalarInt16;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<unsigned short>()
+{
+    return InternalType::IdScalarUInt16;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<int>()
+{
+    return InternalType::IdScalarInt32;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<unsigned int>()
+{
+    return InternalType::IdScalarUInt32;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<long long>()
+{
+    return InternalType::IdScalarInt64;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<unsigned long long>()
+{
+    return InternalType::IdScalarUInt64;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<bool>()
+{
+    return InternalType::IdScalarBool;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<double>()
+{
+    return InternalType::IdScalarDouble;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<std::complex<double>>()
+{
+    return InternalType::IdScalarDoubleComplex;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<char *>()
+{
+    return InternalType::IdInt8;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<unsigned char *>()
+{
+    return InternalType::IdUInt8;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<short *>()
+{
+    return InternalType::IdInt16;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<unsigned short *>()
+{
+    return InternalType::IdUInt16;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<int *>()
+{
+    return InternalType::IdInt32;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<unsigned int *>()
+{
+    return InternalType::IdUInt32;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<long long *>()
+{
+    return InternalType::IdInt64;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<unsigned long long *>()
+{
+    return InternalType::IdUInt64;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<bool *>()
+{
+    return InternalType::IdBool;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<double *>()
+{
+    return InternalType::IdDouble;
+}
+template<> InternalType::ScilabId InternalType::getScilabId<std::complex<double> *>()
+{
+    return InternalType::IdDoubleComplex;
+}
+}
index 2e19a75..5a22753 100644 (file)
@@ -314,7 +314,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index bc1b0c2..1cd49f0 100644 (file)
@@ -411,7 +411,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 10fe888..667af02 100644 (file)
@@ -483,7 +483,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 1d76c90..f801947 100644 (file)
@@ -378,7 +378,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index abb6b46..9d90d82 100644 (file)
@@ -423,7 +423,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 909058d..d84816d 100644 (file)
@@ -309,7 +309,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index b02a446..1f00638 100644 (file)
@@ -439,7 +439,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 0f0589a..cb62f7e 100644 (file)
@@ -459,7 +459,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index fd77279..0dcf9aa 100644 (file)
@@ -547,7 +547,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 219e96d..d31eb90 100644 (file)
@@ -419,7 +419,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 27a0a99..28fa5d3 100644 (file)
@@ -309,7 +309,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index ea4bf55..091e7d9 100644 (file)
@@ -309,7 +309,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index e95c6d7..c64896b 100644 (file)
@@ -253,7 +253,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 9f32515..6741c33 100644 (file)
@@ -464,7 +464,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index b3cb91f..bf887a3 100644 (file)
@@ -416,7 +416,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index f41ea9a..d06ac19 100644 (file)
@@ -631,7 +631,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 9db67b3..7a0c872 100644 (file)
@@ -486,7 +486,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index b0e6254..0b70d76 100644 (file)
@@ -449,7 +449,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index c6524c3..42562e1 100644 (file)
@@ -418,7 +418,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index dfd71d8..a4d3d93 100644 (file)
@@ -496,7 +496,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 62b9b1a..ba48c0f 100644 (file)
@@ -13,7 +13,8 @@ GATEWAY_CPP_SOURCES =  \
     sci_gateway/cpp/sci_execstr.cpp \
     sci_gateway/cpp/sci_getCurrentThreadId.cpp \
     sci_gateway/cpp/sci_getThreads.cpp \
-    sci_gateway/cpp/sci_macrovar.cpp
+    sci_gateway/cpp/sci_macrovar.cpp \
+    sci_gateway/cpp/sci_jit.cpp
 
 libscifunctions_la_CPPFLAGS = \
     -I$(srcdir)/includes/ \
@@ -25,6 +26,8 @@ libscifunctions_la_CPPFLAGS = \
     -I$(top_srcdir)/modules/ast/includes/symbol/ \
     -I$(top_srcdir)/modules/ast/includes/system_env/ \
     -I$(top_srcdir)/modules/ast/includes/types/ \
+    -I$(top_srcdir)/modules/ast/includes/jit/ \
+    -I$(top_srcdir)/modules/ast/includes/analysis/ \
     -I$(top_srcdir)/modules/functions_manager/includes/ \
     -I$(top_srcdir)/modules/api_scilab/includes/ \
     -I$(top_srcdir)/modules/localization/includes/ \
@@ -35,6 +38,8 @@ libscifunctions_la_CPPFLAGS = \
     -I$(top_srcdir)/modules/threads/includes/ \
     -I$(top_srcdir)/modules/elementary_functions/includes/ \
     -I$(top_srcdir)/modules/dynamic_link/includes/ \
+    $(LLVM_INCLUDE) \
+    $(LLVM_CPPFLAGS) \
     $(EIGEN_CPPFLAGS) \
     $(AM_CPPFLAGS)
 
index 9c1b764..0186159 100644 (file)
@@ -172,7 +172,8 @@ am__objects_2 = sci_gateway/cpp/libscifunctions_la-sci_exec.lo \
        sci_gateway/cpp/libscifunctions_la-sci_execstr.lo \
        sci_gateway/cpp/libscifunctions_la-sci_getCurrentThreadId.lo \
        sci_gateway/cpp/libscifunctions_la-sci_getThreads.lo \
-       sci_gateway/cpp/libscifunctions_la-sci_macrovar.lo
+       sci_gateway/cpp/libscifunctions_la-sci_macrovar.lo \
+       sci_gateway/cpp/libscifunctions_la-sci_jit.lo
 am_libscifunctions_la_OBJECTS = $(am__objects_1) $(am__objects_2)
 libscifunctions_la_OBJECTS = $(am_libscifunctions_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -386,7 +387,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
@@ -561,7 +562,8 @@ GATEWAY_CPP_SOURCES = \
     sci_gateway/cpp/sci_execstr.cpp \
     sci_gateway/cpp/sci_getCurrentThreadId.cpp \
     sci_gateway/cpp/sci_getThreads.cpp \
-    sci_gateway/cpp/sci_macrovar.cpp
+    sci_gateway/cpp/sci_macrovar.cpp \
+    sci_gateway/cpp/sci_jit.cpp
 
 libscifunctions_la_CPPFLAGS = \
     -I$(srcdir)/includes/ \
@@ -573,6 +575,8 @@ libscifunctions_la_CPPFLAGS = \
     -I$(top_srcdir)/modules/ast/includes/symbol/ \
     -I$(top_srcdir)/modules/ast/includes/system_env/ \
     -I$(top_srcdir)/modules/ast/includes/types/ \
+    -I$(top_srcdir)/modules/ast/includes/jit/ \
+    -I$(top_srcdir)/modules/ast/includes/analysis/ \
     -I$(top_srcdir)/modules/functions_manager/includes/ \
     -I$(top_srcdir)/modules/api_scilab/includes/ \
     -I$(top_srcdir)/modules/localization/includes/ \
@@ -583,6 +587,8 @@ libscifunctions_la_CPPFLAGS = \
     -I$(top_srcdir)/modules/threads/includes/ \
     -I$(top_srcdir)/modules/elementary_functions/includes/ \
     -I$(top_srcdir)/modules/dynamic_link/includes/ \
+    $(LLVM_INCLUDE) \
+    $(LLVM_CPPFLAGS) \
     $(EIGEN_CPPFLAGS) \
     $(AM_CPPFLAGS)
 
@@ -789,6 +795,9 @@ sci_gateway/cpp/libscifunctions_la-sci_getThreads.lo:  \
 sci_gateway/cpp/libscifunctions_la-sci_macrovar.lo:  \
        sci_gateway/cpp/$(am__dirstamp) \
        sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libscifunctions_la-sci_jit.lo:  \
+       sci_gateway/cpp/$(am__dirstamp) \
+       sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
 
 libscifunctions.la: $(libscifunctions_la_OBJECTS) $(libscifunctions_la_DEPENDENCIES) $(EXTRA_libscifunctions_la_DEPENDENCIES) 
        $(AM_V_CXXLD)$(CXXLINK) -rpath $(pkglibdir) $(libscifunctions_la_OBJECTS) $(libscifunctions_la_LIBADD) $(LIBS)
@@ -809,6 +818,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifunctions_la-sci_functionlist.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifunctions_la-sci_getCurrentThreadId.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifunctions_la-sci_getThreads.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifunctions_la-sci_jit.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifunctions_la-sci_macrovar.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifunctions_la-sci_whereis.Plo@am__quote@
 
@@ -916,6 +926,13 @@ sci_gateway/cpp/libscifunctions_la-sci_macrovar.lo: sci_gateway/cpp/sci_macrovar
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifunctions_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libscifunctions_la-sci_macrovar.lo `test -f 'sci_gateway/cpp/sci_macrovar.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_macrovar.cpp
 
+sci_gateway/cpp/libscifunctions_la-sci_jit.lo: sci_gateway/cpp/sci_jit.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifunctions_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libscifunctions_la-sci_jit.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libscifunctions_la-sci_jit.Tpo -c -o sci_gateway/cpp/libscifunctions_la-sci_jit.lo `test -f 'sci_gateway/cpp/sci_jit.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_jit.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libscifunctions_la-sci_jit.Tpo sci_gateway/cpp/$(DEPDIR)/libscifunctions_la-sci_jit.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='sci_gateway/cpp/sci_jit.cpp' object='sci_gateway/cpp/libscifunctions_la-sci_jit.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifunctions_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libscifunctions_la-sci_jit.lo `test -f 'sci_gateway/cpp/sci_jit.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_jit.cpp
+
 mostlyclean-libtool:
        -rm -f *.lo
 
index 66fa8d9..6e3375d 100644 (file)
@@ -24,6 +24,7 @@ CPP_GATEWAY_PROTOTYPE_EXPORT(sci_whereis, FUNCTIONS_GW_IMPEXP);
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_getCurrentThreadId, FUNCTIONS_GW_IMPEXP);
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_getThreads, FUNCTIONS_GW_IMPEXP);
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_macrovar, FUNCTIONS_GW_IMPEXP);
+CPP_GATEWAY_PROTOTYPE_EXPORT(sci_jit, FUNCTIONS_GW_IMPEXP);
 
 #endif /* __FUNCTIONS_GW_HXX__ */
 
diff --git a/scilab/modules/functions/sci_gateway/cpp/sci_jit.cpp b/scilab/modules/functions/sci_gateway/cpp/sci_jit.cpp
new file mode 100644 (file)
index 0000000..ae6d837
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2006 - INRIA - Antoine ELIAS
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution.  The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+*
+*/
+
+#include <string.h>
+
+#include "AnalysisVisitor.hxx"
+#include "JITVisitor.hxx"
+
+#include "parser.hxx"
+#include "functions_gw.hxx"
+#include "execvisitor.hxx"
+#include "mutevisitor.hxx"
+#include "printvisitor.hxx"
+#include "visitor_common.hxx"
+#include "scilabWrite.hxx"
+#include "scilabexception.hxx"
+#include "configvariable.hxx"
+#include "context.hxx"
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+extern "C"
+{
+#include "sci_malloc.h"
+#include "os_wcsicmp.h"
+#include "Scierror.h"
+#include "sciprint.h"
+#include "localization.h"
+#include "os_swprintf.h"
+}
+
+using namespace std;
+using namespace types;
+using namespace ast;
+
+/*--------------------------------------------------------------------------*/
+Function::ReturnValue sci_jit(types::typed_list &in, int _iRetCount, types::typed_list &out)
+{
+    ast::Exp * pExp = 0;
+
+    if (in.size() != 1)
+    {
+        Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), "jit" , 1);
+        return Function::Error;
+    }
+
+    if (!in[0]->isString() || in[0]->getAs<types::String>()->getSize() != 1)
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), "jit" , 1);
+        return Function::Error;
+    }
+
+    Parser parser;
+    parser.parse(in[0]->getAs<types::String>()->get(0));
+    if (parser.getExitStatus() != Parser::Succeded)
+    {
+        char* pst = wide_string_to_UTF8(parser.getErrorMessage());
+        Scierror(999, "%s", pst);
+        FREE(pst);
+        return Function::Error;
+    }
+
+    pExp = parser.getTree();
+
+    if (!pExp)
+    {
+        return Function::Error;
+    }
+
+    analysis::AnalysisVisitor analysis;
+    pExp->accept(analysis);
+
+    jit::JITVisitor jit(analysis);
+    try
+    {
+        pExp->accept(jit);
+    }
+    catch (ast::ScilabError & se)
+    {
+        jit.dump();
+        throw;
+    }
+    jit.run();
+
+    delete pExp;
+
+    return Function::OK;
+}
index c5637b0..ba2f422 100644 (file)
@@ -25,5 +25,6 @@
     <gateway name="sci_whereis"             function="whereis"              type="1" />
     <gateway name="sci_getCurrentThreadId"  function="getCurrentThreadId"   type="1" />
     <gateway name="sci_getThreads"          function="getThreads"           type="1" />
-    <gateway name="sci_macrovar"            function="macrovar"           type="1" />
+    <gateway name="sci_macrovar"            function="macrovar"             type="1" />
+    <gateway name="sci_jit"                 function="jit"                  type="1" />
 </module>
index ad56c7b..f5f1318 100644 (file)
@@ -378,7 +378,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 87d11b4..cb0d66b 100644 (file)
@@ -311,7 +311,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index ccacddf..0c38bff 100644 (file)
@@ -312,7 +312,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 2ff85ae..a798859 100644 (file)
@@ -422,7 +422,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 23d4220..8c1b918 100644 (file)
@@ -454,7 +454,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index cb90727..2dfdb9a 100644 (file)
@@ -840,7 +840,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 7a548e7..8564cc8 100644 (file)
@@ -550,7 +550,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 1160097..77e51c3 100644 (file)
@@ -449,7 +449,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 8d0a350..7286bd4 100644 (file)
@@ -420,7 +420,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index c70c647..75aba6d 100644 (file)
@@ -410,7 +410,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 06c5004..cddf71b 100644 (file)
@@ -422,7 +422,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 819f391..aa6fb2b 100644 (file)
@@ -424,7 +424,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 08948ea..ffd0eb2 100644 (file)
@@ -421,7 +421,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index c4a4e4c..a4388b2 100644 (file)
@@ -410,7 +410,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 1fb2b44..bdc2b6a 100644 (file)
@@ -374,7 +374,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
@@ -1005,10 +1005,10 @@ maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
        -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-@JAVASCI_FALSE@distclean-local:
 @JAVASCI_FALSE@install-html-local:
-@JAVASCI_FALSE@clean-local:
+@JAVASCI_FALSE@distclean-local:
 @JAVASCI_FALSE@install-data-local:
+@JAVASCI_FALSE@clean-local:
 clean: clean-am
 
 clean-am: clean-generic clean-libtool clean-local \
index 1fc63a7..5d4631f 100644 (file)
@@ -435,7 +435,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index b4a4de1..a456a76 100644 (file)
@@ -443,7 +443,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 803a857..b73310c 100644 (file)
@@ -441,7 +441,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 7d00663..b8f4432 100644 (file)
@@ -306,7 +306,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index d8ef4b3..b8b7233 100644 (file)
@@ -413,7 +413,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 66761ee..f0cde21 100644 (file)
@@ -387,7 +387,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 6415406..a7e281d 100644 (file)
@@ -307,7 +307,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 18e80d6..8e46871 100644 (file)
@@ -389,7 +389,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 9ab2dcb..e281bd6 100644 (file)
@@ -456,7 +456,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index c3d456a..68a8243 100644 (file)
@@ -452,7 +452,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 0160bd8..0270704 100644 (file)
@@ -307,7 +307,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index e0fc214..fd521c7 100644 (file)
@@ -384,7 +384,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 71f6a69..19ecae4 100644 (file)
@@ -372,7 +372,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index c129eab..90f3ed3 100644 (file)
@@ -445,7 +445,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index c49e728..6e557a1 100644 (file)
@@ -281,7 +281,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index d107747..8fff0c5 100644 (file)
@@ -427,7 +427,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 1589c6a..bc91cc9 100644 (file)
@@ -420,7 +420,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 7f8d3c2..a188423 100644 (file)
@@ -376,7 +376,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 2ccc6f3..3ccea9c 100644 (file)
@@ -710,7 +710,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 6a86883..5584121 100644 (file)
@@ -789,7 +789,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index c2064d6..490d2b9 100644 (file)
@@ -419,7 +419,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index c4dcd2f..f5cae89 100644 (file)
@@ -442,7 +442,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index ec25804..12df72d 100644 (file)
@@ -311,7 +311,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 2f8d666..b962cf5 100644 (file)
@@ -363,7 +363,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index c67e6ac..1bed5af 100644 (file)
@@ -416,7 +416,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 16b14ae..cafea21 100644 (file)
@@ -425,7 +425,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index a7b09bd..2df91da 100644 (file)
@@ -411,7 +411,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index a2e3e0b..c62a573 100644 (file)
@@ -425,7 +425,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index fc1548f..7bd8ef4 100644 (file)
@@ -452,7 +452,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 92aca3b..53c0eb7 100644 (file)
@@ -395,7 +395,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 16da6fe..235828b 100644 (file)
@@ -423,7 +423,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index bedebab..8b75c4b 100644 (file)
@@ -369,7 +369,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index eca53f0..d20ab20 100644 (file)
@@ -400,7 +400,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 1494273..3f4ca36 100644 (file)
@@ -473,7 +473,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 1d541b4..57a3b30 100644 (file)
@@ -423,7 +423,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index ad27ce5..4adbb25 100644 (file)
@@ -413,7 +413,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 4e2a9aa..ce1143a 100644 (file)
@@ -370,7 +370,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 0c13740..f895758 100644 (file)
@@ -423,7 +423,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@
index 47488d4..cb2253d 100644 (file)
@@ -448,7 +448,7 @@ LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
 LLVM_INCLUDE = @LLVM_INCLUDE@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
-LLVM_LIBSA = @LLVM_LIBSA@
+LLVM_LIBS_STATIC = @LLVM_LIBS_STATIC@
 LLVM_VERSION = @LLVM_VERSION@
 LN_S = @LN_S@
 LOGGING_LEVEL = @LOGGING_LEVEL@