Fix: eclipse >u. into >y_u.
This commit is contained in:
248
C/cdmgr.c
248
C/cdmgr.c
@@ -537,14 +537,14 @@ PredForChoicePt(yamop *p_code) {
|
||||
case _Nstop:
|
||||
return NULL;
|
||||
case _jump:
|
||||
p_code = p_code->u.l.l;
|
||||
p_code = p_code->y_u.l.l;
|
||||
break;
|
||||
case _retry_me:
|
||||
case _trust_me:
|
||||
return p_code->u.Otapl.p;
|
||||
return p_code->y_u.Otapl.p;
|
||||
case _retry_exo:
|
||||
case _retry_all_exo:
|
||||
return p_code->u.lp.p;
|
||||
return p_code->y_u.lp.p;
|
||||
case _try_logical:
|
||||
case _retry_logical:
|
||||
case _trust_logical:
|
||||
@@ -552,7 +552,7 @@ PredForChoicePt(yamop *p_code) {
|
||||
case _count_trust_logical:
|
||||
case _profiled_retry_logical:
|
||||
case _profiled_trust_logical:
|
||||
return p_code->u.OtaLl.d->ClPred;
|
||||
return p_code->y_u.OtaLl.d->ClPred;
|
||||
#ifdef TABLING
|
||||
case _trie_trust_var:
|
||||
case _trie_retry_var:
|
||||
@@ -596,19 +596,19 @@ PredForChoicePt(yamop *p_code) {
|
||||
/* compile error --> return ENV_ToP(gc_B->cp_cp); */
|
||||
#endif /* TABLING */
|
||||
case _or_else:
|
||||
if (p_code == p_code->u.Osblp.l) {
|
||||
if (p_code == p_code->y_u.Osblp.l) {
|
||||
/* repeat */
|
||||
Atom at = AtomRepeatSpace;
|
||||
return RepPredProp(PredPropByAtom(at, PROLOG_MODULE));
|
||||
} else {
|
||||
return p_code->u.Osblp.p0;
|
||||
return p_code->y_u.Osblp.p0;
|
||||
}
|
||||
break;
|
||||
case _or_last:
|
||||
#ifdef YAPOR
|
||||
return p_code->u.Osblp.p0;
|
||||
return p_code->y_u.Osblp.p0;
|
||||
#else
|
||||
return p_code->u.p.p;
|
||||
return p_code->y_u.p.p;
|
||||
#endif /* YAPOR */
|
||||
break;
|
||||
case _count_retry_me:
|
||||
@@ -619,7 +619,7 @@ PredForChoicePt(yamop *p_code) {
|
||||
p_code = NEXTOP(p_code,l);
|
||||
break;
|
||||
default:
|
||||
return p_code->u.Otapl.p;
|
||||
return p_code->y_u.Otapl.p;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
@@ -1040,7 +1040,7 @@ Yap_IPred(PredEntry *p, UInt NSlots, yamop *next_pc)
|
||||
IPred(p, NSlots, next_pc);
|
||||
}
|
||||
|
||||
#define GONEXT(TYPE) code_p = ((yamop *)(&(code_p->u.TYPE.next)))
|
||||
#define GONEXT(TYPE) code_p = ((yamop *)(&(code_p->y_u.TYPE.next)))
|
||||
|
||||
static void
|
||||
RemoveMainIndex(PredEntry *ap)
|
||||
@@ -1097,29 +1097,29 @@ static yamop *
|
||||
release_wcls(yamop *cop, OPCODE ecs)
|
||||
{
|
||||
if (cop->opc == ecs) {
|
||||
cop->u.sssllp.s3--;
|
||||
if (!cop->u.sssllp.s3) {
|
||||
UInt sz = (UInt)NEXTOP((yamop *)NULL,sssllp)+cop->u.sssllp.s1*sizeof(yamop *);
|
||||
cop->y_u.sssllp.s3--;
|
||||
if (!cop->y_u.sssllp.s3) {
|
||||
UInt sz = (UInt)NEXTOP((yamop *)NULL,sssllp)+cop->y_u.sssllp.s1*sizeof(yamop *);
|
||||
LOCK(ExpandClausesListLock);
|
||||
#ifdef DEBUG
|
||||
Yap_expand_clauses_sz -= sz;
|
||||
Yap_ExpandClauses--;
|
||||
#endif
|
||||
if (cop->u.sssllp.p->PredFlags & LogUpdatePredFlag) {
|
||||
if (cop->y_u.sssllp.p->PredFlags & LogUpdatePredFlag) {
|
||||
Yap_LUIndexSpace_EXT -= sz;
|
||||
} else {
|
||||
Yap_IndexSpace_EXT -= sz;
|
||||
}
|
||||
if (ExpandClausesFirst == cop)
|
||||
ExpandClausesFirst = cop->u.sssllp.snext;
|
||||
ExpandClausesFirst = cop->y_u.sssllp.snext;
|
||||
if (ExpandClausesLast == cop) {
|
||||
ExpandClausesLast = cop->u.sssllp.sprev;
|
||||
ExpandClausesLast = cop->y_u.sssllp.sprev;
|
||||
}
|
||||
if (cop->u.sssllp.sprev) {
|
||||
cop->u.sssllp.sprev->u.sssllp.snext = cop->u.sssllp.snext;
|
||||
if (cop->y_u.sssllp.sprev) {
|
||||
cop->y_u.sssllp.sprev->y_u.sssllp.snext = cop->y_u.sssllp.snext;
|
||||
}
|
||||
if (cop->u.sssllp.snext) {
|
||||
cop->u.sssllp.snext->u.sssllp.sprev = cop->u.sssllp.sprev;
|
||||
if (cop->y_u.sssllp.snext) {
|
||||
cop->y_u.sssllp.snext->y_u.sssllp.sprev = cop->y_u.sssllp.sprev;
|
||||
}
|
||||
UNLOCK(ExpandClausesListLock);
|
||||
Yap_InformOfRemoval(cop);
|
||||
@@ -1163,12 +1163,12 @@ cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *suspend_code
|
||||
case _retry2:
|
||||
case _retry3:
|
||||
case _retry4:
|
||||
decrease_ref_counter(ipc->u.l.l, beg, end, suspend_code);
|
||||
decrease_ref_counter(ipc->y_u.l.l, beg, end, suspend_code);
|
||||
ipc = NEXTOP(ipc,l);
|
||||
break;
|
||||
case _retry:
|
||||
case _trust:
|
||||
decrease_ref_counter(ipc->u.Otapl.d, beg, end, suspend_code);
|
||||
decrease_ref_counter(ipc->y_u.Otapl.d, beg, end, suspend_code);
|
||||
ipc = NEXTOP(ipc,Otapl);
|
||||
break;
|
||||
case _try_clause:
|
||||
@@ -1185,8 +1185,8 @@ cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *suspend_code
|
||||
case _profiled_retry_logical:
|
||||
{
|
||||
yamop *oipc = ipc;
|
||||
decrease_ref_counter(ipc->u.OtaLl.d->ClCode, beg, end, suspend_code);
|
||||
ipc = ipc->u.OtaLl.n;
|
||||
decrease_ref_counter(ipc->y_u.OtaLl.d->ClCode, beg, end, suspend_code);
|
||||
ipc = ipc->y_u.OtaLl.n;
|
||||
Yap_LUIndexSpace_CP -= (UInt)NEXTOP((yamop *)NULL,OtaLl);
|
||||
Yap_FreeCodeSpace((ADDR)oipc);
|
||||
#ifdef DEBUG
|
||||
@@ -1202,35 +1202,35 @@ cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *suspend_code
|
||||
Yap_DirtyCps--;
|
||||
Yap_FreedCps++;
|
||||
#endif
|
||||
decrease_ref_counter(ipc->u.OtILl.d->ClCode, beg, end, suspend_code);
|
||||
decrease_ref_counter(ipc->y_u.OtILl.d->ClCode, beg, end, suspend_code);
|
||||
Yap_LUIndexSpace_CP -= (UInt)NEXTOP((yamop *)NULL,OtILl);
|
||||
Yap_FreeCodeSpace((ADDR)ipc);
|
||||
return;
|
||||
case _enter_lu_pred:
|
||||
{
|
||||
yamop *oipc = ipc;
|
||||
if (ipc->u.Illss.I->ClFlags & InUseMask || ipc->u.Illss.I->ClRefCount)
|
||||
if (ipc->y_u.Illss.I->ClFlags & InUseMask || ipc->y_u.Illss.I->ClRefCount)
|
||||
return;
|
||||
#ifdef DEBUG
|
||||
Yap_DirtyCps+=ipc->u.Illss.s;
|
||||
Yap_LiveCps-=ipc->u.Illss.s;
|
||||
Yap_DirtyCps+=ipc->y_u.Illss.s;
|
||||
Yap_LiveCps-=ipc->y_u.Illss.s;
|
||||
#endif
|
||||
ipc = ipc->u.Illss.l1;
|
||||
ipc = ipc->y_u.Illss.l1;
|
||||
/* in case we visit again */
|
||||
oipc->u.Illss.l1 = FAILCODE;
|
||||
oipc->u.Illss.s = 0;
|
||||
oipc->u.Illss.e = 0;
|
||||
oipc->y_u.Illss.l1 = FAILCODE;
|
||||
oipc->y_u.Illss.s = 0;
|
||||
oipc->y_u.Illss.e = 0;
|
||||
}
|
||||
break;
|
||||
case _try_in:
|
||||
case _jump:
|
||||
case _jump_if_var:
|
||||
ipc->u.l.l = release_wcls(ipc->u.l.l, ecs);
|
||||
ipc->y_u.l.l = release_wcls(ipc->y_u.l.l, ecs);
|
||||
ipc = NEXTOP(ipc,l);
|
||||
break;
|
||||
/* instructions type xl */
|
||||
case _jump_if_nonvar:
|
||||
ipc->u.xll.l1 = release_wcls(ipc->u.xll.l1, ecs);
|
||||
ipc->y_u.xll.l1 = release_wcls(ipc->y_u.xll.l1, ecs);
|
||||
ipc = NEXTOP(ipc,xll);
|
||||
break;
|
||||
/* instructions type p */
|
||||
@@ -1239,31 +1239,31 @@ cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *suspend_code
|
||||
break;
|
||||
/* instructions type e */
|
||||
case _switch_on_type:
|
||||
ipc->u.llll.l1 = release_wcls(ipc->u.llll.l1, ecs);
|
||||
ipc->u.llll.l2 = release_wcls(ipc->u.llll.l2, ecs);
|
||||
ipc->u.llll.l3 = release_wcls(ipc->u.llll.l3, ecs);
|
||||
ipc->u.llll.l4 = release_wcls(ipc->u.llll.l4, ecs);
|
||||
ipc->y_u.llll.l1 = release_wcls(ipc->y_u.llll.l1, ecs);
|
||||
ipc->y_u.llll.l2 = release_wcls(ipc->y_u.llll.l2, ecs);
|
||||
ipc->y_u.llll.l3 = release_wcls(ipc->y_u.llll.l3, ecs);
|
||||
ipc->y_u.llll.l4 = release_wcls(ipc->y_u.llll.l4, ecs);
|
||||
ipc = NEXTOP(ipc,llll);
|
||||
break;
|
||||
case _switch_list_nl:
|
||||
ipc->u.ollll.l1 = release_wcls(ipc->u.ollll.l1, ecs);
|
||||
ipc->u.ollll.l2 = release_wcls(ipc->u.ollll.l2, ecs);
|
||||
ipc->u.ollll.l3 = release_wcls(ipc->u.ollll.l3, ecs);
|
||||
ipc->u.ollll.l4 = release_wcls(ipc->u.ollll.l4, ecs);
|
||||
ipc->y_u.ollll.l1 = release_wcls(ipc->y_u.ollll.l1, ecs);
|
||||
ipc->y_u.ollll.l2 = release_wcls(ipc->y_u.ollll.l2, ecs);
|
||||
ipc->y_u.ollll.l3 = release_wcls(ipc->y_u.ollll.l3, ecs);
|
||||
ipc->y_u.ollll.l4 = release_wcls(ipc->y_u.ollll.l4, ecs);
|
||||
ipc = NEXTOP(ipc,ollll);
|
||||
break;
|
||||
case _switch_on_arg_type:
|
||||
ipc->u.xllll.l1 = release_wcls(ipc->u.xllll.l1, ecs);
|
||||
ipc->u.xllll.l2 = release_wcls(ipc->u.xllll.l2, ecs);
|
||||
ipc->u.xllll.l3 = release_wcls(ipc->u.xllll.l3, ecs);
|
||||
ipc->u.xllll.l4 = release_wcls(ipc->u.xllll.l4, ecs);
|
||||
ipc->y_u.xllll.l1 = release_wcls(ipc->y_u.xllll.l1, ecs);
|
||||
ipc->y_u.xllll.l2 = release_wcls(ipc->y_u.xllll.l2, ecs);
|
||||
ipc->y_u.xllll.l3 = release_wcls(ipc->y_u.xllll.l3, ecs);
|
||||
ipc->y_u.xllll.l4 = release_wcls(ipc->y_u.xllll.l4, ecs);
|
||||
ipc = NEXTOP(ipc,xllll);
|
||||
break;
|
||||
case _switch_on_sub_arg_type:
|
||||
ipc->u.sllll.l1 = release_wcls(ipc->u.sllll.l1, ecs);
|
||||
ipc->u.sllll.l2 = release_wcls(ipc->u.sllll.l2, ecs);
|
||||
ipc->u.sllll.l3 = release_wcls(ipc->u.sllll.l3, ecs);
|
||||
ipc->u.sllll.l4 = release_wcls(ipc->u.sllll.l4, ecs);
|
||||
ipc->y_u.sllll.l1 = release_wcls(ipc->y_u.sllll.l1, ecs);
|
||||
ipc->y_u.sllll.l2 = release_wcls(ipc->y_u.sllll.l2, ecs);
|
||||
ipc->y_u.sllll.l3 = release_wcls(ipc->y_u.sllll.l3, ecs);
|
||||
ipc->y_u.sllll.l4 = release_wcls(ipc->y_u.sllll.l4, ecs);
|
||||
ipc = NEXTOP(ipc,sllll);
|
||||
break;
|
||||
case _if_not_then:
|
||||
@@ -1276,7 +1276,7 @@ cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *suspend_code
|
||||
case _if_cons:
|
||||
case _go_on_cons:
|
||||
/* make sure we don't leave dangling references to memory that is going to be removed */
|
||||
ipc->u.sssl.l = NULL;
|
||||
ipc->y_u.sssl.l = NULL;
|
||||
ipc = NEXTOP(ipc,sssl);
|
||||
break;
|
||||
case _op_fail:
|
||||
@@ -1755,9 +1755,9 @@ add_first_dynamic(PredEntry *p, yamop *cp, int spy_flag)
|
||||
p->OpcodeOfPred = ncp->opc = Yap_opcode(_spy_or_trymark);
|
||||
else
|
||||
p->OpcodeOfPred = ncp->opc = Yap_opcode(_try_and_mark);
|
||||
ncp->u.Otapl.s = p->ArityOfPE;
|
||||
ncp->u.Otapl.p = p;
|
||||
ncp->u.Otapl.d = cp;
|
||||
ncp->y_u.Otapl.s = p->ArityOfPE;
|
||||
ncp->y_u.Otapl.p = p;
|
||||
ncp->y_u.Otapl.d = cp;
|
||||
/* This is the point we enter the code */
|
||||
p->cs.p_code.TrueCodeOfPred = p->CodeOfPred = ncp;
|
||||
p->cs.p_code.NOfClauses = 1;
|
||||
@@ -1777,9 +1777,9 @@ add_first_dynamic(PredEntry *p, yamop *cp, int spy_flag)
|
||||
cp->opc = Yap_opcode(_count_retry_and_mark);
|
||||
else
|
||||
cp->opc = Yap_opcode(_retry_and_mark);
|
||||
cp->u.Otapl.s = p->ArityOfPE;
|
||||
cp->u.Otapl.p = p;
|
||||
cp->u.Otapl.d = ncp;
|
||||
cp->y_u.Otapl.s = p->ArityOfPE;
|
||||
cp->y_u.Otapl.p = p;
|
||||
cp->y_u.Otapl.d = ncp;
|
||||
/* also, keep a backpointer for the days you delete the clause */
|
||||
ClauseCodeToDynamicClause(cp)->ClPrevious = ncp;
|
||||
/* Don't forget to say who is the only clause for the predicate so
|
||||
@@ -1796,7 +1796,7 @@ add_first_dynamic(PredEntry *p, yamop *cp, int spy_flag)
|
||||
/* and close the code */
|
||||
ncp = NEXTOP(ncp,e);
|
||||
ncp->opc = Yap_opcode(_Ystop);
|
||||
ncp->u.l.l = cl->ClCode;
|
||||
ncp->y_u.l.l = cl->ClCode;
|
||||
}
|
||||
|
||||
/* p is already locked */
|
||||
@@ -1840,7 +1840,7 @@ asserta_stat_clause(PredEntry *p, yamop *q, int spy_flag)
|
||||
p->OpcodeOfPred = INDEX_OPCODE;
|
||||
p->CodeOfPred = (yamop *)(&(p->OpcodeOfPred));
|
||||
}
|
||||
p->cs.p_code.LastClause->u.Otapl.d = q;
|
||||
p->cs.p_code.LastClause->y_u.Otapl.d = q;
|
||||
}
|
||||
|
||||
/* p is already locked */
|
||||
@@ -1856,22 +1856,22 @@ asserta_dynam_clause(PredEntry *p, yamop *cp)
|
||||
cl->ClPrevious = (yamop *)(p->CodeOfPred);
|
||||
cl->ClFlags |= DynamicMask;
|
||||
UNLOCK(ClauseCodeToDynamicClause(p->cs.p_code.FirstClause)->ClLock);
|
||||
q->u.Otapl.d = p->cs.p_code.FirstClause;
|
||||
q->u.Otapl.s = p->ArityOfPE;
|
||||
q->u.Otapl.p = p;
|
||||
q->y_u.Otapl.d = p->cs.p_code.FirstClause;
|
||||
q->y_u.Otapl.s = p->ArityOfPE;
|
||||
q->y_u.Otapl.p = p;
|
||||
if (p->PredFlags & ProfiledPredFlag)
|
||||
cp->opc = Yap_opcode(_profiled_retry_and_mark);
|
||||
else if (p->PredFlags & CountPredFlag)
|
||||
cp->opc = Yap_opcode(_count_retry_and_mark);
|
||||
else
|
||||
cp->opc = Yap_opcode(_retry_and_mark);
|
||||
cp->u.Otapl.s = p->ArityOfPE;
|
||||
cp->u.Otapl.p = p;
|
||||
cp->y_u.Otapl.s = p->ArityOfPE;
|
||||
cp->y_u.Otapl.p = p;
|
||||
p->cs.p_code.FirstClause = cp;
|
||||
q = p->CodeOfPred;
|
||||
q->u.Otapl.d = cp;
|
||||
q->u.Otapl.s = p->ArityOfPE;
|
||||
q->u.Otapl.p = p;
|
||||
q->y_u.Otapl.d = cp;
|
||||
q->y_u.Otapl.s = p->ArityOfPE;
|
||||
q->y_u.Otapl.p = p;
|
||||
|
||||
}
|
||||
|
||||
@@ -1931,7 +1931,7 @@ assertz_dynam_clause(PredEntry *p, yamop *cp)
|
||||
|
||||
q = p->cs.p_code.LastClause;
|
||||
LOCK(ClauseCodeToDynamicClause(q)->ClLock);
|
||||
q->u.Otapl.d = cp;
|
||||
q->y_u.Otapl.d = cp;
|
||||
p->cs.p_code.LastClause = cp;
|
||||
/* also, keep backpointers for the days we'll delete all the clause */
|
||||
cl->ClPrevious = q;
|
||||
@@ -1944,9 +1944,9 @@ assertz_dynam_clause(PredEntry *p, yamop *cp)
|
||||
q->opc = Yap_opcode(_count_retry_and_mark);
|
||||
else
|
||||
q->opc = Yap_opcode(_retry_and_mark);
|
||||
q->u.Otapl.d = p->CodeOfPred;
|
||||
q->u.Otapl.s = p->ArityOfPE;
|
||||
q->u.Otapl.p = p;
|
||||
q->y_u.Otapl.d = p->CodeOfPred;
|
||||
q->y_u.Otapl.s = p->ArityOfPE;
|
||||
q->y_u.Otapl.p = p;
|
||||
p->cs.p_code.NOfClauses++;
|
||||
}
|
||||
|
||||
@@ -3553,16 +3553,16 @@ search_for_static_predicate_in_use(PredEntry *p, int check_everything)
|
||||
if (p->PredFlags & LogUpdatePredFlag) {
|
||||
LogUpdIndex *cl = ClauseCodeToLogUpdIndex(code_beg);
|
||||
if (find_owner_log_index(cl, code_p))
|
||||
b_ptr->cp_ap = cur_log_upd_clause(pe, b_ptr->cp_ap->u.Otapl.d);
|
||||
b_ptr->cp_ap = cur_log_upd_clause(pe, b_ptr->cp_ap->y_u.Otapl.d);
|
||||
} else if (p->PredFlags & MegaClausePredFlag) {
|
||||
StaticIndex *cl = ClauseCodeToStaticIndex(code_beg);
|
||||
if (find_owner_static_index(cl, code_p))
|
||||
b_ptr->cp_ap = cur_clause(pe, b_ptr->cp_ap->u.Otapl.d);
|
||||
b_ptr->cp_ap = cur_clause(pe, b_ptr->cp_ap->y_u.Otapl.d);
|
||||
} else {
|
||||
/* static clause */
|
||||
StaticIndex *cl = ClauseCodeToStaticIndex(code_beg);
|
||||
if (find_owner_static_index(cl, code_p)) {
|
||||
b_ptr->cp_ap = cur_clause(pe, b_ptr->cp_ap->u.Otapl.d);
|
||||
b_ptr->cp_ap = cur_clause(pe, b_ptr->cp_ap->y_u.Otapl.d);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4151,7 +4151,7 @@ found_idb_clause(yamop *pc, CODEADDR *startp, CODEADDR *endp)
|
||||
static PredEntry *
|
||||
found_expand_index(yamop *pc, CODEADDR *startp, CODEADDR *endp, yamop *codeptr USES_REGS)
|
||||
{
|
||||
PredEntry *pp = codeptr->u.sssllp.p;
|
||||
PredEntry *pp = codeptr->y_u.sssllp.p;
|
||||
if (pc == codeptr) {
|
||||
*startp = (CODEADDR)codeptr;
|
||||
*endp = (CODEADDR)NEXTOP(codeptr,sssllp);
|
||||
@@ -4199,30 +4199,30 @@ found_ystop(yamop *pc, int clause_code, CODEADDR *startp, CODEADDR *endp, PredEn
|
||||
}
|
||||
if (!pp) {
|
||||
/* must be an index */
|
||||
PredEntry **pep = (PredEntry **)pc->u.l.l;
|
||||
PredEntry **pep = (PredEntry **)pc->y_u.l.l;
|
||||
pp = pep[-1];
|
||||
}
|
||||
if (pp->PredFlags & LogUpdatePredFlag) {
|
||||
if (clause_code) {
|
||||
LogUpdClause *cl = ClauseCodeToLogUpdClause(pc->u.l.l);
|
||||
LogUpdClause *cl = ClauseCodeToLogUpdClause(pc->y_u.l.l);
|
||||
*startp = (CODEADDR)cl;
|
||||
*endp = (CODEADDR)cl+cl->ClSize;
|
||||
} else {
|
||||
LogUpdIndex *cl = ClauseCodeToLogUpdIndex(pc->u.l.l);
|
||||
LogUpdIndex *cl = ClauseCodeToLogUpdIndex(pc->y_u.l.l);
|
||||
*startp = (CODEADDR)cl;
|
||||
*endp = (CODEADDR)cl+cl->ClSize;
|
||||
}
|
||||
} else if (pp->PredFlags & DynamicPredFlag) {
|
||||
DynamicClause *cl = ClauseCodeToDynamicClause(pc->u.l.l);
|
||||
DynamicClause *cl = ClauseCodeToDynamicClause(pc->y_u.l.l);
|
||||
*startp = (CODEADDR)cl;
|
||||
*endp = (CODEADDR)cl+cl->ClSize;
|
||||
} else {
|
||||
if (clause_code) {
|
||||
StaticClause *cl = ClauseCodeToStaticClause(pc->u.l.l);
|
||||
StaticClause *cl = ClauseCodeToStaticClause(pc->y_u.l.l);
|
||||
*startp = (CODEADDR)cl;
|
||||
*endp = (CODEADDR)cl+cl->ClSize;
|
||||
} else {
|
||||
StaticIndex *cl = ClauseCodeToStaticIndex(pc->u.l.l);
|
||||
StaticIndex *cl = ClauseCodeToStaticIndex(pc->y_u.l.l);
|
||||
*startp = (CODEADDR)cl;
|
||||
*endp = (CODEADDR)cl+cl->ClSize;
|
||||
}
|
||||
@@ -5150,7 +5150,7 @@ Yap_UpdateTimestamps(PredEntry *ap)
|
||||
case _trust_logical:
|
||||
case _count_trust_logical:
|
||||
case _profiled_trust_logical:
|
||||
if (bptr->cp_ap->u.OtaLl.d->ClPred == ap) {
|
||||
if (bptr->cp_ap->y_u.OtaLl.d->ClPred == ap) {
|
||||
UInt ts = IntegerOfTerm(bptr->cp_args[ar]);
|
||||
if (ts != arp[0]) {
|
||||
if (arp-HR < 1024) {
|
||||
@@ -5214,7 +5214,7 @@ Yap_UpdateTimestamps(PredEntry *ap)
|
||||
case _trust_logical:
|
||||
case _count_trust_logical:
|
||||
case _profiled_trust_logical:
|
||||
if (bptr->cp_ap->u.OtaLl.d->ClPred == ap) {
|
||||
if (bptr->cp_ap->y_u.OtaLl.d->ClPred == ap) {
|
||||
UInt ts = IntegerOfTerm(bptr->cp_args[ar]);
|
||||
while (ts != arp[0])
|
||||
arp--;
|
||||
@@ -5579,9 +5579,9 @@ index_ssz(StaticIndex *x, PredEntry *pe)
|
||||
}
|
||||
/* expand clause blocks */
|
||||
while (ep) {
|
||||
if (ep->u.sssllp.p == pe)
|
||||
sz += (UInt)NEXTOP((yamop *)NULL,sssllp)+ep->u.sssllp.s1*sizeof(yamop *);
|
||||
ep = ep->u.sssllp.snext;
|
||||
if (ep->y_u.sssllp.p == pe)
|
||||
sz += (UInt)NEXTOP((yamop *)NULL,sssllp)+ep->y_u.sssllp.s1*sizeof(yamop *);
|
||||
ep = ep->y_u.sssllp.snext;
|
||||
}
|
||||
/* main indexing tree */
|
||||
sz += tree_index_ssz(x);
|
||||
@@ -5787,7 +5787,7 @@ p_env_info( USES_REGS1 )
|
||||
env_b = MkIntegerTerm((Int)(LCL0-(CELL *)env[E_CB]));
|
||||
env_cp = (yamop *)env[E_CP];
|
||||
|
||||
/* pe = PREVOP(env_cp,Osbpp)->u.Osbpp.p0; */
|
||||
/* pe = PREVOP(env_cp,Osbpp)->y_u.Osbpp.p0; */
|
||||
taddr = MkIntegerTerm((Int)env);
|
||||
return Yap_unify(ARG3,MkIntegerTerm((Int)env_cp)) &&
|
||||
Yap_unify(ARG2, taddr) &&
|
||||
@@ -5800,7 +5800,7 @@ p_cpc_info( USES_REGS1 )
|
||||
PredEntry *pe;
|
||||
yamop *ipc = (yamop *)IntegerOfTerm(Deref(ARG1));
|
||||
|
||||
pe = PREVOP(ipc,Osbpp)->u.Osbpp.p0;
|
||||
pe = PREVOP(ipc,Osbpp)->y_u.Osbpp.p0;
|
||||
return UnifyPredInfo(pe, 2 PASS_REGS) &&
|
||||
Yap_unify(ARG5,MkIntegerTerm(ClauseId(ipc,pe)));
|
||||
}
|
||||
@@ -5903,21 +5903,21 @@ p_choicepoint_info( USES_REGS1 )
|
||||
case _count_trust_logical:
|
||||
case _profiled_retry_logical:
|
||||
case _profiled_trust_logical:
|
||||
ncl = ipc->u.OtaLl.d->ClCode;
|
||||
pe = ipc->u.OtaLl.d->ClPred;
|
||||
ncl = ipc->y_u.OtaLl.d->ClCode;
|
||||
pe = ipc->y_u.OtaLl.d->ClPred;
|
||||
t = BuildActivePred(pe, cptr->cp_args);
|
||||
break;
|
||||
case _or_else:
|
||||
pe = ipc->u.Osblp.p0;
|
||||
pe = ipc->y_u.Osblp.p0;
|
||||
ncl = ipc;
|
||||
t = Yap_MkNewApplTerm(FunctorOr, 2);
|
||||
break;
|
||||
|
||||
case _or_last:
|
||||
#ifdef YAPOR
|
||||
pe = ipc->u.Osblp.p0;
|
||||
pe = ipc->y_u.Osblp.p0;
|
||||
#else
|
||||
pe = ipc->u.p.p;
|
||||
pe = ipc->y_u.p.p;
|
||||
#endif
|
||||
ncl = ipc;
|
||||
t = Yap_MkNewApplTerm(FunctorOr, 2);
|
||||
@@ -5929,26 +5929,26 @@ p_choicepoint_info( USES_REGS1 )
|
||||
t = TermNil;
|
||||
ipc = NEXTOP(ipc,l);
|
||||
if (!ncl)
|
||||
ncl = ipc->u.Otapl.d;
|
||||
ncl = ipc->y_u.Otapl.d;
|
||||
go_on = TRUE;
|
||||
break;
|
||||
case _jump:
|
||||
pe = NULL;
|
||||
t = TermNil;
|
||||
ipc = ipc->u.l.l;
|
||||
ipc = ipc->y_u.l.l;
|
||||
go_on = TRUE;
|
||||
break;
|
||||
case _retry_c:
|
||||
case _retry_userc:
|
||||
ncl = NEXTOP(ipc,OtapFs);
|
||||
pe = ipc->u.OtapFs.p;
|
||||
pe = ipc->y_u.OtapFs.p;
|
||||
t = BuildActivePred(pe, cptr->cp_args);
|
||||
break;
|
||||
case _retry_profiled:
|
||||
case _count_retry:
|
||||
pe = NULL;
|
||||
t = TermNil;
|
||||
ncl = ipc->u.Otapl.d;
|
||||
ncl = ipc->y_u.Otapl.d;
|
||||
ipc = NEXTOP(ipc,p);
|
||||
go_on = TRUE;
|
||||
break;
|
||||
@@ -5963,14 +5963,14 @@ p_choicepoint_info( USES_REGS1 )
|
||||
case _retry:
|
||||
case _trust:
|
||||
if (!ncl)
|
||||
ncl = ipc->u.Otapl.d;
|
||||
pe = ipc->u.Otapl.p;
|
||||
ncl = ipc->y_u.Otapl.d;
|
||||
pe = ipc->y_u.Otapl.p;
|
||||
t = BuildActivePred(pe, cptr->cp_args);
|
||||
break;
|
||||
case _retry_exo:
|
||||
case _retry_all_exo:
|
||||
ncl = NULL;
|
||||
pe = ipc->u.lp.p;
|
||||
pe = ipc->y_u.lp.p;
|
||||
t = BuildActivePred(pe, cptr->cp_args);
|
||||
break;
|
||||
case _Nstop:
|
||||
@@ -6031,61 +6031,61 @@ store_dbcl_size(yamop *pc, UInt arity, Term t0, PredEntry *pe)
|
||||
case 2:
|
||||
pc->opc = Yap_opcode(_get_2atoms);
|
||||
DerefAndCheck(t, tp[0]);
|
||||
pc->u.cc.c1 = t;
|
||||
pc->y_u.cc.c1 = t;
|
||||
DerefAndCheck(t, tp[1]);
|
||||
pc->u.cc.c2 = t;
|
||||
pc->y_u.cc.c2 = t;
|
||||
pc = NEXTOP(pc,cc);
|
||||
break;
|
||||
case 3:
|
||||
pc->opc = Yap_opcode(_get_3atoms);
|
||||
DerefAndCheck(t, tp[0]);
|
||||
pc->u.ccc.c1 = t;
|
||||
pc->y_u.ccc.c1 = t;
|
||||
DerefAndCheck(t, tp[1]);
|
||||
pc->u.ccc.c2 = t;
|
||||
pc->y_u.ccc.c2 = t;
|
||||
DerefAndCheck(t, tp[2]);
|
||||
pc->u.ccc.c3 = t;
|
||||
pc->y_u.ccc.c3 = t;
|
||||
pc = NEXTOP(pc,ccc);
|
||||
break;
|
||||
case 4:
|
||||
pc->opc = Yap_opcode(_get_4atoms);
|
||||
DerefAndCheck(t, tp[0]);
|
||||
pc->u.cccc.c1 = t;
|
||||
pc->y_u.cccc.c1 = t;
|
||||
DerefAndCheck(t, tp[1]);
|
||||
pc->u.cccc.c2 = t;
|
||||
pc->y_u.cccc.c2 = t;
|
||||
DerefAndCheck(t, tp[2]);
|
||||
pc->u.cccc.c3 = t;
|
||||
pc->y_u.cccc.c3 = t;
|
||||
DerefAndCheck(t, tp[3]);
|
||||
pc->u.cccc.c4 = t;
|
||||
pc->y_u.cccc.c4 = t;
|
||||
pc = NEXTOP(pc,cccc);
|
||||
break;
|
||||
case 5:
|
||||
pc->opc = Yap_opcode(_get_5atoms);
|
||||
DerefAndCheck(t, tp[0]);
|
||||
pc->u.ccccc.c1 = t;
|
||||
pc->y_u.ccccc.c1 = t;
|
||||
DerefAndCheck(t, tp[1]);
|
||||
pc->u.ccccc.c2 = t;
|
||||
pc->y_u.ccccc.c2 = t;
|
||||
DerefAndCheck(t, tp[2]);
|
||||
pc->u.ccccc.c3 = t;
|
||||
pc->y_u.ccccc.c3 = t;
|
||||
DerefAndCheck(t, tp[3]);
|
||||
pc->u.ccccc.c4 = t;
|
||||
pc->y_u.ccccc.c4 = t;
|
||||
DerefAndCheck(t, tp[4]);
|
||||
pc->u.ccccc.c5 = t;
|
||||
pc->y_u.ccccc.c5 = t;
|
||||
pc = NEXTOP(pc,ccccc);
|
||||
break;
|
||||
case 6:
|
||||
pc->opc = Yap_opcode(_get_6atoms);
|
||||
DerefAndCheck(t, tp[0]);
|
||||
pc->u.cccccc.c1 = t;
|
||||
pc->y_u.cccccc.c1 = t;
|
||||
DerefAndCheck(t, tp[1]);
|
||||
pc->u.cccccc.c2 = t;
|
||||
pc->y_u.cccccc.c2 = t;
|
||||
DerefAndCheck(t, tp[2]);
|
||||
pc->u.cccccc.c3 = t;
|
||||
pc->y_u.cccccc.c3 = t;
|
||||
DerefAndCheck(t, tp[3]);
|
||||
pc->u.cccccc.c4 = t;
|
||||
pc->y_u.cccccc.c4 = t;
|
||||
DerefAndCheck(t, tp[4]);
|
||||
pc->u.cccccc.c5 = t;
|
||||
pc->y_u.cccccc.c5 = t;
|
||||
DerefAndCheck(t, tp[5]);
|
||||
pc->u.cccccc.c6 = t;
|
||||
pc->y_u.cccccc.c6 = t;
|
||||
pc = NEXTOP(pc,cccccc);
|
||||
break;
|
||||
default:
|
||||
@@ -6094,12 +6094,12 @@ store_dbcl_size(yamop *pc, UInt arity, Term t0, PredEntry *pe)
|
||||
for (i = 0; i< arity; i++) {
|
||||
pc->opc = Yap_opcode(_get_atom);
|
||||
#if PRECOMPUTE_REGADDRESS
|
||||
pc->u.xc.x = (CELL) (XREGS + (i+1));
|
||||
pc->y_u.xc.x = (CELL) (XREGS + (i+1));
|
||||
#else
|
||||
pc->u.xc.x = i+1;
|
||||
pc->y_u.xc.x = i+1;
|
||||
#endif
|
||||
DerefAndCheck(t, tp[0]);
|
||||
pc->u.xc.c = t;
|
||||
pc->y_u.xc.c = t;
|
||||
tp++;
|
||||
pc = NEXTOP(pc,xc);
|
||||
}
|
||||
@@ -6107,7 +6107,7 @@ store_dbcl_size(yamop *pc, UInt arity, Term t0, PredEntry *pe)
|
||||
break;
|
||||
}
|
||||
pc->opc = Yap_opcode(_procceed);
|
||||
pc->u.p.p = pe;
|
||||
pc->y_u.p.p = pe;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user