Merge branch 'master' of ssh://yap.git.sourceforge.net/gitroot/yap/yap-6.3
This commit is contained in:
commit
417bbd6d46
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -28,3 +28,6 @@
|
||||
[submodule "packages/plunit"]
|
||||
path = packages/plunit
|
||||
url = ssh://vsc@yap.git.sourceforge.net/gitroot/yap/plunit
|
||||
[submodule "packages/R"]
|
||||
path = packages/R
|
||||
url = ssh://vsc@yap.git.sourceforge.net/gitroot/yap/R
|
||||
|
5
C/agc.c
5
C/agc.c
@ -427,6 +427,11 @@ clean_atoms(void)
|
||||
HashPtr++;
|
||||
}
|
||||
clean_atom_list(&INVISIBLECHAIN);
|
||||
{
|
||||
AtomHashEntry list;
|
||||
list.Entry = SWI_Blobs;
|
||||
clean_atom_list(&list);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -188,10 +188,6 @@ Yap_WakeUp(CELL *pt0) {
|
||||
CACHE_REGS
|
||||
CELL d0 = *pt0;
|
||||
RESET_VARIABLE(pt0);
|
||||
/* did we trail */
|
||||
if (pt0 < HB) {
|
||||
TR--;
|
||||
}
|
||||
WakeAttVar(pt0, d0 PASS_REGS);
|
||||
}
|
||||
|
||||
|
@ -467,7 +467,7 @@ copy_complex_term(register CELL *pt0, register CELL *pt0_end, int share, int cop
|
||||
*ptf++ = (CELL) ptd0;
|
||||
} else {
|
||||
#if COROUTINING
|
||||
if (copy_att_vars && FastIsAttachedTerm((CELL)ptd0)) {
|
||||
if (copy_att_vars && GlobalIsAttachedTerm((CELL)ptd0)) {
|
||||
/* if unbound, call the standard copy term routine */
|
||||
struct cp_frame *bp;
|
||||
CELL new;
|
||||
@ -590,7 +590,7 @@ CopyTermToArena(Term t, Term arena, int share, int copy_att_vars, UInt arity, Te
|
||||
ASP = ArenaLimit(arena);
|
||||
H = HB = ArenaPt(arena);
|
||||
#if COROUTINING
|
||||
if (FastIsAttachedTerm(t)) {
|
||||
if (GlobalIsAttachedTerm(t)) {
|
||||
CELL *Hi;
|
||||
|
||||
*H = t;
|
||||
|
@ -1172,7 +1172,7 @@ mark_variable(CELL_PTR current USES_REGS)
|
||||
next = GET_NEXT(ccur);
|
||||
|
||||
if (IsVarTerm(ccur)) {
|
||||
if (IN_BETWEEN(Yap_GlobalBase,current,H) && FastIsAttVar(current) && current==next) {
|
||||
if (IN_BETWEEN(Yap_GlobalBase,current,H) && GlobalIsAttVar(current) && current==next) {
|
||||
if (next < H0) POP_CONTINUATION();
|
||||
if (!UNMARKED_MARK(next-1,local_bp)) {
|
||||
total_marked++;
|
||||
@ -1656,7 +1656,7 @@ mark_trail(tr_fr_ptr trail_ptr, tr_fr_ptr trail_base, CELL *gc_H, choiceptr gc_B
|
||||
nondeterministically, I know that after backtracking it will be back to be an unbound variable.
|
||||
The ideal solution would be to unbind all variables. The current solution is to
|
||||
remark it as an attributed variable */
|
||||
if (IN_BETWEEN(Yap_GlobalBase,hp,H) && FastIsAttVar(hp) && !UNMARKED_MARK(hp-1,Yap_bp)) {
|
||||
if (IN_BETWEEN(Yap_GlobalBase,hp,H) && GlobalIsAttVar(hp) && !UNMARKED_MARK(hp-1,Yap_bp)) {
|
||||
total_marked++;
|
||||
PUSH_POINTER(hp-1 PASS_REGS);
|
||||
if (hp-1 < HGEN) {
|
||||
@ -1697,7 +1697,7 @@ mark_trail(tr_fr_ptr trail_ptr, tr_fr_ptr trail_base, CELL *gc_H, choiceptr gc_B
|
||||
/* can safely ignore this */
|
||||
CELL *cptr = RepPair(trail_cell);
|
||||
if (IN_BETWEEN(Yap_GlobalBase,cptr,H) &&
|
||||
FastIsAttVar(cptr)) {
|
||||
GlobalIsAttVar(cptr)) {
|
||||
TrailTerm(trail_base) = (CELL)cptr;
|
||||
mark_external_reference(&TrailTerm(trail_base) PASS_REGS);
|
||||
TrailTerm(trail_base) = trail_cell;
|
||||
@ -2486,7 +2486,7 @@ sweep_trail(choiceptr gc_B, tr_fr_ptr old_TR USES_REGS)
|
||||
CELL *pt0 = RepPair(trail_cell);
|
||||
CELL flags;
|
||||
|
||||
if (IN_BETWEEN(Yap_GlobalBase, pt0, H) && FastIsAttVar(pt0)) {
|
||||
if (IN_BETWEEN(Yap_GlobalBase, pt0, H) && GlobalIsAttVar(pt0)) {
|
||||
TrailTerm(dest) = trail_cell;
|
||||
/* be careful with partial gc */
|
||||
if (HEAP_PTR(TrailTerm(dest))) {
|
||||
|
@ -2910,10 +2910,12 @@ int Yap_IsGroundTerm(Term t)
|
||||
}
|
||||
}
|
||||
if (out < 0) {
|
||||
*H++ = t;
|
||||
if (!Yap_ExpandPreAllocCodeSpace(0, NULL, TRUE)) {
|
||||
Yap_Error(OUT_OF_AUXSPACE_ERROR, ARG1, "overflow in ground");
|
||||
return FALSE;
|
||||
}
|
||||
t = *--H;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1110,8 +1110,8 @@ Yap_plwrite(Term t, int (*mywrite) (int, wchar_t), int flags, int priority)
|
||||
wglb.Quote_illegal = flags & Quote_illegal_f;
|
||||
wglb.Handle_vars = flags & Handle_vars_f;
|
||||
wglb.Use_portray = flags & Use_portray_f;
|
||||
wglb.MaxDepth = 0L;
|
||||
wglb.MaxArgs = 0L;
|
||||
wglb.MaxDepth = 3L;
|
||||
wglb.MaxArgs = 3L;
|
||||
/* notice: we must have ASP well set when using portray, otherwise
|
||||
we cannot make recursive Prolog calls */
|
||||
wglb.keep_terms = (flags & (Use_portray_f|To_heap_f));
|
||||
|
@ -67,10 +67,11 @@ IsAttVar (CELL *pt)
|
||||
return (pt)[-1] == (CELL)attvar_e && pt < H;
|
||||
}
|
||||
|
||||
inline EXTERN int GlobalIsAttVar (CELL *pt);
|
||||
|
||||
inline EXTERN int
|
||||
FastIsAttVar (CELL *pt)
|
||||
GlobalIsAttVar (CELL *pt)
|
||||
{
|
||||
CACHE_REGS
|
||||
return (pt)[-1] == (CELL)attvar_e;
|
||||
}
|
||||
|
||||
@ -517,9 +518,9 @@ IsAttachedTerm (Term t)
|
||||
inline EXTERN Int IsAttachedTerm (Term);
|
||||
|
||||
inline EXTERN Int
|
||||
FastIsAttachedTerm (Term t)
|
||||
GlobalIsAttachedTerm (Term t)
|
||||
{
|
||||
return (Int) ((IsVarTerm (t) && FastIsAttVar(VarOfTerm(t))));
|
||||
return (Int) ((IsVarTerm (t) && GlobalIsAttVar(VarOfTerm(t))));
|
||||
}
|
||||
|
||||
|
||||
|
@ -974,13 +974,13 @@ Macros to check the limits of stacks
|
||||
|
||||
#define UnifyGlobalCells(a, b) \
|
||||
if ((b) > (a)) { \
|
||||
if (FastIsAttVar(b) && !FastIsAttVar(a)) { \
|
||||
if (GlobalIsAttVar(b) && !GlobalIsAttVar(a)) { \
|
||||
Bind_Global((a),(CELL)(b)); \
|
||||
} else { \
|
||||
Bind_Global((b),(CELL)(a)); \
|
||||
} \
|
||||
} else if ((b) < (a)) { \
|
||||
if (FastIsAttVar(a) && !FastIsAttVar(b)) { \
|
||||
if (GlobalIsAttVar(a) && !GlobalIsAttVar(b)) { \
|
||||
Bind_Global((b),(CELL)(a)); \
|
||||
} else { \
|
||||
Bind_Global((a),(CELL)(b)); \
|
||||
@ -990,8 +990,8 @@ Macros to check the limits of stacks
|
||||
#define UnifyGlobalCellToCell(b, a) \
|
||||
if ((a) < H) { /* two globals */ \
|
||||
UnifyGlobalCells(a,b); \
|
||||
} else { \
|
||||
Bind_Local((a),(CELL)(b)); \
|
||||
} else { \
|
||||
Bind_Local((a),(CELL)(b)); \
|
||||
}
|
||||
|
||||
#define UnifyCells(a, b) \
|
||||
|
@ -274,14 +274,13 @@ Binding Macros for Multiple Assignment Variables.
|
||||
|
||||
extern void Yap_WakeUp(CELL *v);
|
||||
|
||||
#define Bind(A,D) { *(A) = (D); TRAIL(A,D); if (FastIsAttVar(A)) Yap_WakeUp(A); }
|
||||
#define Bind_Local(A,D) { TRAIL_LOCAL(A,D); *(A) = (D); }
|
||||
#define Bind_Global(A,D) { *(A) = (D); if (GlobalIsAttVar(A)) Yap_WakeUp(A); else TRAIL_GLOBAL(A,D); }
|
||||
#define Bind(A,D) { *(A) = (D); if (A < H) { if (GlobalIsAttVar(A)) Yap_WakeUp(A); else TRAIL_GLOBAL(A,D); } else { TRAIL_LOCAL(A,D); } }
|
||||
#define Bind_NonAtt(A,D) { *(A) = (D); TRAIL(A,D); }
|
||||
#define Bind_Global(A,D) { *(A) = (D); TRAIL_GLOBAL(A,D); if (FastIsAttVar(A)) Yap_WakeUp(A); }
|
||||
#define Bind_Global_NonAtt(A,D) { *(A) = (D); TRAIL_GLOBAL(A,D); }
|
||||
#define Bind_and_Trail(A,D) { *(A) = (D); DO_TRAIL(A, D); }
|
||||
|
||||
#define Bind_Local(A,D) { TRAIL_LOCAL(A,D); *(A) = (D); }
|
||||
|
||||
|
||||
#define MaBind(VP,D) { MATRAIL((VP),*(VP),(D)); *(VP) = (D); }
|
||||
|
||||
|
@ -667,6 +667,7 @@ all: startup.yss
|
||||
@INSTALL_DLLS@ (cd packages/clib; $(MAKE))
|
||||
@INSTALL_DLLS@ (cd packages/http; $(MAKE))
|
||||
@INSTALL_DLLS@ (cd packages/plunit; $(MAKE))
|
||||
@INSTALL_DLLS@ (cd packages/R; $(MAKE))
|
||||
@INSTALL_DLLS@ (cd packages/RDF; $(MAKE))
|
||||
@INSTALL_DLLS@ (cd packages/semweb; $(MAKE))
|
||||
@INSTALL_DLLS@ (cd packages/sgml; $(MAKE))
|
||||
@ -725,6 +726,7 @@ install_unix: startup.yss libYap.a
|
||||
@INSTALL_DLLS@ (cd packages/http; $(MAKE) install)
|
||||
@INSTALL_DLLS@ (cd packages/plunit; $(MAKE) install)
|
||||
@INSTALL_DLLS@ (cd packages/sgml; $(MAKE) install)
|
||||
@INSTALL_DLLS@ (cd packages/R; $(MAKE) install)
|
||||
@INSTALL_DLLS@ (cd packages/RDF; $(MAKE) install)
|
||||
@INSTALL_DLLS@ (cd packages/semweb; $(MAKE) install)
|
||||
@INSTALL_DLLS@ (cd packages/zlib; $(MAKE) @ZLIB_INSTALL@)
|
||||
@ -775,6 +777,7 @@ install_win32: startup.yss
|
||||
(cd packages/clib; $(MAKE) install)
|
||||
(cd packages/plunit; $(MAKE) install)
|
||||
(cd packages/http; $(MAKE) install)
|
||||
(cd packages/R; $(MAKE) install)
|
||||
(cd packages/RDF; $(MAKE) install)
|
||||
(cd packages/sgml; $(MAKE) install)
|
||||
(cd packages/semweb; $(MAKE) install)
|
||||
@ -832,6 +835,7 @@ clean: clean_docs
|
||||
@INSTALL_DLLS@ (cd packages/clib; $(MAKE) clean)
|
||||
@INSTALL_DLLS@ (cd packages/http; $(MAKE) clean)
|
||||
@INSTALL_DLLS@ (cd packages/plunit; $(MAKE) clean)
|
||||
@INSTALL_DLLS@ (cd packages/R; $(MAKE) clean)
|
||||
@INSTALL_DLLS@ (cd packages/RDF; $(MAKE) clean)
|
||||
@INSTALL_DLLS@ (cd packages/semweb; $(MAKE) clean)
|
||||
@INSTALL_DLLS@ (cd packages/sgml; $(MAKE) clean)
|
||||
|
@ -1968,6 +1968,7 @@ mkdir -p packages/PLStream/libtai
|
||||
mkdir -p packages/plunit
|
||||
mkdir -p packages/ProbLog
|
||||
mkdir -p packages/ProbLog/simplecudd
|
||||
mkdir -p packages/R
|
||||
mkdir -p packages/RDF
|
||||
mkdir -p packages/semweb
|
||||
mkdir -p packages/sgml
|
||||
@ -2003,6 +2004,7 @@ AC_CONFIG_FILES([packages/meld/Makefile])
|
||||
AC_CONFIG_FILES([packages/PLStream/libtai/Makefile])
|
||||
AC_CONFIG_FILES([packages/plunit/Makefile])
|
||||
AC_CONFIG_FILES([packages/ProbLog/Makefile ])
|
||||
AC_CONFIG_FILES([packages/R/Makefile])
|
||||
AC_CONFIG_FILES([packages/RDF/Makefile])
|
||||
AC_CONFIG_FILES([packages/semweb/Makefile])
|
||||
AC_CONFIG_FILES([packages/sgml/Makefile])
|
||||
|
@ -56,7 +56,6 @@ lookupBlob(void *blob, size_t len, PL_blob_t *type)
|
||||
{
|
||||
BlobPropEntry *b;
|
||||
AtomEntry *ae;
|
||||
|
||||
if (type->flags & PL_BLOB_UNIQUE) {
|
||||
/* just keep a linked chain for now */
|
||||
ae = SWI_Blobs;
|
||||
|
@ -47,6 +47,8 @@ CMFLAGS=@SHLIB_CFLAGS@
|
||||
CIFLAGS=
|
||||
CFLAGS=$(COFLAGS) $(CWFLAGS) $(CMFLAGS) $(CIFLAGS) $(PKGCFLAGS) @DEFS@
|
||||
|
||||
RUNTEX = true
|
||||
|
||||
LDSOFLAGS=@LDFLAGS@ @EXTRA_LIBS_FOR_SWIDLLS@
|
||||
LDFLAGS=$(PKGLDFLAGS)
|
||||
|
||||
|
@ -27,8 +27,6 @@ INSTALL_SCRIPT=@INSTALL_SCRIPT@
|
||||
################################################################
|
||||
|
||||
LATEX=latex
|
||||
RUNTEX=../../man/runtex
|
||||
DOC2TEX=../../man/doc2tex
|
||||
TEX=$(DOC).tex $(SUBTEX)
|
||||
DVI=$(DOC).dvi
|
||||
PDF=$(DOC).pdf
|
||||
|
1
packages/R
Submodule
1
packages/R
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 66edc33d2d03b356751a7059dc36e3328183fa40
|
Reference in New Issue
Block a user