logical update semantics:

instance of erased element should fail;
  garbage collection now tries to recover space for code.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@512 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2002-06-04 00:46:32 +00:00
parent c2b588795e
commit d5a459bb08
9 changed files with 55 additions and 12 deletions

View File

@@ -3684,10 +3684,18 @@ p_instance(void)
{
Term TermDB;
Term t1 = Deref(ARG1);
DBRef dbr;
if (IsVarTerm(t1) || !IsDBRefTerm(t1))
return (FALSE);
while ((TermDB = GetDBTerm(DBRefOfTerm(t1))) == (CELL)0) {
dbr = DBRefOfTerm(t1);
if (dbr->Flags & ErasedMask) {
/* instance/2 of erased terms should fail under log update
semantics */
if (dbr->Parent != NULL && dbr->Parent->KindOfPE & LogUpdDBBit)
return(FALSE);
}
while ((TermDB = GetDBTerm(dbr)) == (CELL)0) {
/* oops, we are in trouble, not enough stack space */
gc(2, ENV, P);
t1 = Deref(ARG1);