fixed a bug in static_clause (thanks to Jose Santos)

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2218 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2008-04-14 21:20:36 +00:00
parent 3c3d0de2de
commit 3edc72b4c1
5 changed files with 21 additions and 11 deletions

View File

@ -11,8 +11,11 @@
* File: index.c *
* comments: Indexing a Prolog predicate *
* *
* Last rev: $Date: 2008-03-25 16:45:53 $,$Author: vsc $ *
* Last rev: $Date: 2008-04-14 21:20:35 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.198 2008/03/25 16:45:53 vsc
* make or-parallelism compile again
*
* Revision 1.197 2008/02/14 14:35:13 vsc
* fixes for indexing code.
*
@ -6603,8 +6606,8 @@ static_clause(yamop *ipc, PredEntry *ap)
if ((fls & StaticMask) == StaticMask &&
!(fls & (MegaMask|SwitchRootMask|SwitchTableMask|DynamicMask|IndexMask|DBClMask|LogUpdMask|LogUpdRuleMask|DirtyMask))) {
if (ap->PredFlags & SourcePredFlag) {
if ((char *)c->usc.ClSource < (char *)c+c->ClSize &&
valid_instructions(ipc, c->ClCode))
if ((c->usc.ClPred == ap || (char *)c->usc.ClSource < (char *)c+c->ClSize)
&& valid_instructions(ipc, c->ClCode))
return c;
} else {
if (c->usc.ClPred == ap &&

View File

@ -2353,8 +2353,8 @@ p_alarm(void)
new.it_interval.tv_sec = 0;
new.it_interval.tv_usec = 0;
new.it_value.tv_sec = IntegerOfTerm(ARG1);
new.it_value.tv_usec = IntegerOfTerm(ARG2);
new.it_value.tv_sec = IntegerOfTerm(t);
new.it_value.tv_usec = IntegerOfTerm(t2);
if (setitimer(ITIMER_REAL, &new, &old) < 0) {
#if HAVE_STRERROR
Yap_Error(OPERATING_SYSTEM_ERROR, ARG1, "setitimer: %s", strerror(errno));

View File

@ -1,4 +1,4 @@
/* $Id: jpl.c,v 1.14 2007-10-09 11:43:43 vsc Exp $
/* $Id: jpl.c,v 1.15 2008-04-14 21:20:36 vsc Exp $
Part of JPL -- SWI-Prolog/Java interface
@ -5486,7 +5486,7 @@ static
{ "jni_func", 4, jni_func_2_plc, 0 },
{ "jni_func", 5, jni_func_3_plc, 0 },
{ "jni_func", 6, jni_func_4_plc, 0 },
#if IN_YAP
#ifdef __YAP_PROLOG__
{ "jni_SetByteArrayElement", 3, jni_SetByteArrayElement, 0 },
{ "jni_SetDoubleArrayElement", 3, jni_SetDoubleArrayElement, 0 },
#endif

View File

@ -17,8 +17,6 @@ cd ../LGPL
splat
cd chr
splat
cd ../clpr
splat
cd ../clp
splat
cd ../JPL
@ -35,6 +33,16 @@ cd ../../../../pillow
splat
cd examples
splat
cd ../../../GPL
splat
cd clpqr
splat
cd clpq
splat
cd ../clpqr
splat
cd ../clpr
splat
cd ../../../include
splat
cd ../CLPBN
@ -120,5 +128,5 @@ cd ../../..
if test "$1" = "--small"; then
tar cvzf "$version"-small.tar.gz --exclude=CVS "$version"/{Artistic,COPYING,INSTALL,README*,changes*,config*,install-sh,Makefile.in,.depend.in,distribute,C,H,VC,console,docs/*.tex,include,library,misc,pl,LGPL/README,LGPL/pillow/[C-Z]*,LGPL/pillow/*.pl,LGPL/pillow/doc/*info*,LGPL/JPL/jpl.yap,LGPL/JPL/jpl_paths.yap.in,LGPL/JPL/Makefile.in,LGPL/JPL/java,LGPL/JPL/src,build-distr,OPTYap,BEAM,MYDDAS,LGPL/clpr,LGPL/chr,LGPL/clp,CLPBN} --exclude=CLPBN/clpbn/backup --exclude=CLPBN/clpbn/devel --exclude=CLPBN/test
else
tar cvzf "$version".tar.gz --exclude=CVS "$version"/{Artistic,COPYING,INSTALL,README*,changes*,config*,install-sh,Makefile.in,.depend.in,distribute,C,H,VC,console,docs,include,library,misc,pl,LGPL/README,LGPL/pillow/[C-Z]*,LGPL/pillow/*.pl,LGPL/pillow/doc/*info*,LGPL/JPL/jpl.yap,LGPL/JPL/jpl_paths.yap.in,LGPL/JPL/Makefile.in,LGPL/JPL/java,LGPL/JPL/src,build-distr,build-distr,OPTYap,BEAM,MYDDAS,LGPL/clpr,LGPL/chr,LGPL/clp,CLPBN,Logtalk} --exclude=CLPBN/clpbn/backup --exclude=CLPBN/clpbn/devel --exclude=docs/index --exclude=CLPBN/test
tar cvzf "$version".tar.gz --exclude=CVS "$version"/{Artistic,COPYING,INSTALL,README*,changes*,config*,install-sh,Makefile.in,.depend.in,distribute,C,H,VC,console,docs,include,library,misc,pl,LGPL/README,LGPL/pillow/[C-Z]*,LGPL/pillow/*.pl,LGPL/pillow/doc/*info*,LGPL/*.pl,LGPL/Makefile.in,LGPL/JPL/jpl.yap,LGPL/JPL/jpl_paths.yap.in,LGPL/JPL/Makefile.in,LGPL/JPL/java,LGPL/JPL/src,build-distr,build-distr,OPTYap,BEAM,MYDDAS,LGPL/chr,GPL/Makefile.in,GPL/*.pl,GPL/clpqr,CLPBN,Logtalk} --exclude=CLPBN/clpbn/backup --exclude=CLPBN/clpbn/devel --exclude=docs/index --exclude=CLPBN/test
fi

View File

@ -861,7 +861,6 @@ predicate_property(Pred,Prop) :-
recorded('$module','$module'(_TFN,M,Publics),_),
lists:memberchk(N/A,Publics), !.
'$predicate_property'(P,Mod,_,number_of_clauses(NCl)) :-
write(P:Mod),nl,
'$number_of_clauses'(P,Mod,NCl).