minor bug fixes

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1934 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2007-09-24 09:02:33 +00:00
parent 0dc508eda0
commit ec2a3ab3b5
2 changed files with 18 additions and 13 deletions

View File

@ -10,8 +10,12 @@
* *
* File: absmi.c *
* comments: Portable abstract machine interpreter *
* Last rev: $Date: 2007-06-04 12:28:01 $,$Author: vsc $ *
* Last rev: $Date: 2007-09-24 09:02:31 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.223 2007/06/04 12:28:01 vsc
* interface speedups
* bad error message in X is foo>>2.
*
* Revision 1.222 2007/05/01 21:18:19 vsc
* fix bug in saving P at p_eq (obs from Frabrizio Riguzzi)
*
@ -1468,7 +1472,8 @@ Yap_absmi(int inp)
/* enter logical pred */
BOp(alloc_for_logical_pred, EC);
/* say that an environment is using this clause */
check_trail(TR);
/* say that an environment is using this clause */
/* we have our own copy for the clause */
#if defined(YAPOR) || defined(THREADS)
{
@ -8093,6 +8098,7 @@ Yap_absmi(int inp)
/* enter logical pred */
BOp(enter_lu_pred, Ill);
check_trail(TR);
/* mark the indexing code */
{
LogUpdIndex *cl = PREG->u.Ill.I;

View File

@ -303,6 +303,16 @@ GrowArena(Term arena, CELL *pt, UInt old_size, UInt size, UInt arity)
}
size = size/sizeof(CELL);
arena = XREGS[arity+1];
#if 0
/* try to recover some room */
if (arena == GlobalArena) {
if (!Yap_gc(arity+1, ENV, P)) {
Yap_Error(OUT_OF_STACK_ERROR,TermNil,Yap_ErrorMessage);
return FALSE;
}
}
arena = XREGS[arity+1];
#endif
}
CreateNewArena(ArenaPt(arena), size+old_size);
return TRUE;
@ -856,17 +866,6 @@ CopyTermToArena(Term t, Term arena, int share, UInt arity, Term *newarena, Term
case -1:
if (arena == GlobalArena)
GlobalArenaOverflows++;
/* handle arena overflow */
/* first, take care of useless stuff */
/*
if (!Yap_gc(arity+4, ENV, P)) {
Yap_Error(OUT_OF_STACK_ERROR,TermNil,Yap_ErrorMessage);
return 0L;
}
arena = XREGS[arity+2];
newarena = (Term *)XREGS[arity+3];
old_top = ArenaLimit(*newarena);
*/
if (!GrowArena(arena, old_top, old_size, min_grow, arity+4)) {
Yap_Error(OUT_OF_STACK_ERROR, TermNil, Yap_ErrorMessage);
return 0L;