avoid unions called u: they confuse eclipse.
This commit is contained in:
parent
964b15d107
commit
6bde2d2cd7
@ -522,7 +522,6 @@ static StaticIndex *find_owner_static_index(StaticIndex *, yamop *);
|
|||||||
|
|
||||||
#define PredArity(p) (p->ArityOfPE)
|
#define PredArity(p) (p->ArityOfPE)
|
||||||
#define TRYCODE(G,F,N) ( (N)<5 ? (op_numbers)((int)F+(N)*3) : G)
|
#define TRYCODE(G,F,N) ( (N)<5 ? (op_numbers)((int)F+(N)*3) : G)
|
||||||
#define NEXTOP(V,TYPE) ((yamop *)(&((V)->u.TYPE.next)))
|
|
||||||
|
|
||||||
#define IN_BLOCK(P,B,SZ) ((CODEADDR)(P) >= (CODEADDR)(B) && \
|
#define IN_BLOCK(P,B,SZ) ((CODEADDR)(P) >= (CODEADDR)(B) && \
|
||||||
(CODEADDR)(P) < (CODEADDR)(B)+(SZ))
|
(CODEADDR)(P) < (CODEADDR)(B)+(SZ))
|
||||||
|
@ -81,7 +81,7 @@ typedef struct mem_blk {
|
|||||||
union {
|
union {
|
||||||
struct mem_blk *next;
|
struct mem_blk *next;
|
||||||
double fill;
|
double fill;
|
||||||
} u;
|
} ublock;
|
||||||
char contents[1];
|
char contents[1];
|
||||||
} MemBlk;
|
} MemBlk;
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ AllocCMem (UInt size, struct intermediates *cip)
|
|||||||
if (LOCAL_CMemFirstBlock) {
|
if (LOCAL_CMemFirstBlock) {
|
||||||
p = LOCAL_CMemFirstBlock;
|
p = LOCAL_CMemFirstBlock;
|
||||||
blksz = LOCAL_CMemFirstBlockSz;
|
blksz = LOCAL_CMemFirstBlockSz;
|
||||||
p->u.next = NULL;
|
p->ublock.next = NULL;
|
||||||
} else {
|
} else {
|
||||||
if (blksz < FIRST_CMEM_BLK_SIZE)
|
if (blksz < FIRST_CMEM_BLK_SIZE)
|
||||||
blksz = FIRST_CMEM_BLK_SIZE;
|
blksz = FIRST_CMEM_BLK_SIZE;
|
||||||
@ -132,7 +132,7 @@ AllocCMem (UInt size, struct intermediates *cip)
|
|||||||
siglongjmp(cip->CompilerBotch, OUT_OF_HEAP_BOTCH);
|
siglongjmp(cip->CompilerBotch, OUT_OF_HEAP_BOTCH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p->u.next = cip->blks;
|
p->ublock.next = cip->blks;
|
||||||
cip->blks = p;
|
cip->blks = p;
|
||||||
cip->blk_cur = p->contents;
|
cip->blk_cur = p->contents;
|
||||||
cip->blk_top = (char *)p+blksz;
|
cip->blk_top = (char *)p+blksz;
|
||||||
@ -163,7 +163,7 @@ Yap_ReleaseCMem (struct intermediates *cip)
|
|||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
struct mem_blk *p = cip->blks;
|
struct mem_blk *p = cip->blks;
|
||||||
while (p) {
|
while (p) {
|
||||||
struct mem_blk *nextp = p->u.next;
|
struct mem_blk *nextp = p->ublock.next;
|
||||||
if (p != LOCAL_CMemFirstBlock)
|
if (p != LOCAL_CMemFirstBlock)
|
||||||
Yap_FreeCodeSpace((ADDR)p);
|
Yap_FreeCodeSpace((ADDR)p);
|
||||||
p = nextp;
|
p = nextp;
|
||||||
|
2
C/exo.c
2
C/exo.c
@ -36,8 +36,6 @@
|
|||||||
|
|
||||||
//void do_write(void) { exo_write=TRUE;}
|
//void do_write(void) { exo_write=TRUE;}
|
||||||
|
|
||||||
#define NEXTOP(V,TYPE) ((yamop *)(&((V)->u.TYPE.next)))
|
|
||||||
|
|
||||||
#define MAX_ARITY 256
|
#define MAX_ARITY 256
|
||||||
|
|
||||||
#define FNV32_PRIME ((UInt)16777619)
|
#define FNV32_PRIME ((UInt)16777619)
|
||||||
|
278
C/index.c
278
C/index.c
@ -596,7 +596,7 @@ recover_from_failed_susp_on_cls(struct intermediates *cint, UInt sz)
|
|||||||
int cases = cpc->rnd1, i;
|
int cases = cpc->rnd1, i;
|
||||||
|
|
||||||
for (i = 0; i < cases; i++) {
|
for (i = 0; i < cases; i++) {
|
||||||
sz = cleanup_sw_on_clauses(target[i].u.Label, sz, ecls);
|
sz = cleanup_sw_on_clauses(target[i].u_a.Label, sz, ecls);
|
||||||
}
|
}
|
||||||
if (log_upd_pred) {
|
if (log_upd_pred) {
|
||||||
LogUpdIndex *lcl = ClauseCodeToLogUpdIndex(cpc->rnd2);
|
LogUpdIndex *lcl = ClauseCodeToLogUpdIndex(cpc->rnd2);
|
||||||
@ -618,7 +618,7 @@ recover_from_failed_susp_on_cls(struct intermediates *cint, UInt sz)
|
|||||||
int cases = cpc->rnd1, i;
|
int cases = cpc->rnd1, i;
|
||||||
|
|
||||||
for (i = 0; i < cases; i++) {
|
for (i = 0; i < cases; i++) {
|
||||||
sz = cleanup_sw_on_clauses(target[i].u.Label, sz, ecls);
|
sz = cleanup_sw_on_clauses(target[i].u_f.Label, sz, ecls);
|
||||||
}
|
}
|
||||||
if (log_upd_pred) {
|
if (log_upd_pred) {
|
||||||
LogUpdIndex *lcl = ClauseCodeToLogUpdIndex(cpc->rnd2);
|
LogUpdIndex *lcl = ClauseCodeToLogUpdIndex(cpc->rnd2);
|
||||||
@ -1031,7 +1031,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
|||||||
if (ap->ModuleOfPred == IDB_MODULE) {
|
if (ap->ModuleOfPred == IDB_MODULE) {
|
||||||
cl = clause->Code;
|
cl = clause->Code;
|
||||||
} else {
|
} else {
|
||||||
cl = clause->u.WorkPC;
|
cl = clause->ucd.WorkPC;
|
||||||
}
|
}
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
op_numbers op = Yap_op_from_opcode(cl->opc);
|
op_numbers op = Yap_op_from_opcode(cl->opc);
|
||||||
@ -1137,7 +1137,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
|||||||
case _unify_l_list:
|
case _unify_l_list:
|
||||||
if (argno == 1) {
|
if (argno == 1) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = NEXTOP(cl,o);
|
clause->ucd.WorkPC = NEXTOP(cl,o);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
argno += 1; /* 2-1: have two extra arguments to skip */
|
argno += 1; /* 2-1: have two extra arguments to skip */
|
||||||
@ -1175,7 +1175,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
|||||||
case _unify_l_float:
|
case _unify_l_float:
|
||||||
if (argno == 1) {
|
if (argno == 1) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
||||||
clause->u.t_ptr = AbsAppl(cl->u.od.d);
|
clause->ucd.t_ptr = AbsAppl(cl->u.od.d);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,od);
|
cl = NEXTOP(cl,od);
|
||||||
@ -1185,7 +1185,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
|||||||
case _unify_l_longint:
|
case _unify_l_longint:
|
||||||
if (argno == 1) {
|
if (argno == 1) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorLongInt);
|
clause->Tag = AbsAppl((CELL *)FunctorLongInt);
|
||||||
clause->u.t_ptr = AbsAppl(cl->u.oi.i);
|
clause->ucd.t_ptr = AbsAppl(cl->u.oi.i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
argno--;
|
argno--;
|
||||||
@ -1195,7 +1195,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
|||||||
case _unify_l_bigint:
|
case _unify_l_bigint:
|
||||||
if (argno == 1) {
|
if (argno == 1) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorBigInt);
|
clause->Tag = AbsAppl((CELL *)FunctorBigInt);
|
||||||
clause->u.t_ptr = cl->u.oc.c;
|
clause->ucd.t_ptr = cl->u.oc.c;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,oc);
|
cl = NEXTOP(cl,oc);
|
||||||
@ -1205,7 +1205,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
|||||||
case _unify_l_string:
|
case _unify_l_string:
|
||||||
if (argno == 1) {
|
if (argno == 1) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorString);
|
clause->Tag = AbsAppl((CELL *)FunctorString);
|
||||||
clause->u.t_ptr = cl->u.ou.u;
|
clause->ucd.t_ptr = cl->u.ou.u;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,ou);
|
cl = NEXTOP(cl,ou);
|
||||||
@ -1224,7 +1224,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
|||||||
case _unify_l_struc:
|
case _unify_l_struc:
|
||||||
if (argno == 1) {
|
if (argno == 1) {
|
||||||
clause->Tag = AbsAppl((CELL *)cl->u.ofa.f);
|
clause->Tag = AbsAppl((CELL *)cl->u.ofa.f);
|
||||||
clause->u.WorkPC = NEXTOP(cl,ofa);
|
clause->ucd.WorkPC = NEXTOP(cl,ofa);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* must skip next n arguments */
|
/* must skip next n arguments */
|
||||||
@ -1254,7 +1254,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
|||||||
case _unify_idb_term:
|
case _unify_idb_term:
|
||||||
case _copy_idb_term:
|
case _copy_idb_term:
|
||||||
{
|
{
|
||||||
Term t = clause->u.c_sreg[argno];
|
Term t = clause->ucd.c_sreg[argno];
|
||||||
|
|
||||||
if (IsVarTerm(t)) {
|
if (IsVarTerm(t)) {
|
||||||
clause->Tag = (CELL)NULL;
|
clause->Tag = (CELL)NULL;
|
||||||
@ -1263,15 +1263,15 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
|||||||
|
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
if (IsExtensionFunctor(FunctorOfTerm(t))) {
|
if (IsExtensionFunctor(FunctorOfTerm(t))) {
|
||||||
clause->u.t_ptr = t;
|
clause->ucd.t_ptr = t;
|
||||||
} else {
|
} else {
|
||||||
clause->u.c_sreg = pt;
|
clause->ucd.c_sreg = pt;
|
||||||
}
|
}
|
||||||
} else if (IsPairTerm(t)) {
|
} else if (IsPairTerm(t)) {
|
||||||
CELL *pt = RepPair(t);
|
CELL *pt = RepPair(t);
|
||||||
|
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.c_sreg = pt-1;
|
clause->ucd.c_sreg = pt-1;
|
||||||
} else {
|
} else {
|
||||||
clause->Tag = t;
|
clause->Tag = t;
|
||||||
}
|
}
|
||||||
@ -1331,7 +1331,7 @@ skip_to_arg(ClauseDef *clause, PredEntry *ap, UInt argno, int at_point)
|
|||||||
*/
|
*/
|
||||||
case _unify_struct:
|
case _unify_struct:
|
||||||
case _unify_l_struc:
|
case _unify_l_struc:
|
||||||
if (cl == clause->u.WorkPC) {
|
if (cl == clause->ucd.WorkPC) {
|
||||||
clause->CurrentCode = cl;
|
clause->CurrentCode = cl;
|
||||||
} else {
|
} else {
|
||||||
clause->CurrentCode = clause->Code;
|
clause->CurrentCode = clause->Code;
|
||||||
@ -1636,7 +1636,7 @@ emit_cswitch(COUNT n, yamop *fail_l, struct intermediates *cint)
|
|||||||
target = (AtomSwiEntry *)emit_switch_space(n, sizeof(AtomSwiEntry), cint, 0);
|
target = (AtomSwiEntry *)emit_switch_space(n, sizeof(AtomSwiEntry), cint, 0);
|
||||||
for (i=0; i<n; i++) {
|
for (i=0; i<n; i++) {
|
||||||
target[i].Tag = Zero;
|
target[i].Tag = Zero;
|
||||||
target[i].u.labp = fail_l;
|
target[i].u_a.labp = fail_l;
|
||||||
}
|
}
|
||||||
Yap_emit(op, Unsigned(n), (CELL)target, cint);
|
Yap_emit(op, Unsigned(n), (CELL)target, cint);
|
||||||
} else {
|
} else {
|
||||||
@ -1646,10 +1646,10 @@ emit_cswitch(COUNT n, yamop *fail_l, struct intermediates *cint)
|
|||||||
target = (AtomSwiEntry *)emit_switch_space(n+1, sizeof(AtomSwiEntry), cint, 0);
|
target = (AtomSwiEntry *)emit_switch_space(n+1, sizeof(AtomSwiEntry), cint, 0);
|
||||||
|
|
||||||
for (i=0; i<n; i++) {
|
for (i=0; i<n; i++) {
|
||||||
target[i].u.labp = fail_l;
|
target[i].u_a.labp = fail_l;
|
||||||
}
|
}
|
||||||
target[n].Tag = Zero;
|
target[n].Tag = Zero;
|
||||||
target[n].u.labp = fail_l;
|
target[n].u_a.labp = fail_l;
|
||||||
Yap_emit(op, Unsigned(n), (CELL)target, cint);
|
Yap_emit(op, Unsigned(n), (CELL)target, cint);
|
||||||
}
|
}
|
||||||
return target;
|
return target;
|
||||||
@ -1703,7 +1703,7 @@ emit_fswitch(COUNT n, yamop *fail_l, struct intermediates *cint)
|
|||||||
target = (FuncSwiEntry *)emit_switch_space(n, sizeof(FuncSwiEntry), cint, FuncSwitchMask);
|
target = (FuncSwiEntry *)emit_switch_space(n, sizeof(FuncSwiEntry), cint, FuncSwitchMask);
|
||||||
for (i=0; i<n; i++) {
|
for (i=0; i<n; i++) {
|
||||||
target[i].Tag = NULL;
|
target[i].Tag = NULL;
|
||||||
target[i].u.labp = fail_l;
|
target[i].u_f.labp = fail_l;
|
||||||
}
|
}
|
||||||
Yap_emit(op, Unsigned(n), (CELL)target, cint);
|
Yap_emit(op, Unsigned(n), (CELL)target, cint);
|
||||||
} else {
|
} else {
|
||||||
@ -1712,10 +1712,10 @@ emit_fswitch(COUNT n, yamop *fail_l, struct intermediates *cint)
|
|||||||
op = if_f_op;
|
op = if_f_op;
|
||||||
target = (FuncSwiEntry *)emit_switch_space(n+1, sizeof(FuncSwiEntry), cint, FuncSwitchMask);
|
target = (FuncSwiEntry *)emit_switch_space(n+1, sizeof(FuncSwiEntry), cint, FuncSwitchMask);
|
||||||
for (i=0; i<n; i++) {
|
for (i=0; i<n; i++) {
|
||||||
target[i].u.labp = fail_l;
|
target[i].u_f.labp = fail_l;
|
||||||
}
|
}
|
||||||
target[n].Tag = NULL;
|
target[n].Tag = NULL;
|
||||||
target[n].u.labp = fail_l;
|
target[n].u_f.labp = fail_l;
|
||||||
Yap_emit(op, Unsigned(n), (CELL)target, cint);
|
Yap_emit(op, Unsigned(n), (CELL)target, cint);
|
||||||
}
|
}
|
||||||
return target;
|
return target;
|
||||||
@ -2033,17 +2033,17 @@ do_consts(GroupDef *grp, Term t, struct intermediates *cint, int compound_term,
|
|||||||
if (min != max) {
|
if (min != max) {
|
||||||
if (sreg != NULL) {
|
if (sreg != NULL) {
|
||||||
if (ap->PredFlags & LogUpdatePredFlag && max > min) {
|
if (ap->PredFlags & LogUpdatePredFlag && max > min) {
|
||||||
ics->u.Label = suspend_indexing(min, max, ap, cint);
|
ics->u_a.Label = suspend_indexing(min, max, ap, cint);
|
||||||
} else {
|
} else {
|
||||||
ics->u.Label = do_compound_index(min, max, sreg, cint, compound_term, arity, argno, nxtlbl, first, last_arg, clleft, top, TRUE);
|
ics->u_a.Label = do_compound_index(min, max, sreg, cint, compound_term, arity, argno, nxtlbl, first, last_arg, clleft, top, TRUE);
|
||||||
}
|
}
|
||||||
} else if (ap->PredFlags & LogUpdatePredFlag) {
|
} else if (ap->PredFlags & LogUpdatePredFlag) {
|
||||||
ics->u.Label = suspend_indexing(min, max, cint->CurrentPred, cint);
|
ics->u_a.Label = suspend_indexing(min, max, cint->CurrentPred, cint);
|
||||||
} else {
|
} else {
|
||||||
ics->u.Label = do_index(min, max, cint, argno+1, nxtlbl, first, clleft, top);
|
ics->u_a.Label = do_index(min, max, cint, argno+1, nxtlbl, first, clleft, top);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ics->u.Label = do_index(min, max, cint, argno+1, nxtlbl, first, clleft, top);
|
ics->u_a.Label = do_index(min, max, cint, argno+1, nxtlbl, first, clleft, top);
|
||||||
}
|
}
|
||||||
grp->FirstClause = min = max+1;
|
grp->FirstClause = min = max+1;
|
||||||
}
|
}
|
||||||
@ -2072,9 +2072,9 @@ do_blobs(GroupDef *grp, Term t, struct intermediates *cint, UInt argno, int firs
|
|||||||
(max+1)->Tag == min->Tag) max++;
|
(max+1)->Tag == min->Tag) max++;
|
||||||
if (min != max &&
|
if (min != max &&
|
||||||
(ap->PredFlags & LogUpdatePredFlag)) {
|
(ap->PredFlags & LogUpdatePredFlag)) {
|
||||||
ics->u.Label = suspend_indexing(min, max, ap, cint);
|
ics->u_a.Label = suspend_indexing(min, max, ap, cint);
|
||||||
} else {
|
} else {
|
||||||
ics->u.Label = do_index(min, max, cint, argno+1, nxtlbl, first, clleft, top);
|
ics->u_a.Label = do_index(min, max, cint, argno+1, nxtlbl, first, clleft, top);
|
||||||
}
|
}
|
||||||
grp->FirstClause = min = max+1;
|
grp->FirstClause = min = max+1;
|
||||||
}
|
}
|
||||||
@ -2115,11 +2115,11 @@ do_funcs(GroupDef *grp, Term t, struct intermediates *cint, UInt argno, int firs
|
|||||||
|
|
||||||
if (IsExtensionFunctor(f)) {
|
if (IsExtensionFunctor(f)) {
|
||||||
if (f == FunctorDBRef)
|
if (f == FunctorDBRef)
|
||||||
ifs->u.Label = do_dbref_index(min, max, t, cint, argno, nxtlbl, first, clleft, top);
|
ifs->u_f.Label = do_dbref_index(min, max, t, cint, argno, nxtlbl, first, clleft, top);
|
||||||
else if (f == FunctorLongInt || f == FunctorBigInt)
|
else if (f == FunctorLongInt || f == FunctorBigInt)
|
||||||
ifs->u.Label = do_blob_index(min, max, t, cint, argno, nxtlbl, first, clleft, top, FALSE);
|
ifs->u_f.Label = do_blob_index(min, max, t, cint, argno, nxtlbl, first, clleft, top, FALSE);
|
||||||
else
|
else
|
||||||
ifs->u.Label = do_blob_index(min, max, t, cint, argno, nxtlbl, first, clleft, top, TRUE);
|
ifs->u_f.Label = do_blob_index(min, max, t, cint, argno, nxtlbl, first, clleft, top, TRUE);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
CELL *sreg;
|
CELL *sreg;
|
||||||
@ -2129,7 +2129,7 @@ do_funcs(GroupDef *grp, Term t, struct intermediates *cint, UInt argno, int firs
|
|||||||
} else {
|
} else {
|
||||||
sreg = NULL;
|
sreg = NULL;
|
||||||
}
|
}
|
||||||
ifs->u.Label = do_compound_index(min, max, sreg, cint, 0, ArityOfFunctor(f), argno, nxtlbl, first, last_arg, clleft, top, TRUE);
|
ifs->u_f.Label = do_compound_index(min, max, sreg, cint, 0, ArityOfFunctor(f), argno, nxtlbl, first, last_arg, clleft, top, TRUE);
|
||||||
}
|
}
|
||||||
grp->FirstClause = min = max+1;
|
grp->FirstClause = min = max+1;
|
||||||
}
|
}
|
||||||
@ -2357,15 +2357,15 @@ cls_head_info(ClauseDef *min, ClauseDef *max, UInt argno, int in_idb)
|
|||||||
|
|
||||||
cl->Tag = AbsAppl((CELL *)pt[0]);
|
cl->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
if (IsExtensionFunctor(FunctorOfTerm(t))) {
|
if (IsExtensionFunctor(FunctorOfTerm(t))) {
|
||||||
cl->u.t_ptr = t;
|
cl->ucd.t_ptr = t;
|
||||||
} else {
|
} else {
|
||||||
cl->u.c_sreg = pt;
|
cl->ucd.c_sreg = pt;
|
||||||
}
|
}
|
||||||
} else if (IsPairTerm(t)) {
|
} else if (IsPairTerm(t)) {
|
||||||
CELL *pt = RepPair(t);
|
CELL *pt = RepPair(t);
|
||||||
|
|
||||||
cl->Tag = AbsPair(NULL);
|
cl->Tag = AbsPair(NULL);
|
||||||
cl->u.c_sreg = pt-1;
|
cl->ucd.c_sreg = pt-1;
|
||||||
} else {
|
} else {
|
||||||
cl->Tag = t;
|
cl->Tag = t;
|
||||||
}
|
}
|
||||||
@ -2637,7 +2637,7 @@ do_dbref_index(ClauseDef *min, ClauseDef* max, Term t, struct intermediates *cin
|
|||||||
cl = min;
|
cl = min;
|
||||||
|
|
||||||
while (cl <= max) {
|
while (cl <= max) {
|
||||||
cl->Tag = cl->u.t_ptr;
|
cl->Tag = cl->ucd.t_ptr;
|
||||||
cl++;
|
cl++;
|
||||||
}
|
}
|
||||||
ngroups = groups_in(min, max, group, cint);
|
ngroups = groups_in(min, max, group, cint);
|
||||||
@ -2665,12 +2665,12 @@ do_blob_index(ClauseDef *min, ClauseDef* max, Term t, struct intermediates *cint
|
|||||||
cl = min;
|
cl = min;
|
||||||
|
|
||||||
while (cl <= max) {
|
while (cl <= max) {
|
||||||
if (cl->u.t_ptr == (CELL)NULL) { /* check whether it is a builtin */
|
if (cl->ucd.t_ptr == (CELL)NULL) { /* check whether it is a builtin */
|
||||||
cl->Tag = Zero;
|
cl->Tag = Zero;
|
||||||
} else if (blob) {
|
} else if (blob) {
|
||||||
cl->Tag = Yap_Double_key(cl->u.t_ptr);
|
cl->Tag = Yap_Double_key(cl->ucd.t_ptr);
|
||||||
} else {
|
} else {
|
||||||
cl->Tag = Yap_Int_key(cl->u.t_ptr);
|
cl->Tag = Yap_Int_key(cl->ucd.t_ptr);
|
||||||
}
|
}
|
||||||
cl++;
|
cl++;
|
||||||
}
|
}
|
||||||
@ -2923,18 +2923,18 @@ install_clause(ClauseDef *cls, PredEntry *ap, istack_entry *stack)
|
|||||||
Functor f = (Functor)RepAppl(cls->Tag);
|
Functor f = (Functor)RepAppl(cls->Tag);
|
||||||
if (IsExtensionFunctor(f)) {
|
if (IsExtensionFunctor(f)) {
|
||||||
if (f == FunctorDBRef) {
|
if (f == FunctorDBRef) {
|
||||||
if (cls->u.t_ptr != sp->extra) break;
|
if (cls->ucd.t_ptr != sp->extra) break;
|
||||||
} else if (f == FunctorDouble) {
|
} else if (f == FunctorDouble) {
|
||||||
if (cls->u.t_ptr &&
|
if (cls->ucd.t_ptr &&
|
||||||
Yap_Double_key(sp->extra) != Yap_Double_key(cls->u.t_ptr))
|
Yap_Double_key(sp->extra) != Yap_Double_key(cls->ucd.t_ptr))
|
||||||
break;
|
break;
|
||||||
} else if (f == FunctorString) {
|
} else if (f == FunctorString) {
|
||||||
if (cls->u.t_ptr &&
|
if (cls->ucd.t_ptr &&
|
||||||
Yap_String_key(sp->extra) != Yap_String_key(cls->u.t_ptr))
|
Yap_String_key(sp->extra) != Yap_String_key(cls->ucd.t_ptr))
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
if (cls->u.t_ptr &&
|
if (cls->ucd.t_ptr &&
|
||||||
Yap_Int_key(sp->extra) != Yap_Int_key(cls->u.t_ptr))
|
Yap_Int_key(sp->extra) != Yap_Int_key(cls->ucd.t_ptr))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3078,14 +3078,14 @@ install_log_upd_clause(ClauseDef *cls, PredEntry *ap, istack_entry *stack)
|
|||||||
Functor f = (Functor)RepAppl(cls->Tag);
|
Functor f = (Functor)RepAppl(cls->Tag);
|
||||||
if (IsExtensionFunctor(f)) {
|
if (IsExtensionFunctor(f)) {
|
||||||
if (f == FunctorDBRef) {
|
if (f == FunctorDBRef) {
|
||||||
if (cls->u.t_ptr != sp->extra) break;
|
if (cls->ucd.t_ptr != sp->extra) break;
|
||||||
} else if (f == FunctorDouble) {
|
} else if (f == FunctorDouble) {
|
||||||
if (cls->u.t_ptr &&
|
if (cls->ucd.t_ptr &&
|
||||||
Yap_Double_key(sp->extra) != Yap_Double_key(cls->u.t_ptr))
|
Yap_Double_key(sp->extra) != Yap_Double_key(cls->ucd.t_ptr))
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
if (cls->u.t_ptr &&
|
if (cls->ucd.t_ptr &&
|
||||||
Yap_Int_key(sp->extra) != Yap_Int_key(cls->u.t_ptr))
|
Yap_Int_key(sp->extra) != Yap_Int_key(cls->ucd.t_ptr))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3677,9 +3677,9 @@ expand_index(struct intermediates *cint) {
|
|||||||
} else {
|
} else {
|
||||||
fe = lookup_f(f,ipc->u.sssl.l,ipc->u.sssl.s);
|
fe = lookup_f(f,ipc->u.sssl.l,ipc->u.sssl.s);
|
||||||
}
|
}
|
||||||
newpc = fe->u.labp;
|
newpc = fe->u_f.labp;
|
||||||
|
|
||||||
labp = &(fe->u.labp);
|
labp = &(fe->u_f.labp);
|
||||||
if (newpc == e_code) {
|
if (newpc == e_code) {
|
||||||
/* we found it */
|
/* we found it */
|
||||||
parentcl = code_to_indexcl(ipc->u.sssl.l,is_lu);
|
parentcl = code_to_indexcl(ipc->u.sssl.l,is_lu);
|
||||||
@ -3703,14 +3703,14 @@ expand_index(struct intermediates *cint) {
|
|||||||
ae = lookup_c(t,ipc->u.sssl.l,ipc->u.sssl.s);
|
ae = lookup_c(t,ipc->u.sssl.l,ipc->u.sssl.s);
|
||||||
}
|
}
|
||||||
|
|
||||||
labp = &(ae->u.labp);
|
labp = &(ae->u_a.labp);
|
||||||
if (ae->u.labp == e_code) {
|
if (ae->u_a.labp == e_code) {
|
||||||
/* we found it */
|
/* we found it */
|
||||||
parentcl = code_to_indexcl(ipc->u.sssl.l,is_lu);
|
parentcl = code_to_indexcl(ipc->u.sssl.l,is_lu);
|
||||||
ipc = NULL;
|
ipc = NULL;
|
||||||
} else {
|
} else {
|
||||||
ClausePointer npar = code_to_indexcl(ipc->u.sssl.l,is_lu);
|
ClausePointer npar = code_to_indexcl(ipc->u.sssl.l,is_lu);
|
||||||
ipc = ae->u.labp;
|
ipc = ae->u_a.labp;
|
||||||
parentcl = index_jmp(npar, parentcl, ipc, is_lu, e_code);
|
parentcl = index_jmp(npar, parentcl, ipc, is_lu, e_code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4151,11 +4151,11 @@ push_path(path_stack_entry *sp, yamop **pipc, ClauseDef *clp, struct intermediat
|
|||||||
siglongjmp(cint->CompilerBotch,4);
|
siglongjmp(cint->CompilerBotch,4);
|
||||||
}
|
}
|
||||||
sp->flag = pc_entry;
|
sp->flag = pc_entry;
|
||||||
sp->u.pce.pi_pc = pipc;
|
sp->uip.pce.pi_pc = pipc;
|
||||||
sp->u.pce.code = clp->Code;
|
sp->uip.pce.code = clp->Code;
|
||||||
sp->u.pce.current_code = clp->CurrentCode;
|
sp->uip.pce.current_code = clp->CurrentCode;
|
||||||
sp->u.pce.work_pc = clp->u.WorkPC;
|
sp->uip.pce.work_pc = clp->ucd.WorkPC;
|
||||||
sp->u.pce.tag = clp->Tag;
|
sp->uip.pce.tag = clp->Tag;
|
||||||
return sp+1;
|
return sp+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4169,11 +4169,11 @@ fetch_new_block(path_stack_entry *sp, yamop **pipc, PredEntry *ap, struct interm
|
|||||||
}
|
}
|
||||||
/* add current position */
|
/* add current position */
|
||||||
sp->flag = block_entry;
|
sp->flag = block_entry;
|
||||||
sp->u.cle.entry_code = pipc;
|
sp->uip.cle.entry_code = pipc;
|
||||||
if (ap->PredFlags & LogUpdatePredFlag) {
|
if (ap->PredFlags & LogUpdatePredFlag) {
|
||||||
sp->u.cle.block = (ClauseUnion *)ClauseCodeToLogUpdIndex(*pipc);
|
sp->uip.cle.block = (ClauseUnion *)ClauseCodeToLogUpdIndex(*pipc);
|
||||||
} else {
|
} else {
|
||||||
sp->u.cle.block = (ClauseUnion *)ClauseCodeToStaticIndex(*pipc);
|
sp->uip.cle.block = (ClauseUnion *)ClauseCodeToStaticIndex(*pipc);
|
||||||
}
|
}
|
||||||
return sp+1;
|
return sp+1;
|
||||||
}
|
}
|
||||||
@ -4184,11 +4184,11 @@ init_block_stack(path_stack_entry *sp, yamop *ipc, PredEntry *ap)
|
|||||||
/* add current position */
|
/* add current position */
|
||||||
|
|
||||||
sp->flag = block_entry;
|
sp->flag = block_entry;
|
||||||
sp->u.cle.entry_code = NULL;
|
sp->uip.cle.entry_code = NULL;
|
||||||
if (ap->PredFlags & LogUpdatePredFlag) {
|
if (ap->PredFlags & LogUpdatePredFlag) {
|
||||||
sp->u.cle.block = (ClauseUnion *)ClauseCodeToLogUpdIndex(ipc);
|
sp->uip.cle.block = (ClauseUnion *)ClauseCodeToLogUpdIndex(ipc);
|
||||||
} else {
|
} else {
|
||||||
sp->u.cle.block = (ClauseUnion *)ClauseCodeToStaticIndex(ipc);
|
sp->uip.cle.block = (ClauseUnion *)ClauseCodeToStaticIndex(ipc);
|
||||||
}
|
}
|
||||||
return sp+1;
|
return sp+1;
|
||||||
}
|
}
|
||||||
@ -4203,7 +4203,7 @@ cross_block(path_stack_entry *sp, yamop **pipc, PredEntry *ap, struct intermedia
|
|||||||
do {
|
do {
|
||||||
UInt bsize;
|
UInt bsize;
|
||||||
while ((--tsp)->flag != block_entry);
|
while ((--tsp)->flag != block_entry);
|
||||||
block = tsp->u.cle.block;
|
block = tsp->uip.cle.block;
|
||||||
if (block->lui.ClFlags & LogUpdMask)
|
if (block->lui.ClFlags & LogUpdMask)
|
||||||
bsize = block->lui.ClSize;
|
bsize = block->lui.ClSize;
|
||||||
else
|
else
|
||||||
@ -4215,18 +4215,18 @@ cross_block(path_stack_entry *sp, yamop **pipc, PredEntry *ap, struct intermedia
|
|||||||
if (tsp->flag == pc_entry) {
|
if (tsp->flag == pc_entry) {
|
||||||
if (nsp != tsp) {
|
if (nsp != tsp) {
|
||||||
nsp->flag = pc_entry;
|
nsp->flag = pc_entry;
|
||||||
nsp->u.pce.pi_pc = tsp->u.pce.pi_pc;
|
nsp->uip.pce.pi_pc = tsp->uip.pce.pi_pc;
|
||||||
nsp->u.pce.code = tsp->u.pce.code;
|
nsp->uip.pce.code = tsp->uip.pce.code;
|
||||||
nsp->u.pce.current_code = tsp->u.pce.current_code;
|
nsp->uip.pce.current_code = tsp->uip.pce.current_code;
|
||||||
nsp->u.pce.work_pc = tsp->u.pce.work_pc;
|
nsp->uip.pce.work_pc = tsp->uip.pce.work_pc;
|
||||||
nsp->u.pce.tag = tsp->u.pce.tag;
|
nsp->uip.pce.tag = tsp->uip.pce.tag;
|
||||||
}
|
}
|
||||||
nsp++;
|
nsp++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nsp;
|
return nsp;
|
||||||
}
|
}
|
||||||
} while (tsp->u.cle.entry_code != NULL);
|
} while (tsp->uip.cle.entry_code != NULL);
|
||||||
/* moved to a new block */
|
/* moved to a new block */
|
||||||
return fetch_new_block(sp, pipc, ap, cint);
|
return fetch_new_block(sp, pipc, ap, cint);
|
||||||
}
|
}
|
||||||
@ -4240,16 +4240,16 @@ pop_path(path_stack_entry **spp, ClauseDef *clp, PredEntry *ap, struct intermedi
|
|||||||
|
|
||||||
while ((--sp)->flag != pc_entry);
|
while ((--sp)->flag != pc_entry);
|
||||||
*spp = sp;
|
*spp = sp;
|
||||||
clp->Code = sp->u.pce.code;
|
clp->Code = sp->uip.pce.code;
|
||||||
clp->CurrentCode = sp->u.pce.current_code;
|
clp->CurrentCode = sp->uip.pce.current_code;
|
||||||
clp->u.WorkPC = sp->u.pce.work_pc;
|
clp->ucd.WorkPC = sp->uip.pce.work_pc;
|
||||||
clp->Tag = sp->u.pce.tag;
|
clp->Tag = sp->uip.pce.tag;
|
||||||
if (sp->u.pce.pi_pc == NULL) {
|
if (sp->uip.pce.pi_pc == NULL) {
|
||||||
*spp = sp;
|
*spp = sp;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
nipc = *(sp->u.pce.pi_pc);
|
nipc = *(sp->uip.pce.pi_pc);
|
||||||
*spp = cross_block(sp, sp->u.pce.pi_pc, ap, cint);
|
*spp = cross_block(sp, sp->uip.pce.pi_pc, ap, cint);
|
||||||
return nipc;
|
return nipc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4357,10 +4357,10 @@ expand_ctable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Term at)
|
|||||||
n = 1;
|
n = 1;
|
||||||
for (i = 0; i < pc->u.sssl.s; i++,tmp++) {
|
for (i = 0; i < pc->u.sssl.s; i++,tmp++) {
|
||||||
if (tmp->Tag != Zero) n++;
|
if (tmp->Tag != Zero) n++;
|
||||||
else fail_l = tmp->u.Label;
|
else fail_l = tmp->u_a.Label;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fail_l = old_ae[n].u.Label;
|
fail_l = old_ae[n].u_a.Label;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
if (n > MIN_HASH_ENTRIES) {
|
if (n > MIN_HASH_ENTRIES) {
|
||||||
@ -4376,14 +4376,14 @@ expand_ctable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Term at)
|
|||||||
pc->u.sssl.s = cases;
|
pc->u.sssl.s = cases;
|
||||||
for (i=0; i<cases; i++) {
|
for (i=0; i<cases; i++) {
|
||||||
target[i].Tag = Zero;
|
target[i].Tag = Zero;
|
||||||
target[i].u.Label = fail_l;
|
target[i].u_a.Label = fail_l;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pc->opc = Yap_opcode(_if_cons);
|
pc->opc = Yap_opcode(_if_cons);
|
||||||
pc->u.sssl.s = n;
|
pc->u.sssl.s = n;
|
||||||
target = (AtomSwiEntry *)emit_switch_space(n+1, sizeof(AtomSwiEntry), cint, 0);
|
target = (AtomSwiEntry *)emit_switch_space(n+1, sizeof(AtomSwiEntry), cint, 0);
|
||||||
target[n].Tag = Zero;
|
target[n].Tag = Zero;
|
||||||
target[n].u.Label = fail_l;
|
target[n].u_a.Label = fail_l;
|
||||||
}
|
}
|
||||||
for (i = 0; i < i0; i++,old_ae++) {
|
for (i = 0; i < i0; i++,old_ae++) {
|
||||||
Term tag = old_ae->Tag;
|
Term tag = old_ae->Tag;
|
||||||
@ -4391,7 +4391,7 @@ expand_ctable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Term at)
|
|||||||
if (tag != Zero) {
|
if (tag != Zero) {
|
||||||
AtomSwiEntry *ics = fetch_centry(target, tag, i, n);
|
AtomSwiEntry *ics = fetch_centry(target, tag, i, n);
|
||||||
ics->Tag = tag;
|
ics->Tag = tag;
|
||||||
ics->u.Label = old_ae->u.Label;
|
ics->u_a.Label = old_ae->u_a.Label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* support for threads */
|
/* support for threads */
|
||||||
@ -4416,10 +4416,10 @@ expand_ftable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Functor f
|
|||||||
n = 1;
|
n = 1;
|
||||||
for (i = 0; i < pc->u.sssl.s; i++,tmp++) {
|
for (i = 0; i < pc->u.sssl.s; i++,tmp++) {
|
||||||
if (tmp->Tag != Zero) n++;
|
if (tmp->Tag != Zero) n++;
|
||||||
else fail_l = tmp->u.Label;
|
else fail_l = tmp->u_f.Label;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fail_l = old_fe[n].u.Label;
|
fail_l = old_fe[n].u_f.Label;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
if (n > MIN_HASH_ENTRIES) {
|
if (n > MIN_HASH_ENTRIES) {
|
||||||
@ -4438,7 +4438,7 @@ expand_ftable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Functor f
|
|||||||
target = (FuncSwiEntry *)emit_switch_space(cases, sizeof(FuncSwiEntry), cint, FuncSwitchMask);
|
target = (FuncSwiEntry *)emit_switch_space(cases, sizeof(FuncSwiEntry), cint, FuncSwitchMask);
|
||||||
for (i=0; i<cases; i++) {
|
for (i=0; i<cases; i++) {
|
||||||
target[i].Tag = NULL;
|
target[i].Tag = NULL;
|
||||||
target[i].u.Label = fail_l;
|
target[i].u_f.Label = fail_l;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pc->opc = Yap_opcode(_if_func);
|
pc->opc = Yap_opcode(_if_func);
|
||||||
@ -4447,7 +4447,7 @@ expand_ftable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Functor f
|
|||||||
pc->u.sssl.w = 0;
|
pc->u.sssl.w = 0;
|
||||||
target = (FuncSwiEntry *)emit_switch_space(n+1, sizeof(FuncSwiEntry), cint, FuncSwitchMask);
|
target = (FuncSwiEntry *)emit_switch_space(n+1, sizeof(FuncSwiEntry), cint, FuncSwitchMask);
|
||||||
target[n].Tag = Zero;
|
target[n].Tag = Zero;
|
||||||
target[n].u.Label = fail_l;
|
target[n].u_f.Label = fail_l;
|
||||||
}
|
}
|
||||||
for (i = 0; i < i0; i++,old_fe++) {
|
for (i = 0; i < i0; i++,old_fe++) {
|
||||||
Functor f = old_fe->Tag;
|
Functor f = old_fe->Tag;
|
||||||
@ -4455,7 +4455,7 @@ expand_ftable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Functor f
|
|||||||
if (f != NULL) {
|
if (f != NULL) {
|
||||||
FuncSwiEntry *ifs = fetch_fentry(target, f, i, n);
|
FuncSwiEntry *ifs = fetch_fentry(target, f, i, n);
|
||||||
ifs->Tag = old_fe->Tag;
|
ifs->Tag = old_fe->Tag;
|
||||||
ifs->u.Label = old_fe->u.Label;
|
ifs->u_f.Label = old_fe->u_f.Label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
replace_index_block(blk, pc->u.sssl.l, (yamop *)target, ap);
|
replace_index_block(blk, pc->u.sssl.l, (yamop *)target, ap);
|
||||||
@ -4480,21 +4480,21 @@ static ClauseUnion *
|
|||||||
current_block(path_stack_entry *sp)
|
current_block(path_stack_entry *sp)
|
||||||
{
|
{
|
||||||
while ((--sp)->flag != block_entry);
|
while ((--sp)->flag != block_entry);
|
||||||
return sp->u.cle.block;
|
return sp->uip.cle.block;
|
||||||
}
|
}
|
||||||
|
|
||||||
static path_stack_entry *
|
static path_stack_entry *
|
||||||
kill_block(path_stack_entry *sp, PredEntry *ap)
|
kill_block(path_stack_entry *sp, PredEntry *ap)
|
||||||
{
|
{
|
||||||
while ((--sp)->flag != block_entry);
|
while ((--sp)->flag != block_entry);
|
||||||
if (sp->u.cle.entry_code == NULL) {
|
if (sp->uip.cle.entry_code == NULL) {
|
||||||
Yap_kill_iblock(sp->u.cle.block, NULL, ap);
|
Yap_kill_iblock(sp->uip.cle.block, NULL, ap);
|
||||||
} else {
|
} else {
|
||||||
path_stack_entry *nsp = sp;
|
path_stack_entry *nsp = sp;
|
||||||
|
|
||||||
while ((--nsp)->flag != block_entry);
|
while ((--nsp)->flag != block_entry);
|
||||||
Yap_kill_iblock(sp->u.cle.block, nsp->u.cle.block, ap);
|
Yap_kill_iblock(sp->uip.cle.block, nsp->uip.cle.block, ap);
|
||||||
*sp->u.cle.entry_code = (yamop *)&(ap->cs.p_code.ExpandCode);
|
*sp->uip.cle.entry_code = (yamop *)&(ap->cs.p_code.ExpandCode);
|
||||||
}
|
}
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
@ -4638,7 +4638,7 @@ kill_clause(yamop *ipc, yamop *bg, yamop *lt, path_stack_entry *sp0, PredEntry *
|
|||||||
path_stack_entry *sp = sp0;
|
path_stack_entry *sp = sp0;
|
||||||
|
|
||||||
while ((--sp)->flag != block_entry);
|
while ((--sp)->flag != block_entry);
|
||||||
blk = (LogUpdIndex *)(sp->u.cle.block);
|
blk = (LogUpdIndex *)(sp->uip.cle.block);
|
||||||
start = blk->ClCode;
|
start = blk->ClCode;
|
||||||
op0 = Yap_op_from_opcode(start->opc);
|
op0 = Yap_op_from_opcode(start->opc);
|
||||||
while (op0 == _lock_lu) {
|
while (op0 == _lock_lu) {
|
||||||
@ -4667,8 +4667,8 @@ kill_clause(yamop *ipc, yamop *bg, yamop *lt, path_stack_entry *sp0, PredEntry *
|
|||||||
nsp = sp;
|
nsp = sp;
|
||||||
while ((--nsp)->flag != block_entry);
|
while ((--nsp)->flag != block_entry);
|
||||||
/* make us point straight at clause */
|
/* make us point straight at clause */
|
||||||
*sp->u.cle.entry_code = tgl->ClCode;
|
*sp->uip.cle.entry_code = tgl->ClCode;
|
||||||
Yap_kill_iblock(sp->u.cle.block, nsp->u.cle.block, ap);
|
Yap_kill_iblock(sp->uip.cle.block, nsp->uip.cle.block, ap);
|
||||||
return sp;
|
return sp;
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
@ -4691,7 +4691,7 @@ static path_stack_entry *
|
|||||||
expanda_block(path_stack_entry *sp, PredEntry *ap, ClauseDef *cls, int group1, yamop *alt, struct intermediates *cint)
|
expanda_block(path_stack_entry *sp, PredEntry *ap, ClauseDef *cls, int group1, yamop *alt, struct intermediates *cint)
|
||||||
{
|
{
|
||||||
while ((--sp)->flag != block_entry);
|
while ((--sp)->flag != block_entry);
|
||||||
Yap_kill_iblock(sp->u.cle.block, NULL, ap);
|
Yap_kill_iblock(sp->uip.cle.block, NULL, ap);
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4699,7 +4699,7 @@ static path_stack_entry *
|
|||||||
expandz_block(path_stack_entry *sp, PredEntry *ap, ClauseDef *cls, int group1, yamop *alt, struct intermediates *cint)
|
expandz_block(path_stack_entry *sp, PredEntry *ap, ClauseDef *cls, int group1, yamop *alt, struct intermediates *cint)
|
||||||
{
|
{
|
||||||
while ((--sp)->flag != block_entry);
|
while ((--sp)->flag != block_entry);
|
||||||
Yap_kill_iblock(sp->u.cle.block, NULL, ap);
|
Yap_kill_iblock(sp->uip.cle.block, NULL, ap);
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4796,18 +4796,18 @@ kill_unsafe_block(path_stack_entry *sp, op_numbers op, PredEntry *ap, int first,
|
|||||||
{
|
{
|
||||||
yamop *ipc;
|
yamop *ipc;
|
||||||
while ((--sp)->flag != block_entry);
|
while ((--sp)->flag != block_entry);
|
||||||
if (sp->u.cle.entry_code == NULL) {
|
if (sp->uip.cle.entry_code == NULL) {
|
||||||
/* we have reached the top */
|
/* we have reached the top */
|
||||||
Yap_RemoveIndexation(ap);
|
Yap_RemoveIndexation(ap);
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
ipc = *sp->u.cle.entry_code;
|
ipc = *sp->uip.cle.entry_code;
|
||||||
if (Yap_op_from_opcode(ipc->opc) == op) {
|
if (Yap_op_from_opcode(ipc->opc) == op) {
|
||||||
/* the new block was the current clause */
|
/* the new block was the current clause */
|
||||||
ClauseDef cld[2];
|
ClauseDef cld[2];
|
||||||
|
|
||||||
if (remove) {
|
if (remove) {
|
||||||
*sp->u.cle.entry_code = FAILCODE;
|
*sp->uip.cle.entry_code = FAILCODE;
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
if (ap->PredFlags & LogUpdatePredFlag) {
|
if (ap->PredFlags & LogUpdatePredFlag) {
|
||||||
@ -4822,10 +4822,10 @@ kill_unsafe_block(path_stack_entry *sp, op_numbers op, PredEntry *ap, int first,
|
|||||||
cld[1].Code = cls[0].Code;
|
cld[1].Code = cls[0].Code;
|
||||||
}
|
}
|
||||||
intrs.expand_block = NULL;
|
intrs.expand_block = NULL;
|
||||||
*sp->u.cle.entry_code = (yamop *)suspend_indexing(cld, cld+1, ap, &intrs);
|
*sp->uip.cle.entry_code = (yamop *)suspend_indexing(cld, cld+1, ap, &intrs);
|
||||||
} else {
|
} else {
|
||||||
/* static predicate, shouldn't do much, just suspend the code here */
|
/* static predicate, shouldn't do much, just suspend the code here */
|
||||||
*sp->u.cle.entry_code = (yamop *)&(ap->cs.p_code.ExpandCode);
|
*sp->uip.cle.entry_code = (yamop *)&(ap->cs.p_code.ExpandCode);
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
return sp;
|
return sp;
|
||||||
@ -4917,8 +4917,8 @@ add_to_expand_clauses(path_stack_entry **spp, yamop *ipc, ClauseDef *cls, PredEn
|
|||||||
} while (compactz_expand_clauses(ipc));
|
} while (compactz_expand_clauses(ipc));
|
||||||
}
|
}
|
||||||
while ((--sp)->flag != block_entry);
|
while ((--sp)->flag != block_entry);
|
||||||
if (sp->u.cle.entry_code) {
|
if (sp->uip.cle.entry_code) {
|
||||||
*sp->u.cle.entry_code = (yamop *)&(ap->cs.p_code.ExpandCode);
|
*sp->uip.cle.entry_code = (yamop *)&(ap->cs.p_code.ExpandCode);
|
||||||
}
|
}
|
||||||
recover_ecls_block(ipc);
|
recover_ecls_block(ipc);
|
||||||
return pop_path(spp, cls, ap, cint);
|
return pop_path(spp, cls, ap, cint);
|
||||||
@ -4946,7 +4946,7 @@ nullify_expand_clause(yamop *ipc, path_stack_entry *sp, ClauseDef *cls)
|
|||||||
while ((--sp)->flag != block_entry);
|
while ((--sp)->flag != block_entry);
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
if (*st && *st != cls->Code) {
|
if (*st && *st != cls->Code) {
|
||||||
*sp->u.cle.entry_code = *st;
|
*sp->uip.cle.entry_code = *st;
|
||||||
recover_ecls_block(ipc);
|
recover_ecls_block(ipc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -5341,7 +5341,7 @@ add_to_index(struct intermediates *cint, int first, path_stack_entry *sp, Clause
|
|||||||
if (!IsExtensionFunctor(f)) {
|
if (!IsExtensionFunctor(f)) {
|
||||||
current_arity = ArityOfFunctor(f);
|
current_arity = ArityOfFunctor(f);
|
||||||
}
|
}
|
||||||
newpc = fe->u.labp;
|
newpc = fe->u_f.labp;
|
||||||
if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) {
|
if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) {
|
||||||
/* we found it */
|
/* we found it */
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
@ -5360,29 +5360,29 @@ add_to_index(struct intermediates *cint, int first, path_stack_entry *sp, Clause
|
|||||||
ipc->u.sssl.e++;
|
ipc->u.sssl.e++;
|
||||||
}
|
}
|
||||||
if (ap->PredFlags & LogUpdatePredFlag) {
|
if (ap->PredFlags & LogUpdatePredFlag) {
|
||||||
fe->u.labp = cls->Code;
|
fe->u_f.labp = cls->Code;
|
||||||
} else {
|
} else {
|
||||||
fe->u.labp = cls->CurrentCode;
|
fe->u_f.labp = cls->CurrentCode;
|
||||||
}
|
}
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
} else {
|
} else {
|
||||||
yamop *newpc = fe->u.labp;
|
yamop *newpc = fe->u_f.labp;
|
||||||
sp = fetch_new_block(sp, &(ipc->u.sssl.l), ap, cint);
|
sp = fetch_new_block(sp, &(ipc->u.sssl.l), ap, cint);
|
||||||
sp = cross_block(sp, &(fe->u.labp), ap, cint);
|
sp = cross_block(sp, &(fe->u_f.labp), ap, cint);
|
||||||
ipc = newpc;
|
ipc = newpc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _index_dbref:
|
case _index_dbref:
|
||||||
cls->Tag = cls->u.t_ptr;
|
cls->Tag = cls->ucd.t_ptr;
|
||||||
ipc = NEXTOP(ipc,e);
|
ipc = NEXTOP(ipc,e);
|
||||||
break;
|
break;
|
||||||
case _index_blob:
|
case _index_blob:
|
||||||
cls->Tag = Yap_Double_key(cls->u.t_ptr);
|
cls->Tag = Yap_Double_key(cls->ucd.t_ptr);
|
||||||
ipc = NEXTOP(ipc,e);
|
ipc = NEXTOP(ipc,e);
|
||||||
break;
|
break;
|
||||||
case _index_long:
|
case _index_long:
|
||||||
cls->Tag = Yap_Int_key(cls->u.t_ptr);
|
cls->Tag = Yap_Int_key(cls->ucd.t_ptr);
|
||||||
ipc = NEXTOP(ipc,e);
|
ipc = NEXTOP(ipc,e);
|
||||||
break;
|
break;
|
||||||
case _switch_on_cons:
|
case _switch_on_cons:
|
||||||
@ -5398,7 +5398,7 @@ add_to_index(struct intermediates *cint, int first, path_stack_entry *sp, Clause
|
|||||||
} else {
|
} else {
|
||||||
ae = lookup_c(at, ipc->u.sssl.l, ipc->u.sssl.s);
|
ae = lookup_c(at, ipc->u.sssl.l, ipc->u.sssl.s);
|
||||||
}
|
}
|
||||||
newpc = ae->u.labp;
|
newpc = ae->u_a.labp;
|
||||||
|
|
||||||
if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) {
|
if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) {
|
||||||
/* nothing more to do */
|
/* nothing more to do */
|
||||||
@ -5413,16 +5413,16 @@ add_to_index(struct intermediates *cint, int first, path_stack_entry *sp, Clause
|
|||||||
ipc->u.sssl.e++;
|
ipc->u.sssl.e++;
|
||||||
}
|
}
|
||||||
if (ap->PredFlags & LogUpdatePredFlag) {
|
if (ap->PredFlags & LogUpdatePredFlag) {
|
||||||
ae->u.labp = cls->Code;
|
ae->u_a.labp = cls->Code;
|
||||||
} else {
|
} else {
|
||||||
ae->u.labp = cls->CurrentCode;
|
ae->u_a.labp = cls->CurrentCode;
|
||||||
}
|
}
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
} else {
|
} else {
|
||||||
yamop *newpc = ae->u.labp;
|
yamop *newpc = ae->u_a.labp;
|
||||||
|
|
||||||
sp = fetch_new_block(sp, &(ipc->u.sssl.l), ap, cint);
|
sp = fetch_new_block(sp, &(ipc->u.sssl.l), ap, cint);
|
||||||
sp = cross_block(sp, &(ae->u.labp), ap, cint);
|
sp = cross_block(sp, &(ae->u_a.labp), ap, cint);
|
||||||
ipc = newpc;
|
ipc = newpc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5441,7 +5441,7 @@ add_to_index(struct intermediates *cint, int first, path_stack_entry *sp, Clause
|
|||||||
break;
|
break;
|
||||||
case _op_fail:
|
case _op_fail:
|
||||||
while ((--sp)->flag != block_entry);
|
while ((--sp)->flag != block_entry);
|
||||||
*sp->u.cle.entry_code = cls->Code;
|
*sp->uip.cle.entry_code = cls->Code;
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -5543,7 +5543,7 @@ contract_ftable(yamop *ipc, ClauseUnion *blk, PredEntry *ap, Functor f) {
|
|||||||
fep = (FuncSwiEntry *)(ipc->u.sssl.l);
|
fep = (FuncSwiEntry *)(ipc->u.sssl.l);
|
||||||
while (fep->Tag != f) fep++;
|
while (fep->Tag != f) fep++;
|
||||||
}
|
}
|
||||||
fep->u.labp = FAILCODE;
|
fep->u_f.labp = FAILCODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -5557,7 +5557,7 @@ contract_ctable(yamop *ipc, ClauseUnion *blk, PredEntry *ap, Term at) {
|
|||||||
cep = (AtomSwiEntry *)(ipc->u.sssl.l);
|
cep = (AtomSwiEntry *)(ipc->u.sssl.l);
|
||||||
while (cep->Tag != at) cep++;
|
while (cep->Tag != at) cep++;
|
||||||
}
|
}
|
||||||
cep->u.labp = FAILCODE;
|
cep->u_a.labp = FAILCODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -5840,35 +5840,35 @@ remove_from_index(PredEntry *ap, path_stack_entry *sp, ClauseDef *cls, yamop *bg
|
|||||||
} else {
|
} else {
|
||||||
fe = lookup_f(f, ipc->u.sssl.l, ipc->u.sssl.s);
|
fe = lookup_f(f, ipc->u.sssl.l, ipc->u.sssl.s);
|
||||||
}
|
}
|
||||||
newpc = fe->u.labp;
|
newpc = fe->u_f.labp;
|
||||||
|
|
||||||
if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) {
|
if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) {
|
||||||
/* we found it */
|
/* we found it */
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
} else if (newpc == FAILCODE) {
|
} else if (newpc == FAILCODE) {
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
} else if (IN_BETWEEN(bg,fe->u.Label,lt)) {
|
} else if (IN_BETWEEN(bg,fe->u_f.Label,lt)) {
|
||||||
/* oops, nothing there */
|
/* oops, nothing there */
|
||||||
contract_ftable(ipc, current_block(sp), ap, f);
|
contract_ftable(ipc, current_block(sp), ap, f);
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
} else {
|
} else {
|
||||||
yamop *newpc = fe->u.labp;
|
yamop *newpc = fe->u_f.labp;
|
||||||
sp = fetch_new_block(sp, &(ipc->u.sssl.l), ap, cint);
|
sp = fetch_new_block(sp, &(ipc->u.sssl.l), ap, cint);
|
||||||
sp = cross_block(sp, &(fe->u.labp), ap, cint);
|
sp = cross_block(sp, &(fe->u_f.labp), ap, cint);
|
||||||
ipc = newpc;
|
ipc = newpc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _index_dbref:
|
case _index_dbref:
|
||||||
cls->Tag = cls->u.t_ptr;
|
cls->Tag = cls->ucd.t_ptr;
|
||||||
ipc = NEXTOP(ipc,e);
|
ipc = NEXTOP(ipc,e);
|
||||||
break;
|
break;
|
||||||
case _index_blob:
|
case _index_blob:
|
||||||
cls->Tag = Yap_Double_key(cls->u.t_ptr);
|
cls->Tag = Yap_Double_key(cls->ucd.t_ptr);
|
||||||
ipc = NEXTOP(ipc,e);
|
ipc = NEXTOP(ipc,e);
|
||||||
break;
|
break;
|
||||||
case _index_long:
|
case _index_long:
|
||||||
cls->Tag = Yap_Int_key(cls->u.t_ptr);
|
cls->Tag = Yap_Int_key(cls->ucd.t_ptr);
|
||||||
ipc = NEXTOP(ipc,e);
|
ipc = NEXTOP(ipc,e);
|
||||||
break;
|
break;
|
||||||
case _switch_on_cons:
|
case _switch_on_cons:
|
||||||
@ -5884,22 +5884,22 @@ remove_from_index(PredEntry *ap, path_stack_entry *sp, ClauseDef *cls, yamop *bg
|
|||||||
} else {
|
} else {
|
||||||
ae = lookup_c(at, ipc->u.sssl.l, ipc->u.sssl.s);
|
ae = lookup_c(at, ipc->u.sssl.l, ipc->u.sssl.s);
|
||||||
}
|
}
|
||||||
newpc = ae->u.labp;
|
newpc = ae->u_a.labp;
|
||||||
|
|
||||||
if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) {
|
if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) {
|
||||||
/* we found it */
|
/* we found it */
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
} else if (newpc == FAILCODE) {
|
} else if (newpc == FAILCODE) {
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
} else if (IN_BETWEEN(bg,ae->u.Label,lt)) {
|
} else if (IN_BETWEEN(bg,ae->u_a.Label,lt)) {
|
||||||
/* oops, nothing there */
|
/* oops, nothing there */
|
||||||
contract_ctable(ipc, current_block(sp), ap, at);
|
contract_ctable(ipc, current_block(sp), ap, at);
|
||||||
ipc = pop_path(&sp, cls, ap, cint);
|
ipc = pop_path(&sp, cls, ap, cint);
|
||||||
} else {
|
} else {
|
||||||
yamop *newpc = ae->u.labp;
|
yamop *newpc = ae->u_a.labp;
|
||||||
|
|
||||||
sp = fetch_new_block(sp, &(ipc->u.sssl.l), ap, cint);
|
sp = fetch_new_block(sp, &(ipc->u.sssl.l), ap, cint);
|
||||||
sp = cross_block(sp, &(ae->u.labp), ap, cint);
|
sp = cross_block(sp, &(ae->u_a.labp), ap, cint);
|
||||||
ipc = newpc;
|
ipc = newpc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6539,9 +6539,9 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
|
|||||||
fe = lookup_f(f, ipc->u.sssl.l, ipc->u.sssl.s);
|
fe = lookup_f(f, ipc->u.sssl.l, ipc->u.sssl.s);
|
||||||
}
|
}
|
||||||
#if defined(YAPOR) || defined(THREADS)
|
#if defined(YAPOR) || defined(THREADS)
|
||||||
jlbl = &(fe->u.labp);
|
jlbl = &(fe->u_f.labp);
|
||||||
#endif
|
#endif
|
||||||
ipc = fe->u.labp;
|
ipc = fe->u_f.labp;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _index_dbref:
|
case _index_dbref:
|
||||||
@ -6572,9 +6572,9 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
|
|||||||
ae = lookup_c(t, ipc->u.sssl.l, ipc->u.sssl.s);
|
ae = lookup_c(t, ipc->u.sssl.l, ipc->u.sssl.s);
|
||||||
}
|
}
|
||||||
#if defined(YAPOR) || defined(THREADS)
|
#if defined(YAPOR) || defined(THREADS)
|
||||||
jlbl = &(ae->u.labp);
|
jlbl = &(ae->u_a.labp);
|
||||||
#endif
|
#endif
|
||||||
ipc = ae->u.labp;
|
ipc = ae->u_a.labp;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _expand_index:
|
case _expand_index:
|
||||||
|
14
C/qlyw.c
14
C/qlyw.c
@ -194,7 +194,7 @@ GrowPredTable(void) {
|
|||||||
}
|
}
|
||||||
newp->val = p->val;
|
newp->val = p->val;
|
||||||
newp->arity = p->arity;
|
newp->arity = p->arity;
|
||||||
newp->u.f = p->u.f;
|
newp->u_af.f = p->u_af.f;
|
||||||
newp->module = p->module;
|
newp->module = p->module;
|
||||||
}
|
}
|
||||||
LOCAL_ExportPredEntryHashChain = newt;
|
LOCAL_ExportPredEntryHashChain = newt;
|
||||||
@ -223,23 +223,23 @@ LookupPredEntry(PredEntry *pe)
|
|||||||
p->val = pe;
|
p->val = pe;
|
||||||
if (pe->ModuleOfPred != IDB_MODULE) {
|
if (pe->ModuleOfPred != IDB_MODULE) {
|
||||||
if (arity) {
|
if (arity) {
|
||||||
p->u.f = pe->FunctorOfPred;
|
p->u_af.f = pe->FunctorOfPred;
|
||||||
LookupFunctor(pe->FunctorOfPred);
|
LookupFunctor(pe->FunctorOfPred);
|
||||||
} else {
|
} else {
|
||||||
p->u.a = (Atom)(pe->FunctorOfPred);
|
p->u_af.a = (Atom)(pe->FunctorOfPred);
|
||||||
LookupAtom((Atom)(pe->FunctorOfPred));
|
LookupAtom((Atom)(pe->FunctorOfPred));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pe->PredFlags & AtomDBPredFlag) {
|
if (pe->PredFlags & AtomDBPredFlag) {
|
||||||
p->u.a = (Atom)(pe->FunctorOfPred);
|
p->u_af.a = (Atom)(pe->FunctorOfPred);
|
||||||
p->arity = (CELL)(-2);
|
p->arity = (CELL)(-2);
|
||||||
LookupAtom((Atom)(pe->FunctorOfPred));
|
LookupAtom((Atom)(pe->FunctorOfPred));
|
||||||
} else if (!(pe->PredFlags & NumberDBPredFlag)) {
|
} else if (!(pe->PredFlags & NumberDBPredFlag)) {
|
||||||
p->u.f = pe->FunctorOfPred;
|
p->u_af.f = pe->FunctorOfPred;
|
||||||
p->arity = (CELL)(-1);
|
p->arity = (CELL)(-1);
|
||||||
LookupFunctor(pe->FunctorOfPred);
|
LookupFunctor(pe->FunctorOfPred);
|
||||||
} else {
|
} else {
|
||||||
p->u.f = pe->FunctorOfPred;
|
p->u_af.f = pe->FunctorOfPred;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pe->ModuleOfPred) {
|
if (pe->ModuleOfPred) {
|
||||||
@ -604,7 +604,7 @@ SaveHash(IOSTREAM *stream)
|
|||||||
CHECK(save_uint(stream, (UInt)(p->val)));
|
CHECK(save_uint(stream, (UInt)(p->val)));
|
||||||
CHECK(save_uint(stream, p->arity));
|
CHECK(save_uint(stream, p->arity));
|
||||||
CHECK(save_uint(stream, (UInt)p->module));
|
CHECK(save_uint(stream, (UInt)p->module));
|
||||||
CHECK(save_uint(stream, (UInt)p->u.f));
|
CHECK(save_uint(stream, (UInt)p->u_af.f));
|
||||||
}
|
}
|
||||||
save_tag(stream, QLY_START_DBREFS);
|
save_tag(stream, QLY_START_DBREFS);
|
||||||
save_uint(stream, LOCAL_ExportDBRefHashTableNum);
|
save_uint(stream, LOCAL_ExportDBRefHashTableNum);
|
||||||
|
30
C/write.c
30
C/write.c
@ -66,7 +66,7 @@ typedef struct rewind_term {
|
|||||||
union {
|
union {
|
||||||
struct union_slots s;
|
struct union_slots s;
|
||||||
struct union_direct d;
|
struct union_direct d;
|
||||||
} u;
|
} u_sd;
|
||||||
} rwts;
|
} rwts;
|
||||||
|
|
||||||
typedef struct write_globs {
|
typedef struct write_globs {
|
||||||
@ -687,23 +687,23 @@ from_pointer(CELL *ptr0, struct rewind_term *rwt, struct write_globs *wglb)
|
|||||||
if (wglb->Keep_terms) {
|
if (wglb->Keep_terms) {
|
||||||
struct rewind_term *x = rwt->parent;
|
struct rewind_term *x = rwt->parent;
|
||||||
|
|
||||||
rwt->u.s.old = Yap_InitSlot(t PASS_REGS);
|
rwt->u_sd.s.old = Yap_InitSlot(t PASS_REGS);
|
||||||
rwt->u.s.ptr = Yap_InitSlot((CELL)ptr0 PASS_REGS);
|
rwt->u_sd.s.ptr = Yap_InitSlot((CELL)ptr0 PASS_REGS);
|
||||||
if (!IsAtomicTerm(t) && !IsVarTerm(t)) {
|
if (!IsAtomicTerm(t) && !IsVarTerm(t)) {
|
||||||
while (x) {
|
while (x) {
|
||||||
if (Yap_GetDerefedFromSlot(x->u.s.old PASS_REGS) == t)
|
if (Yap_GetDerefedFromSlot(x->u_sd.s.old PASS_REGS) == t)
|
||||||
return TermFoundVar;
|
return TermFoundVar;
|
||||||
x = x->parent;
|
x = x->parent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rwt->u.d.old = t;
|
rwt->u_sd.d.old = t;
|
||||||
rwt->u.d.ptr = ptr0;
|
rwt->u_sd.d.ptr = ptr0;
|
||||||
if ( !IsVarTerm(t) && !IsAtomicTerm(t)) {
|
if ( !IsVarTerm(t) && !IsAtomicTerm(t)) {
|
||||||
struct rewind_term *x = rwt->parent;
|
struct rewind_term *x = rwt->parent;
|
||||||
|
|
||||||
while (x) {
|
while (x) {
|
||||||
if (x->u.d.old == t)
|
if (x->u_sd.d.old == t)
|
||||||
return TermFoundVar;
|
return TermFoundVar;
|
||||||
x = x->parent;
|
x = x->parent;
|
||||||
}
|
}
|
||||||
@ -719,12 +719,12 @@ restore_from_write(struct rewind_term *rwt, struct write_globs *wglb)
|
|||||||
CELL *ptr;
|
CELL *ptr;
|
||||||
|
|
||||||
if (wglb->Keep_terms) {
|
if (wglb->Keep_terms) {
|
||||||
ptr = (CELL*)Yap_GetPtrFromSlot(rwt->u.s.ptr PASS_REGS);
|
ptr = (CELL*)Yap_GetPtrFromSlot(rwt->u_sd.s.ptr PASS_REGS);
|
||||||
Yap_RecoverSlots(2 PASS_REGS);
|
Yap_RecoverSlots(2 PASS_REGS);
|
||||||
} else {
|
} else {
|
||||||
ptr = rwt->u.d.ptr;
|
ptr = rwt->u_sd.d.ptr;
|
||||||
}
|
}
|
||||||
rwt->u.s.ptr = 0;
|
rwt->u_sd.s.ptr = 0;
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -745,7 +745,7 @@ write_var(CELL *t, struct write_globs *wglb, struct rewind_term *rwt)
|
|||||||
exts ext = ExtFromCell(t);
|
exts ext = ExtFromCell(t);
|
||||||
struct rewind_term nrwt;
|
struct rewind_term nrwt;
|
||||||
nrwt.parent = rwt;
|
nrwt.parent = rwt;
|
||||||
nrwt.u.s.ptr = 0;
|
nrwt.u_sd.s.ptr = 0;
|
||||||
|
|
||||||
wglb->Portray_delays = FALSE;
|
wglb->Portray_delays = FALSE;
|
||||||
if (ext == attvars_ext) {
|
if (ext == attvars_ext) {
|
||||||
@ -779,13 +779,13 @@ check_infinite_loop(Term t, struct rewind_term *x, struct write_globs *wglb)
|
|||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
if (wglb->Keep_terms) {
|
if (wglb->Keep_terms) {
|
||||||
while (x) {
|
while (x) {
|
||||||
if (Yap_GetFromSlot(x->u.s.old PASS_REGS) == t)
|
if (Yap_GetFromSlot(x->u_sd.s.old PASS_REGS) == t)
|
||||||
return TermFoundVar;
|
return TermFoundVar;
|
||||||
x = x->parent;
|
x = x->parent;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
while (x) {
|
while (x) {
|
||||||
if (x->u.d.old == t)
|
if (x->u_sd.d.old == t)
|
||||||
return TermFoundVar;
|
return TermFoundVar;
|
||||||
x = x->parent;
|
x = x->parent;
|
||||||
}
|
}
|
||||||
@ -799,7 +799,7 @@ write_list(Term t, int direction, int depth, struct write_globs *wglb, struct re
|
|||||||
Term ti;
|
Term ti;
|
||||||
struct rewind_term nrwt;
|
struct rewind_term nrwt;
|
||||||
nrwt.parent = rwt;
|
nrwt.parent = rwt;
|
||||||
nrwt.u.s.ptr = 0;
|
nrwt.u_sd.s.ptr = 0;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int ndirection;
|
int ndirection;
|
||||||
@ -868,7 +868,7 @@ writeTerm(Term t, int p, int depth, int rinfixarg, struct write_globs *wglb, str
|
|||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
struct rewind_term nrwt;
|
struct rewind_term nrwt;
|
||||||
nrwt.parent = rwt;
|
nrwt.parent = rwt;
|
||||||
nrwt.u.s.ptr = 0;
|
nrwt.u_sd.s.ptr = 0;
|
||||||
|
|
||||||
if (wglb->MaxDepth != 0 && depth > wglb->MaxDepth) {
|
if (wglb->MaxDepth != 0 && depth > wglb->MaxDepth) {
|
||||||
putAtom(Atom3Dots, wglb->Quote_illegal, wglb);
|
putAtom(Atom3Dots, wglb->Quote_illegal, wglb);
|
||||||
|
110
H/findclause.h
110
H/findclause.h
@ -29,7 +29,7 @@
|
|||||||
if (IsApplTerm(cl->u.cc.c1)) {
|
if (IsApplTerm(cl->u.cc.c1)) {
|
||||||
CELL *pt = RepAppl(cl->u.cc.c1);
|
CELL *pt = RepAppl(cl->u.cc.c1);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cc.c1;
|
clause->ucd.t_ptr = cl->u.cc.c1;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cc.c1;
|
clause->Tag = cl->u.cc.c1;
|
||||||
return;
|
return;
|
||||||
@ -38,7 +38,7 @@
|
|||||||
if (IsApplTerm(cl->u.cc.c2)) {
|
if (IsApplTerm(cl->u.cc.c2)) {
|
||||||
CELL *pt = RepAppl(cl->u.cc.c2);
|
CELL *pt = RepAppl(cl->u.cc.c2);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cc.c2;
|
clause->ucd.t_ptr = cl->u.cc.c2;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cc.c2;
|
clause->Tag = cl->u.cc.c2;
|
||||||
return;
|
return;
|
||||||
@ -50,7 +50,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccc.c1)) {
|
if (IsApplTerm(cl->u.ccc.c1)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccc.c1);
|
CELL *pt = RepAppl(cl->u.ccc.c1);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccc.c1;
|
clause->ucd.t_ptr = cl->u.ccc.c1;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccc.c1;
|
clause->Tag = cl->u.ccc.c1;
|
||||||
return;
|
return;
|
||||||
@ -59,7 +59,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccc.c2)) {
|
if (IsApplTerm(cl->u.ccc.c2)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccc.c2);
|
CELL *pt = RepAppl(cl->u.ccc.c2);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccc.c2;
|
clause->ucd.t_ptr = cl->u.ccc.c2;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccc.c2;
|
clause->Tag = cl->u.ccc.c2;
|
||||||
return;
|
return;
|
||||||
@ -68,7 +68,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccc.c3)) {
|
if (IsApplTerm(cl->u.ccc.c3)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccc.c3);
|
CELL *pt = RepAppl(cl->u.ccc.c3);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccc.c3;
|
clause->ucd.t_ptr = cl->u.ccc.c3;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccc.c3;
|
clause->Tag = cl->u.ccc.c3;
|
||||||
return;
|
return;
|
||||||
@ -80,7 +80,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccc.c1)) {
|
if (IsApplTerm(cl->u.cccc.c1)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccc.c1);
|
CELL *pt = RepAppl(cl->u.cccc.c1);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccc.c1;
|
clause->ucd.t_ptr = cl->u.cccc.c1;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccc.c1;
|
clause->Tag = cl->u.cccc.c1;
|
||||||
return;
|
return;
|
||||||
@ -89,7 +89,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccc.c2)) {
|
if (IsApplTerm(cl->u.cccc.c2)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccc.c2);
|
CELL *pt = RepAppl(cl->u.cccc.c2);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccc.c2;
|
clause->ucd.t_ptr = cl->u.cccc.c2;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccc.c2;
|
clause->Tag = cl->u.cccc.c2;
|
||||||
return;
|
return;
|
||||||
@ -98,7 +98,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccc.c3)) {
|
if (IsApplTerm(cl->u.cccc.c3)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccc.c3);
|
CELL *pt = RepAppl(cl->u.cccc.c3);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccc.c3;
|
clause->ucd.t_ptr = cl->u.cccc.c3;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccc.c3;
|
clause->Tag = cl->u.cccc.c3;
|
||||||
return;
|
return;
|
||||||
@ -107,7 +107,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccc.c4)) {
|
if (IsApplTerm(cl->u.cccc.c4)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccc.c4);
|
CELL *pt = RepAppl(cl->u.cccc.c4);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccc.c4;
|
clause->ucd.t_ptr = cl->u.cccc.c4;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccc.c4;
|
clause->Tag = cl->u.cccc.c4;
|
||||||
return;
|
return;
|
||||||
@ -119,7 +119,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccccc.c1)) {
|
if (IsApplTerm(cl->u.ccccc.c1)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccccc.c1);
|
CELL *pt = RepAppl(cl->u.ccccc.c1);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccccc.c1;
|
clause->ucd.t_ptr = cl->u.ccccc.c1;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccccc.c1;
|
clause->Tag = cl->u.ccccc.c1;
|
||||||
return;
|
return;
|
||||||
@ -128,7 +128,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccccc.c2)) {
|
if (IsApplTerm(cl->u.ccccc.c2)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccccc.c2);
|
CELL *pt = RepAppl(cl->u.ccccc.c2);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccccc.c2;
|
clause->ucd.t_ptr = cl->u.ccccc.c2;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccccc.c2;
|
clause->Tag = cl->u.ccccc.c2;
|
||||||
return;
|
return;
|
||||||
@ -137,7 +137,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccccc.c3)) {
|
if (IsApplTerm(cl->u.ccccc.c3)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccccc.c3);
|
CELL *pt = RepAppl(cl->u.ccccc.c3);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccccc.c3;
|
clause->ucd.t_ptr = cl->u.ccccc.c3;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccccc.c3;
|
clause->Tag = cl->u.ccccc.c3;
|
||||||
return;
|
return;
|
||||||
@ -146,7 +146,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccccc.c4)) {
|
if (IsApplTerm(cl->u.ccccc.c4)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccccc.c4);
|
CELL *pt = RepAppl(cl->u.ccccc.c4);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccccc.c4;
|
clause->ucd.t_ptr = cl->u.ccccc.c4;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccccc.c4;
|
clause->Tag = cl->u.ccccc.c4;
|
||||||
return;
|
return;
|
||||||
@ -155,7 +155,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccccc.c5)) {
|
if (IsApplTerm(cl->u.ccccc.c5)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccccc.c5);
|
CELL *pt = RepAppl(cl->u.ccccc.c5);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccccc.c5;
|
clause->ucd.t_ptr = cl->u.ccccc.c5;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccccc.c5;
|
clause->Tag = cl->u.ccccc.c5;
|
||||||
return;
|
return;
|
||||||
@ -167,7 +167,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c1)) {
|
if (IsApplTerm(cl->u.cccccc.c1)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c1);
|
CELL *pt = RepAppl(cl->u.cccccc.c1);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c1;
|
clause->ucd.t_ptr = cl->u.cccccc.c1;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c1;
|
clause->Tag = cl->u.cccccc.c1;
|
||||||
return;
|
return;
|
||||||
@ -176,7 +176,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c2)) {
|
if (IsApplTerm(cl->u.cccccc.c2)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c2);
|
CELL *pt = RepAppl(cl->u.cccccc.c2);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c2;
|
clause->ucd.t_ptr = cl->u.cccccc.c2;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c2;
|
clause->Tag = cl->u.cccccc.c2;
|
||||||
return;
|
return;
|
||||||
@ -185,7 +185,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c3)) {
|
if (IsApplTerm(cl->u.cccccc.c3)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c3);
|
CELL *pt = RepAppl(cl->u.cccccc.c3);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c3;
|
clause->ucd.t_ptr = cl->u.cccccc.c3;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c3;
|
clause->Tag = cl->u.cccccc.c3;
|
||||||
return;
|
return;
|
||||||
@ -194,7 +194,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c4)) {
|
if (IsApplTerm(cl->u.cccccc.c4)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c4);
|
CELL *pt = RepAppl(cl->u.cccccc.c4);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c4;
|
clause->ucd.t_ptr = cl->u.cccccc.c4;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c4;
|
clause->Tag = cl->u.cccccc.c4;
|
||||||
return;
|
return;
|
||||||
@ -203,7 +203,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c5)) {
|
if (IsApplTerm(cl->u.cccccc.c5)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c5);
|
CELL *pt = RepAppl(cl->u.cccccc.c5);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c5;
|
clause->ucd.t_ptr = cl->u.cccccc.c5;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c5;
|
clause->Tag = cl->u.cccccc.c5;
|
||||||
return;
|
return;
|
||||||
@ -212,7 +212,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c6)) {
|
if (IsApplTerm(cl->u.cccccc.c6)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c6);
|
CELL *pt = RepAppl(cl->u.cccccc.c6);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c6;
|
clause->ucd.t_ptr = cl->u.cccccc.c6;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c6;
|
clause->Tag = cl->u.cccccc.c6;
|
||||||
return;
|
return;
|
||||||
@ -236,12 +236,12 @@
|
|||||||
CELL *pt = RepAppl(t);
|
CELL *pt = RepAppl(t);
|
||||||
|
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.c_sreg = pt;
|
clause->ucd.c_sreg = pt;
|
||||||
} else if (IsPairTerm(t)) {
|
} else if (IsPairTerm(t)) {
|
||||||
CELL *pt = RepPair(t);
|
CELL *pt = RepPair(t);
|
||||||
|
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.c_sreg = pt-1;
|
clause->ucd.c_sreg = pt-1;
|
||||||
} else {
|
} else {
|
||||||
clause->Tag = t;
|
clause->Tag = t;
|
||||||
}
|
}
|
||||||
@ -271,12 +271,12 @@
|
|||||||
CELL *pt = RepAppl(t);
|
CELL *pt = RepAppl(t);
|
||||||
|
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.c_sreg = pt;
|
clause->ucd.c_sreg = pt;
|
||||||
} else if (IsPairTerm(t)) {
|
} else if (IsPairTerm(t)) {
|
||||||
CELL *pt = RepPair(t);
|
CELL *pt = RepPair(t);
|
||||||
|
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.c_sreg = pt-1;
|
clause->ucd.c_sreg = pt-1;
|
||||||
} else {
|
} else {
|
||||||
clause->Tag = t;
|
clause->Tag = t;
|
||||||
}
|
}
|
||||||
@ -649,7 +649,7 @@
|
|||||||
case _get_list:
|
case _get_list:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.x.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.x.x)) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = NEXTOP(cl,x);
|
clause->ucd.WorkPC = NEXTOP(cl,x);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,x);
|
cl = NEXTOP(cl,x);
|
||||||
@ -688,7 +688,7 @@
|
|||||||
case _get_bigint:
|
case _get_bigint:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xN.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xN.x)) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorBigInt);
|
clause->Tag = AbsAppl((CELL *)FunctorBigInt);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xN);
|
cl = NEXTOP(cl,xN);
|
||||||
@ -705,7 +705,7 @@
|
|||||||
if (IsApplTerm(cl->u.xc.c)) {
|
if (IsApplTerm(cl->u.xc.c)) {
|
||||||
CELL *pt = RepAppl(cl->u.xc.c);
|
CELL *pt = RepAppl(cl->u.xc.c);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.xc.c;
|
clause->ucd.t_ptr = cl->u.xc.c;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.xc.c;
|
clause->Tag = cl->u.xc.c;
|
||||||
return;
|
return;
|
||||||
@ -722,7 +722,7 @@
|
|||||||
case _get_float:
|
case _get_float:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xd.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xd.x)) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
||||||
clause->u.t_ptr = AbsAppl(cl->u.xd.d);
|
clause->ucd.t_ptr = AbsAppl(cl->u.xd.d);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xd);
|
cl = NEXTOP(cl,xd);
|
||||||
@ -737,7 +737,7 @@
|
|||||||
case _get_struct:
|
case _get_struct:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xfa.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xfa.x)) {
|
||||||
clause->Tag = AbsAppl((CELL *)cl->u.xfa.f);
|
clause->Tag = AbsAppl((CELL *)cl->u.xfa.f);
|
||||||
clause->u.WorkPC = NEXTOP(cl,xfa);
|
clause->ucd.WorkPC = NEXTOP(cl,xfa);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xfa);
|
cl = NEXTOP(cl,xfa);
|
||||||
@ -752,7 +752,7 @@
|
|||||||
case _get_longint:
|
case _get_longint:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xi.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xi.x)) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorLongInt);
|
clause->Tag = AbsAppl((CELL *)FunctorLongInt);
|
||||||
clause->u.t_ptr = AbsAppl(cl->u.xi.i);
|
clause->ucd.t_ptr = AbsAppl(cl->u.xi.i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xi);
|
cl = NEXTOP(cl,xi);
|
||||||
@ -771,7 +771,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
||||||
clause->Tag = (_atom+1)*sizeof(CELL);
|
clause->Tag = (_atom+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xl);
|
cl = NEXTOP(cl,xl);
|
||||||
@ -783,7 +783,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
||||||
clause->Tag = (_atomic+1)*sizeof(CELL);
|
clause->Tag = (_atomic+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xl);
|
cl = NEXTOP(cl,xl);
|
||||||
@ -795,7 +795,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
||||||
clause->Tag = (_compound+1)*sizeof(CELL);
|
clause->Tag = (_compound+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xl);
|
cl = NEXTOP(cl,xl);
|
||||||
@ -807,7 +807,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorDBRef);
|
clause->Tag = AbsAppl((CELL *)FunctorDBRef);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xl);
|
cl = NEXTOP(cl,xl);
|
||||||
@ -819,7 +819,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xl);
|
cl = NEXTOP(cl,xl);
|
||||||
@ -831,7 +831,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
||||||
clause->Tag = (_integer+1)*sizeof(CELL);
|
clause->Tag = (_integer+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xl);
|
cl = NEXTOP(cl,xl);
|
||||||
@ -850,7 +850,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
||||||
clause->Tag = (_number+1)*sizeof(CELL);
|
clause->Tag = (_number+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xl);
|
cl = NEXTOP(cl,xl);
|
||||||
@ -862,7 +862,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
||||||
clause->Tag = (_primitive+1)*sizeof(CELL);
|
clause->Tag = (_primitive+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xl);
|
cl = NEXTOP(cl,xl);
|
||||||
@ -874,7 +874,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xl.x)) {
|
||||||
clause->Tag = (_var+1)*sizeof(CELL);
|
clause->Tag = (_var+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xl);
|
cl = NEXTOP(cl,xl);
|
||||||
@ -882,7 +882,7 @@
|
|||||||
case _get_string:
|
case _get_string:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xu.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xu.x)) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorString);
|
clause->Tag = AbsAppl((CELL *)FunctorString);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xu);
|
cl = NEXTOP(cl,xu);
|
||||||
@ -904,7 +904,7 @@
|
|||||||
case _gl_void_valx:
|
case _gl_void_valx:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xx.xl)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xx.xl)) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = cl;
|
clause->ucd.WorkPC = cl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xx);
|
cl = NEXTOP(cl,xx);
|
||||||
@ -912,7 +912,7 @@
|
|||||||
case _gl_void_varx:
|
case _gl_void_varx:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xx.xl)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xx.xl)) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = cl;
|
clause->ucd.WorkPC = cl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(nofregs = delete_regcopy(myregs, nofregs, cl->u.xx.xr))) {
|
if (!(nofregs = delete_regcopy(myregs, nofregs, cl->u.xx.xr))) {
|
||||||
@ -924,7 +924,7 @@
|
|||||||
case _glist_valx:
|
case _glist_valx:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.xx.xl)) {
|
if (is_regcopy(myregs, nofregs, cl->u.xx.xl)) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = cl;
|
clause->ucd.WorkPC = cl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xx);
|
cl = NEXTOP(cl,xx);
|
||||||
@ -1160,7 +1160,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
||||||
clause->Tag = (_atom+1)*sizeof(CELL);
|
clause->Tag = (_atom+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yl);
|
cl = NEXTOP(cl,yl);
|
||||||
@ -1172,7 +1172,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
||||||
clause->Tag = (_atomic+1)*sizeof(CELL);
|
clause->Tag = (_atomic+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yl);
|
cl = NEXTOP(cl,yl);
|
||||||
@ -1184,7 +1184,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
||||||
clause->Tag = (_compound+1)*sizeof(CELL);
|
clause->Tag = (_compound+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yl);
|
cl = NEXTOP(cl,yl);
|
||||||
@ -1196,7 +1196,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorDBRef);
|
clause->Tag = AbsAppl((CELL *)FunctorDBRef);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yl);
|
cl = NEXTOP(cl,yl);
|
||||||
@ -1208,7 +1208,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yl);
|
cl = NEXTOP(cl,yl);
|
||||||
@ -1220,7 +1220,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
||||||
clause->Tag = (_integer+1)*sizeof(CELL);
|
clause->Tag = (_integer+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yl);
|
cl = NEXTOP(cl,yl);
|
||||||
@ -1239,7 +1239,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
||||||
clause->Tag = (_number+1)*sizeof(CELL);
|
clause->Tag = (_number+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yl);
|
cl = NEXTOP(cl,yl);
|
||||||
@ -1251,7 +1251,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
||||||
clause->Tag = (_primitive+1)*sizeof(CELL);
|
clause->Tag = (_primitive+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yl);
|
cl = NEXTOP(cl,yl);
|
||||||
@ -1263,7 +1263,7 @@
|
|||||||
}
|
}
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yl.y)) {
|
||||||
clause->Tag = (_var+1)*sizeof(CELL);
|
clause->Tag = (_var+1)*sizeof(CELL);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yl);
|
cl = NEXTOP(cl,yl);
|
||||||
@ -1285,7 +1285,7 @@
|
|||||||
case _gl_void_valy:
|
case _gl_void_valy:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yx.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yx.y)) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = cl;
|
clause->ucd.WorkPC = cl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yx);
|
cl = NEXTOP(cl,yx);
|
||||||
@ -1293,7 +1293,7 @@
|
|||||||
case _gl_void_vary:
|
case _gl_void_vary:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yx.y)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yx.y)) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = cl;
|
clause->ucd.WorkPC = cl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(nofregs = delete_regcopy(myregs, nofregs, cl->u.yx.y))) {
|
if (!(nofregs = delete_regcopy(myregs, nofregs, cl->u.yx.y))) {
|
||||||
@ -1305,7 +1305,7 @@
|
|||||||
case _glist_valy:
|
case _glist_valy:
|
||||||
if (is_regcopy(myregs, nofregs, cl->u.yx.x)) {
|
if (is_regcopy(myregs, nofregs, cl->u.yx.x)) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = cl;
|
clause->ucd.WorkPC = cl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yx);
|
cl = NEXTOP(cl,yx);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
if (IsApplTerm(cl->u.cc.c1)) {
|
if (IsApplTerm(cl->u.cc.c1)) {
|
||||||
CELL *pt = RepAppl(cl->u.cc.c1);
|
CELL *pt = RepAppl(cl->u.cc.c1);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cc.c1;
|
clause->ucd.t_ptr = cl->u.cc.c1;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cc.c1;
|
clause->Tag = cl->u.cc.c1;
|
||||||
return;
|
return;
|
||||||
@ -26,7 +26,7 @@
|
|||||||
if (IsApplTerm(cl->u.cc.c2)) {
|
if (IsApplTerm(cl->u.cc.c2)) {
|
||||||
CELL *pt = RepAppl(cl->u.cc.c2);
|
CELL *pt = RepAppl(cl->u.cc.c2);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cc.c2;
|
clause->ucd.t_ptr = cl->u.cc.c2;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cc.c2;
|
clause->Tag = cl->u.cc.c2;
|
||||||
return;
|
return;
|
||||||
@ -38,7 +38,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccc.c1)) {
|
if (IsApplTerm(cl->u.ccc.c1)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccc.c1);
|
CELL *pt = RepAppl(cl->u.ccc.c1);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccc.c1;
|
clause->ucd.t_ptr = cl->u.ccc.c1;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccc.c1;
|
clause->Tag = cl->u.ccc.c1;
|
||||||
return;
|
return;
|
||||||
@ -47,7 +47,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccc.c2)) {
|
if (IsApplTerm(cl->u.ccc.c2)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccc.c2);
|
CELL *pt = RepAppl(cl->u.ccc.c2);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccc.c2;
|
clause->ucd.t_ptr = cl->u.ccc.c2;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccc.c2;
|
clause->Tag = cl->u.ccc.c2;
|
||||||
return;
|
return;
|
||||||
@ -56,7 +56,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccc.c3)) {
|
if (IsApplTerm(cl->u.ccc.c3)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccc.c3);
|
CELL *pt = RepAppl(cl->u.ccc.c3);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccc.c3;
|
clause->ucd.t_ptr = cl->u.ccc.c3;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccc.c3;
|
clause->Tag = cl->u.ccc.c3;
|
||||||
return;
|
return;
|
||||||
@ -68,7 +68,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccc.c1)) {
|
if (IsApplTerm(cl->u.cccc.c1)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccc.c1);
|
CELL *pt = RepAppl(cl->u.cccc.c1);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccc.c1;
|
clause->ucd.t_ptr = cl->u.cccc.c1;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccc.c1;
|
clause->Tag = cl->u.cccc.c1;
|
||||||
return;
|
return;
|
||||||
@ -77,7 +77,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccc.c2)) {
|
if (IsApplTerm(cl->u.cccc.c2)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccc.c2);
|
CELL *pt = RepAppl(cl->u.cccc.c2);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccc.c2;
|
clause->ucd.t_ptr = cl->u.cccc.c2;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccc.c2;
|
clause->Tag = cl->u.cccc.c2;
|
||||||
return;
|
return;
|
||||||
@ -86,7 +86,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccc.c3)) {
|
if (IsApplTerm(cl->u.cccc.c3)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccc.c3);
|
CELL *pt = RepAppl(cl->u.cccc.c3);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccc.c3;
|
clause->ucd.t_ptr = cl->u.cccc.c3;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccc.c3;
|
clause->Tag = cl->u.cccc.c3;
|
||||||
return;
|
return;
|
||||||
@ -95,7 +95,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccc.c4)) {
|
if (IsApplTerm(cl->u.cccc.c4)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccc.c4);
|
CELL *pt = RepAppl(cl->u.cccc.c4);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccc.c4;
|
clause->ucd.t_ptr = cl->u.cccc.c4;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccc.c4;
|
clause->Tag = cl->u.cccc.c4;
|
||||||
return;
|
return;
|
||||||
@ -107,7 +107,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccccc.c1)) {
|
if (IsApplTerm(cl->u.ccccc.c1)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccccc.c1);
|
CELL *pt = RepAppl(cl->u.ccccc.c1);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccccc.c1;
|
clause->ucd.t_ptr = cl->u.ccccc.c1;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccccc.c1;
|
clause->Tag = cl->u.ccccc.c1;
|
||||||
return;
|
return;
|
||||||
@ -116,7 +116,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccccc.c2)) {
|
if (IsApplTerm(cl->u.ccccc.c2)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccccc.c2);
|
CELL *pt = RepAppl(cl->u.ccccc.c2);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccccc.c2;
|
clause->ucd.t_ptr = cl->u.ccccc.c2;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccccc.c2;
|
clause->Tag = cl->u.ccccc.c2;
|
||||||
return;
|
return;
|
||||||
@ -125,7 +125,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccccc.c3)) {
|
if (IsApplTerm(cl->u.ccccc.c3)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccccc.c3);
|
CELL *pt = RepAppl(cl->u.ccccc.c3);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccccc.c3;
|
clause->ucd.t_ptr = cl->u.ccccc.c3;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccccc.c3;
|
clause->Tag = cl->u.ccccc.c3;
|
||||||
return;
|
return;
|
||||||
@ -134,7 +134,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccccc.c4)) {
|
if (IsApplTerm(cl->u.ccccc.c4)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccccc.c4);
|
CELL *pt = RepAppl(cl->u.ccccc.c4);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccccc.c4;
|
clause->ucd.t_ptr = cl->u.ccccc.c4;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccccc.c4;
|
clause->Tag = cl->u.ccccc.c4;
|
||||||
return;
|
return;
|
||||||
@ -143,7 +143,7 @@
|
|||||||
if (IsApplTerm(cl->u.ccccc.c5)) {
|
if (IsApplTerm(cl->u.ccccc.c5)) {
|
||||||
CELL *pt = RepAppl(cl->u.ccccc.c5);
|
CELL *pt = RepAppl(cl->u.ccccc.c5);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.ccccc.c5;
|
clause->ucd.t_ptr = cl->u.ccccc.c5;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.ccccc.c5;
|
clause->Tag = cl->u.ccccc.c5;
|
||||||
return;
|
return;
|
||||||
@ -155,7 +155,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c1)) {
|
if (IsApplTerm(cl->u.cccccc.c1)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c1);
|
CELL *pt = RepAppl(cl->u.cccccc.c1);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c1;
|
clause->ucd.t_ptr = cl->u.cccccc.c1;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c1;
|
clause->Tag = cl->u.cccccc.c1;
|
||||||
return;
|
return;
|
||||||
@ -164,7 +164,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c2)) {
|
if (IsApplTerm(cl->u.cccccc.c2)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c2);
|
CELL *pt = RepAppl(cl->u.cccccc.c2);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c2;
|
clause->ucd.t_ptr = cl->u.cccccc.c2;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c2;
|
clause->Tag = cl->u.cccccc.c2;
|
||||||
return;
|
return;
|
||||||
@ -173,7 +173,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c3)) {
|
if (IsApplTerm(cl->u.cccccc.c3)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c3);
|
CELL *pt = RepAppl(cl->u.cccccc.c3);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c3;
|
clause->ucd.t_ptr = cl->u.cccccc.c3;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c3;
|
clause->Tag = cl->u.cccccc.c3;
|
||||||
return;
|
return;
|
||||||
@ -182,7 +182,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c4)) {
|
if (IsApplTerm(cl->u.cccccc.c4)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c4);
|
CELL *pt = RepAppl(cl->u.cccccc.c4);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c4;
|
clause->ucd.t_ptr = cl->u.cccccc.c4;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c4;
|
clause->Tag = cl->u.cccccc.c4;
|
||||||
return;
|
return;
|
||||||
@ -191,7 +191,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c5)) {
|
if (IsApplTerm(cl->u.cccccc.c5)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c5);
|
CELL *pt = RepAppl(cl->u.cccccc.c5);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c5;
|
clause->ucd.t_ptr = cl->u.cccccc.c5;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c5;
|
clause->Tag = cl->u.cccccc.c5;
|
||||||
return;
|
return;
|
||||||
@ -200,7 +200,7 @@
|
|||||||
if (IsApplTerm(cl->u.cccccc.c6)) {
|
if (IsApplTerm(cl->u.cccccc.c6)) {
|
||||||
CELL *pt = RepAppl(cl->u.cccccc.c6);
|
CELL *pt = RepAppl(cl->u.cccccc.c6);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.cccccc.c6;
|
clause->ucd.t_ptr = cl->u.cccccc.c6;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.cccccc.c6;
|
clause->Tag = cl->u.cccccc.c6;
|
||||||
return;
|
return;
|
||||||
@ -222,15 +222,15 @@
|
|||||||
|
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
if (IsExtensionFunctor(FunctorOfTerm(t))) {
|
if (IsExtensionFunctor(FunctorOfTerm(t))) {
|
||||||
clause->u.t_ptr = t;
|
clause->ucd.t_ptr = t;
|
||||||
} else {
|
} else {
|
||||||
clause->u.c_sreg = pt;
|
clause->ucd.c_sreg = pt;
|
||||||
}
|
}
|
||||||
} else if (IsPairTerm(t)) {
|
} else if (IsPairTerm(t)) {
|
||||||
CELL *pt = RepPair(t);
|
CELL *pt = RepPair(t);
|
||||||
|
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.c_sreg = pt-1;
|
clause->ucd.c_sreg = pt-1;
|
||||||
} else {
|
} else {
|
||||||
clause->Tag = t;
|
clause->Tag = t;
|
||||||
}
|
}
|
||||||
@ -257,15 +257,15 @@
|
|||||||
|
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
if (IsExtensionFunctor(FunctorOfTerm(t))) {
|
if (IsExtensionFunctor(FunctorOfTerm(t))) {
|
||||||
clause->u.t_ptr = t;
|
clause->ucd.t_ptr = t;
|
||||||
} else {
|
} else {
|
||||||
clause->u.c_sreg = pt;
|
clause->ucd.c_sreg = pt;
|
||||||
}
|
}
|
||||||
} else if (IsPairTerm(t)) {
|
} else if (IsPairTerm(t)) {
|
||||||
CELL *pt = RepPair(t);
|
CELL *pt = RepPair(t);
|
||||||
|
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.c_sreg = pt-1;
|
clause->ucd.c_sreg = pt-1;
|
||||||
} else {
|
} else {
|
||||||
clause->Tag = t;
|
clause->Tag = t;
|
||||||
}
|
}
|
||||||
@ -560,7 +560,7 @@
|
|||||||
case _get_list:
|
case _get_list:
|
||||||
if (iarg == cl->u.x.x) {
|
if (iarg == cl->u.x.x) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = NEXTOP(cl,x);
|
clause->ucd.WorkPC = NEXTOP(cl,x);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,x);
|
cl = NEXTOP(cl,x);
|
||||||
@ -582,7 +582,7 @@
|
|||||||
case _get_bigint:
|
case _get_bigint:
|
||||||
if (iarg == cl->u.xN.x) {
|
if (iarg == cl->u.xN.x) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorBigInt);
|
clause->Tag = AbsAppl((CELL *)FunctorBigInt);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xN);
|
cl = NEXTOP(cl,xN);
|
||||||
@ -599,7 +599,7 @@
|
|||||||
if (IsApplTerm(cl->u.xc.c)) {
|
if (IsApplTerm(cl->u.xc.c)) {
|
||||||
CELL *pt = RepAppl(cl->u.xc.c);
|
CELL *pt = RepAppl(cl->u.xc.c);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = cl->u.xc.c;
|
clause->ucd.t_ptr = cl->u.xc.c;
|
||||||
} else
|
} else
|
||||||
clause->Tag = cl->u.xc.c;
|
clause->Tag = cl->u.xc.c;
|
||||||
return;
|
return;
|
||||||
@ -616,7 +616,7 @@
|
|||||||
case _get_float:
|
case _get_float:
|
||||||
if (iarg == cl->u.xd.x) {
|
if (iarg == cl->u.xd.x) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
clause->Tag = AbsAppl((CELL *)FunctorDouble);
|
||||||
clause->u.t_ptr = AbsAppl(cl->u.xd.d);
|
clause->ucd.t_ptr = AbsAppl(cl->u.xd.d);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xd);
|
cl = NEXTOP(cl,xd);
|
||||||
@ -631,7 +631,7 @@
|
|||||||
case _get_struct:
|
case _get_struct:
|
||||||
if (iarg == cl->u.xfa.x) {
|
if (iarg == cl->u.xfa.x) {
|
||||||
clause->Tag = AbsAppl((CELL *)cl->u.xfa.f);
|
clause->Tag = AbsAppl((CELL *)cl->u.xfa.f);
|
||||||
clause->u.WorkPC = NEXTOP(cl,xfa);
|
clause->ucd.WorkPC = NEXTOP(cl,xfa);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xfa);
|
cl = NEXTOP(cl,xfa);
|
||||||
@ -646,7 +646,7 @@
|
|||||||
case _get_longint:
|
case _get_longint:
|
||||||
if (iarg == cl->u.xi.x) {
|
if (iarg == cl->u.xi.x) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorLongInt);
|
clause->Tag = AbsAppl((CELL *)FunctorLongInt);
|
||||||
clause->u.t_ptr = AbsAppl(cl->u.xi.i);
|
clause->ucd.t_ptr = AbsAppl(cl->u.xi.i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xi);
|
cl = NEXTOP(cl,xi);
|
||||||
@ -661,7 +661,7 @@
|
|||||||
case _get_string:
|
case _get_string:
|
||||||
if (iarg == cl->u.xu.x) {
|
if (iarg == cl->u.xu.x) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorString);
|
clause->Tag = AbsAppl((CELL *)FunctorString);
|
||||||
clause->u.t_ptr = (CELL)NULL;
|
clause->ucd.t_ptr = (CELL)NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xu);
|
cl = NEXTOP(cl,xu);
|
||||||
@ -685,7 +685,7 @@
|
|||||||
case _gl_void_valx:
|
case _gl_void_valx:
|
||||||
if (iarg == cl->u.xx.xl) {
|
if (iarg == cl->u.xx.xl) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = cl;
|
clause->ucd.WorkPC = cl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xx);
|
cl = NEXTOP(cl,xx);
|
||||||
@ -693,7 +693,7 @@
|
|||||||
case _gl_void_varx:
|
case _gl_void_varx:
|
||||||
if (iarg == cl->u.xx.xl) {
|
if (iarg == cl->u.xx.xl) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = cl;
|
clause->ucd.WorkPC = cl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (iarg == cl->u.xx.xr) {
|
if (iarg == cl->u.xx.xr) {
|
||||||
@ -705,7 +705,7 @@
|
|||||||
case _glist_valx:
|
case _glist_valx:
|
||||||
if (iarg == cl->u.xx.xl) {
|
if (iarg == cl->u.xx.xl) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = cl;
|
clause->ucd.WorkPC = cl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,xx);
|
cl = NEXTOP(cl,xx);
|
||||||
@ -765,7 +765,7 @@
|
|||||||
case _glist_valy:
|
case _glist_valy:
|
||||||
if (iarg == cl->u.yx.x) {
|
if (iarg == cl->u.yx.x) {
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.WorkPC = cl;
|
clause->ucd.WorkPC = cl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,yx);
|
cl = NEXTOP(cl,yx);
|
||||||
|
@ -47,7 +47,7 @@ typedef struct StructClauseDef {
|
|||||||
yamop *WorkPC; /* start of code for clause */
|
yamop *WorkPC; /* start of code for clause */
|
||||||
Term t_ptr;
|
Term t_ptr;
|
||||||
CELL *c_sreg;
|
CELL *c_sreg;
|
||||||
} u;
|
} ucd;
|
||||||
} ClauseDef;
|
} ClauseDef;
|
||||||
|
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ typedef struct {
|
|||||||
union {
|
union {
|
||||||
UInt Label;
|
UInt Label;
|
||||||
yamop *labp;
|
yamop *labp;
|
||||||
} u;
|
} u_a;
|
||||||
} AtomSwiEntry;
|
} AtomSwiEntry;
|
||||||
|
|
||||||
/* switch_on_func */
|
/* switch_on_func */
|
||||||
@ -79,7 +79,7 @@ typedef struct {
|
|||||||
union {
|
union {
|
||||||
UInt Label;
|
UInt Label;
|
||||||
yamop *labp;
|
yamop *labp;
|
||||||
} u;
|
} u_f;
|
||||||
} FuncSwiEntry;
|
} FuncSwiEntry;
|
||||||
|
|
||||||
/* switch_on_type */
|
/* switch_on_type */
|
||||||
@ -116,7 +116,7 @@ typedef struct {
|
|||||||
ClauseUnion *block;
|
ClauseUnion *block;
|
||||||
yamop **entry_code;
|
yamop **entry_code;
|
||||||
} cle;
|
} cle;
|
||||||
} u;
|
} uip;
|
||||||
} path_stack_entry;
|
} path_stack_entry;
|
||||||
|
|
||||||
#define MAX_ISTACK_DEPTH 32
|
#define MAX_ISTACK_DEPTH 32
|
||||||
|
4
H/qly.h
4
H/qly.h
@ -56,7 +56,7 @@ typedef struct export_pred_entry_hash_entry_struct {
|
|||||||
union {
|
union {
|
||||||
Functor f;
|
Functor f;
|
||||||
Atom a;
|
Atom a;
|
||||||
} u;
|
} u_af;
|
||||||
Atom module;
|
Atom module;
|
||||||
UInt arity;
|
UInt arity;
|
||||||
} export_pred_entry_hash_entry_t;
|
} export_pred_entry_hash_entry_t;
|
||||||
@ -106,8 +106,6 @@ typedef enum {
|
|||||||
|
|
||||||
#define SYSTEM_PRED_FLAGS (BackCPredFlag|UserCPredFlag|CArgsPredFlag|AsmPredFlag|CPredFlag|BinaryPredFlag)
|
#define SYSTEM_PRED_FLAGS (BackCPredFlag|UserCPredFlag|CArgsPredFlag|AsmPredFlag|CPredFlag|BinaryPredFlag)
|
||||||
|
|
||||||
#define NEXTOP(V,TYPE) ((yamop *)(&((V)->u.TYPE.next)))
|
|
||||||
|
|
||||||
#define CHECK(F) { size_t r = (F); if (!r) return r; }
|
#define CHECK(F) { size_t r = (F); if (!r) return r; }
|
||||||
#define RCHECK(F) if(!(F)) { QLYR_ERROR(MISMATCH); return; }
|
#define RCHECK(F) if(!(F)) { QLYR_ERROR(MISMATCH); return; }
|
||||||
|
|
||||||
|
@ -547,12 +547,12 @@ dump_action(logical, _, _, L) :-
|
|||||||
CELL *pt = RepAppl(t);
|
CELL *pt = RepAppl(t);
|
||||||
|
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.c_sreg = pt;
|
clause->ucd.c_sreg = pt;
|
||||||
} else if (IsPairTerm(t)) {
|
} else if (IsPairTerm(t)) {
|
||||||
CELL *pt = RepPair(t);
|
CELL *pt = RepPair(t);
|
||||||
|
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.c_sreg = pt-1;
|
clause->ucd.c_sreg = pt-1;
|
||||||
} else {
|
} else {
|
||||||
clause->Tag = t;
|
clause->Tag = t;
|
||||||
}
|
}
|
||||||
@ -570,20 +570,20 @@ check_atom_dbref(Constant, What, ExtraAction) :-
|
|||||||
format_to_chars("if (IsApplTerm(~s)) {
|
format_to_chars("if (IsApplTerm(~s)) {
|
||||||
CELL *pt = RepAppl(~s);
|
CELL *pt = RepAppl(~s);
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
clause->u.t_ptr = ~s;
|
clause->ucd.t_ptr = ~s;
|
||||||
} else
|
} else
|
||||||
",[What,What,What], ExtraAction).
|
",[What,What,What], ExtraAction).
|
||||||
check_atom_dbref(_, _, "").
|
check_atom_dbref(_, _, "").
|
||||||
|
|
||||||
handle_bind_extra([], _, "").
|
handle_bind_extra([], _, "").
|
||||||
handle_bind_extra(t_ptr=[], _,S) :- !,
|
handle_bind_extra(t_ptr=[], _,S) :- !,
|
||||||
format_to_chars("~n clause->u.t_ptr = (CELL)NULL;",[],S).
|
format_to_chars("~n clause->ucd.t_ptr = (CELL)NULL;",[],S).
|
||||||
handle_bind_extra(t_ptr=F, Type, S) :-
|
handle_bind_extra(t_ptr=F, Type, S) :-
|
||||||
format_to_chars("~n clause->u.t_ptr = AbsAppl(cl->u.~s.~s);",[Type,F],S).
|
format_to_chars("~n clause->ucd.t_ptr = AbsAppl(cl->u.~s.~s);",[Type,F],S).
|
||||||
handle_bind_extra(workpc=nextop, T,S) :-
|
handle_bind_extra(workpc=nextop, T,S) :-
|
||||||
format_to_chars("~n clause->u.WorkPC = NEXTOP(cl,~s);",[T],S).
|
format_to_chars("~n clause->ucd.WorkPC = NEXTOP(cl,~s);",[T],S).
|
||||||
handle_bind_extra(workpc=currentop, _,S) :-
|
handle_bind_extra(workpc=currentop, _,S) :-
|
||||||
format_to_chars("~n clause->u.WorkPC = cl;",[],S).
|
format_to_chars("~n clause->ucd.WorkPC = cl;",[],S).
|
||||||
|
|
||||||
handle_constant(What, T, Const) :-
|
handle_constant(What, T, Const) :-
|
||||||
What = [C|_],
|
What = [C|_],
|
||||||
@ -697,15 +697,15 @@ dump_head_action(logical, _, _, L) :-
|
|||||||
|
|
||||||
clause->Tag = AbsAppl((CELL *)pt[0]);
|
clause->Tag = AbsAppl((CELL *)pt[0]);
|
||||||
if (IsExtensionFunctor(FunctorOfTerm(t))) {
|
if (IsExtensionFunctor(FunctorOfTerm(t))) {
|
||||||
clause->u.t_ptr = t;
|
clause->ucd.t_ptr = t;
|
||||||
} else {
|
} else {
|
||||||
clause->u.c_sreg = pt;
|
clause->ucd.c_sreg = pt;
|
||||||
}
|
}
|
||||||
} else if (IsPairTerm(t)) {
|
} else if (IsPairTerm(t)) {
|
||||||
CELL *pt = RepPair(t);
|
CELL *pt = RepPair(t);
|
||||||
|
|
||||||
clause->Tag = AbsPair(NULL);
|
clause->Tag = AbsPair(NULL);
|
||||||
clause->u.c_sreg = pt-1;
|
clause->ucd.c_sreg = pt-1;
|
||||||
} else {
|
} else {
|
||||||
clause->Tag = t;
|
clause->Tag = t;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user