Fix: eclipse >u. into >y_u.
This commit is contained in:
parent
e3674e1223
commit
a76b6d23dc
@ -463,7 +463,7 @@ current_arity(void)
|
||||
{
|
||||
CACHE_REGS
|
||||
if (P && PREVOP(P,Osbpp)->opc == Yap_opcode(_call_usercpred)) {
|
||||
return PREVOP(P,Osbpp)->u.Osbpp.p->ArityOfPE;
|
||||
return PREVOP(P,Osbpp)->y_u.Osbpp.p->ArityOfPE;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
@ -476,7 +476,7 @@ doexpand(UInt sz)
|
||||
UInt arity;
|
||||
|
||||
if (P && PREVOP(P,Osbpp)->opc == Yap_opcode(_call_usercpred)) {
|
||||
arity = PREVOP(P,Osbpp)->u.Osbpp.p->ArityOfPE;
|
||||
arity = PREVOP(P,Osbpp)->y_u.Osbpp.p->ArityOfPE;
|
||||
} else {
|
||||
arity = 0;
|
||||
}
|
||||
@ -1068,7 +1068,7 @@ YAP_ExtraSpaceCut(void)
|
||||
void *ptr;
|
||||
BACKUP_B();
|
||||
|
||||
ptr = (void *)(((CELL *)(Yap_REGS.CUT_C_TOP))-(((yamop *)Yap_REGS.CUT_C_TOP->try_userc_cut_yamop)->u.OtapFs.extra));
|
||||
ptr = (void *)(((CELL *)(Yap_REGS.CUT_C_TOP))-(((yamop *)Yap_REGS.CUT_C_TOP->try_userc_cut_yamop)->y_u.OtapFs.extra));
|
||||
|
||||
RECOVER_B();
|
||||
return(ptr);
|
||||
@ -1083,7 +1083,7 @@ YAP_ExtraSpace(void)
|
||||
BACKUP_H();
|
||||
|
||||
/* find a pointer to extra space allocable */
|
||||
ptr = (void *)((CELL *)(B+1)+P->u.OtapFs.s);
|
||||
ptr = (void *)((CELL *)(B+1)+P->y_u.OtapFs.s);
|
||||
B->cp_h = HR;
|
||||
|
||||
RECOVER_H();
|
||||
|
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;
|
||||
}
|
||||
|
||||
|
@ -75,22 +75,22 @@ Yap_ClauseListExtend(clause_list_t cl, void * clause, void *pred)
|
||||
fclause = ptr[-1];
|
||||
code_p = (yamop *)(ptr-1);
|
||||
code_p->opc = Yap_opcode(_try_clause);
|
||||
code_p->u.Otapl.d = fclause;
|
||||
code_p->u.Otapl.s = ap->ArityOfPE;
|
||||
code_p->u.Otapl.p = ap;
|
||||
code_p->y_u.Otapl.d = fclause;
|
||||
code_p->y_u.Otapl.s = ap->ArityOfPE;
|
||||
code_p->y_u.Otapl.p = ap;
|
||||
#ifdef TABLING
|
||||
code_p->u.Otapl.te = ap->TableOfPred;
|
||||
code_p->y_u.Otapl.te = ap->TableOfPred;
|
||||
#endif
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(code_p, 0);
|
||||
#endif /* YAPOR */
|
||||
code_p = NEXTOP(code_p,Otapl);
|
||||
code_p->opc = Yap_opcode(_trust);
|
||||
code_p->u.Otapl.d = clause;
|
||||
code_p->u.Otapl.s = ap->ArityOfPE;
|
||||
code_p->u.Otapl.p = ap;
|
||||
code_p->y_u.Otapl.d = clause;
|
||||
code_p->y_u.Otapl.s = ap->ArityOfPE;
|
||||
code_p->y_u.Otapl.p = ap;
|
||||
#ifdef TABLING
|
||||
code_p->u.Otapl.te = ap->TableOfPred;
|
||||
code_p->y_u.Otapl.te = ap->TableOfPred;
|
||||
#endif
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(code_p, 0);
|
||||
@ -100,11 +100,11 @@ Yap_ClauseListExtend(clause_list_t cl, void * clause, void *pred)
|
||||
|
||||
if (!(code_p = (yamop *)extend_blob(cl->start,((CELL)NEXTOP((yamop *)NULL,Otapl))/sizeof(CELL) PASS_REGS))) return FALSE;
|
||||
code_p->opc = Yap_opcode(_trust);
|
||||
code_p->u.Otapl.d = clause;
|
||||
code_p->u.Otapl.s = ap->ArityOfPE;
|
||||
code_p->u.Otapl.p = ap;
|
||||
code_p->y_u.Otapl.d = clause;
|
||||
code_p->y_u.Otapl.s = ap->ArityOfPE;
|
||||
code_p->y_u.Otapl.p = ap;
|
||||
#ifdef TABLING
|
||||
code_p->u.Otapl.te = ap->TableOfPred;
|
||||
code_p->y_u.Otapl.te = ap->TableOfPred;
|
||||
#endif
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(code_p, 0);
|
||||
|
32
C/dbase.c
32
C/dbase.c
@ -3614,14 +3614,14 @@ index_sz(LogUpdIndex *x)
|
||||
endop = Yap_opcode(_profiled_trust_logical);
|
||||
else
|
||||
endop = Yap_opcode(_trust_logical);
|
||||
start = start->u.Illss.l1;
|
||||
if (start->u.Illss.s) do {
|
||||
start = start->y_u.Illss.l1;
|
||||
if (start->y_u.Illss.s) do {
|
||||
sz += (UInt)NEXTOP((yamop*)NULL,OtaLl);
|
||||
op1 = start->opc;
|
||||
count++;
|
||||
if (start->u.OtaLl.d->ClFlags & ErasedMask)
|
||||
if (start->y_u.OtaLl.d->ClFlags & ErasedMask)
|
||||
dead++;
|
||||
start = start->u.OtaLl.n;
|
||||
start = start->y_u.OtaLl.n;
|
||||
} while (op1 != endop);
|
||||
}
|
||||
x = x->ChildIndex;
|
||||
@ -3656,9 +3656,9 @@ lu_statistics(PredEntry *pe USES_REGS)
|
||||
/* expand clause blocks */
|
||||
yamop *ep = ExpandClausesFirst;
|
||||
while (ep) {
|
||||
if (ep->u.sssllp.p == pe)
|
||||
isz += (UInt)NEXTOP((yamop *)NULL,sssllp)+ep->u.sssllp.s1*sizeof(yamop *);
|
||||
ep = ep->u.sssllp.snext;
|
||||
if (ep->y_u.sssllp.p == pe)
|
||||
isz += (UInt)NEXTOP((yamop *)NULL,sssllp)+ep->y_u.sssllp.s1*sizeof(yamop *);
|
||||
ep = ep->y_u.sssllp.snext;
|
||||
}
|
||||
isz += index_sz(ClauseCodeToLogUpdIndex(pe->cs.p_code.TrueCodeOfPred));
|
||||
}
|
||||
@ -3915,7 +3915,7 @@ find_next_clause(DBRef ref0 USES_REGS)
|
||||
static Int
|
||||
p_jump_to_next_dynamic_clause( USES_REGS1 )
|
||||
{
|
||||
DBRef ref = (DBRef)(((yamop *)((CODEADDR)P-(CELL)NEXTOP((yamop *)NULL,Osbpp)))->u.Osbpp.bmap);
|
||||
DBRef ref = (DBRef)(((yamop *)((CODEADDR)P-(CELL)NEXTOP((yamop *)NULL,Osbpp)))->y_u.Osbpp.bmap);
|
||||
yamop *newp = find_next_clause(ref PASS_REGS);
|
||||
|
||||
if (newp == NULL) {
|
||||
@ -4070,20 +4070,20 @@ MyEraseClause(DynamicClause *clau USES_REGS)
|
||||
I don't need to lock the clause at this point because
|
||||
I am the last one using it anyway.
|
||||
*/
|
||||
ref = (DBRef) NEXTOP(clau->ClCode,Otapl)->u.Osbpp.bmap;
|
||||
ref = (DBRef) NEXTOP(clau->ClCode,Otapl)->y_u.Osbpp.bmap;
|
||||
/* don't do nothing if the reference is still in use */
|
||||
if (DBREF_IN_USE(ref))
|
||||
return;
|
||||
if ( P == clau->ClCode ) {
|
||||
yamop *np = RTRYCODE;
|
||||
/* make it the next alternative */
|
||||
np->u.Otapl.d = find_next_clause((DBRef)(NEXTOP(P,Otapl)->u.Osbpp.bmap) PASS_REGS);
|
||||
if (np->u.Otapl.d == NULL)
|
||||
np->y_u.Otapl.d = find_next_clause((DBRef)(NEXTOP(P,Otapl)->y_u.Osbpp.bmap) PASS_REGS);
|
||||
if (np->y_u.Otapl.d == NULL)
|
||||
P = (yamop *)FAILCODE;
|
||||
else {
|
||||
/* with same arity as before */
|
||||
np->u.Otapl.s = P->u.Otapl.s;
|
||||
np->u.Otapl.p = P->u.Otapl.p;
|
||||
np->y_u.Otapl.s = P->y_u.Otapl.s;
|
||||
np->y_u.Otapl.p = P->y_u.Otapl.p;
|
||||
/* go ahead and try this code */
|
||||
P = np;
|
||||
}
|
||||
@ -4134,7 +4134,7 @@ PrepareToEraseLogUpdClause(LogUpdClause *clau, DBRef dbr)
|
||||
if (p->cs.p_code.FirstClause != cl) {
|
||||
/* we are not the first clause... */
|
||||
yamop *prev_code_p = (yamop *)(dbr->Prev->Code);
|
||||
prev_code_p->u.Otapl.d = code_p->u.Otapl.d;
|
||||
prev_code_p->y_u.Otapl.d = code_p->y_u.Otapl.d;
|
||||
/* are we the last? */
|
||||
if (p->cs.p_code.LastClause == cl)
|
||||
p->cs.p_code.LastClause = prev_code_p;
|
||||
@ -4143,7 +4143,7 @@ PrepareToEraseLogUpdClause(LogUpdClause *clau, DBRef dbr)
|
||||
if (p->cs.p_code.LastClause == p->cs.p_code.FirstClause) {
|
||||
p->cs.p_code.LastClause = p->cs.p_code.FirstClause = NULL;
|
||||
} else {
|
||||
p->cs.p_code.FirstClause = code_p->u.Otapl.d;
|
||||
p->cs.p_code.FirstClause = code_p->y_u.Otapl.d;
|
||||
p->cs.p_code.FirstClause->opc =
|
||||
Yap_opcode(_try_me);
|
||||
}
|
||||
@ -4158,7 +4158,7 @@ PrepareToEraseLogUpdClause(LogUpdClause *clau, DBRef dbr)
|
||||
if (p->cs.p_code.FirstClause == p->cs.p_code.LastClause) {
|
||||
if (p->cs.p_code.FirstClause != NULL) {
|
||||
code_p = p->cs.p_code.FirstClause;
|
||||
code_p->u.Otapl.d = p->cs.p_code.FirstClause;
|
||||
code_p->y_u.Otapl.d = p->cs.p_code.FirstClause;
|
||||
p->cs.p_code.TrueCodeOfPred = NEXTOP(code_p, Otapl);
|
||||
if (p->PredFlags & (SpiedPredFlag|CountPredFlag|ProfiledPredFlag)) {
|
||||
p->OpcodeOfPred = Yap_opcode(_spy_pred);
|
||||
|
6
C/exec.c
6
C/exec.c
@ -1587,9 +1587,9 @@ static int is_cleanup_cp(choiceptr cp_b)
|
||||
if (cp_b->cp_ap->opc != ORLAST_OPCODE)
|
||||
return FALSE;
|
||||
#ifdef YAPOR
|
||||
pe = cp_b->cp_ap->u.Osblp.p0;
|
||||
pe = cp_b->cp_ap->y_u.Osblp.p0;
|
||||
#else
|
||||
pe = cp_b->cp_ap->u.p.p;
|
||||
pe = cp_b->cp_ap->y_u.p.p;
|
||||
#endif /* YAPOR */
|
||||
/*
|
||||
it has to be a cleanup and it has to be a completed goal,
|
||||
@ -1902,7 +1902,7 @@ Yap_dogc( int extra_args, Term *tp USES_REGS )
|
||||
int i;
|
||||
|
||||
if (P && PREVOP(P,Osbpp)->opc == Yap_opcode(_call_usercpred)) {
|
||||
arity = PREVOP(P,Osbpp)->u.Osbpp.p->ArityOfPE;
|
||||
arity = PREVOP(P,Osbpp)->y_u.Osbpp.p->ArityOfPE;
|
||||
nextpc = P;
|
||||
} else {
|
||||
arity = 0;
|
||||
|
16
C/exo.c
16
C/exo.c
@ -467,30 +467,30 @@ add_index(struct index_t **ip, UInt bmap, PredEntry *ap, UInt count)
|
||||
ptr->opc = Yap_opcode(_try_exo);
|
||||
else
|
||||
ptr->opc = Yap_opcode(_try_all_exo);
|
||||
ptr->u.lp.l = (yamop *)i;
|
||||
ptr->u.lp.p = ap;
|
||||
ptr->y_u.lp.l = (yamop *)i;
|
||||
ptr->y_u.lp.p = ap;
|
||||
ptr = NEXTOP(ptr, lp);
|
||||
if (count)
|
||||
ptr->opc = Yap_opcode(_retry_exo);
|
||||
else
|
||||
ptr->opc = Yap_opcode(_retry_all_exo);
|
||||
ptr->u.lp.p = ap;
|
||||
ptr->u.lp.l = (yamop *)i;
|
||||
ptr->y_u.lp.p = ap;
|
||||
ptr->y_u.lp.l = (yamop *)i;
|
||||
ptr = NEXTOP(ptr, lp);
|
||||
for (j = 0; j < i->arity; j++) {
|
||||
ptr->opc = Yap_opcode(_get_atom_exo);
|
||||
#if PRECOMPUTE_REGADDRESS
|
||||
ptr->u.x.x = (CELL) (XREGS + (j+1));
|
||||
ptr->y_u.x.x = (CELL) (XREGS + (j+1));
|
||||
#else
|
||||
ptr->u.x.x = j+1;
|
||||
ptr->y_u.x.x = j+1;
|
||||
#endif
|
||||
ptr = NEXTOP(ptr, x);
|
||||
}
|
||||
ptr->opc = Yap_opcode(_procceed);
|
||||
ptr->u.p.p = ap;
|
||||
ptr->y_u.p.p = ap;
|
||||
ptr = NEXTOP(ptr, p);
|
||||
ptr->opc = Yap_opcode(_Ystop);
|
||||
ptr->u.l.l = i->code;
|
||||
ptr->y_u.l.l = i->code;
|
||||
Yap_inform_profiler_of_clause((char *)(i->code), (char *)NEXTOP(ptr,l), ap, GPROF_INDEX);
|
||||
if (ap->PredFlags & UDIPredFlag) {
|
||||
Yap_new_udi_clause( ap, NULL, (Term)ip);
|
||||
|
@ -934,10 +934,10 @@ prof_alrm(int signo, siginfo_t *si, void *scv)
|
||||
|
||||
if (oop == _call_cpred || oop == _call_usercpred) {
|
||||
/* doing C-code */
|
||||
current_p = PREVOP(P,Osbpp)->u.Osbpp.p->CodeOfPred;
|
||||
current_p = PREVOP(P,Osbpp)->y_u.Osbpp.p->CodeOfPred;
|
||||
} else if ((oop = Yap_op_from_opcode(P->opc)) == _execute_cpred) {
|
||||
/* doing C-code */
|
||||
current_p = P->u.pp.p->CodeOfPred;
|
||||
current_p = P->y_u.pp.p->CodeOfPred;
|
||||
} else {
|
||||
current_p = P;
|
||||
}
|
||||
|
76
C/heapgc.c
76
C/heapgc.c
@ -451,7 +451,7 @@ push_registers(Int num_regs, yamop *nextop USES_REGS)
|
||||
/* push any live registers we might have hanging around */
|
||||
if (nextop->opc == Yap_opcode(_move_back) ||
|
||||
nextop->opc == Yap_opcode(_skip)) {
|
||||
CELL *lab = (CELL *)(nextop->u.l.l);
|
||||
CELL *lab = (CELL *)(nextop->y_u.l.l);
|
||||
CELL max = lab[0];
|
||||
Int curr = lab[1];
|
||||
lab += 2;
|
||||
@ -547,7 +547,7 @@ pop_registers(Int num_regs, yamop *nextop USES_REGS)
|
||||
/* pop any live registers we might have hanging around */
|
||||
if (nextop->opc == Yap_opcode(_move_back) ||
|
||||
nextop->opc == Yap_opcode(_skip)) {
|
||||
CELL *lab = (CELL *)(nextop->u.l.l);
|
||||
CELL *lab = (CELL *)(nextop->y_u.l.l);
|
||||
CELL max = lab[0];
|
||||
Int curr = lab[1];
|
||||
lab += 2;
|
||||
@ -2055,8 +2055,8 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose
|
||||
if (opnum == _or_else || opnum == _or_last) {
|
||||
/* ; choice point */
|
||||
mark_environments((CELL_PTR) (gc_B->cp_a1),
|
||||
-gc_B->cp_cp->u.Osblp.s / ((OPREG)sizeof(CELL)),
|
||||
gc_B->cp_cp->u.Osblp.bmap
|
||||
-gc_B->cp_cp->y_u.Osblp.s / ((OPREG)sizeof(CELL)),
|
||||
gc_B->cp_cp->y_u.Osblp.bmap
|
||||
PASS_REGS);
|
||||
} else {
|
||||
/* choicepoint with arguments */
|
||||
@ -2107,10 +2107,10 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose
|
||||
}
|
||||
B = old_b;
|
||||
}
|
||||
nargs = rtp->u.OtapFs.s+rtp->u.OtapFs.extra;
|
||||
nargs = rtp->y_u.OtapFs.s+rtp->y_u.OtapFs.extra;
|
||||
break;
|
||||
case _jump:
|
||||
rtp = rtp->u.l.l;
|
||||
rtp = rtp->y_u.l.l;
|
||||
op = rtp->opc;
|
||||
opnum = Yap_op_from_opcode(op);
|
||||
goto restart_cp;
|
||||
@ -2144,7 +2144,7 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose
|
||||
{
|
||||
CELL *vars_ptr, vars;
|
||||
vars_ptr = (CELL *)(GEN_CP(gc_B) + 1);
|
||||
nargs = rtp->u.Otapl.s;
|
||||
nargs = rtp->y_u.Otapl.s;
|
||||
while (nargs--) {
|
||||
mark_external_reference(vars_ptr PASS_REGS);
|
||||
vars_ptr++;
|
||||
@ -2307,15 +2307,15 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose
|
||||
on the other hand it's the only way we can be sure we can reclaim
|
||||
space
|
||||
*/
|
||||
yamop *end = rtp->u.OtaLl.n;
|
||||
yamop *end = rtp->y_u.OtaLl.n;
|
||||
while (end->opc != trust_lu &&
|
||||
end->opc != count_trust_lu &&
|
||||
end->opc != profiled_trust_lu )
|
||||
end = end->u.OtaLl.n;
|
||||
mark_ref_in_use((DBRef)end->u.OtILl.block PASS_REGS);
|
||||
end = end->y_u.OtaLl.n;
|
||||
mark_ref_in_use((DBRef)end->y_u.OtILl.block PASS_REGS);
|
||||
}
|
||||
/* mark timestamp */
|
||||
nargs = rtp->u.OtaLl.s+1;
|
||||
nargs = rtp->y_u.OtaLl.s+1;
|
||||
break;
|
||||
case _count_retry_logical:
|
||||
{
|
||||
@ -2324,13 +2324,13 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose
|
||||
on the other hand it's the only way we can be sure we can reclaim
|
||||
space
|
||||
*/
|
||||
yamop *end = rtp->u.OtaLl.n;
|
||||
yamop *end = rtp->y_u.OtaLl.n;
|
||||
while (Yap_op_from_opcode(end->opc) != _count_trust_logical)
|
||||
end = end->u.OtaLl.n;
|
||||
mark_ref_in_use((DBRef)end->u.OtILl.block PASS_REGS);
|
||||
end = end->y_u.OtaLl.n;
|
||||
mark_ref_in_use((DBRef)end->y_u.OtILl.block PASS_REGS);
|
||||
}
|
||||
/* mark timestamp */
|
||||
nargs = rtp->u.OtaLl.s+1;
|
||||
nargs = rtp->y_u.OtaLl.s+1;
|
||||
break;
|
||||
case _profiled_retry_logical:
|
||||
{
|
||||
@ -2339,28 +2339,28 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose
|
||||
on the other hand it's the only way we can be sure we can reclaim
|
||||
space
|
||||
*/
|
||||
yamop *end = rtp->u.OtaLl.n;
|
||||
yamop *end = rtp->y_u.OtaLl.n;
|
||||
while (Yap_op_from_opcode(end->opc) != _profiled_trust_logical)
|
||||
end = end->u.OtaLl.n;
|
||||
mark_ref_in_use((DBRef)end->u.OtILl.block PASS_REGS);
|
||||
end = end->y_u.OtaLl.n;
|
||||
mark_ref_in_use((DBRef)end->y_u.OtILl.block PASS_REGS);
|
||||
}
|
||||
/* mark timestamp */
|
||||
nargs = rtp->u.OtaLl.s+1;
|
||||
nargs = rtp->y_u.OtaLl.s+1;
|
||||
break;
|
||||
case _trust_logical:
|
||||
case _count_trust_logical:
|
||||
case _profiled_trust_logical:
|
||||
/* mark timestamp */
|
||||
mark_ref_in_use((DBRef)rtp->u.OtILl.block PASS_REGS);
|
||||
nargs = rtp->u.OtILl.d->ClPred->ArityOfPE+1;
|
||||
mark_ref_in_use((DBRef)rtp->y_u.OtILl.block PASS_REGS);
|
||||
nargs = rtp->y_u.OtILl.d->ClPred->ArityOfPE+1;
|
||||
break;
|
||||
case _retry_exo:
|
||||
case _retry_exo_udi:
|
||||
case _retry_all_exo:
|
||||
nargs = rtp->u.lp.p->ArityOfPE;
|
||||
nargs = rtp->y_u.lp.p->ArityOfPE;
|
||||
break;
|
||||
case _retry_udi:
|
||||
nargs = rtp->u.p.p->ArityOfPE;
|
||||
nargs = rtp->y_u.p.p->ArityOfPE;
|
||||
break;
|
||||
#ifdef DEBUG
|
||||
case _retry_me:
|
||||
@ -2375,14 +2375,14 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose
|
||||
fprintf(stderr,"OOPS in GC: gc not supported in this case!!!\n");
|
||||
exit(1);
|
||||
}
|
||||
nargs = rtp->u.Otapl.s;
|
||||
nargs = rtp->y_u.Otapl.s;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "OOPS in GC: Unexpected opcode: %d\n", opnum);
|
||||
nargs = 0;
|
||||
#else
|
||||
default:
|
||||
nargs = rtp->u.Otapl.s;
|
||||
nargs = rtp->y_u.Otapl.s;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -2399,8 +2399,8 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose
|
||||
pt->opc != count_trust_lu &&
|
||||
pt->opc != profiled_trust_lu
|
||||
)
|
||||
pt = pt->u.OtaLl.n;
|
||||
mark_ref_in_use((DBRef)pt->u.OtILl.block PASS_REGS);
|
||||
pt = pt->y_u.OtaLl.n;
|
||||
mark_ref_in_use((DBRef)pt->y_u.OtILl.block PASS_REGS);
|
||||
}
|
||||
}
|
||||
/* for each saved register */
|
||||
@ -3050,8 +3050,8 @@ sweep_choicepoints(choiceptr gc_B USES_REGS)
|
||||
case _or_last:
|
||||
|
||||
sweep_environments((CELL_PTR)(gc_B->cp_a1),
|
||||
-gc_B->cp_cp->u.Osblp.s / ((OPREG)sizeof(CELL)),
|
||||
gc_B->cp_cp->u.Osblp.bmap
|
||||
-gc_B->cp_cp->y_u.Osblp.s / ((OPREG)sizeof(CELL)),
|
||||
gc_B->cp_cp->y_u.Osblp.bmap
|
||||
PASS_REGS);
|
||||
break;
|
||||
case _retry_profiled:
|
||||
@ -3061,7 +3061,7 @@ sweep_choicepoints(choiceptr gc_B USES_REGS)
|
||||
opnum = Yap_op_from_opcode(op);
|
||||
goto restart_cp;
|
||||
case _jump:
|
||||
rtp = rtp->u.l.l;
|
||||
rtp = rtp->y_u.l.l;
|
||||
op = rtp->opc;
|
||||
opnum = Yap_op_from_opcode(op);
|
||||
goto restart_cp;
|
||||
@ -3094,7 +3094,7 @@ sweep_choicepoints(choiceptr gc_B USES_REGS)
|
||||
CELL *vars_ptr, vars;
|
||||
sweep_environments(gc_B->cp_env, EnvSize(gc_B->cp_cp), EnvBMap(gc_B->cp_cp) PASS_REGS);
|
||||
vars_ptr = (CELL *)(GEN_CP(gc_B) + 1);
|
||||
nargs = rtp->u.Otapl.s;
|
||||
nargs = rtp->y_u.Otapl.s;
|
||||
while(nargs--) {
|
||||
CELL cp_cell = *vars_ptr;
|
||||
if (MARKED_PTR(vars_ptr)) {
|
||||
@ -3288,12 +3288,12 @@ sweep_choicepoints(choiceptr gc_B USES_REGS)
|
||||
case _count_retry_logical:
|
||||
case _profiled_retry_logical:
|
||||
/* sweep timestamp */
|
||||
sweep_b(gc_B, rtp->u.OtaLl.s+1 PASS_REGS);
|
||||
sweep_b(gc_B, rtp->y_u.OtaLl.s+1 PASS_REGS);
|
||||
break;
|
||||
case _trust_logical:
|
||||
case _count_trust_logical:
|
||||
case _profiled_trust_logical:
|
||||
sweep_b(gc_B, rtp->u.OtILl.d->ClPred->ArityOfPE+1 PASS_REGS);
|
||||
sweep_b(gc_B, rtp->y_u.OtILl.d->ClPred->ArityOfPE+1 PASS_REGS);
|
||||
break;
|
||||
case _retry2:
|
||||
sweep_b(gc_B, 2 PASS_REGS);
|
||||
@ -3305,12 +3305,12 @@ sweep_choicepoints(choiceptr gc_B USES_REGS)
|
||||
sweep_b(gc_B, 4 PASS_REGS);
|
||||
break;
|
||||
case _retry_udi:
|
||||
sweep_b(gc_B, rtp->u.p.p->ArityOfPE PASS_REGS);
|
||||
sweep_b(gc_B, rtp->y_u.p.p->ArityOfPE PASS_REGS);
|
||||
break;
|
||||
case _retry_exo:
|
||||
case _retry_exo_udi:
|
||||
case _retry_all_exo:
|
||||
sweep_b(gc_B, rtp->u.lp.p->ArityOfPE PASS_REGS);
|
||||
sweep_b(gc_B, rtp->y_u.lp.p->ArityOfPE PASS_REGS);
|
||||
break;
|
||||
case _retry_c:
|
||||
case _retry_userc:
|
||||
@ -3318,8 +3318,8 @@ sweep_choicepoints(choiceptr gc_B USES_REGS)
|
||||
register CELL_PTR saved_reg;
|
||||
|
||||
/* for each extra saved register */
|
||||
for (saved_reg = &(gc_B->cp_a1)+rtp->u.OtapFs.s;
|
||||
saved_reg < &(gc_B->cp_a1)+rtp->u.OtapFs.s+rtp->u.OtapFs.extra;
|
||||
for (saved_reg = &(gc_B->cp_a1)+rtp->y_u.OtapFs.s;
|
||||
saved_reg < &(gc_B->cp_a1)+rtp->y_u.OtapFs.s+rtp->y_u.OtapFs.extra;
|
||||
saved_reg++) {
|
||||
CELL cp_cell = *saved_reg;
|
||||
if (MARKED_PTR(saved_reg)) {
|
||||
@ -3332,7 +3332,7 @@ sweep_choicepoints(choiceptr gc_B USES_REGS)
|
||||
}
|
||||
/* continue to clean environments and arguments */
|
||||
default:
|
||||
sweep_b(gc_B,rtp->u.Otapl.s PASS_REGS);
|
||||
sweep_b(gc_B,rtp->y_u.Otapl.s PASS_REGS);
|
||||
}
|
||||
|
||||
/* link to prev choicepoint */
|
||||
|
96
C/init.c
96
C/init.c
@ -483,22 +483,22 @@ Yap_InitCPred(const char *Name, UInt Arity, CPredicate code, UInt flags)
|
||||
p_code->opc = Yap_opcode(_call_usercpred);
|
||||
else
|
||||
p_code->opc = Yap_opcode(_call_cpred);
|
||||
p_code->u.Osbpp.bmap = NULL;
|
||||
p_code->u.Osbpp.s = -Signed(RealEnvSize);
|
||||
p_code->u.Osbpp.p =
|
||||
p_code->u.Osbpp.p0 =
|
||||
p_code->y_u.Osbpp.bmap = NULL;
|
||||
p_code->y_u.Osbpp.s = -Signed(RealEnvSize);
|
||||
p_code->y_u.Osbpp.p =
|
||||
p_code->y_u.Osbpp.p0 =
|
||||
pe;
|
||||
p_code = NEXTOP(p_code,Osbpp);
|
||||
if (!(flags & SafePredFlag)) {
|
||||
p_code->opc = Yap_opcode(_deallocate);
|
||||
p_code->u.p.p = pe;
|
||||
p_code->y_u.p.p = pe;
|
||||
p_code = NEXTOP(p_code,p);
|
||||
}
|
||||
p_code->opc = Yap_opcode(_procceed);
|
||||
p_code->u.p.p = pe;
|
||||
p_code->y_u.p.p = pe;
|
||||
p_code = NEXTOP(p_code,p);
|
||||
p_code->opc = Yap_opcode(_Ystop);
|
||||
p_code->u.l.l = cl->ClCode;
|
||||
p_code->y_u.l.l = cl->ClCode;
|
||||
pe->OpcodeOfPred = pe->CodeOfPred->opc;
|
||||
}
|
||||
|
||||
@ -567,17 +567,17 @@ Yap_InitCmpPred(const char *Name, UInt Arity, CmpPredicate cmp_code, UInt flags)
|
||||
pe->cs.d_code = cmp_code;
|
||||
pe->ModuleOfPred = CurrentModule;
|
||||
p_code->opc = pe->OpcodeOfPred = Yap_opcode(_call_bfunc_xx);
|
||||
p_code->u.plxxs.p = pe;
|
||||
p_code->u.plxxs.f = FAILCODE;
|
||||
p_code->u.plxxs.x1 = Yap_emit_x(1);
|
||||
p_code->u.plxxs.x2 = Yap_emit_x(2);
|
||||
p_code->u.plxxs.flags = Yap_compile_cmp_flags(pe);
|
||||
p_code->y_u.plxxs.p = pe;
|
||||
p_code->y_u.plxxs.f = FAILCODE;
|
||||
p_code->y_u.plxxs.x1 = Yap_emit_x(1);
|
||||
p_code->y_u.plxxs.x2 = Yap_emit_x(2);
|
||||
p_code->y_u.plxxs.flags = Yap_compile_cmp_flags(pe);
|
||||
p_code = NEXTOP(p_code,plxxs);
|
||||
p_code->opc = Yap_opcode(_procceed);
|
||||
p_code->u.p.p = pe;
|
||||
p_code->y_u.p.p = pe;
|
||||
p_code = NEXTOP(p_code,p);
|
||||
p_code->opc = Yap_opcode(_Ystop);
|
||||
p_code->u.l.l = cl->ClCode;
|
||||
p_code->y_u.l.l = cl->ClCode;
|
||||
}
|
||||
|
||||
void
|
||||
@ -655,20 +655,20 @@ Yap_InitAsmPred(const char *Name, UInt Arity, int code, CPredicate def, UInt fl
|
||||
p_code = NEXTOP(p_code,e);
|
||||
}
|
||||
p_code->opc = Yap_opcode(_call_cpred);
|
||||
p_code->u.Osbpp.bmap = NULL;
|
||||
p_code->u.Osbpp.s = -Signed(RealEnvSize);
|
||||
p_code->u.Osbpp.p = p_code->u.Osbpp.p0 = pe;
|
||||
p_code->y_u.Osbpp.bmap = NULL;
|
||||
p_code->y_u.Osbpp.s = -Signed(RealEnvSize);
|
||||
p_code->y_u.Osbpp.p = p_code->y_u.Osbpp.p0 = pe;
|
||||
p_code = NEXTOP(p_code,Osbpp);
|
||||
if (!(flags & SafePredFlag)) {
|
||||
p_code->opc = Yap_opcode(_deallocate);
|
||||
p_code->u.p.p = pe;
|
||||
p_code->y_u.p.p = pe;
|
||||
p_code = NEXTOP(p_code,p);
|
||||
}
|
||||
p_code->opc = Yap_opcode(_procceed);
|
||||
p_code->u.p.p = pe;
|
||||
p_code->y_u.p.p = pe;
|
||||
p_code = NEXTOP(p_code,p);
|
||||
p_code->opc = Yap_opcode(_Ystop);
|
||||
p_code->u.l.l = cl->ClCode;
|
||||
p_code->y_u.l.l = cl->ClCode;
|
||||
pe->OpcodeOfPred = pe->CodeOfPred->opc;
|
||||
} else {
|
||||
pe->OpcodeOfPred = Yap_opcode(_undef_p);
|
||||
@ -689,7 +689,7 @@ CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont, CPredicate Cut)
|
||||
return;
|
||||
}
|
||||
code = (yamop *)(pe->cs.p_code.FirstClause);
|
||||
code->u.OtapFs.p = pe;
|
||||
code->y_u.OtapFs.p = pe;
|
||||
if (pe->PredFlags & UserCPredFlag)
|
||||
code->opc = Yap_opcode(_try_userc);
|
||||
else
|
||||
@ -698,7 +698,7 @@ CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont, CPredicate Cut)
|
||||
INIT_YAMOP_LTT(code, 2);
|
||||
PUT_YAMOP_SEQ(code);
|
||||
#endif /* YAPOR */
|
||||
code->u.OtapFs.f = Start;
|
||||
code->y_u.OtapFs.f = Start;
|
||||
code = NEXTOP(code,OtapFs);
|
||||
if (pe->PredFlags & UserCPredFlag)
|
||||
code->opc = Yap_opcode(_retry_userc);
|
||||
@ -708,14 +708,14 @@ CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont, CPredicate Cut)
|
||||
INIT_YAMOP_LTT(code, 1);
|
||||
PUT_YAMOP_SEQ(code);
|
||||
#endif /* YAPOR */
|
||||
code->u.OtapFs.f = Cont;
|
||||
code->y_u.OtapFs.f = Cont;
|
||||
code = NEXTOP(code,OtapFs);
|
||||
if (pe->PredFlags & UserCPredFlag)
|
||||
code->opc = Yap_opcode(_cut_c);
|
||||
else
|
||||
code->opc = Yap_opcode(_cut_userc);
|
||||
code->u.OtapFs.p = pe;
|
||||
code->u.OtapFs.f = Cut;
|
||||
code->y_u.OtapFs.p = pe;
|
||||
code->y_u.OtapFs.f = Cut;
|
||||
}
|
||||
|
||||
void
|
||||
@ -805,10 +805,10 @@ Yap_InitCPredBack_(const char *Name, UInt Arity,
|
||||
pe->OpcodeOfPred = code->opc = Yap_opcode(_try_userc);
|
||||
else
|
||||
pe->OpcodeOfPred = code->opc = Yap_opcode(_try_c);
|
||||
code->u.OtapFs.f = Start;
|
||||
code->u.OtapFs.p = pe;
|
||||
code->u.OtapFs.s = Arity;
|
||||
code->u.OtapFs.extra = Extra;
|
||||
code->y_u.OtapFs.f = Start;
|
||||
code->y_u.OtapFs.p = pe;
|
||||
code->y_u.OtapFs.s = Arity;
|
||||
code->y_u.OtapFs.extra = Extra;
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(code, 2);
|
||||
PUT_YAMOP_SEQ(code);
|
||||
@ -818,10 +818,10 @@ Yap_InitCPredBack_(const char *Name, UInt Arity,
|
||||
code->opc = Yap_opcode(_retry_userc);
|
||||
else
|
||||
code->opc = Yap_opcode(_retry_c);
|
||||
code->u.OtapFs.f = Cont;
|
||||
code->u.OtapFs.p = pe;
|
||||
code->u.OtapFs.s = Arity;
|
||||
code->u.OtapFs.extra = Extra;
|
||||
code->y_u.OtapFs.f = Cont;
|
||||
code->y_u.OtapFs.p = pe;
|
||||
code->y_u.OtapFs.s = Arity;
|
||||
code->y_u.OtapFs.extra = Extra;
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(code, 1);
|
||||
PUT_YAMOP_SEQ(code);
|
||||
@ -831,13 +831,13 @@ Yap_InitCPredBack_(const char *Name, UInt Arity,
|
||||
code->opc = Yap_opcode(_cut_userc);
|
||||
else
|
||||
code->opc = Yap_opcode(_cut_c);
|
||||
code->u.OtapFs.f = Cut;
|
||||
code->u.OtapFs.p = pe;
|
||||
code->u.OtapFs.s = Arity;
|
||||
code->u.OtapFs.extra = Extra;
|
||||
code->y_u.OtapFs.f = Cut;
|
||||
code->y_u.OtapFs.p = pe;
|
||||
code->y_u.OtapFs.s = Arity;
|
||||
code->y_u.OtapFs.extra = Extra;
|
||||
code = NEXTOP(code,OtapFs);
|
||||
code->opc = Yap_opcode(_Ystop);
|
||||
code->u.l.l = cl->ClCode;
|
||||
code->y_u.l.l = cl->ClCode;
|
||||
}
|
||||
}
|
||||
|
||||
@ -898,10 +898,10 @@ InitEnvInst(yamop start[2], yamop **instp, op_numbers opc, PredEntry *pred)
|
||||
|
||||
/* make it look like the instruction is preceeded by a call instruction */
|
||||
ipc->opc = Yap_opcode(_call);
|
||||
ipc->u.Osbpp.s = -Signed(RealEnvSize);
|
||||
ipc->u.Osbpp.bmap = NULL;
|
||||
ipc->u.Osbpp.p = pred;
|
||||
ipc->u.Osbpp.p0 = pred;
|
||||
ipc->y_u.Osbpp.s = -Signed(RealEnvSize);
|
||||
ipc->y_u.Osbpp.bmap = NULL;
|
||||
ipc->y_u.Osbpp.p = pred;
|
||||
ipc->y_u.Osbpp.p0 = pred;
|
||||
ipc = NEXTOP(ipc, Osbpp);
|
||||
ipc->opc = Yap_opcode(opc);
|
||||
*instp = ipc;
|
||||
@ -914,14 +914,14 @@ InitOtaplInst(yamop start[1], OPCODE opc, PredEntry *pe)
|
||||
|
||||
/* this is a place holder, it should not really be used */
|
||||
ipc->opc = Yap_opcode(opc);
|
||||
ipc->u.Otapl.s = 0;
|
||||
ipc->u.Otapl.p = pe;
|
||||
ipc->u.Otapl.d = NULL;
|
||||
ipc->y_u.Otapl.s = 0;
|
||||
ipc->y_u.Otapl.p = pe;
|
||||
ipc->y_u.Otapl.d = NULL;
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(ipc, 1);
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
ipc->u.Otapl.te = NULL;
|
||||
ipc->y_u.Otapl.te = NULL;
|
||||
#endif /* TABLING */
|
||||
}
|
||||
|
||||
@ -1182,8 +1182,8 @@ InitCodes(void)
|
||||
modp->PredFlags |= MetaPredFlag;
|
||||
}
|
||||
#ifdef YAPOR
|
||||
Yap_heap_regs->getwork_code->u.Otapl.p = RepPredProp(PredPropByAtom(AtomGetwork, PROLOG_MODULE));
|
||||
Yap_heap_regs->getwork_seq_code->u.Otapl.p = RepPredProp(PredPropByAtom(AtomGetworkSeq, PROLOG_MODULE));
|
||||
Yap_heap_regs->getwork_code->y_u.Otapl.p = RepPredProp(PredPropByAtom(AtomGetwork, PROLOG_MODULE));
|
||||
Yap_heap_regs->getwork_seq_code->y_u.Otapl.p = RepPredProp(PredPropByAtom(AtomGetworkSeq, PROLOG_MODULE));
|
||||
#endif /* YAPOR */
|
||||
|
||||
}
|
||||
|
27
H/Regs.h
27
H/Regs.h
@ -691,6 +691,33 @@ INLINE_ONLY EXTERN inline void restore_B(void) {
|
||||
#define BBREG BB
|
||||
#endif /* YAPOR_SBA || TABLING */
|
||||
|
||||
// define how to handle frozen segments in tabling, etv.
|
||||
#ifdef FROZEN_STACKS
|
||||
#ifdef YAPOR_SBA
|
||||
#define PROTECT_FROZEN_H(CPTR) \
|
||||
((Unsigned((Int)((CPTR)->cp_h)-(Int)(H_FZ)) < \
|
||||
Unsigned((Int)(B_FZ)-(Int)(H_FZ))) ? \
|
||||
(CPTR)->cp_h : H_FZ)
|
||||
#define PROTECT_FROZEN_B(CPTR) \
|
||||
((Unsigned((Int)(CPTR)-(Int)(H_FZ)) < \
|
||||
Unsigned((Int)(B_FZ)-(Int)(H_FZ))) ? \
|
||||
(CPTR) : B_FZ)
|
||||
/*
|
||||
#define PROTECT_FROZEN_H(CPTR) ((CPTR)->cp_h > H_FZ && (CPTR)->cp_h < (CELL *)B_FZ ? (CPTR)->cp_h : H_FZ )
|
||||
|
||||
#define PROTECT_FROZEN_B(CPTR) ((CPTR) < B_FZ && (CPTR) > (choiceptr)H_FZ ? (CPTR) : B_FZ )
|
||||
*/
|
||||
#else /* TABLING */
|
||||
#define PROTECT_FROZEN_B(CPTR) (YOUNGER_CP(CPTR, B_FZ) ? CPTR : B_FZ)
|
||||
#define PROTECT_FROZEN_H(CPTR) (((CPTR)->cp_h > H_FZ) ? (CPTR)->cp_h : H_FZ)
|
||||
#endif /* YAPOR_SBA */
|
||||
#else
|
||||
#define PROTECT_FROZEN_B(CPTR) (CPTR)
|
||||
#define PROTECT_FROZEN_H(CPTR) (CPTR)->cp_h
|
||||
#endif /* FROZEN_STACKS */
|
||||
|
||||
|
||||
|
||||
#if !defined(THREADS)
|
||||
/* use actual addresses for regs */
|
||||
#define PRECOMPUTE_REGADDRESS 1
|
||||
|
8
H/Yap.h
8
H/Yap.h
@ -86,6 +86,10 @@
|
||||
#define TERM_EXTENSIONS 1
|
||||
#endif /* COROUTINING && !TERM_EXTENSIONS */
|
||||
|
||||
/* truth-values */
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
/* Microsoft's Visual C++ Compiler */
|
||||
#ifdef _MSC_VER /* adjust a config.h from mingw32 to work with vc++ */
|
||||
#ifdef HAVE_GCC
|
||||
@ -155,10 +159,6 @@
|
||||
#define EXTERN
|
||||
#endif /* ADTDEFS_C */
|
||||
|
||||
/* truth-values */
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
|
||||
/* null pointer */
|
||||
#define NIL 0
|
||||
|
@ -379,7 +379,7 @@ restore_absmi_regs(REGSTORE * old_regs)
|
||||
|
||||
#define DO_PREFETCH(TYPE) to_go = (void *)(NEXTOP(PREG,TYPE)->opc)
|
||||
|
||||
#define DO_PREFETCH_W(TYPE) to_go = (void *)(NEXTOP(PREG,TYPE)->u.o.opcw)
|
||||
#define DO_PREFETCH_W(TYPE) to_go = (void *)(NEXTOP(PREG,TYPE)->y_u.o.opcw)
|
||||
|
||||
#if LIMITED_PREFETCH||USE_PREFETCH
|
||||
|
||||
@ -466,7 +466,7 @@ restore_absmi_regs(REGSTORE * old_regs)
|
||||
JMP((void *)(PREG->opc))
|
||||
|
||||
#define JMPNextW() \
|
||||
JMP((void *)(PREG->u.o.opcw))
|
||||
JMP((void *)(PREG->y_u.o.opcw))
|
||||
|
||||
#if USE_THREADED_CODE && (LIMITED_PREFETCH || USE_PREFETCH)
|
||||
|
||||
|
36
H/amidefs.h
36
H/amidefs.h
@ -65,30 +65,6 @@
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef FROZEN_STACKS
|
||||
#ifdef YAPOR_SBA
|
||||
#define PROTECT_FROZEN_H(CPTR) \
|
||||
((Unsigned((Int)((CPTR)->cp_h)-(Int)(H_FZ)) < \
|
||||
Unsigned((Int)(B_FZ)-(Int)(H_FZ))) ? \
|
||||
(CPTR)->cp_h : H_FZ)
|
||||
#define PROTECT_FROZEN_B(CPTR) \
|
||||
((Unsigned((Int)(CPTR)-(Int)(H_FZ)) < \
|
||||
Unsigned((Int)(B_FZ)-(Int)(H_FZ))) ? \
|
||||
(CPTR) : B_FZ)
|
||||
/*
|
||||
#define PROTECT_FROZEN_H(CPTR) ((CPTR)->cp_h > H_FZ && (CPTR)->cp_h < (CELL *)B_FZ ? (CPTR)->cp_h : H_FZ )
|
||||
|
||||
#define PROTECT_FROZEN_B(CPTR) ((CPTR) < B_FZ && (CPTR) > (choiceptr)H_FZ ? (CPTR) : B_FZ )
|
||||
*/
|
||||
#else /* TABLING */
|
||||
#define PROTECT_FROZEN_B(CPTR) (YOUNGER_CP(CPTR, B_FZ) ? CPTR : B_FZ)
|
||||
#define PROTECT_FROZEN_H(CPTR) (((CPTR)->cp_h > H_FZ) ? (CPTR)->cp_h : H_FZ)
|
||||
#endif /* YAPOR_SBA */
|
||||
#else
|
||||
#define PROTECT_FROZEN_B(CPTR) (CPTR)
|
||||
#define PROTECT_FROZEN_H(CPTR) (CPTR)->cp_h
|
||||
#endif /* FROZEN_STACKS */
|
||||
|
||||
#if ALIGN_LONGS
|
||||
/* */ typedef Int DISPREG;
|
||||
/* */ typedef CELL SMALLUNSGN;
|
||||
@ -882,7 +858,7 @@ typedef struct yami {
|
||||
Term c;
|
||||
CELL next;
|
||||
} yxc;
|
||||
} u;
|
||||
} y_u;
|
||||
} yamop;
|
||||
|
||||
typedef yamop yamopp;
|
||||
@ -891,7 +867,7 @@ typedef yamop yamopp;
|
||||
#define OPCW u.ox.opcw
|
||||
|
||||
|
||||
#define NEXTOP(V,TYPE) ((yamop *)(&((V)->u.TYPE.next)))
|
||||
#define NEXTOP(V,TYPE) ((yamop *)(&((V)->y_u.TYPE.next)))
|
||||
|
||||
#define PREVOP(V,TYPE) ((yamop *)((CODEADDR)(V)-(CELL)NEXTOP((yamop *)NULL,TYPE)))
|
||||
|
||||
@ -1072,13 +1048,13 @@ CELL *ENV_Parent(CELL *env)
|
||||
static inline
|
||||
UInt ENV_Size(yamop *cp)
|
||||
{
|
||||
return (((yamop *)((CODEADDR)(cp) - (CELL)NEXTOP((yamop *)NULL,Osbpp)))->u.Osbpp.s);
|
||||
return (((yamop *)((CODEADDR)(cp) - (CELL)NEXTOP((yamop *)NULL,Osbpp)))->y_u.Osbpp.s);
|
||||
}
|
||||
|
||||
static inline
|
||||
struct pred_entry *ENV_ToP(yamop *cp)
|
||||
{
|
||||
return (((yamop *)((CODEADDR)(cp) - (CELL)NEXTOP((yamop *)NULL,Osbpp)))->u.Osbpp.p);
|
||||
return (((yamop *)((CODEADDR)(cp) - (CELL)NEXTOP((yamop *)NULL,Osbpp)))->y_u.Osbpp.p);
|
||||
}
|
||||
|
||||
static inline
|
||||
@ -1096,13 +1072,13 @@ UInt EnvSize(yamop *cp)
|
||||
static inline
|
||||
CELL *EnvBMap(yamop *p)
|
||||
{
|
||||
return (((yamop *)((CODEADDR)(p) - (CELL)NEXTOP((yamop *)NULL,Osbpp)))->u.Osbpp.bmap);
|
||||
return (((yamop *)((CODEADDR)(p) - (CELL)NEXTOP((yamop *)NULL,Osbpp)))->y_u.Osbpp.bmap);
|
||||
}
|
||||
|
||||
static inline
|
||||
struct pred_entry *EnvPreg(yamop *p)
|
||||
{
|
||||
return (((yamop *)((CODEADDR)(p) - (CELL)NEXTOP((yamop *)NULL,Osbpp)))->u.Osbpp.p0);
|
||||
return (((yamop *)((CODEADDR)(p) - (CELL)NEXTOP((yamop *)NULL,Osbpp)))->y_u.Osbpp.p0);
|
||||
}
|
||||
|
||||
/* access to instructions */
|
||||
|
@ -33,7 +33,7 @@ typedef union CONSULT_OBJ {
|
||||
#define ASSEMBLING_INDEX 1
|
||||
#define ASSEMBLING_EINDEX 2
|
||||
|
||||
#define NextDynamicClause(X) (((yamop *)X)->u.Otapl.d)
|
||||
#define NextDynamicClause(X) (((yamop *)X)->y_u.Otapl.d)
|
||||
|
||||
#define PredFirstClause 0
|
||||
#define PredMiddleClause 1
|
||||
|
@ -18,11 +18,11 @@ struct cut_c_str{
|
||||
#define CUT_C_STR_SIZE ((sizeof(struct cut_c_str))/(sizeof(CELL)))
|
||||
|
||||
#define EXTRA_CBACK_CUT_ARG(Type,Offset) \
|
||||
((Type) (*(Type *)(((CELL *)Yap_REGS.CUT_C_TOP) - (((yamop *)Yap_REGS.CUT_C_TOP->try_userc_cut_yamop)->u.OtapFs.extra)) + (Offset-1)))
|
||||
((Type) (*(Type *)(((CELL *)Yap_REGS.CUT_C_TOP) - (((yamop *)Yap_REGS.CUT_C_TOP->try_userc_cut_yamop)->y_u.OtapFs.extra)) + (Offset-1)))
|
||||
|
||||
#define CUT_C_PUSH(YAMOP,S_YREG) \
|
||||
{ \
|
||||
if ((YAMOP)->u.OtapFs.f){ \
|
||||
if ((YAMOP)->y_u.OtapFs.f){ \
|
||||
S_YREG = S_YREG - CUT_C_STR_SIZE; \
|
||||
cut_c_str_ptr new_top = (cut_c_str_ptr) S_YREG; \
|
||||
new_top->try_userc_cut_yamop = YAMOP; \
|
||||
@ -37,8 +37,8 @@ struct cut_c_str{
|
||||
|
||||
#define POP_EXECUTE() \
|
||||
cut_c_str_ptr TOP = Yap_REGS.CUT_C_TOP; \
|
||||
CPredicate func = (CPredicate)((yamop *)TOP->try_userc_cut_yamop)->u.OtapFs.f; \
|
||||
PredEntry *pred = (PredEntry *)((yamop *)TOP->try_userc_cut_yamop)->u.OtapFs.p; \
|
||||
CPredicate func = (CPredicate)((yamop *)TOP->try_userc_cut_yamop)->y_u.OtapFs.f; \
|
||||
PredEntry *pred = (PredEntry *)((yamop *)TOP->try_userc_cut_yamop)->y_u.OtapFs.p; \
|
||||
YAP_ExecuteOnCut(pred, func, TOP); \
|
||||
cut_c_pop();
|
||||
|
||||
|
480
H/findclause.h
480
H/findclause.h
File diff suppressed because it is too large
Load Diff
282
H/headclause.h
282
H/headclause.h
@ -14,195 +14,195 @@
|
||||
break;
|
||||
case _get_2atoms:
|
||||
if (iarg == Yap_regnotoreg(1)) {
|
||||
if (IsApplTerm(cl->u.cc.c1)) {
|
||||
CELL *pt = RepAppl(cl->u.cc.c1);
|
||||
if (IsApplTerm(cl->y_u.cc.c1)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cc.c1);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cc.c1;
|
||||
clause->ucd.t_ptr = cl->y_u.cc.c1;
|
||||
} else
|
||||
clause->Tag = cl->u.cc.c1;
|
||||
clause->Tag = cl->y_u.cc.c1;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(2)) {
|
||||
if (IsApplTerm(cl->u.cc.c2)) {
|
||||
CELL *pt = RepAppl(cl->u.cc.c2);
|
||||
if (IsApplTerm(cl->y_u.cc.c2)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cc.c2);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cc.c2;
|
||||
clause->ucd.t_ptr = cl->y_u.cc.c2;
|
||||
} else
|
||||
clause->Tag = cl->u.cc.c2;
|
||||
clause->Tag = cl->y_u.cc.c2;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,cc);
|
||||
break;
|
||||
case _get_3atoms:
|
||||
if (iarg == Yap_regnotoreg(1)) {
|
||||
if (IsApplTerm(cl->u.ccc.c1)) {
|
||||
CELL *pt = RepAppl(cl->u.ccc.c1);
|
||||
if (IsApplTerm(cl->y_u.ccc.c1)) {
|
||||
CELL *pt = RepAppl(cl->y_u.ccc.c1);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.ccc.c1;
|
||||
clause->ucd.t_ptr = cl->y_u.ccc.c1;
|
||||
} else
|
||||
clause->Tag = cl->u.ccc.c1;
|
||||
clause->Tag = cl->y_u.ccc.c1;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(2)) {
|
||||
if (IsApplTerm(cl->u.ccc.c2)) {
|
||||
CELL *pt = RepAppl(cl->u.ccc.c2);
|
||||
if (IsApplTerm(cl->y_u.ccc.c2)) {
|
||||
CELL *pt = RepAppl(cl->y_u.ccc.c2);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.ccc.c2;
|
||||
clause->ucd.t_ptr = cl->y_u.ccc.c2;
|
||||
} else
|
||||
clause->Tag = cl->u.ccc.c2;
|
||||
clause->Tag = cl->y_u.ccc.c2;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(3)) {
|
||||
if (IsApplTerm(cl->u.ccc.c3)) {
|
||||
CELL *pt = RepAppl(cl->u.ccc.c3);
|
||||
if (IsApplTerm(cl->y_u.ccc.c3)) {
|
||||
CELL *pt = RepAppl(cl->y_u.ccc.c3);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.ccc.c3;
|
||||
clause->ucd.t_ptr = cl->y_u.ccc.c3;
|
||||
} else
|
||||
clause->Tag = cl->u.ccc.c3;
|
||||
clause->Tag = cl->y_u.ccc.c3;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,ccc);
|
||||
break;
|
||||
case _get_4atoms:
|
||||
if (iarg == Yap_regnotoreg(1)) {
|
||||
if (IsApplTerm(cl->u.cccc.c1)) {
|
||||
CELL *pt = RepAppl(cl->u.cccc.c1);
|
||||
if (IsApplTerm(cl->y_u.cccc.c1)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cccc.c1);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cccc.c1;
|
||||
clause->ucd.t_ptr = cl->y_u.cccc.c1;
|
||||
} else
|
||||
clause->Tag = cl->u.cccc.c1;
|
||||
clause->Tag = cl->y_u.cccc.c1;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(2)) {
|
||||
if (IsApplTerm(cl->u.cccc.c2)) {
|
||||
CELL *pt = RepAppl(cl->u.cccc.c2);
|
||||
if (IsApplTerm(cl->y_u.cccc.c2)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cccc.c2);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cccc.c2;
|
||||
clause->ucd.t_ptr = cl->y_u.cccc.c2;
|
||||
} else
|
||||
clause->Tag = cl->u.cccc.c2;
|
||||
clause->Tag = cl->y_u.cccc.c2;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(3)) {
|
||||
if (IsApplTerm(cl->u.cccc.c3)) {
|
||||
CELL *pt = RepAppl(cl->u.cccc.c3);
|
||||
if (IsApplTerm(cl->y_u.cccc.c3)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cccc.c3);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cccc.c3;
|
||||
clause->ucd.t_ptr = cl->y_u.cccc.c3;
|
||||
} else
|
||||
clause->Tag = cl->u.cccc.c3;
|
||||
clause->Tag = cl->y_u.cccc.c3;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(4)) {
|
||||
if (IsApplTerm(cl->u.cccc.c4)) {
|
||||
CELL *pt = RepAppl(cl->u.cccc.c4);
|
||||
if (IsApplTerm(cl->y_u.cccc.c4)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cccc.c4);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cccc.c4;
|
||||
clause->ucd.t_ptr = cl->y_u.cccc.c4;
|
||||
} else
|
||||
clause->Tag = cl->u.cccc.c4;
|
||||
clause->Tag = cl->y_u.cccc.c4;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,cccc);
|
||||
break;
|
||||
case _get_5atoms:
|
||||
if (iarg == Yap_regnotoreg(1)) {
|
||||
if (IsApplTerm(cl->u.ccccc.c1)) {
|
||||
CELL *pt = RepAppl(cl->u.ccccc.c1);
|
||||
if (IsApplTerm(cl->y_u.ccccc.c1)) {
|
||||
CELL *pt = RepAppl(cl->y_u.ccccc.c1);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.ccccc.c1;
|
||||
clause->ucd.t_ptr = cl->y_u.ccccc.c1;
|
||||
} else
|
||||
clause->Tag = cl->u.ccccc.c1;
|
||||
clause->Tag = cl->y_u.ccccc.c1;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(2)) {
|
||||
if (IsApplTerm(cl->u.ccccc.c2)) {
|
||||
CELL *pt = RepAppl(cl->u.ccccc.c2);
|
||||
if (IsApplTerm(cl->y_u.ccccc.c2)) {
|
||||
CELL *pt = RepAppl(cl->y_u.ccccc.c2);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.ccccc.c2;
|
||||
clause->ucd.t_ptr = cl->y_u.ccccc.c2;
|
||||
} else
|
||||
clause->Tag = cl->u.ccccc.c2;
|
||||
clause->Tag = cl->y_u.ccccc.c2;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(3)) {
|
||||
if (IsApplTerm(cl->u.ccccc.c3)) {
|
||||
CELL *pt = RepAppl(cl->u.ccccc.c3);
|
||||
if (IsApplTerm(cl->y_u.ccccc.c3)) {
|
||||
CELL *pt = RepAppl(cl->y_u.ccccc.c3);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.ccccc.c3;
|
||||
clause->ucd.t_ptr = cl->y_u.ccccc.c3;
|
||||
} else
|
||||
clause->Tag = cl->u.ccccc.c3;
|
||||
clause->Tag = cl->y_u.ccccc.c3;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(4)) {
|
||||
if (IsApplTerm(cl->u.ccccc.c4)) {
|
||||
CELL *pt = RepAppl(cl->u.ccccc.c4);
|
||||
if (IsApplTerm(cl->y_u.ccccc.c4)) {
|
||||
CELL *pt = RepAppl(cl->y_u.ccccc.c4);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.ccccc.c4;
|
||||
clause->ucd.t_ptr = cl->y_u.ccccc.c4;
|
||||
} else
|
||||
clause->Tag = cl->u.ccccc.c4;
|
||||
clause->Tag = cl->y_u.ccccc.c4;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(5)) {
|
||||
if (IsApplTerm(cl->u.ccccc.c5)) {
|
||||
CELL *pt = RepAppl(cl->u.ccccc.c5);
|
||||
if (IsApplTerm(cl->y_u.ccccc.c5)) {
|
||||
CELL *pt = RepAppl(cl->y_u.ccccc.c5);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.ccccc.c5;
|
||||
clause->ucd.t_ptr = cl->y_u.ccccc.c5;
|
||||
} else
|
||||
clause->Tag = cl->u.ccccc.c5;
|
||||
clause->Tag = cl->y_u.ccccc.c5;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,ccccc);
|
||||
break;
|
||||
case _get_6atoms:
|
||||
if (iarg == Yap_regnotoreg(1)) {
|
||||
if (IsApplTerm(cl->u.cccccc.c1)) {
|
||||
CELL *pt = RepAppl(cl->u.cccccc.c1);
|
||||
if (IsApplTerm(cl->y_u.cccccc.c1)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cccccc.c1);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cccccc.c1;
|
||||
clause->ucd.t_ptr = cl->y_u.cccccc.c1;
|
||||
} else
|
||||
clause->Tag = cl->u.cccccc.c1;
|
||||
clause->Tag = cl->y_u.cccccc.c1;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(2)) {
|
||||
if (IsApplTerm(cl->u.cccccc.c2)) {
|
||||
CELL *pt = RepAppl(cl->u.cccccc.c2);
|
||||
if (IsApplTerm(cl->y_u.cccccc.c2)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cccccc.c2);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cccccc.c2;
|
||||
clause->ucd.t_ptr = cl->y_u.cccccc.c2;
|
||||
} else
|
||||
clause->Tag = cl->u.cccccc.c2;
|
||||
clause->Tag = cl->y_u.cccccc.c2;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(3)) {
|
||||
if (IsApplTerm(cl->u.cccccc.c3)) {
|
||||
CELL *pt = RepAppl(cl->u.cccccc.c3);
|
||||
if (IsApplTerm(cl->y_u.cccccc.c3)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cccccc.c3);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cccccc.c3;
|
||||
clause->ucd.t_ptr = cl->y_u.cccccc.c3;
|
||||
} else
|
||||
clause->Tag = cl->u.cccccc.c3;
|
||||
clause->Tag = cl->y_u.cccccc.c3;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(4)) {
|
||||
if (IsApplTerm(cl->u.cccccc.c4)) {
|
||||
CELL *pt = RepAppl(cl->u.cccccc.c4);
|
||||
if (IsApplTerm(cl->y_u.cccccc.c4)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cccccc.c4);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cccccc.c4;
|
||||
clause->ucd.t_ptr = cl->y_u.cccccc.c4;
|
||||
} else
|
||||
clause->Tag = cl->u.cccccc.c4;
|
||||
clause->Tag = cl->y_u.cccccc.c4;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(5)) {
|
||||
if (IsApplTerm(cl->u.cccccc.c5)) {
|
||||
CELL *pt = RepAppl(cl->u.cccccc.c5);
|
||||
if (IsApplTerm(cl->y_u.cccccc.c5)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cccccc.c5);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cccccc.c5;
|
||||
clause->ucd.t_ptr = cl->y_u.cccccc.c5;
|
||||
} else
|
||||
clause->Tag = cl->u.cccccc.c5;
|
||||
clause->Tag = cl->y_u.cccccc.c5;
|
||||
return;
|
||||
}
|
||||
if (iarg == Yap_regnotoreg(6)) {
|
||||
if (IsApplTerm(cl->u.cccccc.c6)) {
|
||||
CELL *pt = RepAppl(cl->u.cccccc.c6);
|
||||
if (IsApplTerm(cl->y_u.cccccc.c6)) {
|
||||
CELL *pt = RepAppl(cl->y_u.cccccc.c6);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.cccccc.c6;
|
||||
clause->ucd.t_ptr = cl->y_u.cccccc.c6;
|
||||
} else
|
||||
clause->Tag = cl->u.cccccc.c6;
|
||||
clause->Tag = cl->y_u.cccccc.c6;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,cccccc);
|
||||
@ -383,28 +383,28 @@
|
||||
cl = NEXTOP(cl,ou);
|
||||
break;
|
||||
case _save_appl_x:
|
||||
if (iarg == cl->u.ox.x) {
|
||||
if (iarg == cl->y_u.ox.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,ox);
|
||||
break;
|
||||
case _save_appl_x_write:
|
||||
if (iarg == cl->u.ox.x) {
|
||||
if (iarg == cl->y_u.ox.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,ox);
|
||||
break;
|
||||
case _save_pair_x:
|
||||
if (iarg == cl->u.ox.x) {
|
||||
if (iarg == cl->y_u.ox.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,ox);
|
||||
break;
|
||||
case _save_pair_x_write:
|
||||
if (iarg == cl->u.ox.x) {
|
||||
if (iarg == cl->y_u.ox.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
@ -423,14 +423,14 @@
|
||||
cl = NEXTOP(cl,ox);
|
||||
break;
|
||||
case _unify_l_x_var:
|
||||
if (iarg == cl->u.ox.x) {
|
||||
if (iarg == cl->y_u.ox.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,ox);
|
||||
break;
|
||||
case _unify_l_x_var_write:
|
||||
if (iarg == cl->u.ox.x) {
|
||||
if (iarg == cl->y_u.ox.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
@ -449,58 +449,58 @@
|
||||
cl = NEXTOP(cl,ox);
|
||||
break;
|
||||
case _unify_x_var:
|
||||
if (iarg == cl->u.ox.x) {
|
||||
if (iarg == cl->y_u.ox.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,ox);
|
||||
break;
|
||||
case _unify_x_var_write:
|
||||
if (iarg == cl->u.ox.x) {
|
||||
if (iarg == cl->y_u.ox.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,ox);
|
||||
break;
|
||||
case _unify_l_x_var2:
|
||||
if (iarg == cl->u.oxx.xl) {
|
||||
if (iarg == cl->y_u.oxx.xl) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
if (iarg == cl->u.oxx.xr) {
|
||||
if (iarg == cl->y_u.oxx.xr) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,oxx);
|
||||
break;
|
||||
case _unify_l_x_var2_write:
|
||||
if (iarg == cl->u.oxx.xl) {
|
||||
if (iarg == cl->y_u.oxx.xl) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
if (iarg == cl->u.oxx.xr) {
|
||||
if (iarg == cl->y_u.oxx.xr) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,oxx);
|
||||
break;
|
||||
case _unify_x_var2:
|
||||
if (iarg == cl->u.oxx.xl) {
|
||||
if (iarg == cl->y_u.oxx.xl) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
if (iarg == cl->u.oxx.xr) {
|
||||
if (iarg == cl->y_u.oxx.xr) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,oxx);
|
||||
break;
|
||||
case _unify_x_var2_write:
|
||||
if (iarg == cl->u.oxx.xl) {
|
||||
if (iarg == cl->y_u.oxx.xl) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
if (iarg == cl->u.oxx.xr) {
|
||||
if (iarg == cl->y_u.oxx.xr) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
@ -558,7 +558,7 @@
|
||||
cl = NEXTOP(cl,s);
|
||||
break;
|
||||
case _get_list:
|
||||
if (iarg == cl->u.x.x) {
|
||||
if (iarg == cl->y_u.x.x) {
|
||||
clause->Tag = AbsPair(NULL);
|
||||
clause->ucd.WorkPC = NEXTOP(cl,x);
|
||||
return;
|
||||
@ -566,21 +566,21 @@
|
||||
cl = NEXTOP(cl,x);
|
||||
break;
|
||||
case _put_list:
|
||||
if (iarg == cl->u.x.x) {
|
||||
if (iarg == cl->y_u.x.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,x);
|
||||
break;
|
||||
case _put_dbterm:
|
||||
if (iarg == cl->u.xD.x) {
|
||||
if (iarg == cl->y_u.xD.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xD);
|
||||
break;
|
||||
case _get_bigint:
|
||||
if (iarg == cl->u.xN.x) {
|
||||
if (iarg == cl->y_u.xN.x) {
|
||||
clause->Tag = AbsAppl((CELL *)FunctorBigInt);
|
||||
clause->ucd.t_ptr = (CELL)NULL;
|
||||
return;
|
||||
@ -588,78 +588,78 @@
|
||||
cl = NEXTOP(cl,xN);
|
||||
break;
|
||||
case _put_bigint:
|
||||
if (iarg == cl->u.xN.x) {
|
||||
if (iarg == cl->y_u.xN.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xN);
|
||||
break;
|
||||
case _get_atom:
|
||||
if (iarg == cl->u.xc.x) {
|
||||
if (IsApplTerm(cl->u.xc.c)) {
|
||||
CELL *pt = RepAppl(cl->u.xc.c);
|
||||
if (iarg == cl->y_u.xc.x) {
|
||||
if (IsApplTerm(cl->y_u.xc.c)) {
|
||||
CELL *pt = RepAppl(cl->y_u.xc.c);
|
||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||
clause->ucd.t_ptr = cl->u.xc.c;
|
||||
clause->ucd.t_ptr = cl->y_u.xc.c;
|
||||
} else
|
||||
clause->Tag = cl->u.xc.c;
|
||||
clause->Tag = cl->y_u.xc.c;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xc);
|
||||
break;
|
||||
case _put_atom:
|
||||
if (iarg == cl->u.xc.x) {
|
||||
if (iarg == cl->y_u.xc.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xc);
|
||||
break;
|
||||
case _get_float:
|
||||
if (iarg == cl->u.xd.x) {
|
||||
if (iarg == cl->y_u.xd.x) {
|
||||
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
||||
clause->ucd.t_ptr = AbsAppl(cl->u.xd.d);
|
||||
clause->ucd.t_ptr = AbsAppl(cl->y_u.xd.d);
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xd);
|
||||
break;
|
||||
case _put_float:
|
||||
if (iarg == cl->u.xd.x) {
|
||||
if (iarg == cl->y_u.xd.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xd);
|
||||
break;
|
||||
case _get_struct:
|
||||
if (iarg == cl->u.xfa.x) {
|
||||
clause->Tag = AbsAppl((CELL *)cl->u.xfa.f);
|
||||
if (iarg == cl->y_u.xfa.x) {
|
||||
clause->Tag = AbsAppl((CELL *)cl->y_u.xfa.f);
|
||||
clause->ucd.WorkPC = NEXTOP(cl,xfa);
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xfa);
|
||||
break;
|
||||
case _put_struct:
|
||||
if (iarg == cl->u.xfa.x) {
|
||||
if (iarg == cl->y_u.xfa.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xfa);
|
||||
break;
|
||||
case _get_longint:
|
||||
if (iarg == cl->u.xi.x) {
|
||||
if (iarg == cl->y_u.xi.x) {
|
||||
clause->Tag = AbsAppl((CELL *)FunctorLongInt);
|
||||
clause->ucd.t_ptr = AbsAppl(cl->u.xi.i);
|
||||
clause->ucd.t_ptr = AbsAppl(cl->y_u.xi.i);
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xi);
|
||||
break;
|
||||
case _put_longint:
|
||||
if (iarg == cl->u.xi.x) {
|
||||
if (iarg == cl->y_u.xi.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xi);
|
||||
break;
|
||||
case _get_string:
|
||||
if (iarg == cl->u.xu.x) {
|
||||
if (iarg == cl->y_u.xu.x) {
|
||||
clause->Tag = AbsAppl((CELL *)FunctorString);
|
||||
clause->ucd.t_ptr = (CELL)NULL;
|
||||
return;
|
||||
@ -667,23 +667,23 @@
|
||||
cl = NEXTOP(cl,xu);
|
||||
break;
|
||||
case _get_x_val:
|
||||
if (cl->u.xx.xl == iarg ||
|
||||
cl->u.xx.xr == iarg) {
|
||||
if (cl->y_u.xx.xl == iarg ||
|
||||
cl->y_u.xx.xr == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xx);
|
||||
break;
|
||||
case _get_x_var:
|
||||
if (cl->u.xx.xr == iarg ||
|
||||
cl->u.xx.xl == iarg) {
|
||||
if (cl->y_u.xx.xr == iarg ||
|
||||
cl->y_u.xx.xl == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xx);
|
||||
break;
|
||||
case _gl_void_valx:
|
||||
if (iarg == cl->u.xx.xl) {
|
||||
if (iarg == cl->y_u.xx.xl) {
|
||||
clause->Tag = AbsPair(NULL);
|
||||
clause->ucd.WorkPC = cl;
|
||||
return;
|
||||
@ -691,19 +691,19 @@
|
||||
cl = NEXTOP(cl,xx);
|
||||
break;
|
||||
case _gl_void_varx:
|
||||
if (iarg == cl->u.xx.xl) {
|
||||
if (iarg == cl->y_u.xx.xl) {
|
||||
clause->Tag = AbsPair(NULL);
|
||||
clause->ucd.WorkPC = cl;
|
||||
return;
|
||||
}
|
||||
if (iarg == cl->u.xx.xr) {
|
||||
if (iarg == cl->y_u.xx.xr) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xx);
|
||||
break;
|
||||
case _glist_valx:
|
||||
if (iarg == cl->u.xx.xl) {
|
||||
if (iarg == cl->y_u.xx.xl) {
|
||||
clause->Tag = AbsPair(NULL);
|
||||
clause->ucd.WorkPC = cl;
|
||||
return;
|
||||
@ -711,46 +711,46 @@
|
||||
cl = NEXTOP(cl,xx);
|
||||
break;
|
||||
case _put_x_val:
|
||||
if (cl->u.xx.xl == iarg ||
|
||||
cl->u.xx.xr == iarg) {
|
||||
if (cl->y_u.xx.xl == iarg ||
|
||||
cl->y_u.xx.xr == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xx);
|
||||
break;
|
||||
case _put_x_var:
|
||||
if (iarg == cl->u.xx.xl) {
|
||||
if (iarg == cl->y_u.xx.xl) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
if (iarg == cl->u.xx.xr) {
|
||||
if (iarg == cl->y_u.xx.xr) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xx);
|
||||
break;
|
||||
case _put_xx_val:
|
||||
if (cl->u.xxxx.xl1 == iarg ||
|
||||
cl->u.xxxx.xr1 == iarg) {
|
||||
if (cl->y_u.xxxx.xl1 == iarg ||
|
||||
cl->y_u.xxxx.xr1 == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
if (cl->u.xxxx.xl2 == iarg ||
|
||||
cl->u.xxxx.xr2 == iarg) {
|
||||
if (cl->y_u.xxxx.xl2 == iarg ||
|
||||
cl->y_u.xxxx.xr2 == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,xxxx);
|
||||
break;
|
||||
case _get_y_val:
|
||||
if (cl->u.yx.x == iarg) {
|
||||
if (cl->y_u.yx.x == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,yx);
|
||||
break;
|
||||
case _get_y_var:
|
||||
if (cl->u.yx.x == iarg) {
|
||||
if (cl->y_u.yx.x == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
@ -763,7 +763,7 @@
|
||||
cl = NEXTOP(cl,yx);
|
||||
break;
|
||||
case _glist_valy:
|
||||
if (iarg == cl->u.yx.x) {
|
||||
if (iarg == cl->y_u.yx.x) {
|
||||
clause->Tag = AbsPair(NULL);
|
||||
clause->ucd.WorkPC = cl;
|
||||
return;
|
||||
@ -771,32 +771,32 @@
|
||||
cl = NEXTOP(cl,yx);
|
||||
break;
|
||||
case _put_unsafe:
|
||||
if (cl->u.yx.x == iarg) {
|
||||
if (cl->y_u.yx.x == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,yx);
|
||||
break;
|
||||
case _put_y_val:
|
||||
if (cl->u.yx.x == iarg) {
|
||||
if (cl->y_u.yx.x == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,yx);
|
||||
break;
|
||||
case _put_y_var:
|
||||
if (iarg == cl->u.yx.x) {
|
||||
if (iarg == cl->y_u.yx.x) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
cl = NEXTOP(cl,yx);
|
||||
break;
|
||||
case _get_yy_var:
|
||||
if (cl->u.yyxx.x1 == iarg) {
|
||||
if (cl->y_u.yyxx.x1 == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
if (cl->u.yyxx.x2 == iarg) {
|
||||
if (cl->y_u.yyxx.x2 == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}
|
||||
|
504
H/rclause.h
504
H/rclause.h
@ -18,56 +18,56 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
switch (op) {
|
||||
/* instructions type D */
|
||||
case _write_dbterm:
|
||||
pc->u.D.D = DBGroundTermAdjust(pc->u.D.D);
|
||||
pc->y_u.D.D = DBGroundTermAdjust(pc->y_u.D.D);
|
||||
pc = NEXTOP(pc,D);
|
||||
break;
|
||||
/* instructions type Illss */
|
||||
case _enter_lu_pred:
|
||||
pc->u.Illss.I = PtoLUIndexAdjust(pc->u.Illss.I);
|
||||
pc->u.Illss.l1 = PtoOpAdjust(pc->u.Illss.l1);
|
||||
pc->u.Illss.l2 = PtoOpAdjust(pc->u.Illss.l2);
|
||||
pc->u.Illss.s = ConstantAdjust(pc->u.Illss.s);
|
||||
pc->u.Illss.e = ConstantAdjust(pc->u.Illss.e);
|
||||
pc->y_u.Illss.I = PtoLUIndexAdjust(pc->y_u.Illss.I);
|
||||
pc->y_u.Illss.l1 = PtoOpAdjust(pc->y_u.Illss.l1);
|
||||
pc->y_u.Illss.l2 = PtoOpAdjust(pc->y_u.Illss.l2);
|
||||
pc->y_u.Illss.s = ConstantAdjust(pc->y_u.Illss.s);
|
||||
pc->y_u.Illss.e = ConstantAdjust(pc->y_u.Illss.e);
|
||||
opc = NEXTOP(pc,Illss);
|
||||
pc = pc->u.Illss.l1;
|
||||
pc = pc->y_u.Illss.l1;
|
||||
break;
|
||||
/* instructions type L */
|
||||
case _alloc_for_logical_pred:
|
||||
pc->u.L.ClBase = PtoLUClauseAdjust(pc->u.L.ClBase);
|
||||
pc->y_u.L.ClBase = PtoLUClauseAdjust(pc->y_u.L.ClBase);
|
||||
pc = NEXTOP(pc,L);
|
||||
break;
|
||||
/* instructions type N */
|
||||
case _write_bigint:
|
||||
pc->u.N.b = BlobTermInCodeAdjust(pc->u.N.b);
|
||||
pc->y_u.N.b = BlobTermInCodeAdjust(pc->y_u.N.b);
|
||||
pc = NEXTOP(pc,N);
|
||||
break;
|
||||
/* instructions type Osblp */
|
||||
case _either:
|
||||
case _or_else:
|
||||
OrArgAdjust(pc->u.Osblp.or_arg);
|
||||
pc->u.Osblp.s = ConstantAdjust(pc->u.Osblp.s);
|
||||
pc->u.Osblp.bmap = CellPtoHeapAdjust(pc->u.Osblp.bmap);
|
||||
pc->u.Osblp.l = PtoOpAdjust(pc->u.Osblp.l);
|
||||
pc->u.Osblp.p0 = PtoPredAdjust(pc->u.Osblp.p0);
|
||||
OrArgAdjust(pc->y_u.Osblp.or_arg);
|
||||
pc->y_u.Osblp.s = ConstantAdjust(pc->y_u.Osblp.s);
|
||||
pc->y_u.Osblp.bmap = CellPtoHeapAdjust(pc->y_u.Osblp.bmap);
|
||||
pc->y_u.Osblp.l = PtoOpAdjust(pc->y_u.Osblp.l);
|
||||
pc->y_u.Osblp.p0 = PtoPredAdjust(pc->y_u.Osblp.p0);
|
||||
pc = NEXTOP(pc,Osblp);
|
||||
break;
|
||||
/* instructions type Osbmp */
|
||||
case _p_execute:
|
||||
case _p_execute_tail:
|
||||
OrArgAdjust(pc->u.Osbmp.or_arg);
|
||||
pc->u.Osbmp.s = ConstantAdjust(pc->u.Osbmp.s);
|
||||
pc->u.Osbmp.bmap = CellPtoHeapAdjust(pc->u.Osbmp.bmap);
|
||||
pc->u.Osbmp.mod = ModuleAdjust(pc->u.Osbmp.mod);
|
||||
pc->u.Osbmp.p0 = PtoPredAdjust(pc->u.Osbmp.p0);
|
||||
OrArgAdjust(pc->y_u.Osbmp.or_arg);
|
||||
pc->y_u.Osbmp.s = ConstantAdjust(pc->y_u.Osbmp.s);
|
||||
pc->y_u.Osbmp.bmap = CellPtoHeapAdjust(pc->y_u.Osbmp.bmap);
|
||||
pc->y_u.Osbmp.mod = ModuleAdjust(pc->y_u.Osbmp.mod);
|
||||
pc->y_u.Osbmp.p0 = PtoPredAdjust(pc->y_u.Osbmp.p0);
|
||||
pc = NEXTOP(pc,Osbmp);
|
||||
break;
|
||||
/* instructions type Osbpa */
|
||||
case _ensure_space:
|
||||
OrArgAdjust(pc->u.Osbpa.or_arg);
|
||||
pc->u.Osbpa.s = ConstantAdjust(pc->u.Osbpa.s);
|
||||
pc->u.Osbpa.bmap = CellPtoHeapAdjust(pc->u.Osbpa.bmap);
|
||||
pc->u.Osbpa.p = PtoPredAdjust(pc->u.Osbpa.p);
|
||||
pc->u.Osbpa.i = ArityAdjust(pc->u.Osbpa.i);
|
||||
OrArgAdjust(pc->y_u.Osbpa.or_arg);
|
||||
pc->y_u.Osbpa.s = ConstantAdjust(pc->y_u.Osbpa.s);
|
||||
pc->y_u.Osbpa.bmap = CellPtoHeapAdjust(pc->y_u.Osbpa.bmap);
|
||||
pc->y_u.Osbpa.p = PtoPredAdjust(pc->y_u.Osbpa.p);
|
||||
pc->y_u.Osbpa.i = ArityAdjust(pc->y_u.Osbpa.i);
|
||||
pc = NEXTOP(pc,Osbpa);
|
||||
break;
|
||||
/* instructions type Osbpp */
|
||||
@ -76,22 +76,22 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _call_usercpred:
|
||||
case _fcall:
|
||||
case _p_execute2:
|
||||
OrArgAdjust(pc->u.Osbpp.or_arg);
|
||||
pc->u.Osbpp.s = ConstantAdjust(pc->u.Osbpp.s);
|
||||
pc->u.Osbpp.bmap = CellPtoHeapAdjust(pc->u.Osbpp.bmap);
|
||||
pc->u.Osbpp.p = PtoPredAdjust(pc->u.Osbpp.p);
|
||||
pc->u.Osbpp.p0 = PtoPredAdjust(pc->u.Osbpp.p0);
|
||||
OrArgAdjust(pc->y_u.Osbpp.or_arg);
|
||||
pc->y_u.Osbpp.s = ConstantAdjust(pc->y_u.Osbpp.s);
|
||||
pc->y_u.Osbpp.bmap = CellPtoHeapAdjust(pc->y_u.Osbpp.bmap);
|
||||
pc->y_u.Osbpp.p = PtoPredAdjust(pc->y_u.Osbpp.p);
|
||||
pc->y_u.Osbpp.p0 = PtoPredAdjust(pc->y_u.Osbpp.p0);
|
||||
pc = NEXTOP(pc,Osbpp);
|
||||
break;
|
||||
/* instructions type OtILl */
|
||||
case _count_trust_logical:
|
||||
case _profiled_trust_logical:
|
||||
case _trust_logical:
|
||||
OrArgAdjust(pc->u.OtILl.or_arg);
|
||||
TabEntryAdjust(pc->u.OtILl.te);
|
||||
pc->u.OtILl.block = PtoLUIndexAdjust(pc->u.OtILl.block);
|
||||
pc->u.OtILl.d = PtoLUClauseAdjust(pc->u.OtILl.d);
|
||||
pc->u.OtILl.n = PtoOpAdjust(pc->u.OtILl.n);
|
||||
OrArgAdjust(pc->y_u.OtILl.or_arg);
|
||||
TabEntryAdjust(pc->y_u.OtILl.te);
|
||||
pc->y_u.OtILl.block = PtoLUIndexAdjust(pc->y_u.OtILl.block);
|
||||
pc->y_u.OtILl.d = PtoLUClauseAdjust(pc->y_u.OtILl.d);
|
||||
pc->y_u.OtILl.n = PtoOpAdjust(pc->y_u.OtILl.n);
|
||||
pc = opc;
|
||||
break;
|
||||
/* instructions type OtaLl */
|
||||
@ -99,12 +99,12 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _profiled_retry_logical:
|
||||
case _retry_logical:
|
||||
case _try_logical:
|
||||
OrArgAdjust(pc->u.OtaLl.or_arg);
|
||||
TabEntryAdjust(pc->u.OtaLl.te);
|
||||
pc->u.OtaLl.s = ArityAdjust(pc->u.OtaLl.s);
|
||||
pc->u.OtaLl.d = PtoLUClauseAdjust(pc->u.OtaLl.d);
|
||||
pc->u.OtaLl.n = PtoOpAdjust(pc->u.OtaLl.n);
|
||||
pc = pc->u.OtaLl.n;
|
||||
OrArgAdjust(pc->y_u.OtaLl.or_arg);
|
||||
TabEntryAdjust(pc->y_u.OtaLl.te);
|
||||
pc->y_u.OtaLl.s = ArityAdjust(pc->y_u.OtaLl.s);
|
||||
pc->y_u.OtaLl.d = PtoLUClauseAdjust(pc->y_u.OtaLl.d);
|
||||
pc->y_u.OtaLl.n = PtoOpAdjust(pc->y_u.OtaLl.n);
|
||||
pc = pc->y_u.OtaLl.n;
|
||||
break;
|
||||
/* instructions type OtapFs */
|
||||
case _cut_c:
|
||||
@ -113,12 +113,12 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _retry_userc:
|
||||
case _try_c:
|
||||
case _try_userc:
|
||||
OrArgAdjust(pc->u.OtapFs.or_arg);
|
||||
TabEntryAdjust(pc->u.OtapFs.te);
|
||||
pc->u.OtapFs.s = ArityAdjust(pc->u.OtapFs.s);
|
||||
pc->u.OtapFs.p = PtoPredAdjust(pc->u.OtapFs.p);
|
||||
pc->u.OtapFs.f = ExternalFunctionAdjust(pc->u.OtapFs.f);
|
||||
pc->u.OtapFs.extra = ConstantAdjust(pc->u.OtapFs.extra);
|
||||
OrArgAdjust(pc->y_u.OtapFs.or_arg);
|
||||
TabEntryAdjust(pc->y_u.OtapFs.te);
|
||||
pc->y_u.OtapFs.s = ArityAdjust(pc->y_u.OtapFs.s);
|
||||
pc->y_u.OtapFs.p = PtoPredAdjust(pc->y_u.OtapFs.p);
|
||||
pc->y_u.OtapFs.f = ExternalFunctionAdjust(pc->y_u.OtapFs.f);
|
||||
pc->y_u.OtapFs.extra = ConstantAdjust(pc->y_u.OtapFs.extra);
|
||||
pc = NEXTOP(pc,OtapFs);
|
||||
break;
|
||||
/* instructions type Otapl */
|
||||
@ -137,77 +137,77 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _try_and_mark:
|
||||
case _try_clause:
|
||||
case _try_me:
|
||||
OrArgAdjust(pc->u.Otapl.or_arg);
|
||||
TabEntryAdjust(pc->u.Otapl.te);
|
||||
pc->u.Otapl.s = ArityAdjust(pc->u.Otapl.s);
|
||||
pc->u.Otapl.p = PtoPredAdjust(pc->u.Otapl.p);
|
||||
pc->u.Otapl.d = PtoOpAdjust(pc->u.Otapl.d);
|
||||
OrArgAdjust(pc->y_u.Otapl.or_arg);
|
||||
TabEntryAdjust(pc->y_u.Otapl.te);
|
||||
pc->y_u.Otapl.s = ArityAdjust(pc->y_u.Otapl.s);
|
||||
pc->y_u.Otapl.p = PtoPredAdjust(pc->y_u.Otapl.p);
|
||||
pc->y_u.Otapl.d = PtoOpAdjust(pc->y_u.Otapl.d);
|
||||
pc = NEXTOP(pc,Otapl);
|
||||
break;
|
||||
/* instructions type aFlp */
|
||||
case _native_me:
|
||||
pc->u.aFlp.n = ArityAdjust(pc->u.aFlp.n);
|
||||
pc->u.aFlp.native = ExternalFunctionAdjust(pc->u.aFlp.native);
|
||||
pc->u.aFlp.native_next = PtoOpAdjust(pc->u.aFlp.native_next);
|
||||
pc->u.aFlp.p = PtoPredAdjust(pc->u.aFlp.p);
|
||||
pc->y_u.aFlp.n = ArityAdjust(pc->y_u.aFlp.n);
|
||||
pc->y_u.aFlp.native = ExternalFunctionAdjust(pc->y_u.aFlp.native);
|
||||
pc->y_u.aFlp.native_next = PtoOpAdjust(pc->y_u.aFlp.native_next);
|
||||
pc->y_u.aFlp.p = PtoPredAdjust(pc->y_u.aFlp.p);
|
||||
pc = NEXTOP(pc,aFlp);
|
||||
break;
|
||||
/* instructions type c */
|
||||
case _write_atom:
|
||||
pc->u.c.c = ConstantTermAdjust(pc->u.c.c);
|
||||
pc->y_u.c.c = ConstantTermAdjust(pc->y_u.c.c);
|
||||
pc = NEXTOP(pc,c);
|
||||
break;
|
||||
/* instructions type cc */
|
||||
case _get_2atoms:
|
||||
pc->u.cc.c1 = ConstantTermAdjust(pc->u.cc.c1);
|
||||
pc->u.cc.c2 = ConstantTermAdjust(pc->u.cc.c2);
|
||||
pc->y_u.cc.c1 = ConstantTermAdjust(pc->y_u.cc.c1);
|
||||
pc->y_u.cc.c2 = ConstantTermAdjust(pc->y_u.cc.c2);
|
||||
pc = NEXTOP(pc,cc);
|
||||
break;
|
||||
/* instructions type ccc */
|
||||
case _get_3atoms:
|
||||
pc->u.ccc.c1 = ConstantTermAdjust(pc->u.ccc.c1);
|
||||
pc->u.ccc.c2 = ConstantTermAdjust(pc->u.ccc.c2);
|
||||
pc->u.ccc.c3 = ConstantTermAdjust(pc->u.ccc.c3);
|
||||
pc->y_u.ccc.c1 = ConstantTermAdjust(pc->y_u.ccc.c1);
|
||||
pc->y_u.ccc.c2 = ConstantTermAdjust(pc->y_u.ccc.c2);
|
||||
pc->y_u.ccc.c3 = ConstantTermAdjust(pc->y_u.ccc.c3);
|
||||
pc = NEXTOP(pc,ccc);
|
||||
break;
|
||||
/* instructions type cccc */
|
||||
case _get_4atoms:
|
||||
pc->u.cccc.c1 = ConstantTermAdjust(pc->u.cccc.c1);
|
||||
pc->u.cccc.c2 = ConstantTermAdjust(pc->u.cccc.c2);
|
||||
pc->u.cccc.c3 = ConstantTermAdjust(pc->u.cccc.c3);
|
||||
pc->u.cccc.c4 = ConstantTermAdjust(pc->u.cccc.c4);
|
||||
pc->y_u.cccc.c1 = ConstantTermAdjust(pc->y_u.cccc.c1);
|
||||
pc->y_u.cccc.c2 = ConstantTermAdjust(pc->y_u.cccc.c2);
|
||||
pc->y_u.cccc.c3 = ConstantTermAdjust(pc->y_u.cccc.c3);
|
||||
pc->y_u.cccc.c4 = ConstantTermAdjust(pc->y_u.cccc.c4);
|
||||
pc = NEXTOP(pc,cccc);
|
||||
break;
|
||||
/* instructions type ccccc */
|
||||
case _get_5atoms:
|
||||
pc->u.ccccc.c1 = ConstantTermAdjust(pc->u.ccccc.c1);
|
||||
pc->u.ccccc.c2 = ConstantTermAdjust(pc->u.ccccc.c2);
|
||||
pc->u.ccccc.c3 = ConstantTermAdjust(pc->u.ccccc.c3);
|
||||
pc->u.ccccc.c4 = ConstantTermAdjust(pc->u.ccccc.c4);
|
||||
pc->u.ccccc.c5 = ConstantTermAdjust(pc->u.ccccc.c5);
|
||||
pc->y_u.ccccc.c1 = ConstantTermAdjust(pc->y_u.ccccc.c1);
|
||||
pc->y_u.ccccc.c2 = ConstantTermAdjust(pc->y_u.ccccc.c2);
|
||||
pc->y_u.ccccc.c3 = ConstantTermAdjust(pc->y_u.ccccc.c3);
|
||||
pc->y_u.ccccc.c4 = ConstantTermAdjust(pc->y_u.ccccc.c4);
|
||||
pc->y_u.ccccc.c5 = ConstantTermAdjust(pc->y_u.ccccc.c5);
|
||||
pc = NEXTOP(pc,ccccc);
|
||||
break;
|
||||
/* instructions type cccccc */
|
||||
case _get_6atoms:
|
||||
pc->u.cccccc.c1 = ConstantTermAdjust(pc->u.cccccc.c1);
|
||||
pc->u.cccccc.c2 = ConstantTermAdjust(pc->u.cccccc.c2);
|
||||
pc->u.cccccc.c3 = ConstantTermAdjust(pc->u.cccccc.c3);
|
||||
pc->u.cccccc.c4 = ConstantTermAdjust(pc->u.cccccc.c4);
|
||||
pc->u.cccccc.c5 = ConstantTermAdjust(pc->u.cccccc.c5);
|
||||
pc->u.cccccc.c6 = ConstantTermAdjust(pc->u.cccccc.c6);
|
||||
pc->y_u.cccccc.c1 = ConstantTermAdjust(pc->y_u.cccccc.c1);
|
||||
pc->y_u.cccccc.c2 = ConstantTermAdjust(pc->y_u.cccccc.c2);
|
||||
pc->y_u.cccccc.c3 = ConstantTermAdjust(pc->y_u.cccccc.c3);
|
||||
pc->y_u.cccccc.c4 = ConstantTermAdjust(pc->y_u.cccccc.c4);
|
||||
pc->y_u.cccccc.c5 = ConstantTermAdjust(pc->y_u.cccccc.c5);
|
||||
pc->y_u.cccccc.c6 = ConstantTermAdjust(pc->y_u.cccccc.c6);
|
||||
pc = NEXTOP(pc,cccccc);
|
||||
break;
|
||||
/* instructions type clll */
|
||||
case _if_not_then:
|
||||
pc->u.clll.c = ConstantTermAdjust(pc->u.clll.c);
|
||||
pc->u.clll.l1 = PtoOpAdjust(pc->u.clll.l1);
|
||||
pc->u.clll.l2 = PtoOpAdjust(pc->u.clll.l2);
|
||||
pc->u.clll.l3 = PtoOpAdjust(pc->u.clll.l3);
|
||||
pc->y_u.clll.c = ConstantTermAdjust(pc->y_u.clll.c);
|
||||
pc->y_u.clll.l1 = PtoOpAdjust(pc->y_u.clll.l1);
|
||||
pc->y_u.clll.l2 = PtoOpAdjust(pc->y_u.clll.l2);
|
||||
pc->y_u.clll.l3 = PtoOpAdjust(pc->y_u.clll.l3);
|
||||
pc = NEXTOP(pc,clll);
|
||||
break;
|
||||
/* instructions type d */
|
||||
case _write_float:
|
||||
DoubleInCodeAdjust(pc->u.d.d);
|
||||
DoubleInCodeAdjust(pc->y_u.d.d);
|
||||
pc = NEXTOP(pc,d);
|
||||
break;
|
||||
/* instructions type e */
|
||||
@ -245,13 +245,13 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
/* instructions type fa */
|
||||
case _write_l_struc:
|
||||
case _write_struct:
|
||||
pc->u.fa.f = FuncAdjust(pc->u.fa.f);
|
||||
pc->u.fa.a = ArityAdjust(pc->u.fa.a);
|
||||
pc->y_u.fa.f = FuncAdjust(pc->y_u.fa.f);
|
||||
pc->y_u.fa.a = ArityAdjust(pc->y_u.fa.a);
|
||||
pc = NEXTOP(pc,fa);
|
||||
break;
|
||||
/* instructions type i */
|
||||
case _write_longint:
|
||||
IntegerInCodeAdjust(pc->u.i.i);
|
||||
IntegerInCodeAdjust(pc->y_u.i.i);
|
||||
pc = NEXTOP(pc,i);
|
||||
break;
|
||||
/* instructions type l */
|
||||
@ -269,16 +269,16 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _try_clause3:
|
||||
case _try_clause4:
|
||||
case _try_in:
|
||||
pc->u.l.l = PtoOpAdjust(pc->u.l.l);
|
||||
pc->y_u.l.l = PtoOpAdjust(pc->y_u.l.l);
|
||||
if (op == _Ystop) return;
|
||||
pc = NEXTOP(pc,l);
|
||||
break;
|
||||
/* instructions type llll */
|
||||
case _switch_on_type:
|
||||
pc->u.llll.l1 = PtoOpAdjust(pc->u.llll.l1);
|
||||
pc->u.llll.l2 = PtoOpAdjust(pc->u.llll.l2);
|
||||
pc->u.llll.l3 = PtoOpAdjust(pc->u.llll.l3);
|
||||
pc->u.llll.l4 = PtoOpAdjust(pc->u.llll.l4);
|
||||
pc->y_u.llll.l1 = PtoOpAdjust(pc->y_u.llll.l1);
|
||||
pc->y_u.llll.l2 = PtoOpAdjust(pc->y_u.llll.l2);
|
||||
pc->y_u.llll.l3 = PtoOpAdjust(pc->y_u.llll.l3);
|
||||
pc->y_u.llll.l4 = PtoOpAdjust(pc->y_u.llll.l4);
|
||||
pc = NEXTOP(pc,llll);
|
||||
break;
|
||||
/* instructions type lp */
|
||||
@ -289,8 +289,8 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _try_exo:
|
||||
case _try_exo_udi:
|
||||
case _user_switch:
|
||||
pc->u.lp.l = PtoOpAdjust(pc->u.lp.l);
|
||||
pc->u.lp.p = PtoPredAdjust(pc->u.lp.p);
|
||||
pc->y_u.lp.l = PtoOpAdjust(pc->y_u.lp.l);
|
||||
pc->y_u.lp.p = PtoPredAdjust(pc->y_u.lp.p);
|
||||
pc = NEXTOP(pc,lp);
|
||||
break;
|
||||
/* instructions type o */
|
||||
@ -302,21 +302,21 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _unify_list_write:
|
||||
case _unify_void:
|
||||
case _unify_void_write:
|
||||
pc->u.o.opcw = OpcodeAdjust(pc->u.o.opcw);
|
||||
pc->y_u.o.opcw = OpcodeAdjust(pc->y_u.o.opcw);
|
||||
pc = NEXTOP(pc,o);
|
||||
break;
|
||||
/* instructions type oD */
|
||||
case _unify_dbterm:
|
||||
case _unify_l_dbterm:
|
||||
pc->u.oD.opcw = OpcodeAdjust(pc->u.oD.opcw);
|
||||
pc->u.oD.D = DBGroundTermAdjust(pc->u.oD.D);
|
||||
pc->y_u.oD.opcw = OpcodeAdjust(pc->y_u.oD.opcw);
|
||||
pc->y_u.oD.D = DBGroundTermAdjust(pc->y_u.oD.D);
|
||||
pc = NEXTOP(pc,oD);
|
||||
break;
|
||||
/* instructions type oN */
|
||||
case _unify_bigint:
|
||||
case _unify_l_bigint:
|
||||
pc->u.oN.opcw = OpcodeAdjust(pc->u.oN.opcw);
|
||||
pc->u.oN.b = BlobTermInCodeAdjust(pc->u.oN.b);
|
||||
pc->y_u.oN.opcw = OpcodeAdjust(pc->y_u.oN.opcw);
|
||||
pc->y_u.oN.b = BlobTermInCodeAdjust(pc->y_u.oN.b);
|
||||
pc = NEXTOP(pc,oN);
|
||||
break;
|
||||
/* instructions type oc */
|
||||
@ -324,8 +324,8 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _unify_atom_write:
|
||||
case _unify_l_atom:
|
||||
case _unify_l_atom_write:
|
||||
pc->u.oc.opcw = OpcodeAdjust(pc->u.oc.opcw);
|
||||
pc->u.oc.c = ConstantTermAdjust(pc->u.oc.c);
|
||||
pc->y_u.oc.opcw = OpcodeAdjust(pc->y_u.oc.opcw);
|
||||
pc->y_u.oc.c = ConstantTermAdjust(pc->y_u.oc.c);
|
||||
pc = NEXTOP(pc,oc);
|
||||
break;
|
||||
/* instructions type od */
|
||||
@ -333,8 +333,8 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _unify_float_write:
|
||||
case _unify_l_float:
|
||||
case _unify_l_float_write:
|
||||
pc->u.od.opcw = OpcodeAdjust(pc->u.od.opcw);
|
||||
DoubleInCodeAdjust(pc->u.od.d);
|
||||
pc->y_u.od.opcw = OpcodeAdjust(pc->y_u.od.opcw);
|
||||
DoubleInCodeAdjust(pc->y_u.od.d);
|
||||
pc = NEXTOP(pc,od);
|
||||
break;
|
||||
/* instructions type ofa */
|
||||
@ -342,9 +342,9 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _unify_l_struc_write:
|
||||
case _unify_struct:
|
||||
case _unify_struct_write:
|
||||
pc->u.ofa.opcw = OpcodeAdjust(pc->u.ofa.opcw);
|
||||
pc->u.ofa.f = FuncAdjust(pc->u.ofa.f);
|
||||
pc->u.ofa.a = ArityAdjust(pc->u.ofa.a);
|
||||
pc->y_u.ofa.opcw = OpcodeAdjust(pc->y_u.ofa.opcw);
|
||||
pc->y_u.ofa.f = FuncAdjust(pc->y_u.ofa.f);
|
||||
pc->y_u.ofa.a = ArityAdjust(pc->y_u.ofa.a);
|
||||
pc = NEXTOP(pc,ofa);
|
||||
break;
|
||||
/* instructions type oi */
|
||||
@ -352,17 +352,17 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _unify_l_longint_write:
|
||||
case _unify_longint:
|
||||
case _unify_longint_write:
|
||||
pc->u.oi.opcw = OpcodeAdjust(pc->u.oi.opcw);
|
||||
IntegerInCodeAdjust(pc->u.oi.i);
|
||||
pc->y_u.oi.opcw = OpcodeAdjust(pc->y_u.oi.opcw);
|
||||
IntegerInCodeAdjust(pc->y_u.oi.i);
|
||||
pc = NEXTOP(pc,oi);
|
||||
break;
|
||||
/* instructions type ollll */
|
||||
case _switch_list_nl:
|
||||
pc->u.ollll.pop = OpcodeAdjust(pc->u.ollll.pop);
|
||||
pc->u.ollll.l1 = PtoOpAdjust(pc->u.ollll.l1);
|
||||
pc->u.ollll.l2 = PtoOpAdjust(pc->u.ollll.l2);
|
||||
pc->u.ollll.l3 = PtoOpAdjust(pc->u.ollll.l3);
|
||||
pc->u.ollll.l4 = PtoOpAdjust(pc->u.ollll.l4);
|
||||
pc->y_u.ollll.pop = OpcodeAdjust(pc->y_u.ollll.pop);
|
||||
pc->y_u.ollll.l1 = PtoOpAdjust(pc->y_u.ollll.l1);
|
||||
pc->y_u.ollll.l2 = PtoOpAdjust(pc->y_u.ollll.l2);
|
||||
pc->y_u.ollll.l3 = PtoOpAdjust(pc->y_u.ollll.l3);
|
||||
pc->y_u.ollll.l4 = PtoOpAdjust(pc->y_u.ollll.l4);
|
||||
pc = NEXTOP(pc,ollll);
|
||||
break;
|
||||
/* instructions type os */
|
||||
@ -373,23 +373,23 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _unify_l_n_voids_write:
|
||||
case _unify_n_voids:
|
||||
case _unify_n_voids_write:
|
||||
pc->u.os.opcw = OpcodeAdjust(pc->u.os.opcw);
|
||||
pc->u.os.s = ConstantAdjust(pc->u.os.s);
|
||||
pc->y_u.os.opcw = OpcodeAdjust(pc->y_u.os.opcw);
|
||||
pc->y_u.os.s = ConstantAdjust(pc->y_u.os.s);
|
||||
pc = NEXTOP(pc,os);
|
||||
break;
|
||||
/* instructions type osc */
|
||||
case _unify_n_atoms:
|
||||
case _unify_n_atoms_write:
|
||||
pc->u.osc.opcw = OpcodeAdjust(pc->u.osc.opcw);
|
||||
pc->u.osc.s = ConstantAdjust(pc->u.osc.s);
|
||||
pc->u.osc.c = ConstantTermAdjust(pc->u.osc.c);
|
||||
pc->y_u.osc.opcw = OpcodeAdjust(pc->y_u.osc.opcw);
|
||||
pc->y_u.osc.s = ConstantAdjust(pc->y_u.osc.s);
|
||||
pc->y_u.osc.c = ConstantTermAdjust(pc->y_u.osc.c);
|
||||
pc = NEXTOP(pc,osc);
|
||||
break;
|
||||
/* instructions type ou */
|
||||
case _unify_l_string:
|
||||
case _unify_string:
|
||||
pc->u.ou.opcw = OpcodeAdjust(pc->u.ou.opcw);
|
||||
pc->u.ou.ut = BlobTermInCodeAdjust(pc->u.ou.ut);
|
||||
pc->y_u.ou.opcw = OpcodeAdjust(pc->y_u.ou.opcw);
|
||||
pc->y_u.ou.ut = BlobTermInCodeAdjust(pc->y_u.ou.ut);
|
||||
pc = NEXTOP(pc,ou);
|
||||
break;
|
||||
/* instructions type ox */
|
||||
@ -409,8 +409,8 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _unify_x_val_write:
|
||||
case _unify_x_var:
|
||||
case _unify_x_var_write:
|
||||
pc->u.ox.opcw = OpcodeAdjust(pc->u.ox.opcw);
|
||||
pc->u.ox.x = XAdjust(pc->u.ox.x);
|
||||
pc->y_u.ox.opcw = OpcodeAdjust(pc->y_u.ox.opcw);
|
||||
pc->y_u.ox.x = XAdjust(pc->y_u.ox.x);
|
||||
pc = NEXTOP(pc,ox);
|
||||
break;
|
||||
/* instructions type oxx */
|
||||
@ -418,9 +418,9 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _unify_l_x_var2_write:
|
||||
case _unify_x_var2:
|
||||
case _unify_x_var2_write:
|
||||
pc->u.oxx.opcw = OpcodeAdjust(pc->u.oxx.opcw);
|
||||
pc->u.oxx.xl = XAdjust(pc->u.oxx.xl);
|
||||
pc->u.oxx.xr = XAdjust(pc->u.oxx.xr);
|
||||
pc->y_u.oxx.opcw = OpcodeAdjust(pc->y_u.oxx.opcw);
|
||||
pc->y_u.oxx.xl = XAdjust(pc->y_u.oxx.xl);
|
||||
pc->y_u.oxx.xr = XAdjust(pc->y_u.oxx.xr);
|
||||
pc = NEXTOP(pc,oxx);
|
||||
break;
|
||||
/* instructions type oy */
|
||||
@ -440,8 +440,8 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _unify_y_val_write:
|
||||
case _unify_y_var:
|
||||
case _unify_y_var_write:
|
||||
pc->u.oy.opcw = OpcodeAdjust(pc->u.oy.opcw);
|
||||
pc->u.oy.y = YAdjust(pc->u.oy.y);
|
||||
pc->y_u.oy.opcw = OpcodeAdjust(pc->y_u.oy.opcw);
|
||||
pc->y_u.oy.y = YAdjust(pc->y_u.oy.y);
|
||||
pc = NEXTOP(pc,oy);
|
||||
break;
|
||||
/* instructions type p */
|
||||
@ -454,43 +454,43 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _retry_profiled:
|
||||
case _retry_udi:
|
||||
case _try_udi:
|
||||
pc->u.p.p = PtoPredAdjust(pc->u.p.p);
|
||||
pc->y_u.p.p = PtoPredAdjust(pc->y_u.p.p);
|
||||
pc = NEXTOP(pc,p);
|
||||
break;
|
||||
/* instructions type plxxs */
|
||||
case _call_bfunc_xx:
|
||||
pc->u.plxxs.p = PtoPredAdjust(pc->u.plxxs.p);
|
||||
pc->u.plxxs.f = PtoOpAdjust(pc->u.plxxs.f);
|
||||
pc->u.plxxs.x1 = XAdjust(pc->u.plxxs.x1);
|
||||
pc->u.plxxs.x2 = XAdjust(pc->u.plxxs.x2);
|
||||
pc->u.plxxs.flags = ConstantAdjust(pc->u.plxxs.flags);
|
||||
pc->y_u.plxxs.p = PtoPredAdjust(pc->y_u.plxxs.p);
|
||||
pc->y_u.plxxs.f = PtoOpAdjust(pc->y_u.plxxs.f);
|
||||
pc->y_u.plxxs.x1 = XAdjust(pc->y_u.plxxs.x1);
|
||||
pc->y_u.plxxs.x2 = XAdjust(pc->y_u.plxxs.x2);
|
||||
pc->y_u.plxxs.flags = ConstantAdjust(pc->y_u.plxxs.flags);
|
||||
pc = NEXTOP(pc,plxxs);
|
||||
break;
|
||||
/* instructions type plxys */
|
||||
case _call_bfunc_xy:
|
||||
case _call_bfunc_yx:
|
||||
pc->u.plxys.p = PtoPredAdjust(pc->u.plxys.p);
|
||||
pc->u.plxys.f = PtoOpAdjust(pc->u.plxys.f);
|
||||
pc->u.plxys.x = XAdjust(pc->u.plxys.x);
|
||||
pc->u.plxys.y = YAdjust(pc->u.plxys.y);
|
||||
pc->u.plxys.flags = ConstantAdjust(pc->u.plxys.flags);
|
||||
pc->y_u.plxys.p = PtoPredAdjust(pc->y_u.plxys.p);
|
||||
pc->y_u.plxys.f = PtoOpAdjust(pc->y_u.plxys.f);
|
||||
pc->y_u.plxys.x = XAdjust(pc->y_u.plxys.x);
|
||||
pc->y_u.plxys.y = YAdjust(pc->y_u.plxys.y);
|
||||
pc->y_u.plxys.flags = ConstantAdjust(pc->y_u.plxys.flags);
|
||||
pc = NEXTOP(pc,plxys);
|
||||
break;
|
||||
/* instructions type plyys */
|
||||
case _call_bfunc_yy:
|
||||
pc->u.plyys.p = PtoPredAdjust(pc->u.plyys.p);
|
||||
pc->u.plyys.f = PtoOpAdjust(pc->u.plyys.f);
|
||||
pc->u.plyys.y1 = YAdjust(pc->u.plyys.y1);
|
||||
pc->u.plyys.y2 = YAdjust(pc->u.plyys.y2);
|
||||
pc->u.plyys.flags = ConstantAdjust(pc->u.plyys.flags);
|
||||
pc->y_u.plyys.p = PtoPredAdjust(pc->y_u.plyys.p);
|
||||
pc->y_u.plyys.f = PtoOpAdjust(pc->y_u.plyys.f);
|
||||
pc->y_u.plyys.y1 = YAdjust(pc->y_u.plyys.y1);
|
||||
pc->y_u.plyys.y2 = YAdjust(pc->y_u.plyys.y2);
|
||||
pc->y_u.plyys.flags = ConstantAdjust(pc->y_u.plyys.flags);
|
||||
pc = NEXTOP(pc,plyys);
|
||||
break;
|
||||
/* instructions type pp */
|
||||
case _dexecute:
|
||||
case _execute:
|
||||
case _execute_cpred:
|
||||
pc->u.pp.p = PtoPredAdjust(pc->u.pp.p);
|
||||
pc->u.pp.p0 = PtoPredAdjust(pc->u.pp.p0);
|
||||
pc->y_u.pp.p = PtoPredAdjust(pc->y_u.pp.p);
|
||||
pc->y_u.pp.p0 = PtoPredAdjust(pc->y_u.pp.p0);
|
||||
pc = NEXTOP(pc,pp);
|
||||
break;
|
||||
/* instructions type s */
|
||||
@ -499,29 +499,29 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _cut_t:
|
||||
case _pop_n:
|
||||
case _write_n_voids:
|
||||
pc->u.s.s = ConstantAdjust(pc->u.s.s);
|
||||
pc->y_u.s.s = ConstantAdjust(pc->y_u.s.s);
|
||||
pc = NEXTOP(pc,s);
|
||||
break;
|
||||
/* instructions type sc */
|
||||
case _write_n_atoms:
|
||||
pc->u.sc.s = ConstantAdjust(pc->u.sc.s);
|
||||
pc->u.sc.c = ConstantTermAdjust(pc->u.sc.c);
|
||||
pc->y_u.sc.s = ConstantAdjust(pc->y_u.sc.s);
|
||||
pc->y_u.sc.c = ConstantTermAdjust(pc->y_u.sc.c);
|
||||
pc = NEXTOP(pc,sc);
|
||||
break;
|
||||
/* instructions type sllll */
|
||||
case _switch_on_sub_arg_type:
|
||||
pc->u.sllll.s = ConstantAdjust(pc->u.sllll.s);
|
||||
pc->u.sllll.l1 = PtoOpAdjust(pc->u.sllll.l1);
|
||||
pc->u.sllll.l2 = PtoOpAdjust(pc->u.sllll.l2);
|
||||
pc->u.sllll.l3 = PtoOpAdjust(pc->u.sllll.l3);
|
||||
pc->u.sllll.l4 = PtoOpAdjust(pc->u.sllll.l4);
|
||||
pc->y_u.sllll.s = ConstantAdjust(pc->y_u.sllll.s);
|
||||
pc->y_u.sllll.l1 = PtoOpAdjust(pc->y_u.sllll.l1);
|
||||
pc->y_u.sllll.l2 = PtoOpAdjust(pc->y_u.sllll.l2);
|
||||
pc->y_u.sllll.l3 = PtoOpAdjust(pc->y_u.sllll.l3);
|
||||
pc->y_u.sllll.l4 = PtoOpAdjust(pc->y_u.sllll.l4);
|
||||
pc = NEXTOP(pc,sllll);
|
||||
break;
|
||||
/* instructions type slp */
|
||||
case _call_c_wfail:
|
||||
pc->u.slp.s = ConstantAdjust(pc->u.slp.s);
|
||||
pc->u.slp.l = PtoOpAdjust(pc->u.slp.l);
|
||||
pc->u.slp.p = PtoPredAdjust(pc->u.slp.p);
|
||||
pc->y_u.slp.s = ConstantAdjust(pc->y_u.slp.s);
|
||||
pc->y_u.slp.l = PtoOpAdjust(pc->y_u.slp.l);
|
||||
pc->y_u.slp.p = PtoPredAdjust(pc->y_u.slp.p);
|
||||
pc = NEXTOP(pc,slp);
|
||||
break;
|
||||
/* instructions type sssl */
|
||||
@ -531,21 +531,21 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _if_func:
|
||||
case _switch_on_cons:
|
||||
case _switch_on_func:
|
||||
pc->u.sssl.s = ConstantAdjust(pc->u.sssl.s);
|
||||
pc->u.sssl.e = ConstantAdjust(pc->u.sssl.e);
|
||||
pc->u.sssl.w = ConstantAdjust(pc->u.sssl.w);
|
||||
pc->u.sssl.l = PtoOpAdjust(pc->u.sssl.l);
|
||||
AdjustSwitchTable(op, pc->u.sssl.l, pc->u.sssl.s);
|
||||
pc->y_u.sssl.s = ConstantAdjust(pc->y_u.sssl.s);
|
||||
pc->y_u.sssl.e = ConstantAdjust(pc->y_u.sssl.e);
|
||||
pc->y_u.sssl.w = ConstantAdjust(pc->y_u.sssl.w);
|
||||
pc->y_u.sssl.l = PtoOpAdjust(pc->y_u.sssl.l);
|
||||
AdjustSwitchTable(op, pc->y_u.sssl.l, pc->y_u.sssl.s);
|
||||
pc = NEXTOP(pc,sssl);
|
||||
break;
|
||||
/* instructions type sssllp */
|
||||
case _expand_clauses:
|
||||
pc->u.sssllp.s1 = ConstantAdjust(pc->u.sssllp.s1);
|
||||
pc->u.sssllp.s2 = ConstantAdjust(pc->u.sssllp.s2);
|
||||
pc->u.sssllp.s3 = ConstantAdjust(pc->u.sssllp.s3);
|
||||
pc->u.sssllp.sprev = PtoOpAdjust(pc->u.sssllp.sprev);
|
||||
pc->u.sssllp.snext = PtoOpAdjust(pc->u.sssllp.snext);
|
||||
pc->u.sssllp.p = PtoPredAdjust(pc->u.sssllp.p);
|
||||
pc->y_u.sssllp.s1 = ConstantAdjust(pc->y_u.sssllp.s1);
|
||||
pc->y_u.sssllp.s2 = ConstantAdjust(pc->y_u.sssllp.s2);
|
||||
pc->y_u.sssllp.s3 = ConstantAdjust(pc->y_u.sssllp.s3);
|
||||
pc->y_u.sssllp.sprev = PtoOpAdjust(pc->y_u.sssllp.sprev);
|
||||
pc->y_u.sssllp.snext = PtoOpAdjust(pc->y_u.sssllp.snext);
|
||||
pc->y_u.sssllp.p = PtoPredAdjust(pc->y_u.sssllp.p);
|
||||
pc = NEXTOP(pc,sssllp);
|
||||
break;
|
||||
/* instructions type x */
|
||||
@ -556,50 +556,50 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _write_x_loc:
|
||||
case _write_x_val:
|
||||
case _write_x_var:
|
||||
pc->u.x.x = XAdjust(pc->u.x.x);
|
||||
pc->y_u.x.x = XAdjust(pc->y_u.x.x);
|
||||
pc = NEXTOP(pc,x);
|
||||
break;
|
||||
/* instructions type xD */
|
||||
case _get_dbterm:
|
||||
case _put_dbterm:
|
||||
pc->u.xD.x = XAdjust(pc->u.xD.x);
|
||||
pc->u.xD.D = DBGroundTermAdjust(pc->u.xD.D);
|
||||
pc->y_u.xD.x = XAdjust(pc->y_u.xD.x);
|
||||
pc->y_u.xD.D = DBGroundTermAdjust(pc->y_u.xD.D);
|
||||
pc = NEXTOP(pc,xD);
|
||||
break;
|
||||
/* instructions type xN */
|
||||
case _get_bigint:
|
||||
case _put_bigint:
|
||||
pc->u.xN.x = XAdjust(pc->u.xN.x);
|
||||
pc->u.xN.b = BlobTermInCodeAdjust(pc->u.xN.b);
|
||||
pc->y_u.xN.x = XAdjust(pc->y_u.xN.x);
|
||||
pc->y_u.xN.b = BlobTermInCodeAdjust(pc->y_u.xN.b);
|
||||
pc = NEXTOP(pc,xN);
|
||||
break;
|
||||
/* instructions type xc */
|
||||
case _get_atom:
|
||||
case _put_atom:
|
||||
pc->u.xc.x = XAdjust(pc->u.xc.x);
|
||||
pc->u.xc.c = ConstantTermAdjust(pc->u.xc.c);
|
||||
pc->y_u.xc.x = XAdjust(pc->y_u.xc.x);
|
||||
pc->y_u.xc.c = ConstantTermAdjust(pc->y_u.xc.c);
|
||||
pc = NEXTOP(pc,xc);
|
||||
break;
|
||||
/* instructions type xd */
|
||||
case _get_float:
|
||||
case _put_float:
|
||||
pc->u.xd.x = XAdjust(pc->u.xd.x);
|
||||
DoubleInCodeAdjust(pc->u.xd.d);
|
||||
pc->y_u.xd.x = XAdjust(pc->y_u.xd.x);
|
||||
DoubleInCodeAdjust(pc->y_u.xd.d);
|
||||
pc = NEXTOP(pc,xd);
|
||||
break;
|
||||
/* instructions type xfa */
|
||||
case _get_struct:
|
||||
case _put_struct:
|
||||
pc->u.xfa.x = XAdjust(pc->u.xfa.x);
|
||||
pc->u.xfa.f = FuncAdjust(pc->u.xfa.f);
|
||||
pc->u.xfa.a = ArityAdjust(pc->u.xfa.a);
|
||||
pc->y_u.xfa.x = XAdjust(pc->y_u.xfa.x);
|
||||
pc->y_u.xfa.f = FuncAdjust(pc->y_u.xfa.f);
|
||||
pc->y_u.xfa.a = ArityAdjust(pc->y_u.xfa.a);
|
||||
pc = NEXTOP(pc,xfa);
|
||||
break;
|
||||
/* instructions type xi */
|
||||
case _get_longint:
|
||||
case _put_longint:
|
||||
pc->u.xi.x = XAdjust(pc->u.xi.x);
|
||||
IntegerInCodeAdjust(pc->u.xi.i);
|
||||
pc->y_u.xi.x = XAdjust(pc->y_u.xi.x);
|
||||
IntegerInCodeAdjust(pc->y_u.xi.i);
|
||||
pc = NEXTOP(pc,xi);
|
||||
break;
|
||||
/* instructions type xl */
|
||||
@ -613,37 +613,37 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _p_number_x:
|
||||
case _p_primitive_x:
|
||||
case _p_var_x:
|
||||
pc->u.xl.x = XAdjust(pc->u.xl.x);
|
||||
pc->u.xl.F = PtoOpAdjust(pc->u.xl.F);
|
||||
pc->y_u.xl.x = XAdjust(pc->y_u.xl.x);
|
||||
pc->y_u.xl.F = PtoOpAdjust(pc->y_u.xl.F);
|
||||
pc = NEXTOP(pc,xl);
|
||||
break;
|
||||
/* instructions type xll */
|
||||
case _jump_if_nonvar:
|
||||
pc->u.xll.x = XAdjust(pc->u.xll.x);
|
||||
pc->u.xll.l1 = PtoOpAdjust(pc->u.xll.l1);
|
||||
pc->u.xll.l2 = PtoOpAdjust(pc->u.xll.l2);
|
||||
pc->y_u.xll.x = XAdjust(pc->y_u.xll.x);
|
||||
pc->y_u.xll.l1 = PtoOpAdjust(pc->y_u.xll.l1);
|
||||
pc->y_u.xll.l2 = PtoOpAdjust(pc->y_u.xll.l2);
|
||||
pc = NEXTOP(pc,xll);
|
||||
break;
|
||||
/* instructions type xllll */
|
||||
case _switch_on_arg_type:
|
||||
pc->u.xllll.x = XAdjust(pc->u.xllll.x);
|
||||
pc->u.xllll.l1 = PtoOpAdjust(pc->u.xllll.l1);
|
||||
pc->u.xllll.l2 = PtoOpAdjust(pc->u.xllll.l2);
|
||||
pc->u.xllll.l3 = PtoOpAdjust(pc->u.xllll.l3);
|
||||
pc->u.xllll.l4 = PtoOpAdjust(pc->u.xllll.l4);
|
||||
pc->y_u.xllll.x = XAdjust(pc->y_u.xllll.x);
|
||||
pc->y_u.xllll.l1 = PtoOpAdjust(pc->y_u.xllll.l1);
|
||||
pc->y_u.xllll.l2 = PtoOpAdjust(pc->y_u.xllll.l2);
|
||||
pc->y_u.xllll.l3 = PtoOpAdjust(pc->y_u.xllll.l3);
|
||||
pc->y_u.xllll.l4 = PtoOpAdjust(pc->y_u.xllll.l4);
|
||||
pc = NEXTOP(pc,xllll);
|
||||
break;
|
||||
/* instructions type xps */
|
||||
case _commit_b_x:
|
||||
pc->u.xps.x = XAdjust(pc->u.xps.x);
|
||||
pc->u.xps.p0 = PtoPredAdjust(pc->u.xps.p0);
|
||||
pc->u.xps.s = ConstantAdjust(pc->u.xps.s);
|
||||
pc->y_u.xps.x = XAdjust(pc->y_u.xps.x);
|
||||
pc->y_u.xps.p0 = PtoPredAdjust(pc->y_u.xps.p0);
|
||||
pc->y_u.xps.s = ConstantAdjust(pc->y_u.xps.s);
|
||||
pc = NEXTOP(pc,xps);
|
||||
break;
|
||||
/* instructions type xu */
|
||||
case _get_string:
|
||||
pc->u.xu.x = XAdjust(pc->u.xu.x);
|
||||
pc->u.xu.ut = BlobTermInCodeAdjust(pc->u.xu.ut);
|
||||
pc->y_u.xu.x = XAdjust(pc->y_u.xu.x);
|
||||
pc->y_u.xu.ut = BlobTermInCodeAdjust(pc->y_u.xu.ut);
|
||||
pc = NEXTOP(pc,xu);
|
||||
break;
|
||||
/* instructions type xx */
|
||||
@ -654,15 +654,15 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _glist_valx:
|
||||
case _put_x_val:
|
||||
case _put_x_var:
|
||||
pc->u.xx.xl = XAdjust(pc->u.xx.xl);
|
||||
pc->u.xx.xr = XAdjust(pc->u.xx.xr);
|
||||
pc->y_u.xx.xl = XAdjust(pc->y_u.xx.xl);
|
||||
pc->y_u.xx.xr = XAdjust(pc->y_u.xx.xr);
|
||||
pc = NEXTOP(pc,xx);
|
||||
break;
|
||||
/* instructions type xxc */
|
||||
case _p_func2s_cv:
|
||||
pc->u.xxc.x = XAdjust(pc->u.xxc.x);
|
||||
pc->u.xxc.xi = XAdjust(pc->u.xxc.xi);
|
||||
pc->u.xxc.c = ConstantTermAdjust(pc->u.xxc.c);
|
||||
pc->y_u.xxc.x = XAdjust(pc->y_u.xxc.x);
|
||||
pc->y_u.xxc.xi = XAdjust(pc->y_u.xxc.xi);
|
||||
pc->y_u.xxc.c = ConstantTermAdjust(pc->y_u.xxc.c);
|
||||
pc = NEXTOP(pc,xxc);
|
||||
break;
|
||||
/* instructions type xxn */
|
||||
@ -679,9 +679,9 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _p_slr_cv:
|
||||
case _p_slr_vc:
|
||||
case _p_times_vc:
|
||||
pc->u.xxn.x = XAdjust(pc->u.xxn.x);
|
||||
pc->u.xxn.xi = XAdjust(pc->u.xxn.xi);
|
||||
pc->u.xxn.c = IntegerAdjust(pc->u.xxn.c);
|
||||
pc->y_u.xxn.x = XAdjust(pc->y_u.xxn.x);
|
||||
pc->y_u.xxn.xi = XAdjust(pc->y_u.xxn.xi);
|
||||
pc->y_u.xxn.c = IntegerAdjust(pc->y_u.xxn.c);
|
||||
pc = NEXTOP(pc,xxn);
|
||||
break;
|
||||
/* instructions type xxx */
|
||||
@ -696,24 +696,24 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _p_sll_vv:
|
||||
case _p_slr_vv:
|
||||
case _p_times_vv:
|
||||
pc->u.xxx.x = XAdjust(pc->u.xxx.x);
|
||||
pc->u.xxx.x1 = XAdjust(pc->u.xxx.x1);
|
||||
pc->u.xxx.x2 = XAdjust(pc->u.xxx.x2);
|
||||
pc->y_u.xxx.x = XAdjust(pc->y_u.xxx.x);
|
||||
pc->y_u.xxx.x1 = XAdjust(pc->y_u.xxx.x1);
|
||||
pc->y_u.xxx.x2 = XAdjust(pc->y_u.xxx.x2);
|
||||
pc = NEXTOP(pc,xxx);
|
||||
break;
|
||||
/* instructions type xxxx */
|
||||
case _put_xx_val:
|
||||
pc->u.xxxx.xl1 = XAdjust(pc->u.xxxx.xl1);
|
||||
pc->u.xxxx.xl2 = XAdjust(pc->u.xxxx.xl2);
|
||||
pc->u.xxxx.xr1 = XAdjust(pc->u.xxxx.xr1);
|
||||
pc->u.xxxx.xr2 = XAdjust(pc->u.xxxx.xr2);
|
||||
pc->y_u.xxxx.xl1 = XAdjust(pc->y_u.xxxx.xl1);
|
||||
pc->y_u.xxxx.xl2 = XAdjust(pc->y_u.xxxx.xl2);
|
||||
pc->y_u.xxxx.xr1 = XAdjust(pc->y_u.xxxx.xr1);
|
||||
pc->y_u.xxxx.xr2 = XAdjust(pc->y_u.xxxx.xr2);
|
||||
pc = NEXTOP(pc,xxxx);
|
||||
break;
|
||||
/* instructions type xxy */
|
||||
case _p_func2f_xy:
|
||||
pc->u.xxy.x = XAdjust(pc->u.xxy.x);
|
||||
pc->u.xxy.x1 = XAdjust(pc->u.xxy.x1);
|
||||
pc->u.xxy.y2 = YAdjust(pc->u.xxy.y2);
|
||||
pc->y_u.xxy.x = XAdjust(pc->y_u.xxy.x);
|
||||
pc->y_u.xxy.x1 = XAdjust(pc->y_u.xxy.x1);
|
||||
pc->y_u.xxy.y2 = YAdjust(pc->y_u.xxy.y2);
|
||||
pc = NEXTOP(pc,xxy);
|
||||
break;
|
||||
/* instructions type y */
|
||||
@ -721,7 +721,7 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _write_y_loc:
|
||||
case _write_y_val:
|
||||
case _write_y_var:
|
||||
pc->u.y.y = YAdjust(pc->u.y.y);
|
||||
pc->y_u.y.y = YAdjust(pc->y_u.y.y);
|
||||
pc = NEXTOP(pc,y);
|
||||
break;
|
||||
/* instructions type yl */
|
||||
@ -735,15 +735,15 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _p_number_y:
|
||||
case _p_primitive_y:
|
||||
case _p_var_y:
|
||||
pc->u.yl.y = YAdjust(pc->u.yl.y);
|
||||
pc->u.yl.F = PtoOpAdjust(pc->u.yl.F);
|
||||
pc->y_u.yl.y = YAdjust(pc->y_u.yl.y);
|
||||
pc->y_u.yl.F = PtoOpAdjust(pc->y_u.yl.F);
|
||||
pc = NEXTOP(pc,yl);
|
||||
break;
|
||||
/* instructions type yps */
|
||||
case _commit_b_y:
|
||||
pc->u.yps.y = YAdjust(pc->u.yps.y);
|
||||
pc->u.yps.p0 = PtoPredAdjust(pc->u.yps.p0);
|
||||
pc->u.yps.s = ConstantAdjust(pc->u.yps.s);
|
||||
pc->y_u.yps.y = YAdjust(pc->y_u.yps.y);
|
||||
pc->y_u.yps.p0 = PtoPredAdjust(pc->y_u.yps.p0);
|
||||
pc->y_u.yps.s = ConstantAdjust(pc->y_u.yps.s);
|
||||
pc = NEXTOP(pc,yps);
|
||||
break;
|
||||
/* instructions type yx */
|
||||
@ -755,15 +755,15 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _put_unsafe:
|
||||
case _put_y_val:
|
||||
case _put_y_var:
|
||||
pc->u.yx.y = YAdjust(pc->u.yx.y);
|
||||
pc->u.yx.x = XAdjust(pc->u.yx.x);
|
||||
pc->y_u.yx.y = YAdjust(pc->y_u.yx.y);
|
||||
pc->y_u.yx.x = XAdjust(pc->y_u.yx.x);
|
||||
pc = NEXTOP(pc,yx);
|
||||
break;
|
||||
/* instructions type yxc */
|
||||
case _p_func2s_y_cv:
|
||||
pc->u.yxc.y = YAdjust(pc->u.yxc.y);
|
||||
pc->u.yxc.xi = XAdjust(pc->u.yxc.xi);
|
||||
pc->u.yxc.c = ConstantTermAdjust(pc->u.yxc.c);
|
||||
pc->y_u.yxc.y = YAdjust(pc->y_u.yxc.y);
|
||||
pc->y_u.yxc.xi = XAdjust(pc->y_u.yxc.xi);
|
||||
pc->y_u.yxc.c = ConstantTermAdjust(pc->y_u.yxc.c);
|
||||
pc = NEXTOP(pc,yxc);
|
||||
break;
|
||||
/* instructions type yxn */
|
||||
@ -780,9 +780,9 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _p_slr_y_cv:
|
||||
case _p_slr_y_vc:
|
||||
case _p_times_y_vc:
|
||||
pc->u.yxn.y = YAdjust(pc->u.yxn.y);
|
||||
pc->u.yxn.xi = XAdjust(pc->u.yxn.xi);
|
||||
pc->u.yxn.c = IntegerAdjust(pc->u.yxn.c);
|
||||
pc->y_u.yxn.y = YAdjust(pc->y_u.yxn.y);
|
||||
pc->y_u.yxn.xi = XAdjust(pc->y_u.yxn.xi);
|
||||
pc->y_u.yxn.c = IntegerAdjust(pc->y_u.yxn.c);
|
||||
pc = NEXTOP(pc,yxn);
|
||||
break;
|
||||
/* instructions type yxx */
|
||||
@ -797,25 +797,25 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _p_sll_y_vv:
|
||||
case _p_slr_y_vv:
|
||||
case _p_times_y_vv:
|
||||
pc->u.yxx.y = YAdjust(pc->u.yxx.y);
|
||||
pc->u.yxx.x1 = XAdjust(pc->u.yxx.x1);
|
||||
pc->u.yxx.x2 = XAdjust(pc->u.yxx.x2);
|
||||
pc->y_u.yxx.y = YAdjust(pc->y_u.yxx.y);
|
||||
pc->y_u.yxx.x1 = XAdjust(pc->y_u.yxx.x1);
|
||||
pc->y_u.yxx.x2 = XAdjust(pc->y_u.yxx.x2);
|
||||
pc = NEXTOP(pc,yxx);
|
||||
break;
|
||||
/* instructions type yyx */
|
||||
case _p_func2f_yy:
|
||||
pc->u.yyx.y1 = YAdjust(pc->u.yyx.y1);
|
||||
pc->u.yyx.y2 = YAdjust(pc->u.yyx.y2);
|
||||
pc->u.yyx.x = XAdjust(pc->u.yyx.x);
|
||||
pc->y_u.yyx.y1 = YAdjust(pc->y_u.yyx.y1);
|
||||
pc->y_u.yyx.y2 = YAdjust(pc->y_u.yyx.y2);
|
||||
pc->y_u.yyx.x = XAdjust(pc->y_u.yyx.x);
|
||||
pc = NEXTOP(pc,yyx);
|
||||
break;
|
||||
/* instructions type yyxx */
|
||||
case _get_yy_var:
|
||||
case _put_y_vals:
|
||||
pc->u.yyxx.y1 = YAdjust(pc->u.yyxx.y1);
|
||||
pc->u.yyxx.y2 = YAdjust(pc->u.yyxx.y2);
|
||||
pc->u.yyxx.x1 = XAdjust(pc->u.yyxx.x1);
|
||||
pc->u.yyxx.x2 = XAdjust(pc->u.yyxx.x2);
|
||||
pc->y_u.yyxx.y1 = YAdjust(pc->y_u.yyxx.y1);
|
||||
pc->y_u.yyxx.y2 = YAdjust(pc->y_u.yyxx.y2);
|
||||
pc->y_u.yyxx.x1 = XAdjust(pc->y_u.yyxx.x1);
|
||||
pc->y_u.yyxx.x2 = XAdjust(pc->y_u.yyxx.x2);
|
||||
pc = NEXTOP(pc,yyxx);
|
||||
break;
|
||||
#ifdef YAPOR
|
||||
@ -823,11 +823,11 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _getwork:
|
||||
case _getwork_seq:
|
||||
case _sync:
|
||||
OrArgAdjust(pc->u.Otapl.or_arg);
|
||||
TabEntryAdjust(pc->u.Otapl.te);
|
||||
pc->u.Otapl.s = ArityAdjust(pc->u.Otapl.s);
|
||||
pc->u.Otapl.p = PtoPredAdjust(pc->u.Otapl.p);
|
||||
pc->u.Otapl.d = PtoOpAdjust(pc->u.Otapl.d);
|
||||
OrArgAdjust(pc->y_u.Otapl.or_arg);
|
||||
TabEntryAdjust(pc->y_u.Otapl.te);
|
||||
pc->y_u.Otapl.s = ArityAdjust(pc->y_u.Otapl.s);
|
||||
pc->y_u.Otapl.p = PtoPredAdjust(pc->y_u.Otapl.p);
|
||||
pc->y_u.Otapl.d = PtoOpAdjust(pc->y_u.Otapl.d);
|
||||
pc = NEXTOP(pc,Otapl);
|
||||
break;
|
||||
/* instructions type e */
|
||||
@ -852,11 +852,11 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
case _table_try_answer:
|
||||
case _table_try_me:
|
||||
case _table_try_single:
|
||||
OrArgAdjust(pc->u.Otapl.or_arg);
|
||||
TabEntryAdjust(pc->u.Otapl.te);
|
||||
pc->u.Otapl.s = ArityAdjust(pc->u.Otapl.s);
|
||||
pc->u.Otapl.p = PtoPredAdjust(pc->u.Otapl.p);
|
||||
pc->u.Otapl.d = PtoOpAdjust(pc->u.Otapl.d);
|
||||
OrArgAdjust(pc->y_u.Otapl.or_arg);
|
||||
TabEntryAdjust(pc->y_u.Otapl.te);
|
||||
pc->y_u.Otapl.s = ArityAdjust(pc->y_u.Otapl.s);
|
||||
pc->y_u.Otapl.p = PtoPredAdjust(pc->y_u.Otapl.p);
|
||||
pc->y_u.Otapl.d = PtoOpAdjust(pc->y_u.Otapl.d);
|
||||
pc = NEXTOP(pc,Otapl);
|
||||
break;
|
||||
/* instructions type e */
|
||||
@ -868,7 +868,7 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
break;
|
||||
/* instructions type s */
|
||||
case _table_new_answer:
|
||||
pc->u.s.s = ConstantAdjust(pc->u.s.s);
|
||||
pc->y_u.s.s = ConstantAdjust(pc->y_u.s.s);
|
||||
pc = NEXTOP(pc,s);
|
||||
break;
|
||||
/* instructions type e */
|
||||
@ -943,15 +943,15 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
||||
/* this instruction is hardwired */
|
||||
case _or_last:
|
||||
#ifdef YAPOR
|
||||
OrArgAdjust(pc->u.Osblp.or_arg);
|
||||
pc->u.Osblp.s = ConstantAdjust(pc->u.Osblp.s);
|
||||
pc->u.Osblp.bmap = CellPtoHeapAdjust(pc->u.Osblp.bmap);
|
||||
pc->u.Osblp.l = PtoOpAdjust(pc->u.Osblp.l);
|
||||
pc->u.Osblp.p0 = PtoPredAdjust(pc->u.Osblp.p0);
|
||||
OrArgAdjust(pc->y_u.Osblp.or_arg);
|
||||
pc->y_u.Osblp.s = ConstantAdjust(pc->y_u.Osblp.s);
|
||||
pc->y_u.Osblp.bmap = CellPtoHeapAdjust(pc->y_u.Osblp.bmap);
|
||||
pc->y_u.Osblp.l = PtoOpAdjust(pc->y_u.Osblp.l);
|
||||
pc->y_u.Osblp.p0 = PtoPredAdjust(pc->y_u.Osblp.p0);
|
||||
pc = NEXTOP(pc,Osblp);
|
||||
break;
|
||||
#else
|
||||
pc->u.p.p = PtoPredAdjust(pc->u.p.p);
|
||||
pc->y_u.p.p = PtoPredAdjust(pc->y_u.p.p);
|
||||
pc = NEXTOP(pc,p);
|
||||
break;
|
||||
#endif
|
||||
|
32
H/rheap.h
32
H/rheap.h
@ -294,14 +294,14 @@ do_clean_susp_clauses(yamop *ipc USES_REGS) {
|
||||
yamop **st = (yamop **)NEXTOP(ipc,sssllp);
|
||||
|
||||
ipc->opc = Yap_opcode(_expand_clauses);
|
||||
ipc->u.sssllp.p = PtoPredAdjust(ipc->u.sssllp.p);
|
||||
if (ipc->u.sssllp.sprev) {
|
||||
ipc->u.sssllp.sprev = PtoOpAdjust(ipc->u.sssllp.sprev);
|
||||
ipc->y_u.sssllp.p = PtoPredAdjust(ipc->y_u.sssllp.p);
|
||||
if (ipc->y_u.sssllp.sprev) {
|
||||
ipc->y_u.sssllp.sprev = PtoOpAdjust(ipc->y_u.sssllp.sprev);
|
||||
}
|
||||
if (ipc->u.sssllp.snext) {
|
||||
ipc->u.sssllp.snext = PtoOpAdjust(ipc->u.sssllp.snext);
|
||||
if (ipc->y_u.sssllp.snext) {
|
||||
ipc->y_u.sssllp.snext = PtoOpAdjust(ipc->y_u.sssllp.snext);
|
||||
}
|
||||
for (i = 0; i < ipc->u.sssllp.s1; i++, st++) {
|
||||
for (i = 0; i < ipc->y_u.sssllp.s1; i++, st++) {
|
||||
if (*st) {
|
||||
*st = PtoOpAdjust(*st);
|
||||
}
|
||||
@ -766,10 +766,10 @@ RestoreEnvInst(yamop start[2], yamop **instp, op_numbers opc, PredEntry *pred)
|
||||
yamop *ipc = start;
|
||||
|
||||
ipc->opc = Yap_opcode(_call);
|
||||
ipc->u.Osbpp.p = pred;
|
||||
ipc->u.Osbpp.p0 = pred;
|
||||
ipc->u.Osbpp.bmap = NULL;
|
||||
ipc->u.Osbpp.s = -Signed(RealEnvSize);
|
||||
ipc->y_u.Osbpp.p = pred;
|
||||
ipc->y_u.Osbpp.p0 = pred;
|
||||
ipc->y_u.Osbpp.bmap = NULL;
|
||||
ipc->y_u.Osbpp.s = -Signed(RealEnvSize);
|
||||
ipc = NEXTOP(ipc, Osbpp);
|
||||
ipc->opc = Yap_opcode(opc);
|
||||
*instp = ipc;
|
||||
@ -782,15 +782,15 @@ RestoreOtaplInst__(yamop start[1], OPCODE opc, PredEntry *pe USES_REGS)
|
||||
|
||||
/* this is a place holder, it should not really be used */
|
||||
ipc->opc = Yap_opcode(opc);
|
||||
ipc->u.Otapl.s = 0;
|
||||
ipc->u.Otapl.p = pe;
|
||||
if (ipc->u.Otapl.d)
|
||||
ipc->u.Otapl.d = PtoOpAdjust(ipc->u.Otapl.d);
|
||||
ipc->y_u.Otapl.s = 0;
|
||||
ipc->y_u.Otapl.p = pe;
|
||||
if (ipc->y_u.Otapl.d)
|
||||
ipc->y_u.Otapl.d = PtoOpAdjust(ipc->y_u.Otapl.d);
|
||||
#ifdef YAPOR
|
||||
INIT_YAMOP_LTT(ipc, 1);
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
ipc->u.Otapl.te = NULL;
|
||||
ipc->y_u.Otapl.te = NULL;
|
||||
#endif /* TABLING */
|
||||
}
|
||||
|
||||
@ -818,7 +818,7 @@ RestoreExpandList__( USES_REGS1 )
|
||||
yamop *ptr = Yap_heap_regs->expand_clauses_first;
|
||||
while (ptr) {
|
||||
do_clean_susp_clauses(ptr PASS_REGS);
|
||||
ptr = ptr->u.sssllp.snext;
|
||||
ptr = ptr->y_u.sssllp.snext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
486
H/saveclause.h
486
H/saveclause.h
@ -13,61 +13,61 @@
|
||||
switch (op) {
|
||||
/* instructions type D */
|
||||
case _write_dbterm:
|
||||
CHECK(save_DBGroundTerm(stream, pc->u.D.D));
|
||||
CHECK(save_DBGroundTerm(stream, pc->y_u.D.D));
|
||||
pc = NEXTOP(pc,D);
|
||||
break;
|
||||
/* instructions type Illss */
|
||||
case _enter_lu_pred:
|
||||
CHECK(save_PtoLUIndex(stream, pc->u.Illss.I));
|
||||
CHECK(save_PtoOp(stream, pc->u.Illss.l1));
|
||||
CHECK(save_PtoOp(stream, pc->u.Illss.l2));
|
||||
CHECK(save_Constant(stream, pc->u.Illss.s));
|
||||
CHECK(save_Constant(stream, pc->u.Illss.e));
|
||||
CHECK(save_PtoLUIndex(stream, pc->y_u.Illss.I));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.Illss.l1));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.Illss.l2));
|
||||
CHECK(save_Constant(stream, pc->y_u.Illss.s));
|
||||
CHECK(save_Constant(stream, pc->y_u.Illss.e));
|
||||
pc = NEXTOP(pc,Illss);
|
||||
break;
|
||||
/* instructions type L */
|
||||
case _alloc_for_logical_pred:
|
||||
CHECK(save_PtoLUClause(stream, pc->u.L.ClBase));
|
||||
CHECK(save_PtoLUClause(stream, pc->y_u.L.ClBase));
|
||||
pc = NEXTOP(pc,L);
|
||||
break;
|
||||
/* instructions type N */
|
||||
case _write_bigint:
|
||||
CHECK(save_BlobTermInCode(stream, pc->u.N.b));
|
||||
CHECK(save_BlobTermInCode(stream, pc->y_u.N.b));
|
||||
pc = NEXTOP(pc,N);
|
||||
break;
|
||||
/* instructions type Osblp */
|
||||
case _either:
|
||||
case _or_else:
|
||||
#ifdef YAPOR
|
||||
CHECK(save_OrArg(stream, pc->u.Osblp.or_arg));
|
||||
CHECK(save_OrArg(stream, pc->y_u.Osblp.or_arg));
|
||||
#endif
|
||||
CHECK(save_Constant(stream, pc->u.Osblp.s));
|
||||
CHECK(save_CellPtoHeap(stream, pc->u.Osblp.bmap));
|
||||
CHECK(save_PtoOp(stream, pc->u.Osblp.l));
|
||||
CHECK(save_PtoPred(stream, pc->u.Osblp.p0));
|
||||
CHECK(save_Constant(stream, pc->y_u.Osblp.s));
|
||||
CHECK(save_CellPtoHeap(stream, pc->y_u.Osblp.bmap));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.Osblp.l));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.Osblp.p0));
|
||||
pc = NEXTOP(pc,Osblp);
|
||||
break;
|
||||
/* instructions type Osbmp */
|
||||
case _p_execute:
|
||||
case _p_execute_tail:
|
||||
#ifdef YAPOR
|
||||
CHECK(save_OrArg(stream, pc->u.Osbmp.or_arg));
|
||||
CHECK(save_OrArg(stream, pc->y_u.Osbmp.or_arg));
|
||||
#endif
|
||||
CHECK(save_Constant(stream, pc->u.Osbmp.s));
|
||||
CHECK(save_CellPtoHeap(stream, pc->u.Osbmp.bmap));
|
||||
CHECK(save_Module(stream, pc->u.Osbmp.mod));
|
||||
CHECK(save_PtoPred(stream, pc->u.Osbmp.p0));
|
||||
CHECK(save_Constant(stream, pc->y_u.Osbmp.s));
|
||||
CHECK(save_CellPtoHeap(stream, pc->y_u.Osbmp.bmap));
|
||||
CHECK(save_Module(stream, pc->y_u.Osbmp.mod));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.Osbmp.p0));
|
||||
pc = NEXTOP(pc,Osbmp);
|
||||
break;
|
||||
/* instructions type Osbpa */
|
||||
case _ensure_space:
|
||||
#ifdef YAPOR
|
||||
CHECK(save_OrArg(stream, pc->u.Osbpa.or_arg));
|
||||
CHECK(save_OrArg(stream, pc->y_u.Osbpa.or_arg));
|
||||
#endif
|
||||
CHECK(save_Constant(stream, pc->u.Osbpa.s));
|
||||
CHECK(save_CellPtoHeap(stream, pc->u.Osbpa.bmap));
|
||||
CHECK(save_PtoPred(stream, pc->u.Osbpa.p));
|
||||
CHECK(save_Arity(stream, pc->u.Osbpa.i));
|
||||
CHECK(save_Constant(stream, pc->y_u.Osbpa.s));
|
||||
CHECK(save_CellPtoHeap(stream, pc->y_u.Osbpa.bmap));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.Osbpa.p));
|
||||
CHECK(save_Arity(stream, pc->y_u.Osbpa.i));
|
||||
pc = NEXTOP(pc,Osbpa);
|
||||
break;
|
||||
/* instructions type Osbpp */
|
||||
@ -77,12 +77,12 @@
|
||||
case _fcall:
|
||||
case _p_execute2:
|
||||
#ifdef YAPOR
|
||||
CHECK(save_OrArg(stream, pc->u.Osbpp.or_arg));
|
||||
CHECK(save_OrArg(stream, pc->y_u.Osbpp.or_arg));
|
||||
#endif
|
||||
CHECK(save_Constant(stream, pc->u.Osbpp.s));
|
||||
CHECK(save_CellPtoHeap(stream, pc->u.Osbpp.bmap));
|
||||
CHECK(save_PtoPred(stream, pc->u.Osbpp.p));
|
||||
CHECK(save_PtoPred(stream, pc->u.Osbpp.p0));
|
||||
CHECK(save_Constant(stream, pc->y_u.Osbpp.s));
|
||||
CHECK(save_CellPtoHeap(stream, pc->y_u.Osbpp.bmap));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.Osbpp.p));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.Osbpp.p0));
|
||||
pc = NEXTOP(pc,Osbpp);
|
||||
break;
|
||||
/* instructions type OtILl */
|
||||
@ -90,14 +90,14 @@
|
||||
case _profiled_trust_logical:
|
||||
case _trust_logical:
|
||||
#ifdef YAPOR
|
||||
CHECK(save_OrArg(stream, pc->u.OtILl.or_arg));
|
||||
CHECK(save_OrArg(stream, pc->y_u.OtILl.or_arg));
|
||||
#endif
|
||||
#ifdef TABLING
|
||||
CHECK(save_TabEntry(stream, pc->u.OtILl.te));
|
||||
CHECK(save_TabEntry(stream, pc->y_u.OtILl.te));
|
||||
#endif
|
||||
CHECK(save_PtoLUIndex(stream, pc->u.OtILl.block));
|
||||
CHECK(save_PtoLUClause(stream, pc->u.OtILl.d));
|
||||
CHECK(save_PtoOp(stream, pc->u.OtILl.n));
|
||||
CHECK(save_PtoLUIndex(stream, pc->y_u.OtILl.block));
|
||||
CHECK(save_PtoLUClause(stream, pc->y_u.OtILl.d));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.OtILl.n));
|
||||
pc = NEXTOP(pc,OtILl);
|
||||
break;
|
||||
/* instructions type OtaLl */
|
||||
@ -106,14 +106,14 @@
|
||||
case _retry_logical:
|
||||
case _try_logical:
|
||||
#ifdef YAPOR
|
||||
CHECK(save_OrArg(stream, pc->u.OtaLl.or_arg));
|
||||
CHECK(save_OrArg(stream, pc->y_u.OtaLl.or_arg));
|
||||
#endif
|
||||
#ifdef TABLING
|
||||
CHECK(save_TabEntry(stream, pc->u.OtaLl.te));
|
||||
CHECK(save_TabEntry(stream, pc->y_u.OtaLl.te));
|
||||
#endif
|
||||
CHECK(save_Arity(stream, pc->u.OtaLl.s));
|
||||
CHECK(save_PtoLUClause(stream, pc->u.OtaLl.d));
|
||||
CHECK(save_PtoOp(stream, pc->u.OtaLl.n));
|
||||
CHECK(save_Arity(stream, pc->y_u.OtaLl.s));
|
||||
CHECK(save_PtoLUClause(stream, pc->y_u.OtaLl.d));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.OtaLl.n));
|
||||
pc = NEXTOP(pc,OtaLl);
|
||||
break;
|
||||
/* instructions type OtapFs */
|
||||
@ -124,15 +124,15 @@
|
||||
case _try_c:
|
||||
case _try_userc:
|
||||
#ifdef YAPOR
|
||||
CHECK(save_OrArg(stream, pc->u.OtapFs.or_arg));
|
||||
CHECK(save_OrArg(stream, pc->y_u.OtapFs.or_arg));
|
||||
#endif
|
||||
#ifdef TABLING
|
||||
CHECK(save_TabEntry(stream, pc->u.OtapFs.te));
|
||||
CHECK(save_TabEntry(stream, pc->y_u.OtapFs.te));
|
||||
#endif
|
||||
CHECK(save_Arity(stream, pc->u.OtapFs.s));
|
||||
CHECK(save_PtoPred(stream, pc->u.OtapFs.p));
|
||||
CHECK(save_ExternalFunction(stream, pc->u.OtapFs.f));
|
||||
CHECK(save_Constant(stream, pc->u.OtapFs.extra));
|
||||
CHECK(save_Arity(stream, pc->y_u.OtapFs.s));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.OtapFs.p));
|
||||
CHECK(save_ExternalFunction(stream, pc->y_u.OtapFs.f));
|
||||
CHECK(save_Constant(stream, pc->y_u.OtapFs.extra));
|
||||
pc = NEXTOP(pc,OtapFs);
|
||||
break;
|
||||
/* instructions type Otapl */
|
||||
@ -152,80 +152,80 @@
|
||||
case _try_clause:
|
||||
case _try_me:
|
||||
#ifdef YAPOR
|
||||
CHECK(save_OrArg(stream, pc->u.Otapl.or_arg));
|
||||
CHECK(save_OrArg(stream, pc->y_u.Otapl.or_arg));
|
||||
#endif
|
||||
#ifdef TABLING
|
||||
CHECK(save_TabEntry(stream, pc->u.Otapl.te));
|
||||
CHECK(save_TabEntry(stream, pc->y_u.Otapl.te));
|
||||
#endif
|
||||
CHECK(save_Arity(stream, pc->u.Otapl.s));
|
||||
CHECK(save_PtoPred(stream, pc->u.Otapl.p));
|
||||
CHECK(save_PtoOp(stream, pc->u.Otapl.d));
|
||||
CHECK(save_Arity(stream, pc->y_u.Otapl.s));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.Otapl.p));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.Otapl.d));
|
||||
pc = NEXTOP(pc,Otapl);
|
||||
break;
|
||||
/* instructions type aFlp */
|
||||
case _native_me:
|
||||
CHECK(save_Arity(stream, pc->u.aFlp.n));
|
||||
CHECK(save_ExternalFunction(stream, pc->u.aFlp.native));
|
||||
CHECK(save_PtoOp(stream, pc->u.aFlp.native_next));
|
||||
CHECK(save_PtoPred(stream, pc->u.aFlp.p));
|
||||
CHECK(save_Arity(stream, pc->y_u.aFlp.n));
|
||||
CHECK(save_ExternalFunction(stream, pc->y_u.aFlp.native));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.aFlp.native_next));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.aFlp.p));
|
||||
pc = NEXTOP(pc,aFlp);
|
||||
break;
|
||||
/* instructions type c */
|
||||
case _write_atom:
|
||||
CHECK(save_ConstantTerm(stream, pc->u.c.c));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.c.c));
|
||||
pc = NEXTOP(pc,c);
|
||||
break;
|
||||
/* instructions type cc */
|
||||
case _get_2atoms:
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cc.c1));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cc.c2));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cc.c1));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cc.c2));
|
||||
pc = NEXTOP(pc,cc);
|
||||
break;
|
||||
/* instructions type ccc */
|
||||
case _get_3atoms:
|
||||
CHECK(save_ConstantTerm(stream, pc->u.ccc.c1));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.ccc.c2));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.ccc.c3));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.ccc.c1));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.ccc.c2));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.ccc.c3));
|
||||
pc = NEXTOP(pc,ccc);
|
||||
break;
|
||||
/* instructions type cccc */
|
||||
case _get_4atoms:
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cccc.c1));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cccc.c2));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cccc.c3));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cccc.c4));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cccc.c1));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cccc.c2));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cccc.c3));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cccc.c4));
|
||||
pc = NEXTOP(pc,cccc);
|
||||
break;
|
||||
/* instructions type ccccc */
|
||||
case _get_5atoms:
|
||||
CHECK(save_ConstantTerm(stream, pc->u.ccccc.c1));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.ccccc.c2));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.ccccc.c3));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.ccccc.c4));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.ccccc.c5));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.ccccc.c1));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.ccccc.c2));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.ccccc.c3));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.ccccc.c4));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.ccccc.c5));
|
||||
pc = NEXTOP(pc,ccccc);
|
||||
break;
|
||||
/* instructions type cccccc */
|
||||
case _get_6atoms:
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cccccc.c1));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cccccc.c2));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cccccc.c3));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cccccc.c4));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cccccc.c5));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.cccccc.c6));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c1));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c2));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c3));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c4));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c5));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c6));
|
||||
pc = NEXTOP(pc,cccccc);
|
||||
break;
|
||||
/* instructions type clll */
|
||||
case _if_not_then:
|
||||
CHECK(save_ConstantTerm(stream, pc->u.clll.c));
|
||||
CHECK(save_PtoOp(stream, pc->u.clll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->u.clll.l2));
|
||||
CHECK(save_PtoOp(stream, pc->u.clll.l3));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.clll.c));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.clll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.clll.l2));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.clll.l3));
|
||||
pc = NEXTOP(pc,clll);
|
||||
break;
|
||||
/* instructions type d */
|
||||
case _write_float:
|
||||
CHECK(save_DoubleInCode(stream, pc->u.d.d));
|
||||
CHECK(save_DoubleInCode(stream, pc->y_u.d.d));
|
||||
pc = NEXTOP(pc,d);
|
||||
break;
|
||||
/* instructions type e */
|
||||
@ -263,13 +263,13 @@
|
||||
/* instructions type fa */
|
||||
case _write_l_struc:
|
||||
case _write_struct:
|
||||
CHECK(save_Func(stream, pc->u.fa.f));
|
||||
CHECK(save_Arity(stream, pc->u.fa.a));
|
||||
CHECK(save_Func(stream, pc->y_u.fa.f));
|
||||
CHECK(save_Arity(stream, pc->y_u.fa.a));
|
||||
pc = NEXTOP(pc,fa);
|
||||
break;
|
||||
/* instructions type i */
|
||||
case _write_longint:
|
||||
CHECK(save_IntegerInCode(stream, pc->u.i.i));
|
||||
CHECK(save_IntegerInCode(stream, pc->y_u.i.i));
|
||||
pc = NEXTOP(pc,i);
|
||||
break;
|
||||
/* instructions type l */
|
||||
@ -287,15 +287,15 @@
|
||||
case _try_clause3:
|
||||
case _try_clause4:
|
||||
case _try_in:
|
||||
CHECK(save_PtoOp(stream, pc->u.l.l));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.l.l));
|
||||
pc = NEXTOP(pc,l);
|
||||
break;
|
||||
/* instructions type llll */
|
||||
case _switch_on_type:
|
||||
CHECK(save_PtoOp(stream, pc->u.llll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->u.llll.l2));
|
||||
CHECK(save_PtoOp(stream, pc->u.llll.l3));
|
||||
CHECK(save_PtoOp(stream, pc->u.llll.l4));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.llll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.llll.l2));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.llll.l3));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.llll.l4));
|
||||
pc = NEXTOP(pc,llll);
|
||||
break;
|
||||
/* instructions type lp */
|
||||
@ -306,8 +306,8 @@
|
||||
case _try_exo:
|
||||
case _try_exo_udi:
|
||||
case _user_switch:
|
||||
CHECK(save_PtoOp(stream, pc->u.lp.l));
|
||||
CHECK(save_PtoPred(stream, pc->u.lp.p));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.lp.l));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.lp.p));
|
||||
pc = NEXTOP(pc,lp);
|
||||
break;
|
||||
/* instructions type o */
|
||||
@ -319,21 +319,21 @@
|
||||
case _unify_list_write:
|
||||
case _unify_void:
|
||||
case _unify_void_write:
|
||||
CHECK(save_Opcode(stream, pc->u.o.opcw));
|
||||
CHECK(save_Opcode(stream, pc->y_u.o.opcw));
|
||||
pc = NEXTOP(pc,o);
|
||||
break;
|
||||
/* instructions type oD */
|
||||
case _unify_dbterm:
|
||||
case _unify_l_dbterm:
|
||||
CHECK(save_Opcode(stream, pc->u.oD.opcw));
|
||||
CHECK(save_DBGroundTerm(stream, pc->u.oD.D));
|
||||
CHECK(save_Opcode(stream, pc->y_u.oD.opcw));
|
||||
CHECK(save_DBGroundTerm(stream, pc->y_u.oD.D));
|
||||
pc = NEXTOP(pc,oD);
|
||||
break;
|
||||
/* instructions type oN */
|
||||
case _unify_bigint:
|
||||
case _unify_l_bigint:
|
||||
CHECK(save_Opcode(stream, pc->u.oN.opcw));
|
||||
CHECK(save_BlobTermInCode(stream, pc->u.oN.b));
|
||||
CHECK(save_Opcode(stream, pc->y_u.oN.opcw));
|
||||
CHECK(save_BlobTermInCode(stream, pc->y_u.oN.b));
|
||||
pc = NEXTOP(pc,oN);
|
||||
break;
|
||||
/* instructions type oc */
|
||||
@ -341,8 +341,8 @@
|
||||
case _unify_atom_write:
|
||||
case _unify_l_atom:
|
||||
case _unify_l_atom_write:
|
||||
CHECK(save_Opcode(stream, pc->u.oc.opcw));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.oc.c));
|
||||
CHECK(save_Opcode(stream, pc->y_u.oc.opcw));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.oc.c));
|
||||
pc = NEXTOP(pc,oc);
|
||||
break;
|
||||
/* instructions type od */
|
||||
@ -350,8 +350,8 @@
|
||||
case _unify_float_write:
|
||||
case _unify_l_float:
|
||||
case _unify_l_float_write:
|
||||
CHECK(save_Opcode(stream, pc->u.od.opcw));
|
||||
CHECK(save_DoubleInCode(stream, pc->u.od.d));
|
||||
CHECK(save_Opcode(stream, pc->y_u.od.opcw));
|
||||
CHECK(save_DoubleInCode(stream, pc->y_u.od.d));
|
||||
pc = NEXTOP(pc,od);
|
||||
break;
|
||||
/* instructions type ofa */
|
||||
@ -359,9 +359,9 @@
|
||||
case _unify_l_struc_write:
|
||||
case _unify_struct:
|
||||
case _unify_struct_write:
|
||||
CHECK(save_Opcode(stream, pc->u.ofa.opcw));
|
||||
CHECK(save_Func(stream, pc->u.ofa.f));
|
||||
CHECK(save_Arity(stream, pc->u.ofa.a));
|
||||
CHECK(save_Opcode(stream, pc->y_u.ofa.opcw));
|
||||
CHECK(save_Func(stream, pc->y_u.ofa.f));
|
||||
CHECK(save_Arity(stream, pc->y_u.ofa.a));
|
||||
pc = NEXTOP(pc,ofa);
|
||||
break;
|
||||
/* instructions type oi */
|
||||
@ -369,17 +369,17 @@
|
||||
case _unify_l_longint_write:
|
||||
case _unify_longint:
|
||||
case _unify_longint_write:
|
||||
CHECK(save_Opcode(stream, pc->u.oi.opcw));
|
||||
CHECK(save_IntegerInCode(stream, pc->u.oi.i));
|
||||
CHECK(save_Opcode(stream, pc->y_u.oi.opcw));
|
||||
CHECK(save_IntegerInCode(stream, pc->y_u.oi.i));
|
||||
pc = NEXTOP(pc,oi);
|
||||
break;
|
||||
/* instructions type ollll */
|
||||
case _switch_list_nl:
|
||||
CHECK(save_Opcode(stream, pc->u.ollll.pop));
|
||||
CHECK(save_PtoOp(stream, pc->u.ollll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->u.ollll.l2));
|
||||
CHECK(save_PtoOp(stream, pc->u.ollll.l3));
|
||||
CHECK(save_PtoOp(stream, pc->u.ollll.l4));
|
||||
CHECK(save_Opcode(stream, pc->y_u.ollll.pop));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.ollll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.ollll.l2));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.ollll.l3));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.ollll.l4));
|
||||
pc = NEXTOP(pc,ollll);
|
||||
break;
|
||||
/* instructions type os */
|
||||
@ -390,23 +390,23 @@
|
||||
case _unify_l_n_voids_write:
|
||||
case _unify_n_voids:
|
||||
case _unify_n_voids_write:
|
||||
CHECK(save_Opcode(stream, pc->u.os.opcw));
|
||||
CHECK(save_Constant(stream, pc->u.os.s));
|
||||
CHECK(save_Opcode(stream, pc->y_u.os.opcw));
|
||||
CHECK(save_Constant(stream, pc->y_u.os.s));
|
||||
pc = NEXTOP(pc,os);
|
||||
break;
|
||||
/* instructions type osc */
|
||||
case _unify_n_atoms:
|
||||
case _unify_n_atoms_write:
|
||||
CHECK(save_Opcode(stream, pc->u.osc.opcw));
|
||||
CHECK(save_Constant(stream, pc->u.osc.s));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.osc.c));
|
||||
CHECK(save_Opcode(stream, pc->y_u.osc.opcw));
|
||||
CHECK(save_Constant(stream, pc->y_u.osc.s));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.osc.c));
|
||||
pc = NEXTOP(pc,osc);
|
||||
break;
|
||||
/* instructions type ou */
|
||||
case _unify_l_string:
|
||||
case _unify_string:
|
||||
CHECK(save_Opcode(stream, pc->u.ou.opcw));
|
||||
CHECK(save_BlobTermInCode(stream, pc->u.ou.ut));
|
||||
CHECK(save_Opcode(stream, pc->y_u.ou.opcw));
|
||||
CHECK(save_BlobTermInCode(stream, pc->y_u.ou.ut));
|
||||
pc = NEXTOP(pc,ou);
|
||||
break;
|
||||
/* instructions type ox */
|
||||
@ -426,8 +426,8 @@
|
||||
case _unify_x_val_write:
|
||||
case _unify_x_var:
|
||||
case _unify_x_var_write:
|
||||
CHECK(save_Opcode(stream, pc->u.ox.opcw));
|
||||
CHECK(save_X(stream, pc->u.ox.x));
|
||||
CHECK(save_Opcode(stream, pc->y_u.ox.opcw));
|
||||
CHECK(save_X(stream, pc->y_u.ox.x));
|
||||
pc = NEXTOP(pc,ox);
|
||||
break;
|
||||
/* instructions type oxx */
|
||||
@ -435,9 +435,9 @@
|
||||
case _unify_l_x_var2_write:
|
||||
case _unify_x_var2:
|
||||
case _unify_x_var2_write:
|
||||
CHECK(save_Opcode(stream, pc->u.oxx.opcw));
|
||||
CHECK(save_X(stream, pc->u.oxx.xl));
|
||||
CHECK(save_X(stream, pc->u.oxx.xr));
|
||||
CHECK(save_Opcode(stream, pc->y_u.oxx.opcw));
|
||||
CHECK(save_X(stream, pc->y_u.oxx.xl));
|
||||
CHECK(save_X(stream, pc->y_u.oxx.xr));
|
||||
pc = NEXTOP(pc,oxx);
|
||||
break;
|
||||
/* instructions type oy */
|
||||
@ -457,8 +457,8 @@
|
||||
case _unify_y_val_write:
|
||||
case _unify_y_var:
|
||||
case _unify_y_var_write:
|
||||
CHECK(save_Opcode(stream, pc->u.oy.opcw));
|
||||
CHECK(save_Y(stream, pc->u.oy.y));
|
||||
CHECK(save_Opcode(stream, pc->y_u.oy.opcw));
|
||||
CHECK(save_Y(stream, pc->y_u.oy.y));
|
||||
pc = NEXTOP(pc,oy);
|
||||
break;
|
||||
/* instructions type p */
|
||||
@ -471,43 +471,43 @@
|
||||
case _retry_profiled:
|
||||
case _retry_udi:
|
||||
case _try_udi:
|
||||
CHECK(save_PtoPred(stream, pc->u.p.p));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.p.p));
|
||||
pc = NEXTOP(pc,p);
|
||||
break;
|
||||
/* instructions type plxxs */
|
||||
case _call_bfunc_xx:
|
||||
CHECK(save_PtoPred(stream, pc->u.plxxs.p));
|
||||
CHECK(save_PtoOp(stream, pc->u.plxxs.f));
|
||||
CHECK(save_X(stream, pc->u.plxxs.x1));
|
||||
CHECK(save_X(stream, pc->u.plxxs.x2));
|
||||
CHECK(save_Constant(stream, pc->u.plxxs.flags));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.plxxs.p));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.plxxs.f));
|
||||
CHECK(save_X(stream, pc->y_u.plxxs.x1));
|
||||
CHECK(save_X(stream, pc->y_u.plxxs.x2));
|
||||
CHECK(save_Constant(stream, pc->y_u.plxxs.flags));
|
||||
pc = NEXTOP(pc,plxxs);
|
||||
break;
|
||||
/* instructions type plxys */
|
||||
case _call_bfunc_xy:
|
||||
case _call_bfunc_yx:
|
||||
CHECK(save_PtoPred(stream, pc->u.plxys.p));
|
||||
CHECK(save_PtoOp(stream, pc->u.plxys.f));
|
||||
CHECK(save_X(stream, pc->u.plxys.x));
|
||||
CHECK(save_Y(stream, pc->u.plxys.y));
|
||||
CHECK(save_Constant(stream, pc->u.plxys.flags));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.plxys.p));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.plxys.f));
|
||||
CHECK(save_X(stream, pc->y_u.plxys.x));
|
||||
CHECK(save_Y(stream, pc->y_u.plxys.y));
|
||||
CHECK(save_Constant(stream, pc->y_u.plxys.flags));
|
||||
pc = NEXTOP(pc,plxys);
|
||||
break;
|
||||
/* instructions type plyys */
|
||||
case _call_bfunc_yy:
|
||||
CHECK(save_PtoPred(stream, pc->u.plyys.p));
|
||||
CHECK(save_PtoOp(stream, pc->u.plyys.f));
|
||||
CHECK(save_Y(stream, pc->u.plyys.y1));
|
||||
CHECK(save_Y(stream, pc->u.plyys.y2));
|
||||
CHECK(save_Constant(stream, pc->u.plyys.flags));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.plyys.p));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.plyys.f));
|
||||
CHECK(save_Y(stream, pc->y_u.plyys.y1));
|
||||
CHECK(save_Y(stream, pc->y_u.plyys.y2));
|
||||
CHECK(save_Constant(stream, pc->y_u.plyys.flags));
|
||||
pc = NEXTOP(pc,plyys);
|
||||
break;
|
||||
/* instructions type pp */
|
||||
case _dexecute:
|
||||
case _execute:
|
||||
case _execute_cpred:
|
||||
CHECK(save_PtoPred(stream, pc->u.pp.p));
|
||||
CHECK(save_PtoPred(stream, pc->u.pp.p0));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.pp.p));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.pp.p0));
|
||||
pc = NEXTOP(pc,pp);
|
||||
break;
|
||||
/* instructions type s */
|
||||
@ -516,29 +516,29 @@
|
||||
case _cut_t:
|
||||
case _pop_n:
|
||||
case _write_n_voids:
|
||||
CHECK(save_Constant(stream, pc->u.s.s));
|
||||
CHECK(save_Constant(stream, pc->y_u.s.s));
|
||||
pc = NEXTOP(pc,s);
|
||||
break;
|
||||
/* instructions type sc */
|
||||
case _write_n_atoms:
|
||||
CHECK(save_Constant(stream, pc->u.sc.s));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.sc.c));
|
||||
CHECK(save_Constant(stream, pc->y_u.sc.s));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.sc.c));
|
||||
pc = NEXTOP(pc,sc);
|
||||
break;
|
||||
/* instructions type sllll */
|
||||
case _switch_on_sub_arg_type:
|
||||
CHECK(save_Constant(stream, pc->u.sllll.s));
|
||||
CHECK(save_PtoOp(stream, pc->u.sllll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->u.sllll.l2));
|
||||
CHECK(save_PtoOp(stream, pc->u.sllll.l3));
|
||||
CHECK(save_PtoOp(stream, pc->u.sllll.l4));
|
||||
CHECK(save_Constant(stream, pc->y_u.sllll.s));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.sllll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.sllll.l2));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.sllll.l3));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.sllll.l4));
|
||||
pc = NEXTOP(pc,sllll);
|
||||
break;
|
||||
/* instructions type slp */
|
||||
case _call_c_wfail:
|
||||
CHECK(save_Constant(stream, pc->u.slp.s));
|
||||
CHECK(save_PtoOp(stream, pc->u.slp.l));
|
||||
CHECK(save_PtoPred(stream, pc->u.slp.p));
|
||||
CHECK(save_Constant(stream, pc->y_u.slp.s));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.slp.l));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.slp.p));
|
||||
pc = NEXTOP(pc,slp);
|
||||
break;
|
||||
/* instructions type sssl */
|
||||
@ -548,20 +548,20 @@
|
||||
case _if_func:
|
||||
case _switch_on_cons:
|
||||
case _switch_on_func:
|
||||
CHECK(save_Constant(stream, pc->u.sssl.s));
|
||||
CHECK(save_Constant(stream, pc->u.sssl.e));
|
||||
CHECK(save_Constant(stream, pc->u.sssl.w));
|
||||
CHECK(save_PtoOp(stream, pc->u.sssl.l));
|
||||
CHECK(save_Constant(stream, pc->y_u.sssl.s));
|
||||
CHECK(save_Constant(stream, pc->y_u.sssl.e));
|
||||
CHECK(save_Constant(stream, pc->y_u.sssl.w));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.sssl.l));
|
||||
pc = NEXTOP(pc,sssl);
|
||||
break;
|
||||
/* instructions type sssllp */
|
||||
case _expand_clauses:
|
||||
CHECK(save_Constant(stream, pc->u.sssllp.s1));
|
||||
CHECK(save_Constant(stream, pc->u.sssllp.s2));
|
||||
CHECK(save_Constant(stream, pc->u.sssllp.s3));
|
||||
CHECK(save_PtoOp(stream, pc->u.sssllp.sprev));
|
||||
CHECK(save_PtoOp(stream, pc->u.sssllp.snext));
|
||||
CHECK(save_PtoPred(stream, pc->u.sssllp.p));
|
||||
CHECK(save_Constant(stream, pc->y_u.sssllp.s1));
|
||||
CHECK(save_Constant(stream, pc->y_u.sssllp.s2));
|
||||
CHECK(save_Constant(stream, pc->y_u.sssllp.s3));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.sssllp.sprev));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.sssllp.snext));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.sssllp.p));
|
||||
pc = NEXTOP(pc,sssllp);
|
||||
break;
|
||||
/* instructions type x */
|
||||
@ -572,50 +572,50 @@
|
||||
case _write_x_loc:
|
||||
case _write_x_val:
|
||||
case _write_x_var:
|
||||
CHECK(save_X(stream, pc->u.x.x));
|
||||
CHECK(save_X(stream, pc->y_u.x.x));
|
||||
pc = NEXTOP(pc,x);
|
||||
break;
|
||||
/* instructions type xD */
|
||||
case _get_dbterm:
|
||||
case _put_dbterm:
|
||||
CHECK(save_X(stream, pc->u.xD.x));
|
||||
CHECK(save_DBGroundTerm(stream, pc->u.xD.D));
|
||||
CHECK(save_X(stream, pc->y_u.xD.x));
|
||||
CHECK(save_DBGroundTerm(stream, pc->y_u.xD.D));
|
||||
pc = NEXTOP(pc,xD);
|
||||
break;
|
||||
/* instructions type xN */
|
||||
case _get_bigint:
|
||||
case _put_bigint:
|
||||
CHECK(save_X(stream, pc->u.xN.x));
|
||||
CHECK(save_BlobTermInCode(stream, pc->u.xN.b));
|
||||
CHECK(save_X(stream, pc->y_u.xN.x));
|
||||
CHECK(save_BlobTermInCode(stream, pc->y_u.xN.b));
|
||||
pc = NEXTOP(pc,xN);
|
||||
break;
|
||||
/* instructions type xc */
|
||||
case _get_atom:
|
||||
case _put_atom:
|
||||
CHECK(save_X(stream, pc->u.xc.x));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.xc.c));
|
||||
CHECK(save_X(stream, pc->y_u.xc.x));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.xc.c));
|
||||
pc = NEXTOP(pc,xc);
|
||||
break;
|
||||
/* instructions type xd */
|
||||
case _get_float:
|
||||
case _put_float:
|
||||
CHECK(save_X(stream, pc->u.xd.x));
|
||||
CHECK(save_DoubleInCode(stream, pc->u.xd.d));
|
||||
CHECK(save_X(stream, pc->y_u.xd.x));
|
||||
CHECK(save_DoubleInCode(stream, pc->y_u.xd.d));
|
||||
pc = NEXTOP(pc,xd);
|
||||
break;
|
||||
/* instructions type xfa */
|
||||
case _get_struct:
|
||||
case _put_struct:
|
||||
CHECK(save_X(stream, pc->u.xfa.x));
|
||||
CHECK(save_Func(stream, pc->u.xfa.f));
|
||||
CHECK(save_Arity(stream, pc->u.xfa.a));
|
||||
CHECK(save_X(stream, pc->y_u.xfa.x));
|
||||
CHECK(save_Func(stream, pc->y_u.xfa.f));
|
||||
CHECK(save_Arity(stream, pc->y_u.xfa.a));
|
||||
pc = NEXTOP(pc,xfa);
|
||||
break;
|
||||
/* instructions type xi */
|
||||
case _get_longint:
|
||||
case _put_longint:
|
||||
CHECK(save_X(stream, pc->u.xi.x));
|
||||
CHECK(save_IntegerInCode(stream, pc->u.xi.i));
|
||||
CHECK(save_X(stream, pc->y_u.xi.x));
|
||||
CHECK(save_IntegerInCode(stream, pc->y_u.xi.i));
|
||||
pc = NEXTOP(pc,xi);
|
||||
break;
|
||||
/* instructions type xl */
|
||||
@ -629,37 +629,37 @@
|
||||
case _p_number_x:
|
||||
case _p_primitive_x:
|
||||
case _p_var_x:
|
||||
CHECK(save_X(stream, pc->u.xl.x));
|
||||
CHECK(save_PtoOp(stream, pc->u.xl.F));
|
||||
CHECK(save_X(stream, pc->y_u.xl.x));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.xl.F));
|
||||
pc = NEXTOP(pc,xl);
|
||||
break;
|
||||
/* instructions type xll */
|
||||
case _jump_if_nonvar:
|
||||
CHECK(save_X(stream, pc->u.xll.x));
|
||||
CHECK(save_PtoOp(stream, pc->u.xll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->u.xll.l2));
|
||||
CHECK(save_X(stream, pc->y_u.xll.x));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.xll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.xll.l2));
|
||||
pc = NEXTOP(pc,xll);
|
||||
break;
|
||||
/* instructions type xllll */
|
||||
case _switch_on_arg_type:
|
||||
CHECK(save_X(stream, pc->u.xllll.x));
|
||||
CHECK(save_PtoOp(stream, pc->u.xllll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->u.xllll.l2));
|
||||
CHECK(save_PtoOp(stream, pc->u.xllll.l3));
|
||||
CHECK(save_PtoOp(stream, pc->u.xllll.l4));
|
||||
CHECK(save_X(stream, pc->y_u.xllll.x));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.xllll.l1));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.xllll.l2));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.xllll.l3));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.xllll.l4));
|
||||
pc = NEXTOP(pc,xllll);
|
||||
break;
|
||||
/* instructions type xps */
|
||||
case _commit_b_x:
|
||||
CHECK(save_X(stream, pc->u.xps.x));
|
||||
CHECK(save_PtoPred(stream, pc->u.xps.p0));
|
||||
CHECK(save_Constant(stream, pc->u.xps.s));
|
||||
CHECK(save_X(stream, pc->y_u.xps.x));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.xps.p0));
|
||||
CHECK(save_Constant(stream, pc->y_u.xps.s));
|
||||
pc = NEXTOP(pc,xps);
|
||||
break;
|
||||
/* instructions type xu */
|
||||
case _get_string:
|
||||
CHECK(save_X(stream, pc->u.xu.x));
|
||||
CHECK(save_BlobTermInCode(stream, pc->u.xu.ut));
|
||||
CHECK(save_X(stream, pc->y_u.xu.x));
|
||||
CHECK(save_BlobTermInCode(stream, pc->y_u.xu.ut));
|
||||
pc = NEXTOP(pc,xu);
|
||||
break;
|
||||
/* instructions type xx */
|
||||
@ -670,15 +670,15 @@
|
||||
case _glist_valx:
|
||||
case _put_x_val:
|
||||
case _put_x_var:
|
||||
CHECK(save_X(stream, pc->u.xx.xl));
|
||||
CHECK(save_X(stream, pc->u.xx.xr));
|
||||
CHECK(save_X(stream, pc->y_u.xx.xl));
|
||||
CHECK(save_X(stream, pc->y_u.xx.xr));
|
||||
pc = NEXTOP(pc,xx);
|
||||
break;
|
||||
/* instructions type xxc */
|
||||
case _p_func2s_cv:
|
||||
CHECK(save_X(stream, pc->u.xxc.x));
|
||||
CHECK(save_X(stream, pc->u.xxc.xi));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.xxc.c));
|
||||
CHECK(save_X(stream, pc->y_u.xxc.x));
|
||||
CHECK(save_X(stream, pc->y_u.xxc.xi));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.xxc.c));
|
||||
pc = NEXTOP(pc,xxc);
|
||||
break;
|
||||
/* instructions type xxn */
|
||||
@ -695,9 +695,9 @@
|
||||
case _p_slr_cv:
|
||||
case _p_slr_vc:
|
||||
case _p_times_vc:
|
||||
CHECK(save_X(stream, pc->u.xxn.x));
|
||||
CHECK(save_X(stream, pc->u.xxn.xi));
|
||||
CHECK(save_Integer(stream, pc->u.xxn.c));
|
||||
CHECK(save_X(stream, pc->y_u.xxn.x));
|
||||
CHECK(save_X(stream, pc->y_u.xxn.xi));
|
||||
CHECK(save_Integer(stream, pc->y_u.xxn.c));
|
||||
pc = NEXTOP(pc,xxn);
|
||||
break;
|
||||
/* instructions type xxx */
|
||||
@ -712,24 +712,24 @@
|
||||
case _p_sll_vv:
|
||||
case _p_slr_vv:
|
||||
case _p_times_vv:
|
||||
CHECK(save_X(stream, pc->u.xxx.x));
|
||||
CHECK(save_X(stream, pc->u.xxx.x1));
|
||||
CHECK(save_X(stream, pc->u.xxx.x2));
|
||||
CHECK(save_X(stream, pc->y_u.xxx.x));
|
||||
CHECK(save_X(stream, pc->y_u.xxx.x1));
|
||||
CHECK(save_X(stream, pc->y_u.xxx.x2));
|
||||
pc = NEXTOP(pc,xxx);
|
||||
break;
|
||||
/* instructions type xxxx */
|
||||
case _put_xx_val:
|
||||
CHECK(save_X(stream, pc->u.xxxx.xl1));
|
||||
CHECK(save_X(stream, pc->u.xxxx.xl2));
|
||||
CHECK(save_X(stream, pc->u.xxxx.xr1));
|
||||
CHECK(save_X(stream, pc->u.xxxx.xr2));
|
||||
CHECK(save_X(stream, pc->y_u.xxxx.xl1));
|
||||
CHECK(save_X(stream, pc->y_u.xxxx.xl2));
|
||||
CHECK(save_X(stream, pc->y_u.xxxx.xr1));
|
||||
CHECK(save_X(stream, pc->y_u.xxxx.xr2));
|
||||
pc = NEXTOP(pc,xxxx);
|
||||
break;
|
||||
/* instructions type xxy */
|
||||
case _p_func2f_xy:
|
||||
CHECK(save_X(stream, pc->u.xxy.x));
|
||||
CHECK(save_X(stream, pc->u.xxy.x1));
|
||||
CHECK(save_Y(stream, pc->u.xxy.y2));
|
||||
CHECK(save_X(stream, pc->y_u.xxy.x));
|
||||
CHECK(save_X(stream, pc->y_u.xxy.x1));
|
||||
CHECK(save_Y(stream, pc->y_u.xxy.y2));
|
||||
pc = NEXTOP(pc,xxy);
|
||||
break;
|
||||
/* instructions type y */
|
||||
@ -737,7 +737,7 @@
|
||||
case _write_y_loc:
|
||||
case _write_y_val:
|
||||
case _write_y_var:
|
||||
CHECK(save_Y(stream, pc->u.y.y));
|
||||
CHECK(save_Y(stream, pc->y_u.y.y));
|
||||
pc = NEXTOP(pc,y);
|
||||
break;
|
||||
/* instructions type yl */
|
||||
@ -751,15 +751,15 @@
|
||||
case _p_number_y:
|
||||
case _p_primitive_y:
|
||||
case _p_var_y:
|
||||
CHECK(save_Y(stream, pc->u.yl.y));
|
||||
CHECK(save_PtoOp(stream, pc->u.yl.F));
|
||||
CHECK(save_Y(stream, pc->y_u.yl.y));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.yl.F));
|
||||
pc = NEXTOP(pc,yl);
|
||||
break;
|
||||
/* instructions type yps */
|
||||
case _commit_b_y:
|
||||
CHECK(save_Y(stream, pc->u.yps.y));
|
||||
CHECK(save_PtoPred(stream, pc->u.yps.p0));
|
||||
CHECK(save_Constant(stream, pc->u.yps.s));
|
||||
CHECK(save_Y(stream, pc->y_u.yps.y));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.yps.p0));
|
||||
CHECK(save_Constant(stream, pc->y_u.yps.s));
|
||||
pc = NEXTOP(pc,yps);
|
||||
break;
|
||||
/* instructions type yx */
|
||||
@ -771,15 +771,15 @@
|
||||
case _put_unsafe:
|
||||
case _put_y_val:
|
||||
case _put_y_var:
|
||||
CHECK(save_Y(stream, pc->u.yx.y));
|
||||
CHECK(save_X(stream, pc->u.yx.x));
|
||||
CHECK(save_Y(stream, pc->y_u.yx.y));
|
||||
CHECK(save_X(stream, pc->y_u.yx.x));
|
||||
pc = NEXTOP(pc,yx);
|
||||
break;
|
||||
/* instructions type yxc */
|
||||
case _p_func2s_y_cv:
|
||||
CHECK(save_Y(stream, pc->u.yxc.y));
|
||||
CHECK(save_X(stream, pc->u.yxc.xi));
|
||||
CHECK(save_ConstantTerm(stream, pc->u.yxc.c));
|
||||
CHECK(save_Y(stream, pc->y_u.yxc.y));
|
||||
CHECK(save_X(stream, pc->y_u.yxc.xi));
|
||||
CHECK(save_ConstantTerm(stream, pc->y_u.yxc.c));
|
||||
pc = NEXTOP(pc,yxc);
|
||||
break;
|
||||
/* instructions type yxn */
|
||||
@ -796,9 +796,9 @@
|
||||
case _p_slr_y_cv:
|
||||
case _p_slr_y_vc:
|
||||
case _p_times_y_vc:
|
||||
CHECK(save_Y(stream, pc->u.yxn.y));
|
||||
CHECK(save_X(stream, pc->u.yxn.xi));
|
||||
CHECK(save_Integer(stream, pc->u.yxn.c));
|
||||
CHECK(save_Y(stream, pc->y_u.yxn.y));
|
||||
CHECK(save_X(stream, pc->y_u.yxn.xi));
|
||||
CHECK(save_Integer(stream, pc->y_u.yxn.c));
|
||||
pc = NEXTOP(pc,yxn);
|
||||
break;
|
||||
/* instructions type yxx */
|
||||
@ -813,25 +813,25 @@
|
||||
case _p_sll_y_vv:
|
||||
case _p_slr_y_vv:
|
||||
case _p_times_y_vv:
|
||||
CHECK(save_Y(stream, pc->u.yxx.y));
|
||||
CHECK(save_X(stream, pc->u.yxx.x1));
|
||||
CHECK(save_X(stream, pc->u.yxx.x2));
|
||||
CHECK(save_Y(stream, pc->y_u.yxx.y));
|
||||
CHECK(save_X(stream, pc->y_u.yxx.x1));
|
||||
CHECK(save_X(stream, pc->y_u.yxx.x2));
|
||||
pc = NEXTOP(pc,yxx);
|
||||
break;
|
||||
/* instructions type yyx */
|
||||
case _p_func2f_yy:
|
||||
CHECK(save_Y(stream, pc->u.yyx.y1));
|
||||
CHECK(save_Y(stream, pc->u.yyx.y2));
|
||||
CHECK(save_X(stream, pc->u.yyx.x));
|
||||
CHECK(save_Y(stream, pc->y_u.yyx.y1));
|
||||
CHECK(save_Y(stream, pc->y_u.yyx.y2));
|
||||
CHECK(save_X(stream, pc->y_u.yyx.x));
|
||||
pc = NEXTOP(pc,yyx);
|
||||
break;
|
||||
/* instructions type yyxx */
|
||||
case _get_yy_var:
|
||||
case _put_y_vals:
|
||||
CHECK(save_Y(stream, pc->u.yyxx.y1));
|
||||
CHECK(save_Y(stream, pc->u.yyxx.y2));
|
||||
CHECK(save_X(stream, pc->u.yyxx.x1));
|
||||
CHECK(save_X(stream, pc->u.yyxx.x2));
|
||||
CHECK(save_Y(stream, pc->y_u.yyxx.y1));
|
||||
CHECK(save_Y(stream, pc->y_u.yyxx.y2));
|
||||
CHECK(save_X(stream, pc->y_u.yyxx.x1));
|
||||
CHECK(save_X(stream, pc->y_u.yyxx.x2));
|
||||
pc = NEXTOP(pc,yyxx);
|
||||
break;
|
||||
#ifdef YAPOR
|
||||
@ -840,14 +840,14 @@
|
||||
case _getwork_seq:
|
||||
case _sync:
|
||||
#ifdef YAPOR
|
||||
CHECK(save_OrArg(stream, pc->u.Otapl.or_arg));
|
||||
CHECK(save_OrArg(stream, pc->y_u.Otapl.or_arg));
|
||||
#endif
|
||||
#ifdef TABLING
|
||||
CHECK(save_TabEntry(stream, pc->u.Otapl.te));
|
||||
CHECK(save_TabEntry(stream, pc->y_u.Otapl.te));
|
||||
#endif
|
||||
CHECK(save_Arity(stream, pc->u.Otapl.s));
|
||||
CHECK(save_PtoPred(stream, pc->u.Otapl.p));
|
||||
CHECK(save_PtoOp(stream, pc->u.Otapl.d));
|
||||
CHECK(save_Arity(stream, pc->y_u.Otapl.s));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.Otapl.p));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.Otapl.d));
|
||||
pc = NEXTOP(pc,Otapl);
|
||||
break;
|
||||
/* instructions type e */
|
||||
@ -873,14 +873,14 @@
|
||||
case _table_try_me:
|
||||
case _table_try_single:
|
||||
#ifdef YAPOR
|
||||
CHECK(save_OrArg(stream, pc->u.Otapl.or_arg));
|
||||
CHECK(save_OrArg(stream, pc->y_u.Otapl.or_arg));
|
||||
#endif
|
||||
#ifdef TABLING
|
||||
CHECK(save_TabEntry(stream, pc->u.Otapl.te));
|
||||
CHECK(save_TabEntry(stream, pc->y_u.Otapl.te));
|
||||
#endif
|
||||
CHECK(save_Arity(stream, pc->u.Otapl.s));
|
||||
CHECK(save_PtoPred(stream, pc->u.Otapl.p));
|
||||
CHECK(save_PtoOp(stream, pc->u.Otapl.d));
|
||||
CHECK(save_Arity(stream, pc->y_u.Otapl.s));
|
||||
CHECK(save_PtoPred(stream, pc->y_u.Otapl.p));
|
||||
CHECK(save_PtoOp(stream, pc->y_u.Otapl.d));
|
||||
pc = NEXTOP(pc,Otapl);
|
||||
break;
|
||||
/* instructions type e */
|
||||
@ -892,7 +892,7 @@
|
||||
break;
|
||||
/* instructions type s */
|
||||
case _table_new_answer:
|
||||
CHECK(save_Constant(stream, pc->u.s.s));
|
||||
CHECK(save_Constant(stream, pc->y_u.s.s));
|
||||
pc = NEXTOP(pc,s);
|
||||
break;
|
||||
/* instructions type e */
|
||||
|
@ -15,10 +15,10 @@
|
||||
break;
|
||||
/* instructions type Illss */
|
||||
case _enter_lu_pred:
|
||||
return walk_got_lu_block(pc->u.Illss.I, startp, endp);
|
||||
return walk_got_lu_block(pc->y_u.Illss.I, startp, endp);
|
||||
/* instructions type L */
|
||||
case _alloc_for_logical_pred:
|
||||
return walk_got_lu_clause(pc->u.L.ClBase, startp, endp);
|
||||
return walk_got_lu_clause(pc->y_u.L.ClBase, startp, endp);
|
||||
/* instructions type N */
|
||||
case _write_bigint:
|
||||
pc = NEXTOP(pc,N);
|
||||
@ -27,7 +27,7 @@
|
||||
case _either:
|
||||
case _or_else:
|
||||
clause_code = TRUE;
|
||||
pp = pc->u.Osblp.p0;
|
||||
pp = pc->y_u.Osblp.p0;
|
||||
pc = NEXTOP(pc,Osblp);
|
||||
break;
|
||||
/* instructions type Osbmp */
|
||||
@ -41,30 +41,30 @@
|
||||
break;
|
||||
/* instructions type Osbpp */
|
||||
case _call_cpred:
|
||||
pp = pc->u.Osbpp.p;
|
||||
pp = pc->y_u.Osbpp.p;
|
||||
return walk_found_c_pred(pp, startp, endp);
|
||||
case _call_usercpred:
|
||||
pp = pc->u.Osbpp.p;
|
||||
pp = pc->y_u.Osbpp.p;
|
||||
return walk_found_c_pred(pp, startp, endp);
|
||||
case _p_execute2:
|
||||
return found_meta_call(startp, endp);
|
||||
case _call:
|
||||
case _fcall:
|
||||
clause_code = TRUE;
|
||||
pp = pc->u.Osbpp.p0;
|
||||
pp = pc->y_u.Osbpp.p0;
|
||||
pc = NEXTOP(pc,Osbpp);
|
||||
break;
|
||||
/* instructions type OtILl */
|
||||
case _count_trust_logical:
|
||||
case _profiled_trust_logical:
|
||||
case _trust_logical:
|
||||
return walk_got_lu_block(pc->u.OtILl.block, startp, endp);
|
||||
return walk_got_lu_block(pc->y_u.OtILl.block, startp, endp);
|
||||
/* instructions type OtaLl */
|
||||
case _count_retry_logical:
|
||||
case _profiled_retry_logical:
|
||||
case _retry_logical:
|
||||
case _try_logical:
|
||||
pc = pc->u.OtaLl.n;
|
||||
pc = pc->y_u.OtaLl.n;
|
||||
break;
|
||||
/* instructions type OtapFs */
|
||||
case _cut_c:
|
||||
@ -74,7 +74,7 @@
|
||||
case _try_c:
|
||||
case _try_userc:
|
||||
clause_code = TRUE;
|
||||
pp = pc->u.OtapFs.p;
|
||||
pp = pc->y_u.OtapFs.p;
|
||||
pc = NEXTOP(pc,OtapFs);
|
||||
break;
|
||||
/* instructions type Otapl */
|
||||
@ -94,7 +94,7 @@
|
||||
case _try_clause:
|
||||
case _try_me:
|
||||
clause_code = FALSE;
|
||||
pp = pc->u.Otapl.p;
|
||||
pp = pc->y_u.Otapl.p;
|
||||
pc = NEXTOP(pc,Otapl);
|
||||
break;
|
||||
/* instructions type aFlp */
|
||||
@ -342,7 +342,7 @@
|
||||
/* instructions type p */
|
||||
case _lock_lu:
|
||||
case _procceed:
|
||||
pp = pc->u.p.p;
|
||||
pp = pc->y_u.p.p;
|
||||
if (pp->PredFlags & MegaClausePredFlag)
|
||||
return found_mega_clause(pp, startp, endp);
|
||||
clause_code = TRUE;
|
||||
@ -372,12 +372,12 @@
|
||||
break;
|
||||
/* instructions type pp */
|
||||
case _execute_cpred:
|
||||
pp = pc->u.pp.p;
|
||||
pp = pc->y_u.pp.p;
|
||||
return walk_found_c_pred(pp, startp, endp);
|
||||
case _dexecute:
|
||||
case _execute:
|
||||
clause_code = TRUE;
|
||||
pp = pc->u.pp.p0;
|
||||
pp = pc->y_u.pp.p0;
|
||||
pc = NEXTOP(pc,pp);
|
||||
break;
|
||||
/* instructions type s */
|
||||
@ -398,7 +398,7 @@
|
||||
break;
|
||||
/* instructions type slp */
|
||||
case _call_c_wfail:
|
||||
pp = pc->u.slp.p;
|
||||
pp = pc->y_u.slp.p;
|
||||
return walk_found_c_pred(pp, startp, endp);
|
||||
/* instructions type sssl */
|
||||
case _go_on_cons:
|
||||
@ -619,7 +619,7 @@
|
||||
case _getwork_seq:
|
||||
case _sync:
|
||||
clause_code = FALSE;
|
||||
pp = pc->u.Otapl.p;
|
||||
pp = pc->y_u.Otapl.p;
|
||||
pc = NEXTOP(pc,Otapl);
|
||||
break;
|
||||
/* instructions type e */
|
||||
@ -644,7 +644,7 @@
|
||||
case _table_try_me:
|
||||
case _table_try_single:
|
||||
clause_code = FALSE;
|
||||
pp = pc->u.Otapl.p;
|
||||
pp = pc->y_u.Otapl.p;
|
||||
pc = NEXTOP(pc,Otapl);
|
||||
break;
|
||||
/* instructions type e */
|
||||
@ -728,13 +728,13 @@
|
||||
/* this instruction is hardwired */
|
||||
case _or_last:
|
||||
#ifdef YAPOR
|
||||
pp = pc->u.Osblp.p0;
|
||||
pp = pc->y_u.Osblp.p0;
|
||||
if (pp->PredFlags & MegaClausePredFlag)
|
||||
return found_mega_clause(pp, startp, endp);
|
||||
clause_code = TRUE;
|
||||
pc = NEXTOP(pc,Osblp);
|
||||
#else
|
||||
pp = pc->u.p.p;
|
||||
pp = pc->y_u.p.p;
|
||||
if (pp->PredFlags & MegaClausePredFlag)
|
||||
return found_mega_clause(pp, startp, endp);
|
||||
clause_code = TRUE;
|
||||
|
@ -80,16 +80,16 @@ static inline qg_sol_fr_ptr CUT_prune_solution_frames(qg_sol_fr_ptr, int);
|
||||
#define YAMOP_LTT_BITS OOOOPPS!!! Unknown Integer Sizeof
|
||||
#endif /* SIZEOF_INT */
|
||||
|
||||
#define YAMOP_OR_ARG(INST) ((INST)->u.Otapl.or_arg)
|
||||
#define YAMOP_LTT(INST) (((INST)->u.Otapl.or_arg) & YAMOP_LTT_BITS)
|
||||
#define YAMOP_SEQ(INST) (((INST)->u.Otapl.or_arg) & YAMOP_SEQ_FLAG)
|
||||
#define YAMOP_CUT(INST) (((INST)->u.Otapl.or_arg) & YAMOP_CUT_FLAG)
|
||||
#define YAMOP_FLAGS(INST) (((INST)->u.Otapl.or_arg) & YAMOP_FLAGS_BITS)
|
||||
#define YAMOP_OR_ARG(INST) ((INST)->y_u.Otapl.or_arg)
|
||||
#define YAMOP_LTT(INST) (((INST)->y_u.Otapl.or_arg) & YAMOP_LTT_BITS)
|
||||
#define YAMOP_SEQ(INST) (((INST)->y_u.Otapl.or_arg) & YAMOP_SEQ_FLAG)
|
||||
#define YAMOP_CUT(INST) (((INST)->y_u.Otapl.or_arg) & YAMOP_CUT_FLAG)
|
||||
#define YAMOP_FLAGS(INST) (((INST)->y_u.Otapl.or_arg) & YAMOP_FLAGS_BITS)
|
||||
|
||||
#define INIT_YAMOP_LTT(INST, LTT) ((INST)->u.Otapl.or_arg = LTT+1)
|
||||
#define PUT_YAMOP_LTT(INST, LTT) (INST)->u.Otapl.or_arg = YAMOP_FLAGS(INST) | (LTT+1)
|
||||
#define PUT_YAMOP_SEQ(INST) (INST)->u.Otapl.or_arg |= YAMOP_SEQ_FLAG
|
||||
#define PUT_YAMOP_CUT(INST) (INST)->u.Otapl.or_arg |= YAMOP_CUT_FLAG
|
||||
#define INIT_YAMOP_LTT(INST, LTT) ((INST)->y_u.Otapl.or_arg = LTT+1)
|
||||
#define PUT_YAMOP_LTT(INST, LTT) (INST)->y_u.Otapl.or_arg = YAMOP_FLAGS(INST) | (LTT+1)
|
||||
#define PUT_YAMOP_SEQ(INST) (INST)->y_u.Otapl.or_arg |= YAMOP_SEQ_FLAG
|
||||
#define PUT_YAMOP_CUT(INST) (INST)->y_u.Otapl.or_arg |= YAMOP_CUT_FLAG
|
||||
|
||||
#define BRANCH(WORKER, DEPTH) GLOBAL_branch(WORKER, DEPTH)
|
||||
#define BRANCH_LTT(WORKER, DEPTH) (BRANCH(WORKER, DEPTH) & YAMOP_LTT_BITS)
|
||||
|
@ -434,14 +434,14 @@
|
||||
if (PREG->opc == Yap_opcode(_table_try)) {
|
||||
/* table_try */
|
||||
code_ap = NEXTOP(PREG,Otapl);
|
||||
PREG = PREG->u.Otapl.d;
|
||||
PREG = PREG->y_u.Otapl.d;
|
||||
} else if (PREG->opc == Yap_opcode(_table_try_single)) {
|
||||
/* table_try_single */
|
||||
code_ap = COMPLETION;
|
||||
PREG = PREG->u.Otapl.d;
|
||||
PREG = PREG->y_u.Otapl.d;
|
||||
} else {
|
||||
/* table_try_me */
|
||||
code_ap = PREG->u.Otapl.d;
|
||||
code_ap = PREG->y_u.Otapl.d;
|
||||
PREG = NEXTOP(PREG,Otapl);
|
||||
}
|
||||
PREFETCH_OP(PREG);
|
||||
@ -453,7 +453,7 @@
|
||||
GONext();
|
||||
}
|
||||
#else
|
||||
PREG = PREG->u.Otapl.d;
|
||||
PREG = PREG->y_u.Otapl.d;
|
||||
PREFETCH_OP(PREG);
|
||||
GONext();
|
||||
#endif /* INCOMPLETE_TABLING */
|
||||
@ -470,7 +470,7 @@
|
||||
sg_fr_ptr sg_fr;
|
||||
|
||||
check_trail(TR);
|
||||
tab_ent = PREG->u.Otapl.te;
|
||||
tab_ent = PREG->y_u.Otapl.te;
|
||||
YENV2MEM;
|
||||
sg_fr = subgoal_search(PREG, YENV_ADDRESS);
|
||||
MEM2YENV;
|
||||
@ -488,7 +488,7 @@
|
||||
#ifdef THREADS_CONSUMER_SHARING
|
||||
if (SgFr_state(sg_fr) == ready_external) {
|
||||
init_subgoal_frame(sg_fr);
|
||||
store_generator_consumer_node(tab_ent, sg_fr, TRUE, PREG->u.Otapl.s);
|
||||
store_generator_consumer_node(tab_ent, sg_fr, TRUE, PREG->y_u.Otapl.s);
|
||||
PREFETCH_OP(PREG);
|
||||
allocate_environment();
|
||||
check_for_deadlock(sg_fr);
|
||||
@ -505,9 +505,9 @@
|
||||
} else
|
||||
#endif /* DETERMINISTIC_TABLING */
|
||||
{
|
||||
store_generator_node(tab_ent, sg_fr, PREG->u.Otapl.s, COMPLETION);
|
||||
store_generator_node(tab_ent, sg_fr, PREG->y_u.Otapl.s, COMPLETION);
|
||||
}
|
||||
PREG = PREG->u.Otapl.d; /* should work also with PREG = NEXTOP(PREG,Otapl); */
|
||||
PREG = PREG->y_u.Otapl.d; /* should work also with PREG = NEXTOP(PREG,Otapl); */
|
||||
PREFETCH_OP(PREG);
|
||||
allocate_environment();
|
||||
GONext();
|
||||
@ -522,7 +522,7 @@
|
||||
init_subgoal_frame(sg_fr);
|
||||
UNLOCK_SG_FR(sg_fr);
|
||||
SgFr_try_answer(sg_fr) = ans_node;
|
||||
store_generator_node(tab_ent, sg_fr, PREG->u.Otapl.s, TRY_ANSWER);
|
||||
store_generator_node(tab_ent, sg_fr, PREG->y_u.Otapl.s, TRY_ANSWER);
|
||||
PREG = (yamop *) CPREG;
|
||||
PREFETCH_OP(PREG);
|
||||
load_answer(ans_node, subs_ptr);
|
||||
@ -638,7 +638,7 @@
|
||||
sg_fr_ptr sg_fr;
|
||||
|
||||
check_trail(TR);
|
||||
tab_ent = PREG->u.Otapl.te;
|
||||
tab_ent = PREG->y_u.Otapl.te;
|
||||
YENV2MEM;
|
||||
sg_fr = subgoal_search(PREG, YENV_ADDRESS);
|
||||
MEM2YENV;
|
||||
@ -657,7 +657,7 @@
|
||||
if (SgFr_state(sg_fr) == ready_external) {
|
||||
init_subgoal_frame(sg_fr);
|
||||
UNLOCK_SG_FR(sg_fr);
|
||||
store_generator_consumer_node(tab_ent, sg_fr, TRUE, PREG->u.Otapl.s);
|
||||
store_generator_consumer_node(tab_ent, sg_fr, TRUE, PREG->y_u.Otapl.s);
|
||||
PREFETCH_OP(PREG);
|
||||
allocate_environment();
|
||||
check_for_deadlock(sg_fr);
|
||||
@ -668,7 +668,7 @@
|
||||
/* subgoal new */
|
||||
init_subgoal_frame(sg_fr);
|
||||
UNLOCK_SG_FR(sg_fr);
|
||||
store_generator_node(tab_ent, sg_fr, PREG->u.Otapl.s, PREG->u.Otapl.d);
|
||||
store_generator_node(tab_ent, sg_fr, PREG->y_u.Otapl.s, PREG->y_u.Otapl.d);
|
||||
PREG = NEXTOP(PREG, Otapl);
|
||||
PREFETCH_OP(PREG);
|
||||
allocate_environment();
|
||||
@ -684,7 +684,7 @@
|
||||
init_subgoal_frame(sg_fr);
|
||||
UNLOCK_SG_FR(sg_fr);
|
||||
SgFr_try_answer(sg_fr) = ans_node;
|
||||
store_generator_node(tab_ent, sg_fr, PREG->u.Otapl.s, TRY_ANSWER);
|
||||
store_generator_node(tab_ent, sg_fr, PREG->y_u.Otapl.s, TRY_ANSWER);
|
||||
PREG = (yamop *) CPREG;
|
||||
PREFETCH_OP(PREG);
|
||||
load_answer(ans_node, subs_ptr);
|
||||
@ -788,7 +788,7 @@
|
||||
sg_fr_ptr sg_fr;
|
||||
|
||||
check_trail(TR);
|
||||
tab_ent = PREG->u.Otapl.te;
|
||||
tab_ent = PREG->y_u.Otapl.te;
|
||||
YENV2MEM;
|
||||
sg_fr = subgoal_search(PREG, YENV_ADDRESS);
|
||||
MEM2YENV;
|
||||
@ -807,7 +807,7 @@
|
||||
if (SgFr_state(sg_fr) == ready_external) {
|
||||
init_subgoal_frame(sg_fr);
|
||||
UNLOCK_SG_FR(sg_fr);
|
||||
store_generator_consumer_node(tab_ent, sg_fr, TRUE , PREG->u.Otapl.s);
|
||||
store_generator_consumer_node(tab_ent, sg_fr, TRUE , PREG->y_u.Otapl.s);
|
||||
PREFETCH_OP(PREG);
|
||||
allocate_environment();
|
||||
check_for_deadlock(sg_fr);
|
||||
@ -818,8 +818,8 @@
|
||||
/* subgoal new */
|
||||
init_subgoal_frame(sg_fr);
|
||||
UNLOCK_SG_FR(sg_fr);
|
||||
store_generator_node(tab_ent, sg_fr, PREG->u.Otapl.s, NEXTOP(PREG,Otapl));
|
||||
PREG = PREG->u.Otapl.d;
|
||||
store_generator_node(tab_ent, sg_fr, PREG->y_u.Otapl.s, NEXTOP(PREG,Otapl));
|
||||
PREG = PREG->y_u.Otapl.d;
|
||||
PREFETCH_OP(PREG);
|
||||
allocate_environment();
|
||||
GONext();
|
||||
@ -834,7 +834,7 @@
|
||||
init_subgoal_frame(sg_fr);
|
||||
UNLOCK_SG_FR(sg_fr);
|
||||
SgFr_try_answer(sg_fr) = ans_node;
|
||||
store_generator_node(tab_ent, sg_fr, PREG->u.Otapl.s, TRY_ANSWER);
|
||||
store_generator_node(tab_ent, sg_fr, PREG->y_u.Otapl.s, TRY_ANSWER);
|
||||
PREG = (yamop *) CPREG;
|
||||
PREFETCH_OP(PREG);
|
||||
load_answer(ans_node, subs_ptr);
|
||||
@ -946,7 +946,7 @@
|
||||
************************************************************************/
|
||||
|
||||
Op(table_retry_me, Otapl)
|
||||
restore_generator_node(PREG->u.Otapl.s, PREG->u.Otapl.d);
|
||||
restore_generator_node(PREG->y_u.Otapl.s, PREG->y_u.Otapl.d);
|
||||
YENV = (CELL *) PROTECT_FROZEN_B(B);
|
||||
set_cut(YENV, B->cp_b);
|
||||
SET_BB(NORM_CP(YENV));
|
||||
@ -962,12 +962,12 @@
|
||||
************************************************************************/
|
||||
|
||||
Op(table_retry, Otapl)
|
||||
restore_generator_node(PREG->u.Otapl.s, NEXTOP(PREG,Otapl));
|
||||
restore_generator_node(PREG->y_u.Otapl.s, NEXTOP(PREG,Otapl));
|
||||
YENV = (CELL *) PROTECT_FROZEN_B(B);
|
||||
set_cut(YENV, B->cp_b);
|
||||
SET_BB(NORM_CP(YENV));
|
||||
allocate_environment();
|
||||
PREG = PREG->u.Otapl.d;
|
||||
PREG = PREG->y_u.Otapl.d;
|
||||
GONext();
|
||||
ENDOp();
|
||||
|
||||
@ -978,10 +978,10 @@
|
||||
************************************************************************/
|
||||
|
||||
Op(table_trust_me, Otapl)
|
||||
restore_generator_node(PREG->u.Otapl.s, COMPLETION);
|
||||
restore_generator_node(PREG->y_u.Otapl.s, COMPLETION);
|
||||
#ifdef DETERMINISTIC_TABLING
|
||||
if (B_FZ > B && IS_BATCHED_NORM_GEN_CP(B)) {
|
||||
CELL *subs_ptr = (CELL *)(GEN_CP(B) + 1) + PREG->u.Otapl.s;
|
||||
CELL *subs_ptr = (CELL *)(GEN_CP(B) + 1) + PREG->y_u.Otapl.s;
|
||||
choiceptr gcp = NORM_CP(DET_GEN_CP(subs_ptr) - 1);
|
||||
sg_fr_ptr sg_fr = GEN_CP(B)->cp_sg_fr;
|
||||
DET_GEN_CP(gcp)->cp_sg_fr = sg_fr;
|
||||
@ -1010,10 +1010,10 @@
|
||||
************************************************************************/
|
||||
|
||||
Op(table_trust, Otapl)
|
||||
restore_generator_node(PREG->u.Otapl.s, COMPLETION);
|
||||
restore_generator_node(PREG->y_u.Otapl.s, COMPLETION);
|
||||
#ifdef DETERMINISTIC_TABLING
|
||||
if (B_FZ > B && IS_BATCHED_NORM_GEN_CP(B)) {
|
||||
CELL *subs_ptr = (CELL *)(GEN_CP(B) + 1) + PREG->u.Otapl.s;
|
||||
CELL *subs_ptr = (CELL *)(GEN_CP(B) + 1) + PREG->y_u.Otapl.s;
|
||||
choiceptr gcp = NORM_CP(DET_GEN_CP(subs_ptr) - 1);
|
||||
sg_fr_ptr sg_fr = GEN_CP(B)->cp_sg_fr;
|
||||
DET_GEN_CP(gcp)->cp_sg_fr = sg_fr;
|
||||
@ -1031,7 +1031,7 @@
|
||||
set_cut(YENV, B->cp_b);
|
||||
SET_BB(NORM_CP(YENV));
|
||||
allocate_environment();
|
||||
PREG = PREG->u.Otapl.d;
|
||||
PREG = PREG->y_u.Otapl.d;
|
||||
GONext();
|
||||
ENDOp();
|
||||
|
||||
@ -1056,7 +1056,7 @@
|
||||
#endif /* DETERMINISTIC_TABLING */
|
||||
{
|
||||
sg_fr = GEN_CP(gcp)->cp_sg_fr;
|
||||
subs_ptr = (CELL *)(GEN_CP(gcp) + 1) + PREG->u.s.s;
|
||||
subs_ptr = (CELL *)(GEN_CP(gcp) + 1) + PREG->y_u.s.s;
|
||||
}
|
||||
#if defined(DEBUG_TABLING) && !defined(DETERMINISTIC_TABLING)
|
||||
{
|
||||
@ -1064,7 +1064,7 @@
|
||||
CELL *aux_args;
|
||||
CELL *aux_subs;
|
||||
|
||||
arity_args = PREG->u.s.s;
|
||||
arity_args = PREG->y_u.s.s;
|
||||
arity_subs = *subs_ptr;
|
||||
aux_args = (CELL *)(GEN_CP(gcp) + 1);
|
||||
aux_subs = subs_ptr;
|
||||
|
@ -271,8 +271,8 @@ typedef struct subgoal_entry {
|
||||
|
||||
#define SgEnt_lock(X) ((X)->lock)
|
||||
#define SgEnt_code(X) ((X)->code_of_subgoal)
|
||||
#define SgEnt_tab_ent(X) (((X)->code_of_subgoal)->u.Otapl.te)
|
||||
#define SgEnt_arity(X) (((X)->code_of_subgoal)->u.Otapl.s)
|
||||
#define SgEnt_tab_ent(X) (((X)->code_of_subgoal)->y_u.Otapl.te)
|
||||
#define SgEnt_arity(X) (((X)->code_of_subgoal)->y_u.Otapl.s)
|
||||
#define SgEnt_hash_chain(X) ((X)->hash_chain)
|
||||
#define SgEnt_answer_trie(X) ((X)->answer_trie)
|
||||
#define SgEnt_first_answer(X) ((X)->first_answer)
|
||||
@ -316,8 +316,8 @@ typedef struct subgoal_frame {
|
||||
#endif /* THREADS_FULL_SHARING || THREADS_CONSUMER_SHARING */
|
||||
#define SgFr_lock(X) (SUBGOAL_ENTRY(X) lock)
|
||||
#define SgFr_code(X) (SUBGOAL_ENTRY(X) code_of_subgoal)
|
||||
#define SgFr_tab_ent(X) ((SUBGOAL_ENTRY(X) code_of_subgoal)->u.Otapl.te)
|
||||
#define SgFr_arity(X) ((SUBGOAL_ENTRY(X) code_of_subgoal)->u.Otapl.s)
|
||||
#define SgFr_tab_ent(X) ((SUBGOAL_ENTRY(X) code_of_subgoal)->y_u.Otapl.te)
|
||||
#define SgFr_arity(X) ((SUBGOAL_ENTRY(X) code_of_subgoal)->y_u.Otapl.s)
|
||||
#define SgFr_hash_chain(X) (SUBGOAL_ENTRY(X) hash_chain)
|
||||
#define SgFr_answer_trie(X) (SUBGOAL_ENTRY(X) answer_trie)
|
||||
#define SgFr_first_answer(X) (SUBGOAL_ENTRY(X) first_answer)
|
||||
|
@ -1071,8 +1071,8 @@ sg_fr_ptr subgoal_search(yamop *preg, CELL **Yaddr) {
|
||||
|
||||
stack_vars = *Yaddr;
|
||||
subs_arity = 0;
|
||||
pred_arity = preg->u.Otapl.s;
|
||||
tab_ent = preg->u.Otapl.te;
|
||||
pred_arity = preg->y_u.Otapl.s;
|
||||
tab_ent = preg->y_u.Otapl.te;
|
||||
current_sg_node = get_insert_subgoal_trie(tab_ent PASS_REGS);
|
||||
LOCK_SUBGOAL_TRIE(tab_ent);
|
||||
|
||||
|
@ -30,7 +30,7 @@ typedef void *yamop;
|
||||
|
||||
typedef char *ADDR;
|
||||
|
||||
#define RESET_VARIABLE(X) (*(X) = (CELL)(X))
|
||||
// #define RESET_VARIABLE(X) (*(X) = (CELL)(X))
|
||||
|
||||
#ifdef _YAP_NOT_INSTALLED_
|
||||
#include "Regs.h"
|
||||
|
@ -81,7 +81,7 @@ do_gc(UInt sz)
|
||||
yamop *nextpc;
|
||||
|
||||
if (P && PREVOP(P,Osbpp)->opc == Yap_opcode(_call_usercpred)) {
|
||||
arity = PREVOP(P,Osbpp)->u.Osbpp.p->ArityOfPE;
|
||||
arity = PREVOP(P,Osbpp)->y_u.Osbpp.p->ArityOfPE;
|
||||
nextpc = P;
|
||||
} else {
|
||||
arity = 0;
|
||||
|
@ -200,15 +200,15 @@ special_formats(C,"e") :- !,
|
||||
special_formats(C,"l") :- !,
|
||||
format(C,' if (op == _Ystop) return;~n',[]).
|
||||
special_formats(C,"sssl") :- !,
|
||||
format(C,' AdjustSwitchTable(op, pc->u.sssl.l, pc->u.sssl.s);~n',[]).
|
||||
format(C,' AdjustSwitchTable(op, pc->y_u.sssl.l, pc->y_u.sssl.s);~n',[]).
|
||||
special_formats(C,"Illss") :- !,
|
||||
format(C,' opc = NEXTOP(pc,Illss);
|
||||
pc = pc->u.Illss.l1;
|
||||
pc = pc->y_u.Illss.l1;
|
||||
break;~n',[]),
|
||||
% don't go to NEXTOP
|
||||
fail.
|
||||
special_formats(C,"OtaLl") :- !,
|
||||
format(C,' pc = pc->u.OtaLl.n;
|
||||
format(C,' pc = pc->y_u.OtaLl.n;
|
||||
break;~n',[]),
|
||||
% don't go to NEXTOP
|
||||
fail.
|
||||
@ -230,10 +230,10 @@ dump_fields(C,[_|Info],Ops,T) :-
|
||||
dump_field(C,I,O,T) :-
|
||||
rewritable_field(O), !,
|
||||
get_op(O,A),
|
||||
format(C,' ~sAdjust(pc->u.~s.~s);~n',[A,T,I]).
|
||||
format(C,' ~sAdjust(pc->y_u.~s.~s);~n',[A,T,I]).
|
||||
dump_field(C,I,O,T) :-
|
||||
get_op(O,A),
|
||||
format(C,' pc->u.~s.~s = ~sAdjust(pc->u.~s.~s);~n',[T,I,A,T,I]).
|
||||
format(C,' pc->y_u.~s.~s = ~sAdjust(pc->y_u.~s.~s);~n',[T,I,A,T,I]).
|
||||
|
||||
rewritable_field(0'd).
|
||||
rewritable_field(0'i).
|
||||
@ -349,15 +349,15 @@ c_call_op("call_c_wfail").
|
||||
|
||||
% I field gives direct access to LU index block and to all Pred information
|
||||
output_walk(C,"Illss",_) :- !,
|
||||
format(C,' return walk_got_lu_block(pc->u.Illss.I, startp, endp);~n',[]).
|
||||
format(C,' return walk_got_lu_block(pc->y_u.Illss.I, startp, endp);~n',[]).
|
||||
output_walk(C,"OtILl",_) :- !,
|
||||
format(C,' return walk_got_lu_block(pc->u.OtILl.block, startp, endp);~n',[]).
|
||||
format(C,' return walk_got_lu_block(pc->y_u.OtILl.block, startp, endp);~n',[]).
|
||||
% I field gives direct access to LU index clause and to all Pred information
|
||||
output_walk(C,"L",_) :- !,
|
||||
format(C,' return walk_got_lu_clause(pc->u.L.ClBase, startp, endp);~n',[]).
|
||||
format(C,' return walk_got_lu_clause(pc->y_u.L.ClBase, startp, endp);~n',[]).
|
||||
% we cannot jump to clause code.
|
||||
output_walk(C,"OtaLl",_) :- !,
|
||||
format(C,' pc = pc->u.OtaLl.n;~n break;~n',[]).
|
||||
format(C,' pc = pc->y_u.OtaLl.n;~n break;~n',[]).
|
||||
% ops which point at the clause's predicate.
|
||||
output_walk(C,"Osblp",_) :- !,
|
||||
label_in_clause(C,"Osblp","p0").
|
||||
@ -443,23 +443,23 @@ output_ewalks(C,["trust_fail"|Ops]) :-
|
||||
|
||||
label_in_clause(C,Type,Field) :-
|
||||
format(C,' clause_code = TRUE;~n',[]),
|
||||
format(C,' pp = pc->u.~s.~s;~n',[Type,Field]),
|
||||
format(C,' pp = pc->y_u.~s.~s;~n',[Type,Field]),
|
||||
format(C,' pc = NEXTOP(pc,~s);
|
||||
break;~n',[Type]).
|
||||
|
||||
label_in_index(C,Type,Field) :-
|
||||
format(C,' clause_code = FALSE;~n',[]),
|
||||
format(C,' pp = pc->u.~s.~s;~n',[Type,Field]),
|
||||
format(C,' pp = pc->y_u.~s.~s;~n',[Type,Field]),
|
||||
format(C,' pc = NEXTOP(pc,~s);
|
||||
break;~n',[Type]).
|
||||
|
||||
add_pi(C,Type,Field) :-
|
||||
format(C,' pp = pc->u.~s.~s;~n',[Type,Field]),
|
||||
format(C,' pp = pc->y_u.~s.~s;~n',[Type,Field]),
|
||||
format(C,' clause_code = FALSE;~n',[]),
|
||||
format(C,' pc = NEXTOP(pc,~s);~n',[Type]).
|
||||
|
||||
add_pp(C,Type,Field) :-
|
||||
format(C,' pp = pc->u.~s.~s;~n',[Type,Field]),
|
||||
format(C,' pp = pc->y_u.~s.~s;~n',[Type,Field]),
|
||||
format(C,' if (pp->PredFlags & MegaClausePredFlag)~n',[]),
|
||||
format(C,' return found_mega_clause(pp, startp, endp);~n',[]),
|
||||
format(C,' clause_code = TRUE;~n',[]),
|
||||
@ -469,7 +469,7 @@ walk_to_meta_call(C) :-
|
||||
format(C,' return found_meta_call(startp, endp);~n',[]).
|
||||
|
||||
walk_to_c_code(C,Type,Field) :-
|
||||
format(C,' pp = pc->u.~s.~s;~n',[Type,Field]),
|
||||
format(C,' pp = pc->y_u.~s.~s;~n',[Type,Field]),
|
||||
format(C,' return walk_found_c_pred(pp, startp, endp);~n',[]).
|
||||
|
||||
%
|
||||
@ -500,7 +500,7 @@ dump_actions([A|Actions], Op, T, L) :-
|
||||
% conditional jumps can
|
||||
dump_action(body, _, _, _).
|
||||
dump_action(ifthenelse, _, T, L) :-
|
||||
format(L,' if (cl->u.~s.F != FAILCODE) {
|
||||
format(L,' if (cl->y_u.~s.F != FAILCODE) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T]).
|
||||
@ -517,22 +517,22 @@ dump_action(bind(Who,What,Extra), _, T, L) :-
|
||||
handle_bind_extra(Extra, T, Command),
|
||||
handle_constant(What, T, Constant),
|
||||
check_atom_dbref(What, Constant, ExtraAction),
|
||||
format(L,' if (is_regcopy(myregs, nofregs, cl->u.~s.~s)) {
|
||||
format(L,' if (is_regcopy(myregs, nofregs, cl->y_u.~s.~s)) {
|
||||
~sclause->Tag = ~s;~s
|
||||
return;
|
||||
}~n', [T, Who, ExtraAction, Constant, Command]).
|
||||
dump_action(new(Who), _, T, L) :-
|
||||
format(L,' if (!(nofregs = delete_regcopy(myregs, nofregs, cl->u.~s.~s))) {
|
||||
format(L,' if (!(nofregs = delete_regcopy(myregs, nofregs, cl->y_u.~s.~s))) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T,Who]).
|
||||
dump_action(dup(Who1,Who2), _, T, L) :-
|
||||
format(L,' if (!(nofregs = add_regcopy(myregs, nofregs, cl->u.~s.~s, cl->u.~s.~s))) {
|
||||
format(L,' if (!(nofregs = add_regcopy(myregs, nofregs, cl->y_u.~s.~s, cl->y_u.~s.~s))) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T,Who1,T,Who2]).
|
||||
dump_action(unify(Who1,Who2), _, T, L) :-
|
||||
format(L,' if (!(nofregs = link_regcopies(myregs, nofregs, cl->u.~s.~s, cl->u.~s.~s))) {
|
||||
format(L,' if (!(nofregs = link_regcopies(myregs, nofregs, cl->y_u.~s.~s, cl->y_u.~s.~s))) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T,Who1,T,Who2]).
|
||||
@ -579,7 +579,7 @@ handle_bind_extra([], _, "").
|
||||
handle_bind_extra(t_ptr=[], _,S) :- !,
|
||||
format_to_chars("~n clause->ucd.t_ptr = (CELL)NULL;",[],S).
|
||||
handle_bind_extra(t_ptr=F, Type, S) :-
|
||||
format_to_chars("~n clause->ucd.t_ptr = AbsAppl(cl->u.~s.~s);",[Type,F],S).
|
||||
format_to_chars("~n clause->ucd.t_ptr = AbsAppl(cl->y_u.~s.~s);",[Type,F],S).
|
||||
handle_bind_extra(workpc=nextop, T,S) :-
|
||||
format_to_chars("~n clause->ucd.WorkPC = NEXTOP(cl,~s);",[T],S).
|
||||
handle_bind_extra(workpc=currentop, _,S) :-
|
||||
@ -596,7 +596,7 @@ handle_constant(What, T, Const) :-
|
||||
->
|
||||
Const = What
|
||||
;
|
||||
format_to_chars("cl->u.~s.~s",[T,What],Const)
|
||||
format_to_chars("cl->y_u.~s.~s",[T,What],Const)
|
||||
).
|
||||
|
||||
%
|
||||
@ -640,45 +640,45 @@ dump_head_action(bind(Who,What,Extra), _, T, L) :-
|
||||
handle_constant(What, T, Constant),
|
||||
handle_bind_extra(Extra, T, Command),
|
||||
check_atom_dbref(What, Constant, ExtraAction),
|
||||
format(L,' if (iarg == cl->u.~s.~s) {
|
||||
format(L,' if (iarg == cl->y_u.~s.~s) {
|
||||
~sclause->Tag = ~s;~s
|
||||
return;
|
||||
}~n', [T,Who,ExtraAction,Constant,Command]).
|
||||
dump_head_action(new(Who), _, _, _) :- Who = [0'y|_], !. % 0'y done
|
||||
dump_head_action(new(Who), _, T, L) :-
|
||||
format(L,' if (iarg == cl->u.~s.~s) {
|
||||
format(L,' if (iarg == cl->y_u.~s.~s) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T,Who]).
|
||||
dump_head_action(dup(Who1,Who2), _, T, L) :- Who1 = [0'y|_], !, % 0'y done
|
||||
format(L,' if (cl->u.~s.~s == iarg) {
|
||||
format(L,' if (cl->y_u.~s.~s == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T,Who2]).
|
||||
dump_head_action(dup(Who1,Who2), _, T, L) :- Who2 = [0'y|_], !, % 0'y done
|
||||
format(L,' if (cl->u.~s.~s == iarg) {
|
||||
format(L,' if (cl->y_u.~s.~s == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T,Who1]).
|
||||
dump_head_action(dup(Who1,Who2), _, T, L) :-
|
||||
format(L,' if (cl->u.~s.~s == iarg ||
|
||||
cl->u.~s.~s == iarg) {
|
||||
format(L,' if (cl->y_u.~s.~s == iarg ||
|
||||
cl->y_u.~s.~s == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T,Who1,T,Who2]).
|
||||
dump_head_action(unify(Who1,Who2), _, T, L) :- Who1 = [0'y|_], !, % 0'y done
|
||||
format(L,' if (cl->u.~s.~s == iarg) {
|
||||
format(L,' if (cl->y_u.~s.~s == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T,Who2]).
|
||||
dump_head_action(unify(Who1,Who2), _, T, L) :- Who2 = [0'y|_], !, % 0'y done
|
||||
format(L,' if (cl->u.~s.~s == iarg) {
|
||||
format(L,' if (cl->y_u.~s.~s == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T,Who1]).
|
||||
dump_head_action(unify(Who1,Who2), _, T, L) :-
|
||||
format(L,' if (cl->u.~s.~s == iarg ||
|
||||
cl->u.~s.~s == iarg) {
|
||||
format(L,' if (cl->y_u.~s.~s == iarg ||
|
||||
cl->y_u.~s.~s == iarg) {
|
||||
clause->Tag = (CELL)NULL;
|
||||
return;
|
||||
}~n', [T,Who1,T,Who2]).
|
||||
@ -882,7 +882,7 @@ opinfo("gl_void_valx",[bind("xl","AbsPair(NULL)",workpc=currentop)]).
|
||||
opinfo("gl_void_valy",[bind("y","AbsPair(NULL)",workpc=currentop)]).
|
||||
opinfo("gl_void_varx",[bind("xl","AbsPair(NULL)",workpc=currentop),new("xr")]).
|
||||
opinfo("gl_void_vary",[bind("y","AbsPair(NULL)",workpc=currentop),new("y")]).
|
||||
opinfo("get_struct",[bind("x","AbsAppl((CELL *)cl->u.xfa.f)",workpc=nextop)]).
|
||||
opinfo("get_struct",[bind("x","AbsAppl((CELL *)cl->y_u.xfa.f)",workpc=nextop)]).
|
||||
opinfo("get_float",[bind("x","AbsAppl((CELL *)FunctorDouble)",t_ptr="d")]).
|
||||
opinfo("get_longint",[bind("x","AbsAppl((CELL *)FunctorLongInt)",t_ptr="i")]).
|
||||
opinfo("get_string",[bind("x","AbsAppl((CELL *)FunctorString)",t_ptr=[])]).
|
||||
@ -1166,10 +1166,10 @@ output_save(S, [Name|Names], [Type|Types], Desc) :-
|
||||
|
||||
output_save_type(S, OpT, T-"none", Desc) :- !,
|
||||
get_op(OpT, Name),
|
||||
format(S, " CHECK(save_~s(stream, pc->u.~s.~s));~n", [Name, Desc, T]).
|
||||
format(S, " CHECK(save_~s(stream, pc->y_u.~s.~s));~n", [Name, Desc, T]).
|
||||
output_save_type(S, OpT, T-Def, Desc) :-
|
||||
get_op(OpT, Name),
|
||||
format(S, "#ifdef ~s~n CHECK(save_~s(stream, pc->u.~s.~s));~n#endif~n", [Def,Name, Desc, T]).
|
||||
format(S, "#ifdef ~s~n CHECK(save_~s(stream, pc->y_u.~s.~s));~n#endif~n", [Def,Name, Desc, T]).
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user