From 9b00f3700c53f55724c3c623234d19da53129071 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 11 Feb 2014 13:27:26 +0000 Subject: [PATCH 1/5] fix missing packages --- configure | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure b/configure index b7a49acc4..17fd74f32 100755 --- a/configure +++ b/configure @@ -12696,6 +12696,12 @@ _ACEOF +if test $i_am_cross_compiling = yes +then + #mingw: we know where things are + JPLCFLAGS="-I \"$yap_cv_java\"/include -I \"$yap_cv_java\"/include/win32" + JAVALIBS="-L \"$yap_cv_java\"/jre/bin/server -L \"$yap_cv_java\"/jre/bin/client -ljvm" +fi From 365dcd5bca0b60601e2ebea02c55ea5ef7ee2a0e Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 11 Feb 2014 13:31:53 +0000 Subject: [PATCH 2/5] fix missing packages --- configure.in | 26 +++++++++++++------------- packages/clib | 2 +- packages/jpl | 2 +- packages/pldoc | 2 +- packages/real | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/configure.in b/configure.in index 28cba3853..f26eb5f1a 100755 --- a/configure.in +++ b/configure.in @@ -623,22 +623,22 @@ CMFLAGS=-fpic CIFLAGS=-I. if test "$use_prism" = no; then - PKG_PRISM="@# " -else PKG_PRISM="" +else + PKG_PRISM="packages/prism/src/c packages/prism/src/prolog" fi AC_SUBST(PKG_PRISM) if test -e "$srcdir"/packages/archive/Makefile.in; then - PKG_LIBARCHIVE="" + PKG_LIBARCHIVE="packages/archive" else - PKG_LIBARCHIVE="@# " + PKG_LIBARCHIVE="" fi if test -e "$srcdir"/packages/odbc/Makefile.in; then - PKG_ODBC="" + PKG_ODBC="packages/odbc" else - PKG_ODBC="@# " + PKG_ODBC="" fi if test "$use_chr" = no; then @@ -1743,32 +1743,32 @@ fi m4_include([packages/myddas/configure.in]) -if test "$PKG_CLIB" = "" +if test "$PKG_CLIB" != "" then m4_include([packages/clib/configure.in]) fi -if test "$PKG_LIBARCHIVE" = "" +if test "$PKG_LIBARCHIVE" != "" then m4_include([packages/archive/configure.in]) if test "$ARCHIVE_TARGETS" = "nolib" then - PKG_LIBARCHIVE="@# " + PKG_LIBARCHIVE="" fi fi -if test "$PKG_ODBC" = ""; then +if test "$PKG_ODBC" != ""; then m4_include([packages/odbc/configure.in]) if test "$ODBC_TARGETS" = "nolib" then - PKG_ODBC="@# " + PKG_ODBC="" fi else @@ -1780,14 +1780,14 @@ fi m4_include([packages/bdd/configure.in]) dnl zlib -if test "$PKG_ZLIB" = "" +if test "$PKG_ZLIB" != "" then m4_include([packages/zlib/configure.in]) if test "$ZLIB_TARGETS" = "nolib" then - PKG_ZLIB="@# " + PKG_ZLIB="" fi fi diff --git a/packages/clib b/packages/clib index f9c9a5e10..ab6b1a70d 160000 --- a/packages/clib +++ b/packages/clib @@ -1 +1 @@ -Subproject commit f9c9a5e10f84c2c0238a8338ef7ac3f93886c30d +Subproject commit ab6b1a70db5dfaf6467b7d4ab51cfa76f1352d4c diff --git a/packages/jpl b/packages/jpl index e111442b4..f96cfb753 160000 --- a/packages/jpl +++ b/packages/jpl @@ -1 +1 @@ -Subproject commit e111442b428bcaac015d9545e42faf97df6b30f4 +Subproject commit f96cfb7533c57789fa25db64b73c09aa7269d244 diff --git a/packages/pldoc b/packages/pldoc index 34ef10c71..1e324d30b 160000 --- a/packages/pldoc +++ b/packages/pldoc @@ -1 +1 @@ -Subproject commit 34ef10c71d1577dcde1e5437949cc202638ed671 +Subproject commit 1e324d30b913edbe78cc4b923cde7998013cbfb0 diff --git a/packages/real b/packages/real index e8360ba2d..6235790ec 160000 --- a/packages/real +++ b/packages/real @@ -1 +1 @@ -Subproject commit e8360ba2db265175a3b469bc9d51aff5cfccabb0 +Subproject commit 6235790ec8283ca65aefaed14f95a1749e744325 From 6110ecb95df131f9ab1b2f63ba75181b38fdc5a9 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 11 Feb 2014 13:44:17 +0000 Subject: [PATCH 3/5] update submodules --- configure | 77 +++++++++--------------------------- configure.in | 23 +---------- packages/python/configure.in | 2 +- 3 files changed, 21 insertions(+), 81 deletions(-) diff --git a/configure b/configure index 17fd74f32..2cde4ff5b 100755 --- a/configure +++ b/configure @@ -835,8 +835,6 @@ ac_user_opts=' enable_option_checking enable_tabling enable_or_parallelism -enable_rational_trees -enable_coroutining enable_depth_limit enable_wam_profile enable_low_level_tracer @@ -1513,8 +1511,6 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-tabling support tabling --enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads - --enable-rational-trees support infinite rational trees - --enable-coroutining support co-routining, attributed variables and constraints --enable-depth-limit support depth-bound computation --enable-wam-profile support low level profiling of abstract machine --enable-low-level-tracer support support for procedure-call tracing @@ -4114,20 +4110,6 @@ else orparallelism=no fi -# Check whether --enable-rational-trees was given. -if test "${enable_rational_trees+set}" = set; then : - enableval=$enable_rational_trees; rationaltrees="$enableval" -else - rationaltrees=yes -fi - -# Check whether --enable-coroutining was given. -if test "${enable_coroutining+set}" = set; then : - enableval=$enable_coroutining; rationaltrees="$enableval";coroutining="$enableval" -else - coroutining=yes -fi - # Check whether --enable-depth-limit was given. if test "${enable_depth_limit+set}" = set; then : enableval=$enable_depth_limit; depthlimit="$enableval" @@ -6410,22 +6392,22 @@ CMFLAGS=-fpic CIFLAGS=-I. if test "$use_prism" = no; then - PKG_PRISM="@# " -else PKG_PRISM="" +else + PKG_PRISM="packages/prism/src/c packages/prism/src/prolog" fi if test -e "$srcdir"/packages/archive/Makefile.in; then - PKG_LIBARCHIVE="" + PKG_LIBARCHIVE="packages/archive" else - PKG_LIBARCHIVE="@# " + PKG_LIBARCHIVE="" fi if test -e "$srcdir"/packages/odbc/Makefile.in; then - PKG_ODBC="" + PKG_ODBC="packages/odbc" else - PKG_ODBC="@# " + PKG_ODBC="" fi if test "$use_chr" = no; then @@ -7103,22 +7085,7 @@ else YAPLIB_CFLAGS="$CFLAGS" fi -if test "$coroutining" = "yes" - then - YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DCUT_C=1" -fi - -if test "$rationaltrees" = "yes" - then - YAP_EXTRAS="$YAP_EXTRAS -DRATIONAL_TREES=1" -fi - -if test "$rationaltrees" = "yes" -a "$coroutining" = "yes" - then - INSTALLCLP="" - else - INSTALLCLP="@#" -fi +YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DCUT_C=1 -DRATIONAL_TREES=1" if test "$debugyap" = "yes" then @@ -9424,7 +9391,7 @@ fi -if test "$PKG_CLIB" = "" +if test "$PKG_CLIB" != "" then @@ -10103,7 +10070,7 @@ fi fi -if test "$PKG_LIBARCHIVE" = "" +if test "$PKG_LIBARCHIVE" != "" then @@ -10238,12 +10205,12 @@ fi if test "$ARCHIVE_TARGETS" = "nolib" then - PKG_LIBARCHIVE="@# " + PKG_LIBARCHIVE="" fi fi -if test "$PKG_ODBC" = ""; then +if test "$PKG_ODBC" != ""; then @@ -10836,7 +10803,7 @@ ODBC_PLTARGETS=`echo $ODBC_TARGETS | sed "s/4pl\.$SO/.pl/g"` if test "$ODBC_TARGETS" = "nolib" then - PKG_ODBC="@# " + PKG_ODBC="" fi else @@ -11276,7 +11243,7 @@ fi -if test "$PKG_ZLIB" = "" +if test "$PKG_ZLIB" != "" then @@ -11364,7 +11331,7 @@ fi if test "$ZLIB_TARGETS" = "nolib" then - PKG_ZLIB="@# " + PKG_ZLIB="" fi fi @@ -11703,7 +11670,7 @@ else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST -/* #line 11706 "configure" */ +/* #line 11673 "configure" */ public class Test { } EOF @@ -11879,7 +11846,7 @@ EOF if uudecode$EXEEXT Test.uue; then ac_cv_prog_uudecode_base64=yes else - echo "configure: 11882: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 + echo "configure: 11849: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 echo "configure: failed file was:" >&5 cat Test.uue >&5 ac_cv_prog_uudecode_base64=no @@ -12010,7 +11977,7 @@ else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST -/* #line 12013 "configure" */ +/* #line 11980 "configure" */ public class Test { } EOF @@ -12045,7 +12012,7 @@ JAVA_TEST=Test.java CLASS_TEST=Test.class TEST=Test cat << \EOF > $JAVA_TEST -/* [#]line 12048 "configure" */ +/* [#]line 12015 "configure" */ public class Test { public static void main (String args[]) { System.exit (0); @@ -12696,12 +12663,6 @@ _ACEOF -if test $i_am_cross_compiling = yes -then - #mingw: we know where things are - JPLCFLAGS="-I \"$yap_cv_java\"/include -I \"$yap_cv_java\"/include/win32" - JAVALIBS="-L \"$yap_cv_java\"/jre/bin/server -L \"$yap_cv_java\"/jre/bin/client -ljvm" -fi @@ -14617,7 +14578,7 @@ if test "$ac_res" != no; then : else echo "Could not find libraries for Python"; - ENABLE_PYTHON="@# " + PKG_PYTHON="" fi PYTHON_LIBS=$LIBS diff --git a/configure.in b/configure.in index f26eb5f1a..2c7c0d8ee 100755 --- a/configure.in +++ b/configure.in @@ -80,12 +80,6 @@ AC_ARG_ENABLE(tabling, AC_ARG_ENABLE(or-parallelism, [ --enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads ], orparallelism="$enableval", orparallelism=no) -AC_ARG_ENABLE(rational-trees, - [ --enable-rational-trees support infinite rational trees ], - rationaltrees="$enableval" , rationaltrees=yes) -AC_ARG_ENABLE(coroutining, - [ --enable-coroutining support co-routining, attributed variables and constraints], - rationaltrees="$enableval";coroutining="$enableval", coroutining=yes) AC_ARG_ENABLE(depth-limit, [ --enable-depth-limit support depth-bound computation ], depthlimit="$enableval", depthlimit=yes) @@ -1051,23 +1045,8 @@ else YAPLIB_CFLAGS="$CFLAGS" fi -if test "$coroutining" = "yes" - then - YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DCUT_C=1" -fi - -if test "$rationaltrees" = "yes" - then - YAP_EXTRAS="$YAP_EXTRAS -DRATIONAL_TREES=1" -fi +YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DCUT_C=1 -DRATIONAL_TREES=1" -if test "$rationaltrees" = "yes" -a "$coroutining" = "yes" - then - INSTALLCLP="" - else - INSTALLCLP="@#" -fi - if test "$debugyap" = "yes" then YAP_EXTRAS="$YAP_EXTRAS -DDEBUG=1" diff --git a/packages/python/configure.in b/packages/python/configure.in index 9cc5477f6..f5adf8143 100755 --- a/packages/python/configure.in +++ b/packages/python/configure.in @@ -44,7 +44,7 @@ elif test -e "$srcdir"/packages/python/Makefile.in ; then OLIBS=$LIBS LIBS=$PYTHON_LIBS AC_SEARCH_LIBS(Py_Initialize, [python"$PYTHONVERSION" python"$PYTHONVERSION"m],,[echo "Could not find libraries for Python"; - ENABLE_PYTHON="@# "],"$OLIBS") + PKG_PYTHON=""],"$OLIBS") PYTHON_LIBS=$LIBS LIBS=$OLIBS if test -d "$PYTHONHOME/include/python$PYTHONVERSION"; then From 1d7407ba4d31328135d565bd74d8e86b552f08a5 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 11 Feb 2014 13:56:40 +0000 Subject: [PATCH 4/5] fix horus --- packages/CLPBN/horus/Makefile.in | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/CLPBN/horus/Makefile.in b/packages/CLPBN/horus/Makefile.in index 17487fe6a..e2b361ba7 100644 --- a/packages/CLPBN/horus/Makefile.in +++ b/packages/CLPBN/horus/Makefile.in @@ -181,20 +181,20 @@ UTESTS_OBJS = \ $(utestsdir)/UnitTesting.o -LIB = $(srcdir)/horus.@SO@ -HCLI = $(srcdir)/hcli +SOBJS = horus.@SO@ +HCLI = hcli UTESTING = $(srcdir)/run_tests -all: $(LIB) $(HCLI) +all: $(SOBJS) $(HCLI) # Don't require $(UTESTING) by default as we # don't want a hard dependency on CppUnit -with_tests: $(LIB) $(HCLI) $(UTESTING) +with_tests: $(SOBJS) $(HCLI) $(UTESTING) -@DO_SECOND_LD@$(LIB): $(LIB_OBJS) +@DO_SECOND_LD@$(SOBJS): $(LIB_OBJS) @DO_SECOND_LD@ @SHLIB_CXX_LD@ $(LDFLAGS) -o $@ $(LIB_OBJS) @EXTRA_LIBS_FOR_SWIDLLS@ @@ -212,13 +212,15 @@ $(UTESTING): $(UTESTS_OBJS) install: all - $(INSTALL_PROGRAM) $(LIB) $(DESTDIR)$(YAPLIBDIR) + $(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR) $(INSTALL_PROGRAM) $(HCLI) $(DESTDIR)$(BINDIR) clean: - rm -f $(LIB) $(HCLI) $(UTESTING) *.o *~ $(utestsdir)/*.o $(utestsdir)/*~ + rm -f $(SOBJS) $(HCLI) $(UTESTING) *.o *~ $(utestsdir)/*.o $(utestsdir)/*~ +distclean: clean + rm -f Makefile remove_dots: rm -f *.dot *.png *.svg From 3cad9c37b19114e300f3b62332963d46f06abf44 Mon Sep 17 00:00:00 2001 From: David Vaz Date: Tue, 11 Feb 2014 07:15:39 -0800 Subject: [PATCH 5/5] removed unnecessary cut_c macros (always on) --- C/absmi.c | 20 ---------------- C/c_interface.c | 15 ------------ C/cut_c.c | 4 ---- C/exec.c | 6 ----- C/grow.c | 6 ----- C/index.c | 14 +---------- C/init.c | 41 --------------------------------- C/inlines.c | 4 ---- H/Regs.h | 7 +----- H/YapOpcodes.h | 4 ---- H/Yapproto.h | 2 -- H/amiops.h | 2 -- H/rclause.h | 4 ---- H/saveclause.h | 4 ---- H/walkclause.h | 4 ---- configure | 8 +------ configure.in | 8 +------ console/yap.c | 2 -- misc/buildops | 4 ++-- packages/myddas/myddas_odbc.c | 4 ++-- packages/myddas/myddas_shared.c | 16 ++++++------- 21 files changed, 16 insertions(+), 163 deletions(-) diff --git a/C/absmi.c b/C/absmi.c index 47c0c0e32..50dc6c91e 100755 --- a/C/absmi.c +++ b/C/absmi.c @@ -497,9 +497,7 @@ #include "absmi.h" #include "heapgc.h" -#ifdef CUT_C #include "cut_c.h" -#endif #ifdef PUSH_X #else @@ -2688,14 +2686,12 @@ Yap_absmi(int inp) /* trust_fail */ BOp(trust_fail, e); -#ifdef CUT_C { while (POP_CHOICE_POINT(B->cp_b)) { POP_EXECUTE(); } } -#endif /* CUT_C */ #ifdef YAPOR { choiceptr cut_pt; @@ -3603,11 +3599,9 @@ Yap_absmi(int inp) /* cut */ BACKUP_B(); -#ifdef CUT_C while (POP_CHOICE_POINT(B->cp_b)) { POP_EXECUTE(); } -#endif /* CUT_C */ B = B->cp_b; /* cut_fail */ HB = B->cp_h; /* cut_fail */ RECOVER_B(); @@ -7659,10 +7653,8 @@ Yap_absmi(int inp) CUT_wait_leftmost(); #endif /* YAPOR */ CACHE_Y(YREG); -#ifdef CUT_C /* Alocate space for the cut_c structure*/ CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG); -#endif S_YREG = S_YREG - PREG->u.OtapFs.extra; store_args(PREG->u.OtapFs.s); store_yaam_regs(NEXTOP(PREG, OtapFs), 0); @@ -7680,21 +7672,17 @@ Yap_absmi(int inp) saveregs(); SREG = (CELL *) ((f) (PASS_REGS1)); /* This last instruction changes B B*/ -#ifdef CUT_C while (POP_CHOICE_POINT(B)){ cut_c_pop(); } -#endif setregs(); } if (!SREG) { -#ifdef CUT_C /* Removes the cut functions from the stack without executing them because we have fail and not cuted the predicate*/ while(POP_CHOICE_POINT(B)) cut_c_pop(); -#endif FAIL(); } if ((CELL *) B == YREG && ASP != (CELL *) B) { @@ -7727,7 +7715,6 @@ Yap_absmi(int inp) goto TRYCC; ENDBOp(); -#ifdef CUT_C BOp(cut_c, OtapFs); /*This is a phantom instruction. This is not executed by the WAM*/ #ifdef DEBUG @@ -7736,17 +7723,14 @@ Yap_absmi(int inp) printf ("ERROR: Should not print this message FILE: absmi.c %d\n",__LINE__); #endif /*DEBUG*/ ENDBOp(); -#endif BOp(try_userc, OtapFs); #ifdef YAPOR CUT_wait_leftmost(); #endif /* YAPOR */ CACHE_Y(YREG); -#ifdef CUT_C /* Alocate space for the cut_c structure*/ CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG); -#endif S_YREG = S_YREG - PREG->u.OtapFs.extra; store_args(PREG->u.OtapFs.s); store_yaam_regs(NEXTOP(PREG, OtapFs), 0); @@ -7806,13 +7790,11 @@ Yap_absmi(int inp) setregs(); LOCAL_PrologMode &= ~UserCCallMode; if (!SREG) { -#ifdef CUT_C /* Removes the cut functions from the stack without executing them because we have fail and not cuted the predicate*/ while(POP_CHOICE_POINT(B)) cut_c_pop(); -#endif FAIL(); } if ((CELL *) B == YREG && ASP != (CELL *) B) { @@ -7828,7 +7810,6 @@ Yap_absmi(int inp) JMPNext(); ENDBOp(); -#ifdef CUT_C BOp(cut_userc, OtapFs); /*This is a phantom instruction. This is not executed by the WAM*/ #ifdef DEBUG @@ -7839,7 +7820,6 @@ Yap_absmi(int inp) CACHE_A1(); JMPNext(); ENDBOp(); -#endif /************************************************************************\ diff --git a/C/c_interface.c b/C/c_interface.c index 5d82f5ef9..b5dbed23e 100644 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -363,9 +363,7 @@ #include "or.macros.h" #endif /* YAPOR */ #include "threads.h" -#ifdef CUT_C #include "cut_c.h" -#endif /* CUT_C */ #if HAVE_MALLOC_H #include #endif @@ -515,10 +513,8 @@ X_API void YAP_PredicateInfo(void *,Atom *,UInt *,Term *); X_API void YAP_UserCPredicate(char *,CPredicate,UInt); X_API void YAP_UserBackCPredicate(char *,CPredicate,CPredicate,UInt,unsigned int); X_API void YAP_UserCPredicateWithArgs(char *,CPredicate,UInt,Term); -#ifdef CUT_C X_API void YAP_UserBackCutCPredicate(char *,CPredicate,CPredicate,CPredicate,UInt,unsigned int); X_API void *YAP_ExtraSpaceCut(void); -#endif X_API Term YAP_SetCurrentModule(Term); X_API Term YAP_CurrentModule(void); X_API Term YAP_CreateModule(Atom); @@ -1166,7 +1162,6 @@ YAP_ArityOfFunctor(Functor f) return (ArityOfFunctor(f)); } -#ifdef CUT_C X_API void * YAP_ExtraSpaceCut(void) { @@ -1179,7 +1174,6 @@ YAP_ExtraSpaceCut(void) RECOVER_B(); return(ptr); } -#endif /*CUT_C*/ X_API void * YAP_ExtraSpace(void) @@ -1203,14 +1197,12 @@ YAP_cut_up(void) { CACHE_REGS BACKUP_B(); -#ifdef CUT_C { while (POP_CHOICE_POINT(B->cp_b)) { POP_EXECUTE(); } } -#endif /* CUT_C */ /* This is complicated: make sure we can restore the ASP pointer back to where cut_up called it. Slots depend on it. */ if (ENV > B->cp_env) { @@ -3505,23 +3497,16 @@ X_API void YAP_UserBackCPredicate(char *name, CPredicate init, CPredicate cont, UInt arity, unsigned int extra) { -#ifdef CUT_C Yap_InitCPredBackCut(name, arity, extra, init, cont, NULL ,UserCPredFlag); -#else - Yap_InitCPredBack(name, arity, extra, init, cont, UserCPredFlag); -#endif } -#ifdef CUT_C X_API void YAP_UserBackCutCPredicate(char *name, CPredicate init, CPredicate cont, CPredicate cut, UInt arity, unsigned int extra) { Yap_InitCPredBackCut(name, arity, extra, init, cont, cut, UserCPredFlag); } -#endif - X_API void YAP_UserCPredicateWithArgs(char *a, CPredicate f, UInt arity, Term mod) diff --git a/C/cut_c.c b/C/cut_c.c index bc85126ee..b36941024 100644 --- a/C/cut_c.c +++ b/C/cut_c.c @@ -1,5 +1,3 @@ -#ifdef CUT_C - #include "Yap.h" #include "cut_c.h" #include @@ -33,5 +31,3 @@ void cut_c_push(cut_c_str_ptr new_top){ Yap_REGS.CUT_C_TOP=new_top; return; } - -#endif /*CUT_C*/ diff --git a/C/exec.c b/C/exec.c index c54e90f58..11052121e 100644 --- a/C/exec.c +++ b/C/exec.c @@ -22,9 +22,7 @@ static char SccsId[] = "@(#)cdmgr.c 1.1 05/02/98"; #include "pl-shared.h" #include "yapio.h" #include "attvar.h" -#ifdef CUT_C #include "cut_c.h" -#endif static Int CallPredicate(PredEntry *, choiceptr, yamop * CACHE_TYPE); static Int EnterCreepMode(Term, Term CACHE_TYPE); @@ -1229,7 +1227,6 @@ execute_pred(PredEntry *ppe, CELL *pt USES_REGS) /* restore the old environment */ /* get to previous environment */ cut_B = (choiceptr)ENV[E_CB]; -#ifdef CUT_C { /* Note that cut_B == (choiceptr)ENV[E_CB] */ @@ -1238,7 +1235,6 @@ execute_pred(PredEntry *ppe, CELL *pt USES_REGS) POP_EXECUTE(); } } -#endif /* CUT_C */ #ifdef YAPOR CUT_prune_to(cut_B); #endif /* YAPOR */ @@ -1799,9 +1795,7 @@ Yap_InitYaamRegs( int myworker_id ) #endif Yap_AllocateDefaultArena(128*1024, 2, myworker_id); Yap_InitPreAllocCodeSpace( myworker_id ); -#ifdef CUT_C cut_c_initialize( myworker_id ); -#endif Yap_PrepGoal(0, NULL, NULL PASS_REGS); #ifdef TABLING /* ensure that LOCAL_top_dep_fr is always valid */ diff --git a/C/grow.c b/C/grow.c index b787efe26..3778d0093 100755 --- a/C/grow.c +++ b/C/grow.c @@ -22,9 +22,7 @@ #include "sshift.h" #include "compile.h" #include "attvar.h" -#ifdef CUT_C #include "cut_c.h" -#endif /* CUT_C */ #if HAVE_STRING_H #include #endif @@ -137,10 +135,8 @@ SetHeapRegs(int copying_threads USES_REGS) UNLOCK(LOCAL_SignalLock); if (HR) HR = PtoGloAdjust(HR); -#ifdef CUT_C if (Yap_REGS.CUT_C_TOP) Yap_REGS.CUT_C_TOP = CutCAdjust(Yap_REGS.CUT_C_TOP); -#endif if (HB) HB = PtoGloAdjust(HB); if (LOCAL_OpenArray) @@ -1986,9 +1982,7 @@ Yap_CopyThreadStacks(int worker_q, int worker_p, int incremental) if (ASP > CellPtr(B)) ASP = CellPtr(B); LCL0 = REMOTE_ThreadHandle(worker_p).current_yaam_regs->LCL0_; -#ifdef CUT_C Yap_REGS.CUT_C_TOP = REMOTE_ThreadHandle(worker_p).current_yaam_regs->CUT_C_TOP; -#endif LOCAL_DynamicArrays = NULL; LOCAL_StaticArrays = NULL; LOCAL_GlobalVariables = NULL; diff --git a/C/index.c b/C/index.c index f3d4dcea9..fcca4b837 100755 --- a/C/index.c +++ b/C/index.c @@ -492,9 +492,7 @@ static char SccsId[] = "%W% %G%"; #if HAVE_STRING_H #include #endif -#ifdef CUT_C #include "cut_c.h" -#endif #if defined(YAPOR) || defined(THREADS) #define SET_JLBL(X) jlbl = &(ipc->u.X) @@ -6200,14 +6198,12 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y #if TABLING case _table_trust: #endif -#ifdef CUT_C { while (POP_CHOICE_POINT(B->cp_b)) { POP_EXECUTE(); } } -#endif /* CUT_C */ #ifdef YAPOR { choiceptr cut_pt; @@ -6230,14 +6226,12 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y case _table_trust_me: #endif b0 = B; -#ifdef CUT_C { while (POP_CHOICE_POINT(B->cp_b)) { POP_EXECUTE(); } } -#endif /* CUT_C */ #ifdef YAPOR { choiceptr cut_pt; @@ -6369,7 +6363,7 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y LogUpdClause *lcl = ipc->u.OtILl.d; /* make sure we don't erase the clause we are jumping to, notice that ErLogUpdIndex may remove several references in one go. - Notice we only need to do this if we´ re jumping to the clause. + Notice we only need to do this if we´ re jumping to the clause. */ if (newpc && !(lcl->ClFlags & (DirtyMask|InUseMask))) { lcl->ClFlags |= InUseMask; @@ -6383,14 +6377,12 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y } } #endif -#ifdef CUT_C { while (POP_CHOICE_POINT(B->cp_b)) { POP_EXECUTE(); } } -#endif /* CUT_C */ #ifdef YAPOR { choiceptr cut_pt; @@ -6657,14 +6649,12 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y return NULL; default: if (b0) { -#ifdef CUT_C { while (POP_CHOICE_POINT(B->cp_b)) { POP_EXECUTE(); } } -#endif /* CUT_C */ #ifdef YAPOR { choiceptr cut_pt; @@ -6687,14 +6677,12 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y } if (b0) { /* I did a trust */ -#ifdef CUT_C { while (POP_CHOICE_POINT(B->cp_b)) { POP_EXECUTE(); } } -#endif /* CUT_C */ #ifdef YAPOR { choiceptr cut_pt; diff --git a/C/init.c b/C/init.c index 1c7c7a951..4b38783fd 100755 --- a/C/init.c +++ b/C/init.c @@ -69,11 +69,7 @@ static void InTTYLine(char *); static void SetOp(int, int, char *, Term); static void InitOps(void); static void InitDebug(void); -#ifdef CUT_C static void CleanBack(PredEntry *, CPredicate, CPredicate, CPredicate); -#else -static void CleanBack(PredEntry *, CPredicate, CPredicate); -#endif static void InitStdPreds(void); static void InitFlags(void); static void InitCodes(void); @@ -682,11 +678,7 @@ Yap_InitAsmPred(char *Name, unsigned long int Arity, int code, CPredicate def, static void -#ifdef CUT_C CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont, CPredicate Cut) -#else -CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont) -#endif { yamop *code; if (pe->cs.p_code.FirstClause != pe->cs.p_code.LastClause || @@ -717,7 +709,6 @@ CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont) PUT_YAMOP_SEQ(code); #endif /* YAPOR */ code->u.OtapFs.f = Cont; -#ifdef CUT_C code = NEXTOP(code,OtapFs); if (pe->PredFlags & UserCPredFlag) code->opc = Yap_opcode(_cut_c); @@ -725,11 +716,8 @@ CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont) code->opc = Yap_opcode(_cut_userc); code->u.OtapFs.p = pe; code->u.OtapFs.f = Cut; -#endif } - -#ifdef CUT_C void Yap_InitCPredBack(char *Name, unsigned long int Arity, unsigned int Extra, CPredicate Start, @@ -743,24 +731,11 @@ Yap_InitCPredBackCut(char *Name, unsigned long int Arity, CPredicate Cont,CPredicate Cut, UInt flags){ Yap_InitCPredBack_(Name,Arity,Extra,Start,Cont,Cut,flags); } -#else -Yap_InitCPredBackCut(char *Name, unsigned long int Arity, - unsigned int Extra, CPredicate Start, - CPredicate Cont,CPredicate Cut, UInt flags){ - Yap_InitCPredBack(Name,Arity,Extra,Start,Cont,flags); -} -#endif /* CUT_C */ void -#ifdef CUT_C Yap_InitCPredBack_(char *Name, unsigned long int Arity, unsigned int Extra, CPredicate Start, CPredicate Cont, CPredicate Cut, UInt flags) -#else -Yap_InitCPredBack(char *Name, unsigned long int Arity, - unsigned int Extra, CPredicate Start, - CPredicate Cont, UInt flags) -#endif { CACHE_REGS PredEntry *pe = NULL; @@ -796,11 +771,7 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity, if (pe->cs.p_code.FirstClause != NIL) { flags = update_flags_from_prolog(flags, pe); -#ifdef CUT_C CleanBack(pe, Start, Cont, Cut); -#else - CleanBack(pe, Start, Cont); -#endif /*CUT_C*/ } else { StaticClause *cl; @@ -814,11 +785,7 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity, pe->PredFlags |= SequentialPredFlag; #endif /* YAPOR */ -#ifdef CUT_C cl = (StaticClause *)Yap_AllocCodeSpace((CELL)NEXTOP(NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),OtapFs),l)); -#else - cl = (StaticClause *)Yap_AllocCodeSpace((CELL)NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),l)); -#endif if (cl == NULL) { Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"No Heap Space in InitCPredBack"); @@ -826,15 +793,9 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity, } cl->ClFlags = StaticMask; cl->ClNext = NULL; -#ifdef CUT_C Yap_ClauseSpace += (CELL)NEXTOP(NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),OtapFs),l); cl->ClSize = (CELL)NEXTOP(NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),OtapFs),e); -#else - Yap_ClauseSpace += (CELL)NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),l); - cl->ClSize = - (CELL)NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),e); -#endif cl->usc.ClLine = Yap_source_line_no(); code = cl->ClCode; @@ -866,7 +827,6 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity, PUT_YAMOP_SEQ(code); #endif /* YAPOR */ code = NEXTOP(code,OtapFs); -#ifdef CUT_C if (flags & UserCPredFlag) code->opc = Yap_opcode(_cut_userc); else @@ -876,7 +836,6 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity, code->u.OtapFs.s = Arity; code->u.OtapFs.extra = Extra; code = NEXTOP(code,OtapFs); -#endif /* CUT_C */ code->opc = Yap_opcode(_Ystop); code->u.l.l = cl->ClCode; } diff --git a/C/inlines.c b/C/inlines.c index 3a9a19783..32550f9f3 100644 --- a/C/inlines.c +++ b/C/inlines.c @@ -19,9 +19,7 @@ #include "absmi.h" -#ifdef CUT_C #include "cut_c.h" -#endif static Int p_atom( USES_REGS1 ); static Int p_atomic( USES_REGS1 ); @@ -797,14 +795,12 @@ p_cut_by( USES_REGS1 ) #else pt0 = (choiceptr)(LCL0-IntOfTerm(d0)); #endif -#ifdef CUT_C { while (POP_CHOICE_POINT(pt0)) { POP_EXECUTE(); } } -#endif /* CUT_C */ #ifdef YAPOR CUT_prune_to(pt0); #endif /* YAPOR */ diff --git a/H/Regs.h b/H/Regs.h index 5e5920fa7..36266d856 100644 --- a/H/Regs.h +++ b/H/Regs.h @@ -16,12 +16,9 @@ /********* abstract machine registers **********************************/ #ifdef YAP_H -#ifdef CUT_C #include "cut_c.h" #endif -#endif - #define MaxTemps 512 #define MaxArithms 32 @@ -104,10 +101,8 @@ typedef struct regstore_t #endif /* DEPTH_LIMIT */ yamop *CP_; /* 28 continuation program counter */ CELL *ENV_; /* 1 current environment */ -#ifdef CUT_C struct cut_c_str *CUT_C_TOP; -#endif -#if defined CUT_C && (defined MYDDAS_ODBC || defined MYDDAS_MYSQL) +#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL struct myddas_global *MYDDAS_GLOBAL_POINTER; #endif yamop *P_; /* 7 prolog machine program counter */ diff --git a/H/YapOpcodes.h b/H/YapOpcodes.h index 2300d8248..0187b7d94 100644 --- a/H/YapOpcodes.h +++ b/H/YapOpcodes.h @@ -203,14 +203,10 @@ OPCODE(call_c_wfail ,slp), OPCODE(try_c ,OtapFs), OPCODE(retry_c ,OtapFs), -#ifdef CUT_C OPCODE(cut_c ,OtapFs), -#endif OPCODE(try_userc ,OtapFs), OPCODE(retry_userc ,OtapFs), -#ifdef CUT_C OPCODE(cut_userc ,OtapFs), -#endif OPCODE(lock_pred ,e), OPCODE(index_pred ,e), #ifdef THREADS diff --git a/H/Yapproto.h b/H/Yapproto.h index a24189451..ab653d805 100644 --- a/H/Yapproto.h +++ b/H/Yapproto.h @@ -238,9 +238,7 @@ void Yap_InitAsmPred(char *, unsigned long int, int, CPredicate, UInt); void Yap_InitCmpPred(char *, unsigned long int, CmpPredicate, UInt); void Yap_InitCPredBack(char *, unsigned long int, unsigned int, CPredicate,CPredicate,UInt); void Yap_InitCPredBackCut(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,UInt); -#ifdef CUT_C void Yap_InitCPredBack_(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,UInt); -#endif void Yap_InitWorkspace(UInt,UInt,UInt,UInt,UInt,int,int,int); #ifdef YAPOR diff --git a/H/amiops.h b/H/amiops.h index 71de4fa31..4ebf11302 100644 --- a/H/amiops.h +++ b/H/amiops.h @@ -412,11 +412,9 @@ Yap_unify_constant(register Term a, register Term cons) static inline int do_cut(int i) { CACHE_REGS -#ifdef CUT_C if (POP_CHOICE_POINT(B->cp_b)) { cut_c_pop(); } -#endif Yap_TrimTrail(); B = B->cp_b; return i; diff --git a/H/rclause.h b/H/rclause.h index 156addb24..c77963639 100644 --- a/H/rclause.h +++ b/H/rclause.h @@ -107,12 +107,8 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS) pc = pc->u.OtaLl.n; break; /* instructions type OtapFs */ -#ifdef CUT_C case _cut_c: -#endif -#ifdef CUT_C case _cut_userc: -#endif case _retry_c: case _retry_userc: case _try_c: diff --git a/H/saveclause.h b/H/saveclause.h index e826eec14..6e1d27fcb 100644 --- a/H/saveclause.h +++ b/H/saveclause.h @@ -117,12 +117,8 @@ pc = NEXTOP(pc,OtaLl); break; /* instructions type OtapFs */ -#ifdef CUT_C case _cut_c: -#endif -#ifdef CUT_C case _cut_userc: -#endif case _retry_c: case _retry_userc: case _try_c: diff --git a/H/walkclause.h b/H/walkclause.h index 53b829e76..10e33c34c 100644 --- a/H/walkclause.h +++ b/H/walkclause.h @@ -67,12 +67,8 @@ pc = pc->u.OtaLl.n; break; /* instructions type OtapFs */ -#ifdef CUT_C case _cut_c: -#endif -#ifdef CUT_C case _cut_userc: -#endif case _retry_c: case _retry_userc: case _try_c: diff --git a/configure b/configure index 2cde4ff5b..5972d1c21 100755 --- a/configure +++ b/configure @@ -7085,7 +7085,7 @@ else YAPLIB_CFLAGS="$CFLAGS" fi -YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DCUT_C=1 -DRATIONAL_TREES=1" +YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DRATIONAL_TREES=1" if test "$debugyap" = "yes" then @@ -7166,12 +7166,6 @@ else esac fi - -if test "$cutc" = "yes" - then - YAP_EXTRAS="$YAP_EXTRAS -DCUT_C=1" -fi - if test "$tabling" = "yes" then YAP_EXTRAS="$YAP_EXTRAS -DTABLING=1" diff --git a/configure.in b/configure.in index 2c7c0d8ee..77d7cbead 100755 --- a/configure.in +++ b/configure.in @@ -1045,7 +1045,7 @@ else YAPLIB_CFLAGS="$CFLAGS" fi -YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DCUT_C=1 -DRATIONAL_TREES=1" +YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DRATIONAL_TREES=1" if test "$debugyap" = "yes" then @@ -1119,12 +1119,6 @@ else ;; esac fi - - -if test "$cutc" = "yes" - then - YAP_EXTRAS="$YAP_EXTRAS -DCUT_C=1" -fi if test "$tabling" = "yes" then diff --git a/console/yap.c b/console/yap.c index fd5ed46a6..f9c546169 100755 --- a/console/yap.c +++ b/console/yap.c @@ -19,9 +19,7 @@ #include "config.h" #include "YapInterface.h" -#ifdef CUT_C #include "cut_c.h" -#endif #ifdef _MSC_VER /* Microsoft's Visual C++ Compiler */ #ifdef HAVE_UNISTD_H diff --git a/misc/buildops b/misc/buildops index 53eaa441d..812843dd5 100644 --- a/misc/buildops +++ b/misc/buildops @@ -166,8 +166,8 @@ end_special(_, _). special_op("clause_with_cut","TABLING_INNER_CUTS"). special_op("table_answer_resolution_completion","THREADS_CONSUMER_SHARING"). -special_op("cut_c","CUT_C"). -special_op("cut_userc","CUT_C"). +/*special_op("cut_c","CUT_C").*/ +/*special_op("cut_userc","CUT_C").*/ special_op("run_eam","BEAM"). special_op("retry_eam","BEAM"). special_op("thread_local","THREADS"). diff --git a/packages/myddas/myddas_odbc.c b/packages/myddas/myddas_odbc.c index c00eaf536..cea23d813 100644 --- a/packages/myddas/myddas_odbc.c +++ b/packages/myddas/myddas_odbc.c @@ -15,7 +15,7 @@ * * *************************************************************************/ -#if defined MYDDAS_ODBC && defined CUT_C +#if defined MYDDAS_ODBC #include #include @@ -765,7 +765,7 @@ c_db_odbc_get_fields_properties( USES_REGS1 ) { list = fields_properties_list; SQLSMALLINT bind_prim_key; - //por causa de as rows em odbc começam em 1 :) + //por causa de as rows em odbc come�am em 1 :) Short *null=(Short *)malloc(sizeof(Short)*(1+num_fields)); if (!SQLALLOCHANDLE(SQL_HANDLE_STMT, hdbc, &hstmt2, "db_get_fields_properties")) diff --git a/packages/myddas/myddas_shared.c b/packages/myddas/myddas_shared.c index cfeb2ca1e..5d8232308 100644 --- a/packages/myddas/myddas_shared.c +++ b/packages/myddas/myddas_shared.c @@ -268,7 +268,7 @@ c_db_preds_conn_start ( USES_REGS1 ){ MYDDAS_UTIL_CONNECTION node = myddas_util_search_connection(conn); - /* Caso a ligacao já tenha sido apagada*/ + /* Caso a ligacao já tenha sido apagada*/ if (node == NULL) { cut_fail(); @@ -699,22 +699,22 @@ void init_myddas(void) { CACHE_REGS -#if defined MYDDAS_MYSQL && defined CUT_C +#if defined MYDDAS_MYSQL Yap_InitBackMYDDAS_MySQLPreds(); #endif -#if defined MYDDAS_ODBC && defined CUT_C +#if defined MYDDAS_ODBC Yap_InitBackMYDDAS_ODBCPreds(); #endif -#if defined CUT_C && (defined MYDDAS_ODBC || defined MYDDAS_MYSQL) +#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL Yap_InitBackMYDDAS_SharedPreds(); #endif -#if defined CUT_C && defined MYDDAS_MYSQL +#if defined MYDDAS_MYSQL Yap_InitMYDDAS_MySQLPreds(); #endif -#if defined CUT_C && defined MYDDAS_ODBC +#if defined MYDDAS_ODBC Yap_InitMYDDAS_ODBCPreds(); #endif -#if defined CUT_C && (defined MYDDAS_ODBC || defined MYDDAS_MYSQL) +#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL Yap_InitMYDDAS_SharedPreds(); #endif #if defined MYDDAS_TOP_LEVEL && defined MYDDAS_MYSQL // && defined HAVE_LIBREADLINE @@ -767,4 +767,4 @@ int WINAPI win_myddas(HANDLE hinst, DWORD reason, LPVOID reserved) -#endif /*CUT_C && (MYDDAS_MYSQL || MYDDAS_ODBC)*/ +#endif /*MYDDAS_MYSQL || MYDDAS_ODBC*/