fix anon vars in new syntax_error

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@452 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-04-23 22:43:10 +00:00
parent 13a8ebfe34
commit 778dbbde3e
5 changed files with 13 additions and 2 deletions

View File

@ -363,6 +363,7 @@ Error (yap_error_number type, Term where, char *format,...)
PrologMode &= ~AbortMode; PrologMode &= ~AbortMode;
PrologMode |= InErrorMode; PrologMode |= InErrorMode;
} else { } else {
plwrite( where, DebugPutc, 0);
where = CopyTerm(Deref(where)); where = CopyTerm(Deref(where));
if (IsVarTerm(where)) { if (IsVarTerm(where)) {
/* we must be careful someone gave us a copy to a local variable */ /* we must be careful someone gave us a copy to a local variable */

View File

@ -2692,6 +2692,7 @@ syntax_error (TokEntry * tokptr)
start = tokptr->TokPos; start = tokptr->TokPos;
clean_vars(VarTable); clean_vars(VarTable);
clean_vars(AnonVarTable);
while (1) { while (1) {
Term ts[2]; Term ts[2];

View File

@ -108,7 +108,7 @@ copy_complex_term(register CELL *pt0, register CELL *pt0_end, CELL *ptf, CELL *H
pt0_end = ap2 + 1; pt0_end = ap2 + 1;
ptf = H; ptf = H;
H += 2; H += 2;
if (H > ENV - 2048) { if (H > ASP - 2048) {
goto overflow; goto overflow;
} }
} else if (IsApplTerm(d0)) { } else if (IsApplTerm(d0)) {
@ -161,7 +161,7 @@ copy_complex_term(register CELL *pt0, register CELL *pt0_end, CELL *ptf, CELL *H
H[0] = (CELL)f; H[0] = (CELL)f;
ptf = H+1; ptf = H+1;
H += 1+d0; H += 1+d0;
if (H > ENV - 2048) { if (H > ASP - 2048) {
goto overflow; goto overflow;
} }
} else { } else {

View File

@ -7411,6 +7411,12 @@ already. The variable @var{Val} unifies with a value for key @var{Key},
and the variable @var{NewTree} unifies with the new tree. The predicate and the variable @var{NewTree} unifies with the new tree. The predicate
will fail if @var{Key} is not present. will fail if @var{Key} is not present.
@item splay_init(-@var{NewTree})
@findex splay_init/3
@snindex splay_init/3
@cnindex splay_init/3
Initialise a new splay tree.
@item splay_insert(+@var{Key},?@var{Val},+@var{Tree},-@var{NewTree}) @item splay_insert(+@var{Key},?@var{Val},+@var{Tree},-@var{NewTree})
@findex splay_insert/4 @findex splay_insert/4
@snindex splay_insert/4 @snindex splay_insert/4

View File

@ -19,6 +19,7 @@
splay_access/5, splay_access/5,
splay_insert/4, splay_insert/4,
splay_del/3, splay_del/3,
splay_init/1,
splay_join/3, splay_join/3,
splay_split/5]). splay_split/5]).
@ -184,3 +185,5 @@ join(Left-n(Y, VY, n(X, VX, C, B), NL), n(X, VX, C, n(Y, VY, B, n(Z, VZ, A1, A2)
join(Left-NL, n(Z, VZ,A1, A2), Right, New). join(Left-NL, n(Z, VZ,A1, A2), Right, New).
splay_init(_).