From 6bde2d2cd76ab8014d041160783d93f78fe0e7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 18 Feb 2014 09:44:01 +0000 Subject: [PATCH] avoid unions called u: they confuse eclipse. --- C/cdmgr.c | 1 - C/computils.c | 8 +- C/exo.c | 2 - C/index.c | 278 ++++++++++++++++++++++++------------------------- C/qlyw.c | 14 +-- C/write.c | 30 +++--- H/findclause.h | 110 +++++++++---------- H/headclause.h | 74 ++++++------- H/index.h | 8 +- H/qly.h | 4 +- misc/buildops | 20 ++-- 11 files changed, 272 insertions(+), 277 deletions(-) diff --git a/C/cdmgr.c b/C/cdmgr.c index 646420e09..7eac6c608 100644 --- a/C/cdmgr.c +++ b/C/cdmgr.c @@ -522,7 +522,6 @@ static StaticIndex *find_owner_static_index(StaticIndex *, yamop *); #define PredArity(p) (p->ArityOfPE) #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) && \ (CODEADDR)(P) < (CODEADDR)(B)+(SZ)) diff --git a/C/computils.c b/C/computils.c index c1bd08fa7..68efd847d 100644 --- a/C/computils.c +++ b/C/computils.c @@ -81,7 +81,7 @@ typedef struct mem_blk { union { struct mem_blk *next; double fill; - } u; + } ublock; char contents[1]; } MemBlk; @@ -110,7 +110,7 @@ AllocCMem (UInt size, struct intermediates *cip) if (LOCAL_CMemFirstBlock) { p = LOCAL_CMemFirstBlock; blksz = LOCAL_CMemFirstBlockSz; - p->u.next = NULL; + p->ublock.next = NULL; } else { if (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); } } - p->u.next = cip->blks; + p->ublock.next = cip->blks; cip->blks = p; cip->blk_cur = p->contents; cip->blk_top = (char *)p+blksz; @@ -163,7 +163,7 @@ Yap_ReleaseCMem (struct intermediates *cip) CACHE_REGS struct mem_blk *p = cip->blks; while (p) { - struct mem_blk *nextp = p->u.next; + struct mem_blk *nextp = p->ublock.next; if (p != LOCAL_CMemFirstBlock) Yap_FreeCodeSpace((ADDR)p); p = nextp; diff --git a/C/exo.c b/C/exo.c index 37c85106e..0c9087efd 100755 --- a/C/exo.c +++ b/C/exo.c @@ -36,8 +36,6 @@ //void do_write(void) { exo_write=TRUE;} -#define NEXTOP(V,TYPE) ((yamop *)(&((V)->u.TYPE.next))) - #define MAX_ARITY 256 #define FNV32_PRIME ((UInt)16777619) diff --git a/C/index.c b/C/index.c index fcca4b837..de45c18f6 100755 --- a/C/index.c +++ b/C/index.c @@ -596,7 +596,7 @@ recover_from_failed_susp_on_cls(struct intermediates *cint, UInt sz) int cases = cpc->rnd1, 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) { 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; 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) { LogUpdIndex *lcl = ClauseCodeToLogUpdIndex(cpc->rnd2); @@ -1031,7 +1031,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno) if (ap->ModuleOfPred == IDB_MODULE) { cl = clause->Code; } else { - cl = clause->u.WorkPC; + cl = clause->ucd.WorkPC; } while (TRUE) { 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: if (argno == 1) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = NEXTOP(cl,o); + clause->ucd.WorkPC = NEXTOP(cl,o); return; } 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: if (argno == 1) { clause->Tag = AbsAppl((CELL *)FunctorDouble); - clause->u.t_ptr = AbsAppl(cl->u.od.d); + clause->ucd.t_ptr = AbsAppl(cl->u.od.d); return; } cl = NEXTOP(cl,od); @@ -1185,7 +1185,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno) case _unify_l_longint: if (argno == 1) { clause->Tag = AbsAppl((CELL *)FunctorLongInt); - clause->u.t_ptr = AbsAppl(cl->u.oi.i); + clause->ucd.t_ptr = AbsAppl(cl->u.oi.i); return; } argno--; @@ -1195,7 +1195,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno) case _unify_l_bigint: if (argno == 1) { clause->Tag = AbsAppl((CELL *)FunctorBigInt); - clause->u.t_ptr = cl->u.oc.c; + clause->ucd.t_ptr = cl->u.oc.c; return; } cl = NEXTOP(cl,oc); @@ -1205,7 +1205,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno) case _unify_l_string: if (argno == 1) { clause->Tag = AbsAppl((CELL *)FunctorString); - clause->u.t_ptr = cl->u.ou.u; + clause->ucd.t_ptr = cl->u.ou.u; return; } cl = NEXTOP(cl,ou); @@ -1224,7 +1224,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno) case _unify_l_struc: if (argno == 1) { clause->Tag = AbsAppl((CELL *)cl->u.ofa.f); - clause->u.WorkPC = NEXTOP(cl,ofa); + clause->ucd.WorkPC = NEXTOP(cl,ofa); return; } /* must skip next n arguments */ @@ -1254,7 +1254,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno) case _unify_idb_term: case _copy_idb_term: { - Term t = clause->u.c_sreg[argno]; + Term t = clause->ucd.c_sreg[argno]; if (IsVarTerm(t)) { clause->Tag = (CELL)NULL; @@ -1263,15 +1263,15 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno) clause->Tag = AbsAppl((CELL *)pt[0]); if (IsExtensionFunctor(FunctorOfTerm(t))) { - clause->u.t_ptr = t; + clause->ucd.t_ptr = t; } else { - clause->u.c_sreg = pt; + clause->ucd.c_sreg = pt; } } else if (IsPairTerm(t)) { CELL *pt = RepPair(t); clause->Tag = AbsPair(NULL); - clause->u.c_sreg = pt-1; + clause->ucd.c_sreg = pt-1; } else { clause->Tag = t; } @@ -1331,7 +1331,7 @@ skip_to_arg(ClauseDef *clause, PredEntry *ap, UInt argno, int at_point) */ case _unify_struct: case _unify_l_struc: - if (cl == clause->u.WorkPC) { + if (cl == clause->ucd.WorkPC) { clause->CurrentCode = cl; } else { 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); for (i=0; iPredFlags & LogUpdatePredFlag && max > min) { - ics->u.Label = suspend_indexing(min, max, ap, cint); + ics->u_a.Label = suspend_indexing(min, max, ap, cint); } 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) { - ics->u.Label = suspend_indexing(min, max, cint->CurrentPred, cint); + ics->u_a.Label = suspend_indexing(min, max, cint->CurrentPred, cint); } 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 { - 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; } @@ -2072,9 +2072,9 @@ do_blobs(GroupDef *grp, Term t, struct intermediates *cint, UInt argno, int firs (max+1)->Tag == min->Tag) max++; if (min != max && (ap->PredFlags & LogUpdatePredFlag)) { - ics->u.Label = suspend_indexing(min, max, ap, cint); + ics->u_a.Label = suspend_indexing(min, max, ap, cint); } 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; } @@ -2115,11 +2115,11 @@ do_funcs(GroupDef *grp, Term t, struct intermediates *cint, UInt argno, int firs if (IsExtensionFunctor(f)) { 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) - 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 - 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 { CELL *sreg; @@ -2129,7 +2129,7 @@ do_funcs(GroupDef *grp, Term t, struct intermediates *cint, UInt argno, int firs } else { 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; } @@ -2357,15 +2357,15 @@ cls_head_info(ClauseDef *min, ClauseDef *max, UInt argno, int in_idb) cl->Tag = AbsAppl((CELL *)pt[0]); if (IsExtensionFunctor(FunctorOfTerm(t))) { - cl->u.t_ptr = t; + cl->ucd.t_ptr = t; } else { - cl->u.c_sreg = pt; + cl->ucd.c_sreg = pt; } } else if (IsPairTerm(t)) { CELL *pt = RepPair(t); cl->Tag = AbsPair(NULL); - cl->u.c_sreg = pt-1; + cl->ucd.c_sreg = pt-1; } else { cl->Tag = t; } @@ -2637,7 +2637,7 @@ do_dbref_index(ClauseDef *min, ClauseDef* max, Term t, struct intermediates *cin cl = min; while (cl <= max) { - cl->Tag = cl->u.t_ptr; + cl->Tag = cl->ucd.t_ptr; cl++; } 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; 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; } else if (blob) { - cl->Tag = Yap_Double_key(cl->u.t_ptr); + cl->Tag = Yap_Double_key(cl->ucd.t_ptr); } else { - cl->Tag = Yap_Int_key(cl->u.t_ptr); + cl->Tag = Yap_Int_key(cl->ucd.t_ptr); } cl++; } @@ -2923,18 +2923,18 @@ install_clause(ClauseDef *cls, PredEntry *ap, istack_entry *stack) Functor f = (Functor)RepAppl(cls->Tag); if (IsExtensionFunctor(f)) { if (f == FunctorDBRef) { - if (cls->u.t_ptr != sp->extra) break; + if (cls->ucd.t_ptr != sp->extra) break; } else if (f == FunctorDouble) { - if (cls->u.t_ptr && - Yap_Double_key(sp->extra) != Yap_Double_key(cls->u.t_ptr)) + if (cls->ucd.t_ptr && + Yap_Double_key(sp->extra) != Yap_Double_key(cls->ucd.t_ptr)) break; } else if (f == FunctorString) { - if (cls->u.t_ptr && - Yap_String_key(sp->extra) != Yap_String_key(cls->u.t_ptr)) + if (cls->ucd.t_ptr && + Yap_String_key(sp->extra) != Yap_String_key(cls->ucd.t_ptr)) break; } else { - if (cls->u.t_ptr && - Yap_Int_key(sp->extra) != Yap_Int_key(cls->u.t_ptr)) + if (cls->ucd.t_ptr && + Yap_Int_key(sp->extra) != Yap_Int_key(cls->ucd.t_ptr)) break; } } @@ -3078,14 +3078,14 @@ install_log_upd_clause(ClauseDef *cls, PredEntry *ap, istack_entry *stack) Functor f = (Functor)RepAppl(cls->Tag); if (IsExtensionFunctor(f)) { if (f == FunctorDBRef) { - if (cls->u.t_ptr != sp->extra) break; + if (cls->ucd.t_ptr != sp->extra) break; } else if (f == FunctorDouble) { - if (cls->u.t_ptr && - Yap_Double_key(sp->extra) != Yap_Double_key(cls->u.t_ptr)) + if (cls->ucd.t_ptr && + Yap_Double_key(sp->extra) != Yap_Double_key(cls->ucd.t_ptr)) break; } else { - if (cls->u.t_ptr && - Yap_Int_key(sp->extra) != Yap_Int_key(cls->u.t_ptr)) + if (cls->ucd.t_ptr && + Yap_Int_key(sp->extra) != Yap_Int_key(cls->ucd.t_ptr)) break; } } @@ -3677,9 +3677,9 @@ expand_index(struct intermediates *cint) { } else { 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) { /* we found it */ 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); } - labp = &(ae->u.labp); - if (ae->u.labp == e_code) { + labp = &(ae->u_a.labp); + if (ae->u_a.labp == e_code) { /* we found it */ parentcl = code_to_indexcl(ipc->u.sssl.l,is_lu); ipc = NULL; } else { 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); } } @@ -4151,11 +4151,11 @@ push_path(path_stack_entry *sp, yamop **pipc, ClauseDef *clp, struct intermediat siglongjmp(cint->CompilerBotch,4); } sp->flag = pc_entry; - sp->u.pce.pi_pc = pipc; - sp->u.pce.code = clp->Code; - sp->u.pce.current_code = clp->CurrentCode; - sp->u.pce.work_pc = clp->u.WorkPC; - sp->u.pce.tag = clp->Tag; + sp->uip.pce.pi_pc = pipc; + sp->uip.pce.code = clp->Code; + sp->uip.pce.current_code = clp->CurrentCode; + sp->uip.pce.work_pc = clp->ucd.WorkPC; + sp->uip.pce.tag = clp->Tag; return sp+1; } @@ -4169,11 +4169,11 @@ fetch_new_block(path_stack_entry *sp, yamop **pipc, PredEntry *ap, struct interm } /* add current position */ sp->flag = block_entry; - sp->u.cle.entry_code = pipc; + sp->uip.cle.entry_code = pipc; if (ap->PredFlags & LogUpdatePredFlag) { - sp->u.cle.block = (ClauseUnion *)ClauseCodeToLogUpdIndex(*pipc); + sp->uip.cle.block = (ClauseUnion *)ClauseCodeToLogUpdIndex(*pipc); } else { - sp->u.cle.block = (ClauseUnion *)ClauseCodeToStaticIndex(*pipc); + sp->uip.cle.block = (ClauseUnion *)ClauseCodeToStaticIndex(*pipc); } return sp+1; } @@ -4184,11 +4184,11 @@ init_block_stack(path_stack_entry *sp, yamop *ipc, PredEntry *ap) /* add current position */ sp->flag = block_entry; - sp->u.cle.entry_code = NULL; + sp->uip.cle.entry_code = NULL; if (ap->PredFlags & LogUpdatePredFlag) { - sp->u.cle.block = (ClauseUnion *)ClauseCodeToLogUpdIndex(ipc); + sp->uip.cle.block = (ClauseUnion *)ClauseCodeToLogUpdIndex(ipc); } else { - sp->u.cle.block = (ClauseUnion *)ClauseCodeToStaticIndex(ipc); + sp->uip.cle.block = (ClauseUnion *)ClauseCodeToStaticIndex(ipc); } return sp+1; } @@ -4203,7 +4203,7 @@ cross_block(path_stack_entry *sp, yamop **pipc, PredEntry *ap, struct intermedia do { UInt bsize; while ((--tsp)->flag != block_entry); - block = tsp->u.cle.block; + block = tsp->uip.cle.block; if (block->lui.ClFlags & LogUpdMask) bsize = block->lui.ClSize; else @@ -4215,18 +4215,18 @@ cross_block(path_stack_entry *sp, yamop **pipc, PredEntry *ap, struct intermedia if (tsp->flag == pc_entry) { if (nsp != tsp) { nsp->flag = pc_entry; - nsp->u.pce.pi_pc = tsp->u.pce.pi_pc; - nsp->u.pce.code = tsp->u.pce.code; - nsp->u.pce.current_code = tsp->u.pce.current_code; - nsp->u.pce.work_pc = tsp->u.pce.work_pc; - nsp->u.pce.tag = tsp->u.pce.tag; + nsp->uip.pce.pi_pc = tsp->uip.pce.pi_pc; + nsp->uip.pce.code = tsp->uip.pce.code; + nsp->uip.pce.current_code = tsp->uip.pce.current_code; + nsp->uip.pce.work_pc = tsp->uip.pce.work_pc; + nsp->uip.pce.tag = tsp->uip.pce.tag; } nsp++; } } return nsp; } - } while (tsp->u.cle.entry_code != NULL); + } while (tsp->uip.cle.entry_code != NULL); /* moved to a new block */ 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); *spp = sp; - clp->Code = sp->u.pce.code; - clp->CurrentCode = sp->u.pce.current_code; - clp->u.WorkPC = sp->u.pce.work_pc; - clp->Tag = sp->u.pce.tag; - if (sp->u.pce.pi_pc == NULL) { + clp->Code = sp->uip.pce.code; + clp->CurrentCode = sp->uip.pce.current_code; + clp->ucd.WorkPC = sp->uip.pce.work_pc; + clp->Tag = sp->uip.pce.tag; + if (sp->uip.pce.pi_pc == NULL) { *spp = sp; return NULL; } - nipc = *(sp->u.pce.pi_pc); - *spp = cross_block(sp, sp->u.pce.pi_pc, ap, cint); + nipc = *(sp->uip.pce.pi_pc); + *spp = cross_block(sp, sp->uip.pce.pi_pc, ap, cint); return nipc; } @@ -4357,10 +4357,10 @@ expand_ctable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Term at) n = 1; for (i = 0; i < pc->u.sssl.s; i++,tmp++) { if (tmp->Tag != Zero) n++; - else fail_l = tmp->u.Label; + else fail_l = tmp->u_a.Label; } } else { - fail_l = old_ae[n].u.Label; + fail_l = old_ae[n].u_a.Label; n++; } 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; for (i=0; iopc = Yap_opcode(_if_cons); pc->u.sssl.s = n; target = (AtomSwiEntry *)emit_switch_space(n+1, sizeof(AtomSwiEntry), cint, 0); 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++) { Term tag = old_ae->Tag; @@ -4391,7 +4391,7 @@ expand_ctable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Term at) if (tag != Zero) { AtomSwiEntry *ics = fetch_centry(target, tag, i, n); ics->Tag = tag; - ics->u.Label = old_ae->u.Label; + ics->u_a.Label = old_ae->u_a.Label; } } /* support for threads */ @@ -4416,10 +4416,10 @@ expand_ftable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Functor f n = 1; for (i = 0; i < pc->u.sssl.s; i++,tmp++) { if (tmp->Tag != Zero) n++; - else fail_l = tmp->u.Label; + else fail_l = tmp->u_f.Label; } } else { - fail_l = old_fe[n].u.Label; + fail_l = old_fe[n].u_f.Label; n++; } 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); for (i=0; iopc = Yap_opcode(_if_func); @@ -4447,7 +4447,7 @@ expand_ftable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Functor f pc->u.sssl.w = 0; target = (FuncSwiEntry *)emit_switch_space(n+1, sizeof(FuncSwiEntry), cint, FuncSwitchMask); 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++) { Functor f = old_fe->Tag; @@ -4455,7 +4455,7 @@ expand_ftable(yamop *pc, ClauseUnion *blk, struct intermediates *cint, Functor f if (f != NULL) { FuncSwiEntry *ifs = fetch_fentry(target, f, i, n); 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); @@ -4480,21 +4480,21 @@ static ClauseUnion * current_block(path_stack_entry *sp) { while ((--sp)->flag != block_entry); - return sp->u.cle.block; + return sp->uip.cle.block; } static path_stack_entry * kill_block(path_stack_entry *sp, PredEntry *ap) { while ((--sp)->flag != block_entry); - if (sp->u.cle.entry_code == NULL) { - Yap_kill_iblock(sp->u.cle.block, NULL, ap); + if (sp->uip.cle.entry_code == NULL) { + Yap_kill_iblock(sp->uip.cle.block, NULL, ap); } else { path_stack_entry *nsp = sp; while ((--nsp)->flag != block_entry); - Yap_kill_iblock(sp->u.cle.block, nsp->u.cle.block, ap); - *sp->u.cle.entry_code = (yamop *)&(ap->cs.p_code.ExpandCode); + Yap_kill_iblock(sp->uip.cle.block, nsp->uip.cle.block, ap); + *sp->uip.cle.entry_code = (yamop *)&(ap->cs.p_code.ExpandCode); } return sp; } @@ -4638,7 +4638,7 @@ kill_clause(yamop *ipc, yamop *bg, yamop *lt, path_stack_entry *sp0, PredEntry * path_stack_entry *sp = sp0; while ((--sp)->flag != block_entry); - blk = (LogUpdIndex *)(sp->u.cle.block); + blk = (LogUpdIndex *)(sp->uip.cle.block); start = blk->ClCode; op0 = Yap_op_from_opcode(start->opc); while (op0 == _lock_lu) { @@ -4667,8 +4667,8 @@ kill_clause(yamop *ipc, yamop *bg, yamop *lt, path_stack_entry *sp0, PredEntry * nsp = sp; while ((--nsp)->flag != block_entry); /* make us point straight at clause */ - *sp->u.cle.entry_code = tgl->ClCode; - Yap_kill_iblock(sp->u.cle.block, nsp->u.cle.block, ap); + *sp->uip.cle.entry_code = tgl->ClCode; + Yap_kill_iblock(sp->uip.cle.block, nsp->uip.cle.block, ap); return sp; } else { 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) { 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; } @@ -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) { 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; } @@ -4796,18 +4796,18 @@ kill_unsafe_block(path_stack_entry *sp, op_numbers op, PredEntry *ap, int first, { yamop *ipc; while ((--sp)->flag != block_entry); - if (sp->u.cle.entry_code == NULL) { + if (sp->uip.cle.entry_code == NULL) { /* we have reached the top */ Yap_RemoveIndexation(ap); return sp; } - ipc = *sp->u.cle.entry_code; + ipc = *sp->uip.cle.entry_code; if (Yap_op_from_opcode(ipc->opc) == op) { /* the new block was the current clause */ ClauseDef cld[2]; if (remove) { - *sp->u.cle.entry_code = FAILCODE; + *sp->uip.cle.entry_code = FAILCODE; return sp; } 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; } 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 { /* 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; @@ -4917,8 +4917,8 @@ add_to_expand_clauses(path_stack_entry **spp, yamop *ipc, ClauseDef *cls, PredEn } while (compactz_expand_clauses(ipc)); } while ((--sp)->flag != block_entry); - if (sp->u.cle.entry_code) { - *sp->u.cle.entry_code = (yamop *)&(ap->cs.p_code.ExpandCode); + if (sp->uip.cle.entry_code) { + *sp->uip.cle.entry_code = (yamop *)&(ap->cs.p_code.ExpandCode); } recover_ecls_block(ipc); 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 (TRUE) { if (*st && *st != cls->Code) { - *sp->u.cle.entry_code = *st; + *sp->uip.cle.entry_code = *st; recover_ecls_block(ipc); return; } @@ -5341,7 +5341,7 @@ add_to_index(struct intermediates *cint, int first, path_stack_entry *sp, Clause if (!IsExtensionFunctor(f)) { current_arity = ArityOfFunctor(f); } - newpc = fe->u.labp; + newpc = fe->u_f.labp; if (newpc == (yamop *)&(ap->cs.p_code.ExpandCode)) { /* we found it */ 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++; } if (ap->PredFlags & LogUpdatePredFlag) { - fe->u.labp = cls->Code; + fe->u_f.labp = cls->Code; } else { - fe->u.labp = cls->CurrentCode; + fe->u_f.labp = cls->CurrentCode; } ipc = pop_path(&sp, cls, ap, cint); } else { - yamop *newpc = fe->u.labp; + yamop *newpc = fe->u_f.labp; 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; } } break; case _index_dbref: - cls->Tag = cls->u.t_ptr; + cls->Tag = cls->ucd.t_ptr; ipc = NEXTOP(ipc,e); break; 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); break; 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); break; case _switch_on_cons: @@ -5398,7 +5398,7 @@ add_to_index(struct intermediates *cint, int first, path_stack_entry *sp, Clause } else { 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)) { /* 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++; } if (ap->PredFlags & LogUpdatePredFlag) { - ae->u.labp = cls->Code; + ae->u_a.labp = cls->Code; } else { - ae->u.labp = cls->CurrentCode; + ae->u_a.labp = cls->CurrentCode; } ipc = pop_path(&sp, cls, ap, cint); } else { - yamop *newpc = ae->u.labp; + yamop *newpc = ae->u_a.labp; 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; } } @@ -5441,7 +5441,7 @@ add_to_index(struct intermediates *cint, int first, path_stack_entry *sp, Clause break; case _op_fail: 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); break; default: @@ -5543,7 +5543,7 @@ contract_ftable(yamop *ipc, ClauseUnion *blk, PredEntry *ap, Functor f) { fep = (FuncSwiEntry *)(ipc->u.sssl.l); while (fep->Tag != f) fep++; } - fep->u.labp = FAILCODE; + fep->u_f.labp = FAILCODE; } static void @@ -5557,7 +5557,7 @@ contract_ctable(yamop *ipc, ClauseUnion *blk, PredEntry *ap, Term at) { cep = (AtomSwiEntry *)(ipc->u.sssl.l); while (cep->Tag != at) cep++; } - cep->u.labp = FAILCODE; + cep->u_a.labp = FAILCODE; } static void @@ -5840,35 +5840,35 @@ remove_from_index(PredEntry *ap, path_stack_entry *sp, ClauseDef *cls, yamop *bg } else { 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)) { /* we found it */ ipc = pop_path(&sp, cls, ap, cint); } else if (newpc == FAILCODE) { 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 */ contract_ftable(ipc, current_block(sp), ap, f); ipc = pop_path(&sp, cls, ap, cint); } else { - yamop *newpc = fe->u.labp; + yamop *newpc = fe->u_f.labp; 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; } } break; case _index_dbref: - cls->Tag = cls->u.t_ptr; + cls->Tag = cls->ucd.t_ptr; ipc = NEXTOP(ipc,e); break; 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); break; 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); break; case _switch_on_cons: @@ -5884,22 +5884,22 @@ remove_from_index(PredEntry *ap, path_stack_entry *sp, ClauseDef *cls, yamop *bg } else { 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)) { /* we found it */ ipc = pop_path(&sp, cls, ap, cint); } else if (newpc == FAILCODE) { 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 */ contract_ctable(ipc, current_block(sp), ap, at); ipc = pop_path(&sp, cls, ap, cint); } else { - yamop *newpc = ae->u.labp; + yamop *newpc = ae->u_a.labp; 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; } } @@ -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); } #if defined(YAPOR) || defined(THREADS) - jlbl = &(fe->u.labp); + jlbl = &(fe->u_f.labp); #endif - ipc = fe->u.labp; + ipc = fe->u_f.labp; } break; 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); } #if defined(YAPOR) || defined(THREADS) - jlbl = &(ae->u.labp); + jlbl = &(ae->u_a.labp); #endif - ipc = ae->u.labp; + ipc = ae->u_a.labp; } break; case _expand_index: diff --git a/C/qlyw.c b/C/qlyw.c index 15714792a..c01cc4d67 100755 --- a/C/qlyw.c +++ b/C/qlyw.c @@ -194,7 +194,7 @@ GrowPredTable(void) { } newp->val = p->val; newp->arity = p->arity; - newp->u.f = p->u.f; + newp->u_af.f = p->u_af.f; newp->module = p->module; } LOCAL_ExportPredEntryHashChain = newt; @@ -223,23 +223,23 @@ LookupPredEntry(PredEntry *pe) p->val = pe; if (pe->ModuleOfPred != IDB_MODULE) { if (arity) { - p->u.f = pe->FunctorOfPred; + p->u_af.f = pe->FunctorOfPred; LookupFunctor(pe->FunctorOfPred); } else { - p->u.a = (Atom)(pe->FunctorOfPred); + p->u_af.a = (Atom)(pe->FunctorOfPred); LookupAtom((Atom)(pe->FunctorOfPred)); } } else { if (pe->PredFlags & AtomDBPredFlag) { - p->u.a = (Atom)(pe->FunctorOfPred); + p->u_af.a = (Atom)(pe->FunctorOfPred); p->arity = (CELL)(-2); LookupAtom((Atom)(pe->FunctorOfPred)); } else if (!(pe->PredFlags & NumberDBPredFlag)) { - p->u.f = pe->FunctorOfPred; + p->u_af.f = pe->FunctorOfPred; p->arity = (CELL)(-1); LookupFunctor(pe->FunctorOfPred); } else { - p->u.f = pe->FunctorOfPred; + p->u_af.f = pe->FunctorOfPred; } } if (pe->ModuleOfPred) { @@ -604,7 +604,7 @@ SaveHash(IOSTREAM *stream) CHECK(save_uint(stream, (UInt)(p->val))); CHECK(save_uint(stream, p->arity)); 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_uint(stream, LOCAL_ExportDBRefHashTableNum); diff --git a/C/write.c b/C/write.c index caa54941a..8758f0f39 100644 --- a/C/write.c +++ b/C/write.c @@ -66,7 +66,7 @@ typedef struct rewind_term { union { struct union_slots s; struct union_direct d; - } u; + } u_sd; } rwts; typedef struct write_globs { @@ -687,23 +687,23 @@ from_pointer(CELL *ptr0, struct rewind_term *rwt, struct write_globs *wglb) if (wglb->Keep_terms) { struct rewind_term *x = rwt->parent; - rwt->u.s.old = Yap_InitSlot(t PASS_REGS); - rwt->u.s.ptr = Yap_InitSlot((CELL)ptr0 PASS_REGS); + rwt->u_sd.s.old = Yap_InitSlot(t PASS_REGS); + rwt->u_sd.s.ptr = Yap_InitSlot((CELL)ptr0 PASS_REGS); if (!IsAtomicTerm(t) && !IsVarTerm(t)) { 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; x = x->parent; } } } else { - rwt->u.d.old = t; - rwt->u.d.ptr = ptr0; + rwt->u_sd.d.old = t; + rwt->u_sd.d.ptr = ptr0; if ( !IsVarTerm(t) && !IsAtomicTerm(t)) { struct rewind_term *x = rwt->parent; while (x) { - if (x->u.d.old == t) + if (x->u_sd.d.old == t) return TermFoundVar; x = x->parent; } @@ -719,12 +719,12 @@ restore_from_write(struct rewind_term *rwt, struct write_globs *wglb) CELL *ptr; 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); } 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; } @@ -745,7 +745,7 @@ write_var(CELL *t, struct write_globs *wglb, struct rewind_term *rwt) exts ext = ExtFromCell(t); struct rewind_term nrwt; nrwt.parent = rwt; - nrwt.u.s.ptr = 0; + nrwt.u_sd.s.ptr = 0; wglb->Portray_delays = FALSE; if (ext == attvars_ext) { @@ -779,13 +779,13 @@ check_infinite_loop(Term t, struct rewind_term *x, struct write_globs *wglb) CACHE_REGS if (wglb->Keep_terms) { 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; x = x->parent; } } else { while (x) { - if (x->u.d.old == t) + if (x->u_sd.d.old == t) return TermFoundVar; x = x->parent; } @@ -799,7 +799,7 @@ write_list(Term t, int direction, int depth, struct write_globs *wglb, struct re Term ti; struct rewind_term nrwt; nrwt.parent = rwt; - nrwt.u.s.ptr = 0; + nrwt.u_sd.s.ptr = 0; while (1) { int ndirection; @@ -868,7 +868,7 @@ writeTerm(Term t, int p, int depth, int rinfixarg, struct write_globs *wglb, str CACHE_REGS struct rewind_term nrwt; nrwt.parent = rwt; - nrwt.u.s.ptr = 0; + nrwt.u_sd.s.ptr = 0; if (wglb->MaxDepth != 0 && depth > wglb->MaxDepth) { putAtom(Atom3Dots, wglb->Quote_illegal, wglb); diff --git a/H/findclause.h b/H/findclause.h index 7233a4b6e..611938e9f 100644 --- a/H/findclause.h +++ b/H/findclause.h @@ -29,7 +29,7 @@ if (IsApplTerm(cl->u.cc.c1)) { CELL *pt = RepAppl(cl->u.cc.c1); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cc.c1; + clause->ucd.t_ptr = cl->u.cc.c1; } else clause->Tag = cl->u.cc.c1; return; @@ -38,7 +38,7 @@ if (IsApplTerm(cl->u.cc.c2)) { CELL *pt = RepAppl(cl->u.cc.c2); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cc.c2; + clause->ucd.t_ptr = cl->u.cc.c2; } else clause->Tag = cl->u.cc.c2; return; @@ -50,7 +50,7 @@ if (IsApplTerm(cl->u.ccc.c1)) { CELL *pt = RepAppl(cl->u.ccc.c1); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccc.c1; + clause->ucd.t_ptr = cl->u.ccc.c1; } else clause->Tag = cl->u.ccc.c1; return; @@ -59,7 +59,7 @@ if (IsApplTerm(cl->u.ccc.c2)) { CELL *pt = RepAppl(cl->u.ccc.c2); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccc.c2; + clause->ucd.t_ptr = cl->u.ccc.c2; } else clause->Tag = cl->u.ccc.c2; return; @@ -68,7 +68,7 @@ if (IsApplTerm(cl->u.ccc.c3)) { CELL *pt = RepAppl(cl->u.ccc.c3); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccc.c3; + clause->ucd.t_ptr = cl->u.ccc.c3; } else clause->Tag = cl->u.ccc.c3; return; @@ -80,7 +80,7 @@ if (IsApplTerm(cl->u.cccc.c1)) { CELL *pt = RepAppl(cl->u.cccc.c1); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccc.c1; + clause->ucd.t_ptr = cl->u.cccc.c1; } else clause->Tag = cl->u.cccc.c1; return; @@ -89,7 +89,7 @@ if (IsApplTerm(cl->u.cccc.c2)) { CELL *pt = RepAppl(cl->u.cccc.c2); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccc.c2; + clause->ucd.t_ptr = cl->u.cccc.c2; } else clause->Tag = cl->u.cccc.c2; return; @@ -98,7 +98,7 @@ if (IsApplTerm(cl->u.cccc.c3)) { CELL *pt = RepAppl(cl->u.cccc.c3); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccc.c3; + clause->ucd.t_ptr = cl->u.cccc.c3; } else clause->Tag = cl->u.cccc.c3; return; @@ -107,7 +107,7 @@ if (IsApplTerm(cl->u.cccc.c4)) { CELL *pt = RepAppl(cl->u.cccc.c4); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccc.c4; + clause->ucd.t_ptr = cl->u.cccc.c4; } else clause->Tag = cl->u.cccc.c4; return; @@ -119,7 +119,7 @@ if (IsApplTerm(cl->u.ccccc.c1)) { CELL *pt = RepAppl(cl->u.ccccc.c1); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccccc.c1; + clause->ucd.t_ptr = cl->u.ccccc.c1; } else clause->Tag = cl->u.ccccc.c1; return; @@ -128,7 +128,7 @@ if (IsApplTerm(cl->u.ccccc.c2)) { CELL *pt = RepAppl(cl->u.ccccc.c2); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccccc.c2; + clause->ucd.t_ptr = cl->u.ccccc.c2; } else clause->Tag = cl->u.ccccc.c2; return; @@ -137,7 +137,7 @@ if (IsApplTerm(cl->u.ccccc.c3)) { CELL *pt = RepAppl(cl->u.ccccc.c3); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccccc.c3; + clause->ucd.t_ptr = cl->u.ccccc.c3; } else clause->Tag = cl->u.ccccc.c3; return; @@ -146,7 +146,7 @@ if (IsApplTerm(cl->u.ccccc.c4)) { CELL *pt = RepAppl(cl->u.ccccc.c4); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccccc.c4; + clause->ucd.t_ptr = cl->u.ccccc.c4; } else clause->Tag = cl->u.ccccc.c4; return; @@ -155,7 +155,7 @@ if (IsApplTerm(cl->u.ccccc.c5)) { CELL *pt = RepAppl(cl->u.ccccc.c5); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccccc.c5; + clause->ucd.t_ptr = cl->u.ccccc.c5; } else clause->Tag = cl->u.ccccc.c5; return; @@ -167,7 +167,7 @@ if (IsApplTerm(cl->u.cccccc.c1)) { CELL *pt = RepAppl(cl->u.cccccc.c1); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c1; + clause->ucd.t_ptr = cl->u.cccccc.c1; } else clause->Tag = cl->u.cccccc.c1; return; @@ -176,7 +176,7 @@ if (IsApplTerm(cl->u.cccccc.c2)) { CELL *pt = RepAppl(cl->u.cccccc.c2); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c2; + clause->ucd.t_ptr = cl->u.cccccc.c2; } else clause->Tag = cl->u.cccccc.c2; return; @@ -185,7 +185,7 @@ if (IsApplTerm(cl->u.cccccc.c3)) { CELL *pt = RepAppl(cl->u.cccccc.c3); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c3; + clause->ucd.t_ptr = cl->u.cccccc.c3; } else clause->Tag = cl->u.cccccc.c3; return; @@ -194,7 +194,7 @@ if (IsApplTerm(cl->u.cccccc.c4)) { CELL *pt = RepAppl(cl->u.cccccc.c4); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c4; + clause->ucd.t_ptr = cl->u.cccccc.c4; } else clause->Tag = cl->u.cccccc.c4; return; @@ -203,7 +203,7 @@ if (IsApplTerm(cl->u.cccccc.c5)) { CELL *pt = RepAppl(cl->u.cccccc.c5); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c5; + clause->ucd.t_ptr = cl->u.cccccc.c5; } else clause->Tag = cl->u.cccccc.c5; return; @@ -212,7 +212,7 @@ if (IsApplTerm(cl->u.cccccc.c6)) { CELL *pt = RepAppl(cl->u.cccccc.c6); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c6; + clause->ucd.t_ptr = cl->u.cccccc.c6; } else clause->Tag = cl->u.cccccc.c6; return; @@ -236,12 +236,12 @@ CELL *pt = RepAppl(t); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.c_sreg = pt; + clause->ucd.c_sreg = pt; } else if (IsPairTerm(t)) { CELL *pt = RepPair(t); clause->Tag = AbsPair(NULL); - clause->u.c_sreg = pt-1; + clause->ucd.c_sreg = pt-1; } else { clause->Tag = t; } @@ -271,12 +271,12 @@ CELL *pt = RepAppl(t); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.c_sreg = pt; + clause->ucd.c_sreg = pt; } else if (IsPairTerm(t)) { CELL *pt = RepPair(t); clause->Tag = AbsPair(NULL); - clause->u.c_sreg = pt-1; + clause->ucd.c_sreg = pt-1; } else { clause->Tag = t; } @@ -649,7 +649,7 @@ case _get_list: if (is_regcopy(myregs, nofregs, cl->u.x.x)) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = NEXTOP(cl,x); + clause->ucd.WorkPC = NEXTOP(cl,x); return; } cl = NEXTOP(cl,x); @@ -688,7 +688,7 @@ case _get_bigint: if (is_regcopy(myregs, nofregs, cl->u.xN.x)) { clause->Tag = AbsAppl((CELL *)FunctorBigInt); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xN); @@ -705,7 +705,7 @@ if (IsApplTerm(cl->u.xc.c)) { CELL *pt = RepAppl(cl->u.xc.c); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.xc.c; + clause->ucd.t_ptr = cl->u.xc.c; } else clause->Tag = cl->u.xc.c; return; @@ -722,7 +722,7 @@ case _get_float: if (is_regcopy(myregs, nofregs, cl->u.xd.x)) { clause->Tag = AbsAppl((CELL *)FunctorDouble); - clause->u.t_ptr = AbsAppl(cl->u.xd.d); + clause->ucd.t_ptr = AbsAppl(cl->u.xd.d); return; } cl = NEXTOP(cl,xd); @@ -737,7 +737,7 @@ case _get_struct: if (is_regcopy(myregs, nofregs, cl->u.xfa.x)) { clause->Tag = AbsAppl((CELL *)cl->u.xfa.f); - clause->u.WorkPC = NEXTOP(cl,xfa); + clause->ucd.WorkPC = NEXTOP(cl,xfa); return; } cl = NEXTOP(cl,xfa); @@ -752,7 +752,7 @@ case _get_longint: if (is_regcopy(myregs, nofregs, cl->u.xi.x)) { clause->Tag = AbsAppl((CELL *)FunctorLongInt); - clause->u.t_ptr = AbsAppl(cl->u.xi.i); + clause->ucd.t_ptr = AbsAppl(cl->u.xi.i); return; } cl = NEXTOP(cl,xi); @@ -771,7 +771,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.xl.x)) { clause->Tag = (_atom+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xl); @@ -783,7 +783,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.xl.x)) { clause->Tag = (_atomic+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xl); @@ -795,7 +795,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.xl.x)) { clause->Tag = (_compound+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xl); @@ -807,7 +807,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.xl.x)) { clause->Tag = AbsAppl((CELL *)FunctorDBRef); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xl); @@ -819,7 +819,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.xl.x)) { clause->Tag = AbsAppl((CELL *)FunctorDouble); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xl); @@ -831,7 +831,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.xl.x)) { clause->Tag = (_integer+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xl); @@ -850,7 +850,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.xl.x)) { clause->Tag = (_number+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xl); @@ -862,7 +862,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.xl.x)) { clause->Tag = (_primitive+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xl); @@ -874,7 +874,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.xl.x)) { clause->Tag = (_var+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xl); @@ -882,7 +882,7 @@ case _get_string: if (is_regcopy(myregs, nofregs, cl->u.xu.x)) { clause->Tag = AbsAppl((CELL *)FunctorString); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xu); @@ -904,7 +904,7 @@ case _gl_void_valx: if (is_regcopy(myregs, nofregs, cl->u.xx.xl)) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = cl; + clause->ucd.WorkPC = cl; return; } cl = NEXTOP(cl,xx); @@ -912,7 +912,7 @@ case _gl_void_varx: if (is_regcopy(myregs, nofregs, cl->u.xx.xl)) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = cl; + clause->ucd.WorkPC = cl; return; } if (!(nofregs = delete_regcopy(myregs, nofregs, cl->u.xx.xr))) { @@ -924,7 +924,7 @@ case _glist_valx: if (is_regcopy(myregs, nofregs, cl->u.xx.xl)) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = cl; + clause->ucd.WorkPC = cl; return; } cl = NEXTOP(cl,xx); @@ -1160,7 +1160,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.yl.y)) { clause->Tag = (_atom+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,yl); @@ -1172,7 +1172,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.yl.y)) { clause->Tag = (_atomic+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,yl); @@ -1184,7 +1184,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.yl.y)) { clause->Tag = (_compound+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,yl); @@ -1196,7 +1196,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.yl.y)) { clause->Tag = AbsAppl((CELL *)FunctorDBRef); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,yl); @@ -1208,7 +1208,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.yl.y)) { clause->Tag = AbsAppl((CELL *)FunctorDouble); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,yl); @@ -1220,7 +1220,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.yl.y)) { clause->Tag = (_integer+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,yl); @@ -1239,7 +1239,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.yl.y)) { clause->Tag = (_number+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,yl); @@ -1251,7 +1251,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.yl.y)) { clause->Tag = (_primitive+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,yl); @@ -1263,7 +1263,7 @@ } if (is_regcopy(myregs, nofregs, cl->u.yl.y)) { clause->Tag = (_var+1)*sizeof(CELL); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,yl); @@ -1285,7 +1285,7 @@ case _gl_void_valy: if (is_regcopy(myregs, nofregs, cl->u.yx.y)) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = cl; + clause->ucd.WorkPC = cl; return; } cl = NEXTOP(cl,yx); @@ -1293,7 +1293,7 @@ case _gl_void_vary: if (is_regcopy(myregs, nofregs, cl->u.yx.y)) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = cl; + clause->ucd.WorkPC = cl; return; } if (!(nofregs = delete_regcopy(myregs, nofregs, cl->u.yx.y))) { @@ -1305,7 +1305,7 @@ case _glist_valy: if (is_regcopy(myregs, nofregs, cl->u.yx.x)) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = cl; + clause->ucd.WorkPC = cl; return; } cl = NEXTOP(cl,yx); diff --git a/H/headclause.h b/H/headclause.h index e92dfa00c..23b42888f 100644 --- a/H/headclause.h +++ b/H/headclause.h @@ -17,7 +17,7 @@ if (IsApplTerm(cl->u.cc.c1)) { CELL *pt = RepAppl(cl->u.cc.c1); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cc.c1; + clause->ucd.t_ptr = cl->u.cc.c1; } else clause->Tag = cl->u.cc.c1; return; @@ -26,7 +26,7 @@ if (IsApplTerm(cl->u.cc.c2)) { CELL *pt = RepAppl(cl->u.cc.c2); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cc.c2; + clause->ucd.t_ptr = cl->u.cc.c2; } else clause->Tag = cl->u.cc.c2; return; @@ -38,7 +38,7 @@ if (IsApplTerm(cl->u.ccc.c1)) { CELL *pt = RepAppl(cl->u.ccc.c1); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccc.c1; + clause->ucd.t_ptr = cl->u.ccc.c1; } else clause->Tag = cl->u.ccc.c1; return; @@ -47,7 +47,7 @@ if (IsApplTerm(cl->u.ccc.c2)) { CELL *pt = RepAppl(cl->u.ccc.c2); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccc.c2; + clause->ucd.t_ptr = cl->u.ccc.c2; } else clause->Tag = cl->u.ccc.c2; return; @@ -56,7 +56,7 @@ if (IsApplTerm(cl->u.ccc.c3)) { CELL *pt = RepAppl(cl->u.ccc.c3); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccc.c3; + clause->ucd.t_ptr = cl->u.ccc.c3; } else clause->Tag = cl->u.ccc.c3; return; @@ -68,7 +68,7 @@ if (IsApplTerm(cl->u.cccc.c1)) { CELL *pt = RepAppl(cl->u.cccc.c1); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccc.c1; + clause->ucd.t_ptr = cl->u.cccc.c1; } else clause->Tag = cl->u.cccc.c1; return; @@ -77,7 +77,7 @@ if (IsApplTerm(cl->u.cccc.c2)) { CELL *pt = RepAppl(cl->u.cccc.c2); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccc.c2; + clause->ucd.t_ptr = cl->u.cccc.c2; } else clause->Tag = cl->u.cccc.c2; return; @@ -86,7 +86,7 @@ if (IsApplTerm(cl->u.cccc.c3)) { CELL *pt = RepAppl(cl->u.cccc.c3); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccc.c3; + clause->ucd.t_ptr = cl->u.cccc.c3; } else clause->Tag = cl->u.cccc.c3; return; @@ -95,7 +95,7 @@ if (IsApplTerm(cl->u.cccc.c4)) { CELL *pt = RepAppl(cl->u.cccc.c4); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccc.c4; + clause->ucd.t_ptr = cl->u.cccc.c4; } else clause->Tag = cl->u.cccc.c4; return; @@ -107,7 +107,7 @@ if (IsApplTerm(cl->u.ccccc.c1)) { CELL *pt = RepAppl(cl->u.ccccc.c1); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccccc.c1; + clause->ucd.t_ptr = cl->u.ccccc.c1; } else clause->Tag = cl->u.ccccc.c1; return; @@ -116,7 +116,7 @@ if (IsApplTerm(cl->u.ccccc.c2)) { CELL *pt = RepAppl(cl->u.ccccc.c2); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccccc.c2; + clause->ucd.t_ptr = cl->u.ccccc.c2; } else clause->Tag = cl->u.ccccc.c2; return; @@ -125,7 +125,7 @@ if (IsApplTerm(cl->u.ccccc.c3)) { CELL *pt = RepAppl(cl->u.ccccc.c3); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccccc.c3; + clause->ucd.t_ptr = cl->u.ccccc.c3; } else clause->Tag = cl->u.ccccc.c3; return; @@ -134,7 +134,7 @@ if (IsApplTerm(cl->u.ccccc.c4)) { CELL *pt = RepAppl(cl->u.ccccc.c4); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccccc.c4; + clause->ucd.t_ptr = cl->u.ccccc.c4; } else clause->Tag = cl->u.ccccc.c4; return; @@ -143,7 +143,7 @@ if (IsApplTerm(cl->u.ccccc.c5)) { CELL *pt = RepAppl(cl->u.ccccc.c5); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.ccccc.c5; + clause->ucd.t_ptr = cl->u.ccccc.c5; } else clause->Tag = cl->u.ccccc.c5; return; @@ -155,7 +155,7 @@ if (IsApplTerm(cl->u.cccccc.c1)) { CELL *pt = RepAppl(cl->u.cccccc.c1); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c1; + clause->ucd.t_ptr = cl->u.cccccc.c1; } else clause->Tag = cl->u.cccccc.c1; return; @@ -164,7 +164,7 @@ if (IsApplTerm(cl->u.cccccc.c2)) { CELL *pt = RepAppl(cl->u.cccccc.c2); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c2; + clause->ucd.t_ptr = cl->u.cccccc.c2; } else clause->Tag = cl->u.cccccc.c2; return; @@ -173,7 +173,7 @@ if (IsApplTerm(cl->u.cccccc.c3)) { CELL *pt = RepAppl(cl->u.cccccc.c3); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c3; + clause->ucd.t_ptr = cl->u.cccccc.c3; } else clause->Tag = cl->u.cccccc.c3; return; @@ -182,7 +182,7 @@ if (IsApplTerm(cl->u.cccccc.c4)) { CELL *pt = RepAppl(cl->u.cccccc.c4); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c4; + clause->ucd.t_ptr = cl->u.cccccc.c4; } else clause->Tag = cl->u.cccccc.c4; return; @@ -191,7 +191,7 @@ if (IsApplTerm(cl->u.cccccc.c5)) { CELL *pt = RepAppl(cl->u.cccccc.c5); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c5; + clause->ucd.t_ptr = cl->u.cccccc.c5; } else clause->Tag = cl->u.cccccc.c5; return; @@ -200,7 +200,7 @@ if (IsApplTerm(cl->u.cccccc.c6)) { CELL *pt = RepAppl(cl->u.cccccc.c6); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.cccccc.c6; + clause->ucd.t_ptr = cl->u.cccccc.c6; } else clause->Tag = cl->u.cccccc.c6; return; @@ -222,15 +222,15 @@ clause->Tag = AbsAppl((CELL *)pt[0]); if (IsExtensionFunctor(FunctorOfTerm(t))) { - clause->u.t_ptr = t; + clause->ucd.t_ptr = t; } else { - clause->u.c_sreg = pt; + clause->ucd.c_sreg = pt; } } else if (IsPairTerm(t)) { CELL *pt = RepPair(t); clause->Tag = AbsPair(NULL); - clause->u.c_sreg = pt-1; + clause->ucd.c_sreg = pt-1; } else { clause->Tag = t; } @@ -257,15 +257,15 @@ clause->Tag = AbsAppl((CELL *)pt[0]); if (IsExtensionFunctor(FunctorOfTerm(t))) { - clause->u.t_ptr = t; + clause->ucd.t_ptr = t; } else { - clause->u.c_sreg = pt; + clause->ucd.c_sreg = pt; } } else if (IsPairTerm(t)) { CELL *pt = RepPair(t); clause->Tag = AbsPair(NULL); - clause->u.c_sreg = pt-1; + clause->ucd.c_sreg = pt-1; } else { clause->Tag = t; } @@ -560,7 +560,7 @@ case _get_list: if (iarg == cl->u.x.x) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = NEXTOP(cl,x); + clause->ucd.WorkPC = NEXTOP(cl,x); return; } cl = NEXTOP(cl,x); @@ -582,7 +582,7 @@ case _get_bigint: if (iarg == cl->u.xN.x) { clause->Tag = AbsAppl((CELL *)FunctorBigInt); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xN); @@ -599,7 +599,7 @@ if (IsApplTerm(cl->u.xc.c)) { CELL *pt = RepAppl(cl->u.xc.c); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = cl->u.xc.c; + clause->ucd.t_ptr = cl->u.xc.c; } else clause->Tag = cl->u.xc.c; return; @@ -616,7 +616,7 @@ case _get_float: if (iarg == cl->u.xd.x) { clause->Tag = AbsAppl((CELL *)FunctorDouble); - clause->u.t_ptr = AbsAppl(cl->u.xd.d); + clause->ucd.t_ptr = AbsAppl(cl->u.xd.d); return; } cl = NEXTOP(cl,xd); @@ -631,7 +631,7 @@ case _get_struct: if (iarg == cl->u.xfa.x) { clause->Tag = AbsAppl((CELL *)cl->u.xfa.f); - clause->u.WorkPC = NEXTOP(cl,xfa); + clause->ucd.WorkPC = NEXTOP(cl,xfa); return; } cl = NEXTOP(cl,xfa); @@ -646,7 +646,7 @@ case _get_longint: if (iarg == cl->u.xi.x) { clause->Tag = AbsAppl((CELL *)FunctorLongInt); - clause->u.t_ptr = AbsAppl(cl->u.xi.i); + clause->ucd.t_ptr = AbsAppl(cl->u.xi.i); return; } cl = NEXTOP(cl,xi); @@ -661,7 +661,7 @@ case _get_string: if (iarg == cl->u.xu.x) { clause->Tag = AbsAppl((CELL *)FunctorString); - clause->u.t_ptr = (CELL)NULL; + clause->ucd.t_ptr = (CELL)NULL; return; } cl = NEXTOP(cl,xu); @@ -685,7 +685,7 @@ case _gl_void_valx: if (iarg == cl->u.xx.xl) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = cl; + clause->ucd.WorkPC = cl; return; } cl = NEXTOP(cl,xx); @@ -693,7 +693,7 @@ case _gl_void_varx: if (iarg == cl->u.xx.xl) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = cl; + clause->ucd.WorkPC = cl; return; } if (iarg == cl->u.xx.xr) { @@ -705,7 +705,7 @@ case _glist_valx: if (iarg == cl->u.xx.xl) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = cl; + clause->ucd.WorkPC = cl; return; } cl = NEXTOP(cl,xx); @@ -765,7 +765,7 @@ case _glist_valy: if (iarg == cl->u.yx.x) { clause->Tag = AbsPair(NULL); - clause->u.WorkPC = cl; + clause->ucd.WorkPC = cl; return; } cl = NEXTOP(cl,yx); diff --git a/H/index.h b/H/index.h index afdafe372..32badf1e3 100644 --- a/H/index.h +++ b/H/index.h @@ -47,7 +47,7 @@ typedef struct StructClauseDef { yamop *WorkPC; /* start of code for clause */ Term t_ptr; CELL *c_sreg; - } u; + } ucd; } ClauseDef; @@ -70,7 +70,7 @@ typedef struct { union { UInt Label; yamop *labp; - } u; + } u_a; } AtomSwiEntry; /* switch_on_func */ @@ -79,7 +79,7 @@ typedef struct { union { UInt Label; yamop *labp; - } u; + } u_f; } FuncSwiEntry; /* switch_on_type */ @@ -116,7 +116,7 @@ typedef struct { ClauseUnion *block; yamop **entry_code; } cle; - } u; + } uip; } path_stack_entry; #define MAX_ISTACK_DEPTH 32 diff --git a/H/qly.h b/H/qly.h index cacaa8acc..00fc6d268 100644 --- a/H/qly.h +++ b/H/qly.h @@ -56,7 +56,7 @@ typedef struct export_pred_entry_hash_entry_struct { union { Functor f; Atom a; - } u; + } u_af; Atom module; UInt arity; } export_pred_entry_hash_entry_t; @@ -106,8 +106,6 @@ typedef enum { #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 RCHECK(F) if(!(F)) { QLYR_ERROR(MISMATCH); return; } diff --git a/misc/buildops b/misc/buildops index 812843dd5..461880dea 100644 --- a/misc/buildops +++ b/misc/buildops @@ -547,12 +547,12 @@ dump_action(logical, _, _, L) :- CELL *pt = RepAppl(t); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.c_sreg = pt; + clause->ucd.c_sreg = pt; } else if (IsPairTerm(t)) { CELL *pt = RepPair(t); clause->Tag = AbsPair(NULL); - clause->u.c_sreg = pt-1; + clause->ucd.c_sreg = pt-1; } else { clause->Tag = t; } @@ -570,20 +570,20 @@ check_atom_dbref(Constant, What, ExtraAction) :- format_to_chars("if (IsApplTerm(~s)) { CELL *pt = RepAppl(~s); clause->Tag = AbsAppl((CELL *)pt[0]); - clause->u.t_ptr = ~s; + clause->ucd.t_ptr = ~s; } else ",[What,What,What], ExtraAction). check_atom_dbref(_, _, ""). handle_bind_extra([], _, ""). 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) :- - 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) :- - 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) :- - format_to_chars("~n clause->u.WorkPC = cl;",[],S). + format_to_chars("~n clause->ucd.WorkPC = cl;",[],S). handle_constant(What, T, Const) :- What = [C|_], @@ -697,15 +697,15 @@ dump_head_action(logical, _, _, L) :- clause->Tag = AbsAppl((CELL *)pt[0]); if (IsExtensionFunctor(FunctorOfTerm(t))) { - clause->u.t_ptr = t; + clause->ucd.t_ptr = t; } else { - clause->u.c_sreg = pt; + clause->ucd.c_sreg = pt; } } else if (IsPairTerm(t)) { CELL *pt = RepPair(t); clause->Tag = AbsPair(NULL); - clause->u.c_sreg = pt-1; + clause->ucd.c_sreg = pt-1; } else { clause->Tag = t; }